xtz 4 年之前
当前提交
f03bd33297
共有 97 个文件被更改,包括 9218 次插入0 次删除
  1. 二进制
      .DS_Store
  2. 141 0
      api/api.js
  3. 59 0
      app.js
  4. 23 0
      app.json
  5. 664 0
      app.wxss
  6. 二进制
      imgs/act-tag.png
  7. 二进制
      imgs/activity-act.png
  8. 二进制
      imgs/activity.png
  9. 二进制
      imgs/add-tidings.png
  10. 二进制
      imgs/banner-sample.jpg
  11. 二进制
      imgs/clock-attr.png
  12. 二进制
      imgs/close-tidings.png
  13. 二进制
      imgs/collection-checked.png
  14. 二进制
      imgs/collection.png
  15. 二进制
      imgs/comments.png
  16. 二进制
      imgs/community-act.png
  17. 二进制
      imgs/community.png
  18. 二进制
      imgs/favorite-checked.png
  19. 二进制
      imgs/favorite.png
  20. 二进制
      imgs/female.png
  21. 二进制
      imgs/home-act.png
  22. 二进制
      imgs/home.png
  23. 二进制
      imgs/input.png
  24. 二进制
      imgs/male.png
  25. 二进制
      imgs/mine-act.png
  26. 二进制
      imgs/mine-bg.png
  27. 二进制
      imgs/mine.png
  28. 二进制
      imgs/partner-sample.jpg
  29. 二进制
      imgs/picture.png
  30. 二进制
      imgs/planet-done.png
  31. 二进制
      imgs/radio-checked.png
  32. 二进制
      imgs/radio.png
  33. 二进制
      imgs/sample-avatar.png
  34. 二进制
      imgs/share-online.jpg
  35. 二进制
      imgs/share2.jpg
  36. 二进制
      imgs/video-play.png
  37. 二进制
      imgs/video.png
  38. 1226 0
      lib/style/icon.wxss
  39. 3941 0
      lib/style/main.wxss
  40. 二进制
      pages/.DS_Store
  41. 二进制
      pages/activities/.DS_Store
  42. 二进制
      pages/activities/activityDetails/.DS_Store
  43. 34 0
      pages/activities/activityDetails/activityDetails.js
  44. 4 0
      pages/activities/activityDetails/activityDetails.json
  45. 37 0
      pages/activities/activityDetails/activityDetails.wxml
  46. 63 0
      pages/activities/activityDetails/activityDetails.wxss
  47. 91 0
      pages/activities/register/register.js
  48. 4 0
      pages/activities/register/register.json
  49. 67 0
      pages/activities/register/register.wxml
  50. 42 0
      pages/activities/register/register.wxss
  51. 9 0
      pages/activities/registerDone/registerDone.js
  52. 4 0
      pages/activities/registerDone/registerDone.json
  53. 9 0
      pages/activities/registerDone/registerDone.wxml
  54. 23 0
      pages/activities/registerDone/registerDone.wxss
  55. 139 0
      pages/community/articleDetails/articleDetails.js
  56. 4 0
      pages/community/articleDetails/articleDetails.json
  57. 62 0
      pages/community/articleDetails/articleDetails.wxml
  58. 65 0
      pages/community/articleDetails/articleDetails.wxss
  59. 70 0
      pages/community/uploadPics/uploadPics.js
  60. 4 0
      pages/community/uploadPics/uploadPics.json
  61. 30 0
      pages/community/uploadPics/uploadPics.wxml
  62. 31 0
      pages/community/uploadPics/uploadPics.wxss
  63. 110 0
      pages/community/uploadVideos/uploadVideos.js
  64. 4 0
      pages/community/uploadVideos/uploadVideos.json
  65. 43 0
      pages/community/uploadVideos/uploadVideos.wxml
  66. 31 0
      pages/community/uploadVideos/uploadVideos.wxss
  67. 121 0
      pages/community/videoDetails/videoDetails.js
  68. 4 0
      pages/community/videoDetails/videoDetails.json
  69. 54 0
      pages/community/videoDetails/videoDetails.wxml
  70. 87 0
      pages/community/videoDetails/videoDetails.wxss
  71. 二进制
      pages/home/.DS_Store
  72. 504 0
      pages/home/home.js
  73. 5 0
      pages/home/home.json
  74. 306 0
      pages/home/home.wxml
  75. 380 0
      pages/home/home.wxss
  76. 43 0
      pages/hotnews/hotnews/hotnews.js
  77. 4 0
      pages/hotnews/hotnews/hotnews.json
  78. 17 0
      pages/hotnews/hotnews/hotnews.wxml
  79. 58 0
      pages/hotnews/hotnews/hotnews.wxss
  80. 19 0
      pages/hotnews/newsDetails/newsDetails.js
  81. 4 0
      pages/hotnews/newsDetails/newsDetails.json
  82. 7 0
      pages/hotnews/newsDetails/newsDetails.wxml
  83. 13 0
      pages/hotnews/newsDetails/newsDetails.wxss
  84. 二进制
      pages/mine/.DS_Store
  85. 二进制
      pages/mine/myinfo/.DS_Store
  86. 88 0
      pages/mine/myinfo/edit/edit.js
  87. 4 0
      pages/mine/myinfo/edit/edit.json
  88. 63 0
      pages/mine/myinfo/edit/edit.wxml
  89. 67 0
      pages/mine/myinfo/edit/edit.wxss
  90. 57 0
      pages/mine/register/register.js
  91. 4 0
      pages/mine/register/register.json
  92. 48 0
      pages/mine/register/register.wxml
  93. 44 0
      pages/mine/register/register.wxss
  94. 61 0
      project.config.json
  95. 7 0
      sitemap.json
  96. 二进制
      utils/.DS_Store
  97. 115 0
      utils/http.js

二进制
.DS_Store


+ 141 - 0
api/api.js

@@ -0,0 +1,141 @@
+import {
+  post,
+  upload
+} from '../utils/http.js';
+
+const resolver = function(cb) {
+  return {
+    done(r) {
+      console.log(r)
+      if (r.state != 100) {
+        return wx.showToast({
+          icon: 'loading',
+          title: r.message
+        })
+      }
+      // console.log('api done:', r.data)
+      cb && cb(r)
+    },
+    fail(e) {
+      console.error('api fail:', e)
+      wx.showToast({
+        icon: 'loading',
+        title: '系统繁忙!'
+      })
+    }
+  }
+}
+
+module.exports = {
+  ilogin: {
+    loadAT(d, cb) {
+      post('/mWx/getUserInfo', d).then(resolver(cb).done).catch(resolver(cb).fail)
+    },
+    loadUserinfo(d, cb) {
+      post('small/save_wx_userinfo', d).then(resolver(cb).done).catch(resolver(cb).fail)
+    },
+    loadConfig(d ,cb) {
+      post('small/siteinfo', d).then(resolver(cb).done).catch(resolver(cb).fail)
+    }
+  },
+  ihome: {
+    loadSponsors(d,cb) {
+      post('small/zanzhushang_list',d).then(resolver(cb).done).catch(resolver(cb).fail)
+    },
+    loadBanners(d,cb) {
+      post('/home/queryMobileBannerList',d).then(resolver(cb).done).catch(resolver(cb).fail)
+    },
+    loadPartners(d,cb) {
+      post('/home/queryMobilePartnerList',d).then(resolver(cb).done).catch(resolver(cb).fail)
+    },
+    loadHotnews(d,cb) {
+      post('/home/queryMobileHeadlineList',d).then(resolver(cb).done).catch(resolver(cb).fail)
+    },
+  },
+  ihotnews: {
+    loadNews(d, cb) {
+      post('small/news_list', d).then(resolver(cb).done).catch(resolver(cb).fail)
+    },
+    loadNewsdetails(d, cb) {
+      post('small/news_detail', d).then(resolver(cb).done).catch(resolver(cb).fail)
+    },
+  },
+  iactivity: {
+    loadActivities(d, cb) {
+      post('/mActivity/searchActivityList', d).then(resolver(cb).done).catch(resolver(cb).fail)
+    },
+    loadActivitydetails(d, cb) {
+      post('/mActivity/searchActivityById', d).then(resolver(cb).done).catch(resolver(cb).fail)
+    },
+    loadJoinin(d, cb) {
+      post('small/event_attend', d).then(resolver(cb).done).catch(resolver(cb).fail)
+    },
+  },
+  icommunity: {
+    uploadPics(f, cb) {
+      upload('/mUpload/uploadImg', {
+      }, f).then(resolver(cb).done).catch(resolver(cb).fail)
+    },
+    uploadVideos(f, cb) {
+      upload('/mUpload/uploadVideo', {
+      }, f).then(resolver(cb).done).catch(resolver(cb).fail)
+    },
+    loadPubArticle(d, cb) {
+      post('/mArticle/saveArticle', d).then(resolver(cb).done).catch(resolver(cb).fail)
+    },
+    loadDeleteArticle(d, cb) {
+      post('/mArticle/deleteMyArticle', d).then(resolver(cb).done).catch(resolver(cb).fail)
+    },
+    loadDeleteCollect(d, cb) {
+      post('/collect/deleteMyCollect', d).then(resolver(cb).done).catch(resolver(cb).fail)
+    },
+    loadArticles(d, cb) {
+      post('/mArticle/searchArticleList', d).then(resolver(cb).done).catch(resolver(cb).fail)
+    },
+    loadAddArticle(d, cb) {
+      post('/collect/addCollect', d).then(resolver(cb).done).catch(resolver(cb).fail)
+    },
+    loadAddArticlefavor(d, cb) {
+      post('small/space_zan_add', d).then(resolver(cb).done).catch(resolver(cb).fail)
+    },
+    loadRemoveArticlefavor(d, cb) {
+      post('small/space_zan_del', d).then(resolver(cb).done).catch(resolver(cb).fail)
+    },
+    loadArticledetails(d, cb) {
+      post('/mArticle/searchArticleById', d).then(resolver(cb).done).catch(resolver(cb).fail)
+    },
+    loadArticlecomments(d, cb, hideLoading) {
+      post('small/space_comment_list', d, hideLoading).then(resolver(cb).done).catch(resolver(cb).fail)
+    },
+    loadAddArticlecomment(d, cb) {
+      post('small/space_comment_add', d).then(resolver(cb).done).catch(resolver(cb).fail)
+    },
+    loadArticleCollectionToggle(d, cb) {
+      post('small/space_follow_opert', d).then(resolver(cb).done).catch(resolver(cb).fail)
+    },
+  },
+  imine: {
+    loadMyPubarticles(d, cb) {
+      post('/mArticle/searchMyArticle', d).then(resolver(cb).done).catch(resolver(cb).fail)
+    },
+    loadMyCollectedarticles(d, cb) {
+      post('/collect/searchCollectList', d).then(resolver(cb).done).catch(resolver(cb).fail)
+    },
+    loadMyComments(d, cb) {
+      post('/mComment/queryMyComment', d).then(resolver(cb).done).catch(resolver(cb).fail)
+    },
+    loadMyActivities(d, cb) {
+      post('/mActivity/myApplyActivities', d).then(resolver(cb).done).catch(resolver(cb).fail)
+    },
+    loadMyinformation(d,cb) {
+      post('/user/queryUserById',d).then(resolver(cb).done).catch(resolver(cb).fail)
+    },
+    loadEditMyinformation(d, cb) {
+      post('small/userinfo_modify', d).then(resolver(cb).done).catch(resolver(cb).fail)
+    },
+    loadReg(d, cb) {
+      post('small/userinfo_reg', d).then(resolver(cb).done).catch(resolver(cb).fail)
+    },
+  }
+
+}

+ 59 - 0
app.js

@@ -0,0 +1,59 @@
+App({
+  onLaunch() {
+    Object.assign(Date.prototype, {
+      getDateName(realtime) {
+        let td = new Date(),
+          d = new Date(this.getFullYear(), this.getMonth(), this.getDate()),
+          n
+        td = new Date(td.getFullYear(), td.getMonth(), td.getDate())
+        n = (d - td) / 1000 / 60 / 60 / 24;
+        if (n < -2) {
+          return -n + '天前'
+        }
+        if (n < -1) {
+          return '前天'
+        }
+        if (n < 0) {
+          return '昨天'
+        }
+        if (n == 0) {
+          return realtime ? this.format(realtime) : '今天'
+        }
+        if (n < 2) {
+          return '明天'
+        }
+        if (n < 3) {
+          return '后天'
+        }
+        return n + '天后'
+      },
+      format(fmt) { //author: meizz   
+        var o = {
+          "M+": this.getMonth() + 1, //月份   
+          "d+": this.getDate(), //日   
+          "h+": this.getHours(), //小时   
+          "m+": this.getMinutes(), //分   
+          "s+": this.getSeconds(), //秒   
+          "q+": Math.floor((this.getMonth() + 3) / 3), //季度   
+          "S": this.getMilliseconds() //毫秒   
+        };
+        if (/(y+)/.test(fmt))
+          fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
+        for (var k in o)
+          if (new RegExp("(" + k + ")").test(fmt))
+            fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
+        return fmt;
+      }
+    })
+
+  },
+  data: {
+    nav: {}
+  },
+  config: {},
+  globalData: {
+    userInfo: null,
+    appid: 'wx4398d60942bc7710',
+    imgUrl: 'http://cdn.info666.com/'
+  }
+})

+ 23 - 0
app.json

@@ -0,0 +1,23 @@
+{
+  "pages": [
+    "pages/home/home",
+    "pages/mine/register/register",
+    "pages/mine/myinfo/edit/edit",
+    "pages/activities/register/register",
+    "pages/activities/registerDone/registerDone",
+    "pages/activities/activityDetails/activityDetails",
+    "pages/hotnews/hotnews/hotnews",
+    "pages/hotnews/newsDetails/newsDetails",
+    "pages/community/uploadPics/uploadPics",
+    "pages/community/uploadVideos/uploadVideos",
+    "pages/community/articleDetails/articleDetails",
+    "pages/community/videoDetails/videoDetails"
+  ],
+  "window": {
+    "backgroundTextStyle": "light",
+    "navigationBarBackgroundColor": "#fff",
+    "navigationBarTitleText": "冰雪小程序",
+    "navigationBarTextStyle": "black"
+  },
+  "sitemapLocation": "sitemap.json"
+}

+ 664 - 0
app.wxss

@@ -0,0 +1,664 @@
+@import "lib/style/icon.wxss";
+
+/* init tags */
+
+page {
+  /* size */
+  --sizehgr: 48rpx;
+  --sizehg: 44rpx;
+  --sizelgr: 40rpx;
+  --sizelg: 36rpx;
+  --sizenor: 30rpx;
+  --sizesm: 28rpx;
+  --sizesmr: 24rpx;
+  --sizetn: 20rpx;
+  --sizetnr: 16rpx;
+  /* color */
+  --tit: #666;
+  --theme: #e51b35;
+  --dark: #333;
+  --darkgray: #666;
+  --lightgray: #999;
+  --bg: #e6e6e6;
+  --fg: #fff;
+  --raduis: 10rpx;
+  --wrp: 20rpx;
+  --txtsub: 0.88em;
+  --themecolor: #002063;
+  --themeborcolor: #e6e6e6;
+  --themebor: 1rpx solid var(--themeborcolor);
+  --themerad: 10rpx;
+  --themedanger: #e6233c;
+  --colorattr: #036eb8;
+  --colorp: #9d9d9d;
+  --shadow: 0 2px 4px #666;
+  width: 100vw;
+  /* height: 100vh; */
+  color: var(--dark);
+  font-size: var(--sizenor);
+  overflow-x: hidden;
+  background-color: var(--themeborcolor);
+}
+
+view, page {
+  box-sizing: border-box;
+}
+
+.both {
+  margin: 0 10rpx;
+}
+
+button {
+  margin-left: 0;
+  margin-right: 0;
+  font-size: inherit;
+  line-height: normal;
+  padding: 12rpx 32rpx;
+  background-color: transparent;
+}
+
+.button-hover {
+  background-color: transparent;
+}
+
+image {
+  display: block;
+}
+
+textarea {
+  width: 100%
+}
+
+/*****************************/
+
+/******* embellishment *******/
+
+.assetsbg {
+  /* Safari 5.1 - 6.0 */
+  background: -webkit-linear-gradient(left, #ff4a76, #ff9605);
+  /* Opera 11.1 - 12.0  */
+  background: -o-linear-gradient(left, #ff4a76, #ff9605);
+  /* Firefox 3.6 - 15 */
+  background: -moz-linear-gradient(left, #ff4a76, #ff9605);
+  background: linear-gradient(left, #ff4a76, #ff9605);
+}
+
+.shadow {
+  box-shadow: var(--shadow);
+}
+
+/* 反色 anti-color */
+
+.acolorw {
+  color: #fff;
+}
+
+.subtxt {
+  color: darkgray;
+}
+
+.txtdanger {
+  color: var(--theme);
+}
+
+.themerad {
+  border-radius: var(--raduis)
+}
+
+/* 不换行 */
+
+.nowrap, .nowrap-ell {
+  white-space: nowrap;
+}
+
+.nowrap-ell, .txtelldup {
+  text-overflow: ellipsis;
+}
+
+.txtelldup {
+  display: -webkit-box;
+  -webkit-line-clamp: 2;
+  -webkit-box-orient: vertical
+}
+
+.txtt, .txty {
+  margin-top: .4em;
+}
+
+.txtb, .txty {
+  margin-bottom: .4em;
+}
+
+.txtl, .txtx {
+  margin-left: .4em;
+}
+
+.txtr, .txtx {
+  margin-right: .4em
+}
+
+/* 文字 */
+
+.txtanti {
+  color: #fff;
+}
+
+.txtcenter {
+  text-align: center;
+}
+
+.txtbold {
+  font-weight: bold;
+}
+
+.txtpro {
+  font-size: 1.12em;
+}
+
+.txtsub {
+  font-size: 0.88em;
+}
+
+.txthgr {
+  font-size: var(--sizehgr);
+}
+
+.txthg {
+  font-size: var(--sizehg);
+}
+
+.txtlgr {
+  font-size: var(--sizelgr);
+}
+
+.txt-large, .txtlg, .txt-opt {
+  font-size: var(--sizelg);
+}
+
+.txt-normal, .txt {
+  font-size: var(--sizenor);
+}
+
+.txt-small, .txtsm {
+  font-size: var(--sizesm);
+}
+
+.txt-smaller, .txtsmr {
+  font-size: var(--sizesmr);
+}
+
+.txttn, .txttn {
+  font-size: var(--sizetn);
+}
+
+.txtbold {
+  font-weight: bold;
+}
+
+.txt-opt, .txt-highlight, .txtboldr {
+  font-weight: bolder;
+}
+
+.txt-lighter {
+  font-weight: lighter;
+}
+
+/* 文字状态 */
+
+.active, .txt-highlight, .discounts {
+  color: var(--theme);
+}
+
+.note {
+  color: var(--gray);
+}
+
+.inactive, .notetit {
+  color: #666;
+}
+
+.common {
+  color: initial;
+}
+
+/* 背景色,前景色 */
+
+.bg {
+  background-color: var(--bg);
+}
+
+.fg {
+  background-color: var(--fg);
+}
+
+/* cover */
+
+.cover {
+  background-color: rgba(0, 0, 0, 0.8);
+}
+
+.danger {
+  border-color: red;
+}
+
+/* 超链接颜色 */
+
+.hyperlink {
+  color: #00f;
+}
+
+/* 删除线 */
+
+.s {
+  text-decoration-line: line-through;
+}
+
+/* 图标大小 */
+
+.icon-huge image, .temp-box, .imghg image, .boxhg {
+  width: 180rpx;
+  height: 180rpx;
+}
+
+.icon-larger image, .imglgr image, .boxlgr {
+  width: 160rpx;
+  height: 160rpx;
+}
+
+.icon-head, .icon-large image, .imglg image, .boxlg {
+  width: 140rpx;
+  height: 140rpx;
+}
+
+.icon, .icon-normal image, .img image, .box {
+  width: 44rpx;
+  height: 44rpx;
+}
+
+.icon-common image, .icon-small image, .imgsm image, .boxsm {
+  width: 32rpx;
+  height: 32rpx;
+}
+
+.icon-smaller image, .imgsmr image, .boxsmr {
+  width: 28rpx;
+  height: 28rpx;
+}
+
+/**********************/
+
+/******* layout *******/
+
+/* 盒子 */
+
+.boxpro {
+  height: 1.12em !important;
+  width: 1.12em !important;
+}
+
+.boxsub {
+  height: 0.88em !important;
+  width: 0.88em !important;
+}
+
+/* 定位 */
+
+.posabswrp, .posrel {
+  position: relative;
+}
+
+.posabs {
+  position: absolute;
+}
+
+.posfix {
+  position: fixed;
+}
+
+::-webkit-scrollbar, .hide {
+  display: none;
+}
+
+/* 圆 */
+
+.circle {
+  border-radius: 50%;
+}
+
+/* 填充圆 */
+
+.circle .filled, .full, .col.scroll, .fully {
+  height: 100%;
+}
+
+.circle .filled, .full, .row.scroll, .fullx {
+  width: 100%;
+}
+
+/* 行布局,列布局 */
+
+/* lv : listview */
+
+.row, .col, .lv, .lv .li {
+  display: -webkit-box;
+  display: flex;
+}
+
+.col {
+  flex-direction: column;
+}
+
+.col.reverse {
+  flex-direction: column-reverse;
+}
+
+.row.wrap, .col.wrap {
+  flex-wrap: wrap;
+}
+
+/* 弹性格,收缩格,扩展格 */
+
+.flexible, .shrinkable, .growable {
+  min-width: 0;
+}
+
+.flexible {
+  flex: 1;
+  -prefix-box-flex: 1;
+  -webkit-box-flex: 1;
+  /*  -webkit-flex: 1; *//*  -moz-box-flex: 1; *//*  -ms-flex: 1; */
+}
+
+.shrinkable {
+  flex-shrink: 1;
+}
+
+.growable {
+  flex-grow: 1;
+}
+
+/* 内容包裹方式 包裹wrapped:wrp 插入inserted:in 结合combined:comb 单边side */
+
+/* 垂直方向vertical:ver,水平方向horizontal:hor */
+
+/* normal */
+
+.wrp, .inright, .inleft, .wrpy, .wrptop, .inbot {
+  padding-top: 24rpx;
+}
+
+.wrp, .inright, .intop, .wrpleft, .inbot {
+  padding-left: 24rpx;
+}
+
+.wrp, .inleft, .intop, .wrpright, .inbot {
+  padding-right: 24rpx;
+}
+
+.wrp, .inright, .inleft, .intop, .wrpy, .wrpbot {
+  padding-bottom: 24rpx;
+}
+
+/* little */
+
+.wrplit, .combverlit {
+  padding-top: 10rpx;
+}
+
+.wrplit, .combhorlit {
+  padding-left: 10rpx;
+}
+
+.wrplit, .combhorlit {
+  padding-right: 10rpx;
+}
+
+.wrplit, .combverlit, .sidebotlit {
+  padding-bottom: 10rpx;
+}
+
+.inrightlit {
+  padding: 10rpx 10rpx 10rpx 0;
+}
+
+.insertedbot-lit {
+  padding: 10rpx 10rpx 0;
+}
+
+/* large */
+
+.wrplg, .combinedhorlg, .combhorlg, .insertedtoplg, .intoplg, .inbotlg,
+.sideleftlg {
+  padding-left: 32rpx;
+}
+
+.wrplg, .combinedhorlg, .combhorlg, .insertedtoplg, .intoplg, .insertedleftlg,
+.inleftlg, .inbotlg, .wrprlg {
+  padding-right: 32rpx;
+}
+
+.wrplg, .combinedverlg, .combverlg, .insertedleftlg, .inleftlg, .inbotlg,
+.sidetoplg {
+  padding-top: 32rpx;
+}
+
+.wrplg, .combinedverlg, .combverlg, .insertedtoplg, .intoplg, .insertedleftlg,
+.inleftlg, .sidebotlg {
+  padding-bottom: 32rpx;
+}
+
+.wrplgr {
+  padding: 40rpx;
+}
+
+/* 垂直居中,水平居中,水平锤子居中,倒序 */
+
+.row.center, .col.center, .row.main-center, .row.maincenter, .col.main-center,
+.col.maincenter {
+  justify-content: center;
+}
+
+.row.center, .col.center, .row.cross-center, .row.crosscenter, .col.crosscenter,
+.col.cross-center {
+  align-items: center;
+}
+
+/* 两端对齐 */
+
+.between {
+  justify-content: space-between;
+}
+
+/* 平铺 */
+
+.around {
+  justify-content: space-around;
+}
+
+/* 左对齐 */
+
+.row.left {
+  justify-content: flex-start;
+}
+
+.col.left {
+  align-items: flex-start;
+}
+
+/* 右对齐 */
+
+.row.right {
+  justify-content: flex-end;
+}
+
+.col.right {
+  align-items: flex-end;
+}
+
+/* 底部对齐 */
+
+.row.bot {
+  align-items: flex-end;
+}
+
+.col.bot {
+  justify-content: flex-end;
+}
+
+/* 滚动 */
+
+.circle, .nowrap-ell, .scrolly, .noscroll {
+  overflow: hidden;
+}
+
+.scrolly {
+  overflow-y: scroll;
+}
+
+.row.scroll {
+  overflow-x: scroll;
+  overflow-y: hidden;
+}
+
+/* 边 bor */
+
+.bor, .bortop, .bory {
+  border-top: var(--themebor);
+}
+
+.bor, .borleft, .borx {
+  border-left: var(--themebor);
+}
+
+.bor, .borright, .borx {
+  border-right: var(--themebor);
+}
+
+.bor, .borbot, .bory {
+  border-bottom: var(--themebor);
+}
+
+/* 块间距 gap */
+
+/* less:ls */
+
+.gapbot, .gaprb, .gaplb, .gapy {
+  margin-bottom: 24rpx;
+}
+
+.gaptop, .gaprt, .gaplt, .gapy {
+  margin-top: 24rpx;
+}
+
+.gapleft, .gaplt, .gaplb{
+  margin-left: 24rpx;
+}
+
+.gapright, .gaprt, .gaprb {
+  margin-right: 24rpx;
+}
+
+.gaptoplit {
+  margin-top: 20rpx;
+}
+
+.gapbotlit {
+  margin-bottom: 20rpx;
+}
+
+.gapleftlit {
+  margin-left: 20rpx;
+}
+
+.gaprightlit {
+  margin-right: 20rpx;
+}
+
+.gaptopls {
+  margin-top: 10rpx;
+}
+
+.gapbotls {
+  margin-bottom: 10rpx;
+}
+
+.gapleftls {
+  margin-left: 10rpx;
+}
+
+.gaprightls {
+  margin-right: 10rpx;
+}
+
+/* 组件样式 */
+
+/* .banner {
+  margin: var(--wrp);
+  height: 20%;
+  overflow: hidden;
+  border-radius: var(--raduis);
+}
+
+.banner image {
+  width: 100%;
+}
+
+.personalPanel {
+  margin: var(--wrp);
+  padding: var(--wrp);
+  background-color: var(--fg);
+  border-radius: var(--raduis);
+}
+
+.personalPanel .avatar {
+  height: 112rpx;
+  width: 112rpx;
+  display: inline-block;
+  margin-right: var(--wrp);
+}
+
+.personalPanel .subinfo {
+  color: darkgray;
+  font-size: var(--sizesmr);
+}
+
+.article {
+  padding: var(--wrp);
+}
+
+.article .title {
+  font-weight: bold;
+}
+
+.article .more {
+  font-size: var(--txtsub);
+  color: darkgray;
+}
+
+.article .empty {
+  font-size: var(--sizesmr);
+  color: darkgray;
+  height: 420rpx;
+}
+
+.article .empty image {
+  width: 290rpx;
+  height: 190rpx;
+  margin-bottom: calc(var(--wrp) * 2);
+}
+
+.btngroup {
+}
+
+.btn {
+  color: #fff;
+  background-color: #e3485a;
+  width: 80%;
+  padding: var(--wrp);
+}
+
+.btnround {
+  border-radius: 40rpx;
+} */
+
+/* main style */

二进制
imgs/act-tag.png


二进制
imgs/activity-act.png


二进制
imgs/activity.png


二进制
imgs/add-tidings.png


二进制
imgs/banner-sample.jpg


二进制
imgs/clock-attr.png


二进制
imgs/close-tidings.png


二进制
imgs/collection-checked.png


二进制
imgs/collection.png


二进制
imgs/comments.png


二进制
imgs/community-act.png


二进制
imgs/community.png


二进制
imgs/favorite-checked.png


二进制
imgs/favorite.png


二进制
imgs/female.png


二进制
imgs/home-act.png


二进制
imgs/home.png


二进制
imgs/input.png


二进制
imgs/male.png


二进制
imgs/mine-act.png


二进制
imgs/mine-bg.png


二进制
imgs/mine.png


二进制
imgs/partner-sample.jpg


二进制
imgs/picture.png


二进制
imgs/planet-done.png


二进制
imgs/radio-checked.png


二进制
imgs/radio.png


二进制
imgs/sample-avatar.png


二进制
imgs/share-online.jpg


二进制
imgs/share2.jpg


二进制
imgs/video-play.png


二进制
imgs/video.png


文件差异内容过多而无法显示
+ 1226 - 0
lib/style/icon.wxss


文件差异内容过多而无法显示
+ 3941 - 0
lib/style/main.wxss


二进制
pages/.DS_Store


二进制
pages/activities/.DS_Store


二进制
pages/activities/activityDetails/.DS_Store


+ 34 - 0
pages/activities/activityDetails/activityDetails.js

@@ -0,0 +1,34 @@
+import {
+  iactivity
+} from '../../../api/api.js'
+const globalData = getApp().data
+
+Page({
+  data: {
+    status: {
+      ready: "即将开始",
+      registering: '马上参加'
+    },
+    curStatus: false
+  },
+
+  clickBotbtn() {
+    if (this.data.curStatus == 'registering') {
+      wx.navigateTo({
+        url: '../register/register?id=' + this.data.activity.id
+      })
+    }
+  },
+  onLoad(args) {
+    iactivity.loadActivitydetails({
+      event_id: args.id
+    }, r => {
+      this.setData({
+        activity: r.info,
+        curStatus: r.info.status_attend == '报名中' ? 'registering' : r.info.status_attend == '未开始' ? 'ready' : false
+      })
+    })
+
+  }
+
+})

+ 4 - 0
pages/activities/activityDetails/activityDetails.json

@@ -0,0 +1,4 @@
+{
+  "navigationBarTitleText": "活动详情",
+  "usingComponents": {}
+}

+ 37 - 0
pages/activities/activityDetails/activityDetails.wxml

@@ -0,0 +1,37 @@
+<view class="wrp fg themebor">
+  <image mode="widthFix" src="{{activity.pic_show}}" class="fullx"></image>
+</view>
+<view class="title wrp fg">
+  <text>{{activity.activityTitle}}</text>
+</view>
+
+<view class="intop txtsub col fg">
+  <view class="row crosscenter">
+    <view class="posrel label txtanti">
+      <image src="../../../imgs/act-tag.png" mode="scaleToFill" class="full"></image>
+      <text>活动时间</text>
+    </view>
+    <text class="acttime">{{activity.activityTime}}</text>
+  </view>
+  <view class="row crosscenter gaptop">
+    <view class="label subtxt">
+      <text>报名时间</text>
+    </view>
+    <text>{{activity.applyStartTime + ' - ' + activity.applyEndTime}}</text>
+  </view>
+  <view class="row crosscenter gaptop">
+    <view class="label subtxt">
+      <text>活动地点</text>
+    </view>
+    <text>{{activity.activityLocation}}</text>
+  </view>
+</view>
+
+<view class="details wrp fg">
+  <view class="subtitle">活动详情</view>
+  <view class="flexible wrp txtsub">
+    <rich-text nodes="{{activity.activityContent}}"></rich-text>
+  </view>
+</view>
+
+<view class="btn {{curStatus}}" bindtap="clickBotbtn" wx:if="{{curStatus}}">{{status[curStatus]}}</view>

+ 63 - 0
pages/activities/activityDetails/activityDetails.wxss

@@ -0,0 +1,63 @@
+page {
+  padding-bottom: calc(1em + 2 * .72em)
+}
+
+.registering {
+  background-color: #FF0039
+}
+
+.ready {
+  background: #51B84B
+}
+
+.title {
+  font-size: 36rpx;
+  font-weight: bold
+}
+
+.label image {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  z-index: 0
+}
+
+.label text {
+  position: relative;
+  z-index: 1
+}
+
+.label {
+  padding: 4rpx 24rpx 6rpx 6rpx;
+  display: inline-block;
+  overflow: hidden;
+  margin-right: 2em
+}
+
+.acttime {
+  color: #E6233C
+}
+
+.subtitle {
+  font-weight: bold
+}
+
+.details {
+  margin-top: .5em
+}
+
+.btn {
+  text-align: center;
+  padding: .72em;
+  position: fixed;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  z-index: 1
+}
+
+.btn.registering, .btn.ready {
+  color: #fff
+}

+ 91 - 0
pages/activities/register/register.js

@@ -0,0 +1,91 @@
+import {
+  iactivity
+} from '../../../api/api.js'
+
+const app = getApp()
+
+Page({
+  data: {
+    gender: '男',
+    age_range: ''
+  },
+  clickRegister() {
+    if (!this.data.realname) {
+      return wx.showToast({
+        icon: 'loading',
+        title: '请填写姓名!'
+      })
+    }
+    if (!this.data.age_range) {
+      return wx.showToast({
+        icon: 'loading',
+        title: '请选择年龄段!'
+      })
+    }
+
+    if (!this.data.mobile || this.data.mobile.length != 11) {
+      return wx.showToast({
+        icon: 'loading',
+        title: '请正确填写手机号!'
+      })
+    }
+
+    if (!this.data.address) {
+      return wx.showToast({
+        icon: 'loading',
+        title: '请填写地址!'
+      })
+    }
+
+    delete this.data.showAgegroup
+    delete this.data.__webviewId__
+    iactivity.loadJoinin(this.data, r => {
+      app.data.nav.joininActivityInfo = r.info
+      wx.navigateTo({
+        url: '../registerDone/registerDone'
+      })
+    })
+
+  },
+  clickRadio(e) {
+    this.setData({
+      gender: e.currentTarget.dataset.v
+    })
+  },
+  clickAgegroup(e) {
+    this.setData({
+      showAgegroupModal: true
+    })
+  },
+  clickAgegroupModalCancel() {
+    this.setData({
+      showAgegroupModal: false
+    })
+  },
+  clickAgegroupItem(e) {
+    this.setData({
+      age_range: e.currentTarget.dataset.agegroup,
+      showAgegroupModal: false
+    })
+  },
+  inputName(e) {
+    this.setData({
+      realname: e.detail.value
+    })
+  },
+  inputPhoneno(e) {
+    this.setData({
+      mobile: e.detail.value
+    })
+  },
+  inputAddress(e) {
+    this.setData({
+      address: e.detail.value
+    })
+  },
+  onLoad(opts) {
+    this.setData({
+      event_id: opts.id
+    })
+  }
+})

+ 4 - 0
pages/activities/register/register.json

@@ -0,0 +1,4 @@
+{
+  "navigationBarTitleText": "活动报名",
+  "usingComponents": {}
+}

+ 67 - 0
pages/activities/register/register.wxml

@@ -0,0 +1,67 @@
+<view class="inright borbot">
+  <text class="title txtbold">填写报名信息</text>
+
+
+  <view class="form ">
+    <view class="borbot wrpy row crosscenter item">
+      <view class="label">姓名</view>
+      <view>
+        <input placeholder="请输入姓名" bindinput="inputName"></input>
+      </view>
+    </view>
+    <view class="borbot wrpy row crosscenter item">
+      <view class="label">性别</view>
+      <view class="radioGroup row">
+        <view class="radio row crosscenter" bindtap="clickRadio" data-v="男">
+          <image src="../../../imgs/radio{{gender=='男'?'-checked':''}}.png" mode="aspectFit"></image>
+          <text>男</text>
+        </view>
+        <view class="radio row crosscenter" bindtap="clickRadio" data-v="女">
+          <image src="../../../imgs/radio{{gender=='女'?'-checked':''}}.png" mode="aspectFit"></image>
+          <text>女</text>
+        </view>
+      </view>
+    </view>
+    <view class="borbot wrpy row crosscenter item">
+      <view class="label">年龄</view>
+      <view class="flexible row between crosscenter" bindtap="clickAgegroup">
+        <text class="{{!age_range&&'subtxt'}}">{{age_range||'请选择年龄段'}}</text>
+        <text class="cuIcon-right"> </text>
+      </view>
+    </view>
+    <view class="borbot wrpy row crosscenter item">
+      <view class="label">手机号</view>
+      <view>
+        <input wx:if="{{!showAgegroupModal}}" placeholder="请填写手机号" bindinput="inputPhoneno" maxlength="11"></input>
+      </view>
+    </view>
+    <view class="wrpy row item">
+      <view class="label">地址</view>
+      <view class="flexible">
+        <textarea wx:if="{{!showAgegroupModal}}" placeholder="街道、门牌号等" bindinput="inputAddress"></textarea>
+      </view>
+    </view>
+  </view>
+</view>
+
+<view class="row bot maincenter flexible" style="padding: 2em 0">
+  <view class="btn danger" bindtap="clickRegister">确认报名</view>
+</view>
+
+<view class="cu-modal bottom-modal {{showAgegroupModal && 'show'}}">
+  <view class="cu-dialog">
+    <view class="cu-bar bg-white">
+      <!-- <view class="action text-green">确定</view> -->
+      <view class="action text-blue" bindtap="clickAgegroupModalCancel">取消</view>
+    </view>
+    <view class="padding-xl txtcenter txtpro">
+      <view class="wrpy borbot" bindtap="clickAgegroupItem" data-agegroup="10-19">10-19</view>
+      <view class="wrpy borbot" bindtap="clickAgegroupItem" data-agegroup="20-29">20-29</view>
+      <view class="wrpy borbot" bindtap="clickAgegroupItem" data-agegroup="30-39">30-39</view>
+      <view class="wrpy borbot" bindtap="clickAgegroupItem" data-agegroup="40-49">40-49</view>
+      <view class="wrpy borbot" bindtap="clickAgegroupItem" data-agegroup="50-59">50-59</view>
+      <view class="wrpy borbot" bindtap="clickAgegroupItem" data-agegroup="60-69">60-69</view>
+      <view class="wrpy borbot" bindtap="clickAgegroupItem" data-agegroup="70-79">70-79</view>
+    </view>
+  </view>
+</view>

+ 42 - 0
pages/activities/register/register.wxss

@@ -0,0 +1,42 @@
+@import "../../../lib/style/main.wxss";
+
+page {
+  background-color: #fff
+}
+
+.form {
+  margin-top: 3em
+}
+
+.item .label {
+  width: 5em
+}
+
+.radio {
+  margin-right: 1em;
+}
+
+.radio:last-child {
+  margin: 0
+}
+
+.radioGroup image {
+  height: 1em;
+  width: 1em;
+  margin-right: .4em
+}
+
+.btn {
+  border-radius: var(--raduis);
+  width: 72%;
+  text-align: center;
+  padding: .72em
+}
+
+.danger {
+  background-color: #FF0039;
+}
+
+.btn.danger {
+  color: #fff
+}

+ 9 - 0
pages/activities/registerDone/registerDone.js

@@ -0,0 +1,9 @@
+const app = getApp()
+Page({
+  data: {},
+  onLoad(args) {
+    this.setData({
+      info: app.data.nav.joininActivityInfo
+    })
+  }
+})

+ 4 - 0
pages/activities/registerDone/registerDone.json

@@ -0,0 +1,4 @@
+{
+  "navigationBarTitleText": "活动报名",
+  "usingComponents": {}
+}

+ 9 - 0
pages/activities/registerDone/registerDone.wxml

@@ -0,0 +1,9 @@
+<view class="col crosscenter">
+  <image src="../../../imgs/planet-done.png"></image>
+  <text class="done">报名待审核!</text>
+  <view class="txtsub subtxt col crosscenter tips">
+    <text>您已成功报名 {{info.title}} 活动</text>
+    <text>活动时间:{{info.event_time_start}}</text>
+    <text>活动地点:{{info.address}}</text>
+  </view>
+</view>

+ 23 - 0
pages/activities/registerDone/registerDone.wxss

@@ -0,0 +1,23 @@
+page {
+  background: #fff;
+}
+
+image {
+  height: 4em;
+  width: 4em;
+  margin-top: 4em;
+}
+
+.done {
+  color: #002063;
+  font-size: 1.4em;
+  margin-top: 1em
+}
+
+.tips {
+  margin-top: 1.2em;
+}
+
+.tips text {
+  margin-top: .6em
+}

+ 139 - 0
pages/community/articleDetails/articleDetails.js

@@ -0,0 +1,139 @@
+import {
+  icommunity
+} from '../../../api/api.js'
+
+const app = getApp()
+
+Page({
+  data: {
+    pagination: {
+      page: 1,
+      pagesize: 100
+    },
+    allowComments: false,
+    swiperHeight: 0
+  },
+  clickPic(e) {
+    wx.previewImage({
+      current: this.data.article.upload_url_list[e.currentTarget.dataset.i],
+      urls: this.data.article.upload_url_list
+    })
+  },
+  clickFavor() {
+    icommunity.loadArticleFavorToggle({
+      reqdata: {
+        id: this.data.article.id
+      }
+    }, r => {
+      this.loadArticledetails()
+    })
+  },
+  clickCollection() {
+    icommunity.loadArticleCollectionToggle({
+      reqdata: {
+        id: this.data.article.id
+      }
+    }, r => {
+      this.loadArticledetails()
+    })
+  },
+  clickCommentconfirm() {
+    if (!this.data.comment) {
+      return wx.showToast({
+        icon: 'loading',
+        title: '请输入内容',
+      })
+    }
+    icommunity.loadAddArticlecomment({
+      reqdata: {
+        id: this.data.article.id,
+        content: this.data.comment
+      }
+    }, r => {
+      wx.showToast({
+        icon: 'success',
+        title: '提交成功',
+      })
+      this.setData({
+        comment: '',
+        isFocused: false
+      })
+      this.loadArticlecomments(true)
+    })
+  },
+  inputComment(e) {
+    this.setData({
+      comment: e.detail.value,
+    })
+  },
+  blurComment() {
+    this.setData({
+      isFocused: false
+    })
+  },
+  focusComment() {
+    this.setData({
+      isFocused: true
+    })
+  },
+  loadArticlecomments(hideLoading) {
+    icommunity.loadArticlecomments(this.data.pagination, r => {
+      this.setData({
+        comments: r.list,
+        ['article.num_comment']: r.list.length
+      })
+    }, hideLoading)
+  },
+  hideComments() {
+    this.setData({
+      showComments: false
+    })
+  },
+  clickComments() {
+    if (!this.data.showComments) {
+      this.loadArticlecomments()
+    }
+    this.setData({
+      showComments: !this.data.showComments
+    })
+  },
+  loadArticledetails() {
+    icommunity.loadArticledetails({
+      reqdata: {
+        id: this.data.article.id
+      }
+    }, r => {
+      this.setData({
+        article: r.info
+      })
+    })
+  },
+  onLoad(args) {
+    this.setData({
+      allowComments: app.config.open_comment == 1,
+      article: app.data.nav.communityArticle,
+      ['pagination.reqdata.id']: app.data.nav.communityArticle.id
+    })
+    this.loadArticledetails()
+  },
+  // onReady() {
+  //   setTimeout(() => {
+  //     this.swiperAutoHeight()
+  //   }, 300)
+  // },
+  swiperAutoHeight() {
+    let imgs = this.data.article.upload_url_list
+
+    for (let i in imgs) {
+      wx.createSelectorQuery()
+        .select(`#img${i}`).boundingClientRect()
+        .select(`#fake${i}`).boundingClientRect().exec(rect => {
+          let h = rect[1].top - rect[0].top
+          console.log(h)
+          this.setData({
+            swiperHeight: h > this.data.swiperHeight ? h : this.data.swiperHeight
+          })
+        })
+    }
+  }
+})

+ 4 - 0
pages/community/articleDetails/articleDetails.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "社区"
+}

+ 62 - 0
pages/community/articleDetails/articleDetails.wxml

@@ -0,0 +1,62 @@
+<view class="wrp row crosscenter borbot" bindtap="hideComments">
+  <view class="circle">
+    <image src="{{article.avatar}}" mode="scaleToFill" class="avatar"></image>
+  </view>
+  <text class="txtsub">{{article.nickname}}</text>
+</view>
+
+<view bindtap="hideComments" class="gaptop">
+  <swiper indicator-dots autoplay circular style="height:240px; background: #000">
+    <swiper-item item-id="{{index}}" wx:for="{{article.upload_url_list}}" wx:key bindtap="clickPic" data-i="{{index}}">
+      <image class="fullx" src="{{item}}" mode="aspectFit" id="img{{index}}"></image>
+      <view id="fake{{index}}"></view>
+    </swiper-item>
+  </swiper>
+</view>
+
+
+<view class="wrp" style="min-height: 6em" bindtap="hideComments">
+  <text>{{article.content}}</text>
+</view>
+
+<view class="bortop commentsContatiner {{allowComments?'':'hide'}} fg shadow">
+  <view class="comment row textsub wrp">
+    <view class="row flexible crosscenter input">
+      <image src="../../../imgs/input.png" mode="scaleToFill"></image>
+      <input placeholder="说点什么..." cursor-spacing="10" class="flexible" bindfocus="focusComment" bindblur="blurComment" bindinput="inputComment" value="{{comment}}" confirm-type="done" bindconfirm="clickCommentconfirm"></input>
+    </view>
+    <view class="row crosscenter" wx:if="{{isFocused}}" catchtap="clickCommentconfirm">
+    确定
+    </view>
+    <view class="row crosscenter subtxt" wx:if="{{!isFocused}}" catchtap="clickFavor">
+      <view>
+        <image src="../../../imgs/favorite{{article.isCollect?'-checked':''}}.png" mode="scaleToFill"></image>
+      </view>
+      <text>{{article.collectNumber}}</text>
+    </view>
+    <view class="row crosscenter subtxt" wx:if="{{!isFocused}}" catchtap="clickCollection">
+      <view>
+        <image src="../../../imgs/collection{{article.isCollect?'-checked':''}}.png" mode="scaleToFill"></image>
+      </view>
+      <text>{{article.num_follow}}</text>
+    </view>
+    <view class="row crosscenter subtxt" catchtap="clickComments" wx:if="{{!isFocused}}">
+      <view>
+        <image src="../../../imgs/comments.png" mode="scaleToFill"></image>
+      </view>
+      <text>{{article.num_comment}}</text>
+    </view>
+  </view>
+  <view class="comments {{showComments&&'show'}} scrolly">
+    <view class="inright row" wx:for="{{comments}}" wx:key>
+      <image src="{{item.upload_head}}" class="gapright"></image>
+      <view class="col flexible">
+        <text class="txtsub nickname gapbot">{{item.nickname}}</text>
+        <view class="row content wrpright borbot">
+          <text class="flexible">{{item.content}}</text>
+          <text class="subtxt">{{item.addtime}}</text>
+        </view>
+      </view>
+    </view>
+  </view>
+</view>

+ 65 - 0
pages/community/articleDetails/articleDetails.wxss

@@ -0,0 +1,65 @@
+page {
+  background: #fff;
+  padding-bottom: calc(49rpx + .4em + 1.4rem);
+  padding-bottom: calc(constant(safe-area-inset-bottom) + 49rpx + .4em + 1.4rem);
+  padding-bottom: calc(env(safe-area-inset-bottom) + 49rpx + .4em + 1.4rem);
+}
+
+.header {
+  /* background-color: rgba(229,27,53, .1) */
+}
+
+.avatar, .comments image {
+  width: 70rpx;
+  height: 70rpx;
+}
+
+.circle {
+  margin-right: .5em 
+}
+
+.commentsContatiner {
+  position: fixed;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  padding-bottom: constant(safe-area-inset-bottom);
+  padding-bottom: env(safe-area-inset-bottom);
+}
+
+.comment .input  {
+  background: #efefef;
+  padding: .2em .5em;
+  border-radius: 1em
+}
+
+.comment image {
+  height: 1em;
+  width: 1em;
+  margin-right: .3em;
+}
+
+.comment > view {
+  margin-right: 1em
+}
+
+.comment > view:last-child {
+  margin-right: 0
+}
+
+.comments .nickname {
+  color: #002063;
+}
+
+.comments .content {
+  padding-bottom: 1.2em
+}
+
+.comments {
+  height: 0;
+  transition: all .3s ease-in-out 0s
+}
+
+.comments.show {
+  height: 400rpx
+}

+ 70 - 0
pages/community/uploadPics/uploadPics.js

@@ -0,0 +1,70 @@
+import {
+  icommunity
+} from '../../../api/api.js';
+const app = getApp()
+Page({
+  data: {
+    article: {
+      fileType: 1,
+      imgs: []
+    },
+    imgUrl: app.globalData.imgUrl,
+  },
+  clickUpload() {
+    if (!this.data.article.articleTitle) {
+      return wx.showToast({
+        title: '请输入标题'
+      })
+    }
+    if (this.data.article.imgs.length <= 0) {
+      return wx.showToast({
+        title: '请添加图片'
+      })
+    }
+    let {article} = this.data
+    article.filePath = article.imgs.map(i=>i.url).join(',')
+    delete article.imgs
+    icommunity.loadPubArticle({reqdata:article}, r => {
+      wx.showToast({
+        mask: true,
+        title: '提交成功',
+        success() {
+          setTimeout(wx.navigateBack, 1800)
+        }
+      })
+    })
+  },
+  inputTitle(e) {
+    this.setData({
+      ['article.articleTitle']: e.detail.value
+    })
+  },
+  inputContent(e) {
+    this.setData({
+      ['article.articleContent']: e.detail.value
+    })
+  },
+  clickImg(e) {
+    this.data.article.imgs.splice(e.currentTarget.dataset.i, 1)
+    this.setData({
+      ['article.imgs']: this.data.article.imgs
+    })
+  },
+  clickAddpic() {
+    wx.chooseImage({
+      count: 1,
+      success: r => {
+        icommunity.uploadPics(r.tempFilePaths[0], r => {
+          wx.showToast({
+            title: '上传成功!'
+          })
+          this.data.article.imgs.push(r)
+          this.setData({
+            ['article.imgs']: this.data.article.imgs
+          })
+        })
+      },
+    })
+  },
+  onLoad(args) {}
+})

+ 4 - 0
pages/community/uploadPics/uploadPics.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "图片上传"
+}

+ 30 - 0
pages/community/uploadPics/uploadPics.wxml

@@ -0,0 +1,30 @@
+<view class="bory gapleft inleft row crosscenter">
+  <text>标题   </text>
+  <input placeholder="请添加一个标题" bindinput="inputTitle" class="flexible"></input>
+</view>
+
+<view class="borbot gapleft inleft row">
+  <view>
+    <text>图片   </text>
+  </view>
+  <view class="row flexible wrap">
+    <view class="themerad imgbox col center gaprt" wx:for="{{article.imgs}}" wx:key bindtap="clickImg" data-i="{{index}}">
+      <image src="{{imgUrl + item.url}}" mode="aspectFit" class="full"></image>
+    </view>
+    <view class="themerad imgbox col center gaprt" bindtap="clickAddpic">
+      <text>+</text>
+    </view>
+  </view>
+</view>
+
+<view class="borbot wrp row">
+  <view>
+    <text>正文   </text>
+  </view>
+  <view class="flexible">
+    <textarea class="fullx" placeholder="文字符号限制100字之内" maxlength="100" bindinput="inputContent"></textarea>
+  </view>
+</view>
+<view class="row bot maincenter flexible" style="padding-bottom: 2.4rem">
+  <view class="btn danger" bindtap="clickUpload">提交审核</view>
+</view>

+ 31 - 0
pages/community/uploadPics/uploadPics.wxss

@@ -0,0 +1,31 @@
+page {
+  background-color: #fff;
+  display: flex;
+  flex-direction: column;
+  height: 100vh
+}
+
+.imgbox {
+  width: 140rpx;
+  height: 140rpx;
+  font-size: 100rpx;
+  color: #dedede;
+  font-weight: 100;
+  background: #f4f5f6;
+  overflow: hidden;
+}
+
+.btn {
+  border-radius: var(--raduis);
+  width: 72%;
+  text-align: center;
+  padding: .72em
+}
+
+.danger {
+  background-color: #FF0039;
+}
+
+.btn.danger {
+  color: #fff
+}

+ 110 - 0
pages/community/uploadVideos/uploadVideos.js

@@ -0,0 +1,110 @@
+import {
+  icommunity
+} from '../../../api/api.js';
+const app = getApp()
+Page({
+  data: {
+    article: {
+      fileType: 2
+    },
+    imgUrl: app.globalData.imgUrl,
+  },
+  clickUpload() {
+    let {article} = this.data
+    if (!article.articleTitle) {
+      return wx.showToast({
+        icon: 'loading',
+        title: '请输入标题'
+      })
+    }
+    if (!article.filePath) {
+      return wx.showToast({
+        icon: 'loading',
+        title: '请添加视频'
+      })
+    }
+    if (!article.coverImage) {
+      return wx.showToast({
+        icon: 'loading',
+        title: '请添加预览图'
+      })
+    }
+    console.log(article);
+    icommunity.loadPubArticle({reqdata:article}, r => {
+      wx.showToast({
+        mask: true,
+        title: '提交成功',
+        success() {
+          setTimeout(wx.navigateBack, 1800)
+        }
+      })
+    })
+  },
+  inputTitle(e) {
+    this.setData({
+      ['article.articleTitle']: e.detail.value
+    })
+  },
+  inputContent(e) {
+    this.setData({
+      ['article.articleContent']: e.detail.value
+    })
+  },
+  clickVideo(e) {
+    if (e.currentTarget.dataset.t == 'poster') {
+      this.setData({
+        poster: false
+      })
+    } else {
+      this.setData({
+        ['article.video']: false
+      })
+    }
+  },
+  clickAddimg() {
+    wx.chooseImage({
+      count: 1,
+      success: r => {
+        icommunity.uploadPics(r.tempFilePaths[0], r => {
+          wx.showToast({
+            title: '添加成功'
+          })
+          console.log(r);
+          this.setData({
+            ['article.coverImage']: r.url
+          })
+        })
+      },
+    })
+  },
+  clickAddvideo() {
+    wx.chooseVideo({
+      compressed: false,
+      success: v => {
+        icommunity.uploadVideos(v.tempFilePath, r => {
+          console.log(r);
+          this.setData({
+            ['article.filePath']: r.url,
+            // ['article.video.poster']: {
+            //   url: v.thumbTempFilePath
+            // }
+          },()=>{
+            console.log(this.data.article);
+          })
+          // if (v.thumbTempFilePath) {
+          //   icommunity.uploadPics(v.thumbTempFilePath, r => {
+          //     console.log(r);
+          //     this.setData({
+          //       ['article.video.poster']: r
+          //     })
+          //   })
+          // }
+          wx.showToast({
+            title: '添加成功'
+          })
+        })
+      }
+    })
+  },
+  onLoad(args) {},
+})

+ 4 - 0
pages/community/uploadVideos/uploadVideos.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "视频上传"
+}

+ 43 - 0
pages/community/uploadVideos/uploadVideos.wxml

@@ -0,0 +1,43 @@
+<view class="bory gapleft inleft row crosscenter">
+  <text>标题   </text>
+  <input placeholder="请添加一个标题" bindinput="inputTitle" class="flexible"></input>
+</view>
+
+<view class="borbot gapleft inleft row">
+  <view>
+    <text>视频   </text>
+  </view>
+  <view class="row flexible wrap">
+    <view class="themerad imgbox col center" wx:if="{{article.filePath}}" bindtap="clickVideo">
+      <image src="{{imgUrl + article.coverImage}}" mode="aspectFit" class="full"></image>
+    </view>
+    <view class="themerad imgbox col center" bindtap="clickAddvideo" wx:if="{{!article.filePath}}">
+      <text>+</text>
+    </view>
+  </view>
+</view>
+<view class="borbot gapleft inleft row">
+  <view>
+    <text>预览图  </text>
+  </view>
+  <view class="row flexible wrap">
+    <view class="themerad imgbox col center" wx:if="{{article.coverImage}}" bindtap="clickVideo" data-t="poster">
+      <image src="{{imgUrl + article.coverImage}}" mode="aspectFit" class="full"></image>
+    </view>
+    <view class="themerad imgbox col center" bindtap="clickAddimg" wx:if="{{!article.coverImage}}">
+      <text>+</text>
+    </view>
+  </view>
+</view>
+
+<view class="borbot wrp row">
+  <view>
+    <text>正文   </text>
+  </view>
+  <view class="flexible">
+    <textarea class="fullx" placeholder="文字符号限制100字之内" maxlength="100" bindinput="inputContent"></textarea>
+  </view>
+</view>
+<view class="row bot maincenter flexible" style="padding-bottom: 2.4rem">
+  <view class="btn danger" bindtap="clickUpload">提交审核</view>
+</view>

+ 31 - 0
pages/community/uploadVideos/uploadVideos.wxss

@@ -0,0 +1,31 @@
+page {
+  background-color: #fff;
+  display: flex;
+  flex-direction: column;
+  height: 100vh
+}
+
+.imgbox {
+  width: 140rpx;
+  height: 140rpx;
+  font-size: 100rpx;
+  color: #dedede;
+  font-weight: 100;
+  background: #f4f5f6;
+  overflow: hidden;
+}
+
+.btn {
+  border-radius: var(--raduis);
+  width: 72%;
+  text-align: center;
+  padding: .72em
+}
+
+.danger {
+  background-color: #FF0039;
+}
+
+.btn.danger {
+  color: #fff
+}

+ 121 - 0
pages/community/videoDetails/videoDetails.js

@@ -0,0 +1,121 @@
+import {
+  icommunity
+} from '../../../api/api.js'
+
+const app = getApp()
+
+Page({
+  data: {
+    showInfo: true,
+    pagination: {
+      page: 1,
+      pagesize: 100
+    },
+    allowComments: false
+  },
+  clickFavor() {
+    icommunity.loadArticleFavorToggle({
+      reqdata: {
+        id: this.data.article.id
+      }
+    }, r => {
+      this.loadArticledetails()
+    })
+  },
+  clickCollection() {
+    icommunity.loadArticleCollectionToggle({
+      reqdata: {
+        id: this.data.article.id
+      }
+    }, r => {
+      this.loadArticledetails()
+    })
+  },
+  clickCommentconfirm() {
+    console.log(1234)
+    if (!this.data.comment) {
+      return wx.showToast({
+        icon: 'loading',
+        title: '请输入内容',
+      })
+    }
+    icommunity.loadAddArticlecomment({
+      reqdata: {
+        id: this.data.article.id,
+        content: this.data.comment
+      }
+    }, r => {
+      wx.showToast({
+        icon: 'success',
+        title: '提交成功',
+      })
+      this.setData({
+        comment: '',
+        isFocused: false
+      })
+      this.loadArticlecomments(true)
+    })
+  },
+  inputComment(e) {
+    this.setData({
+      comment: e.detail.value,
+    })
+  },
+  blurComment() {
+    this.setData({
+      isFocused: false,
+      commentFocus: false
+    })
+  },
+  focusComment() {
+    this.setData({
+      isFocused: true
+    })
+  },
+  loadArticlecomments(hideLoading) {
+    icommunity.loadArticlecomments(this.data.pagination, r => {
+      this.setData({
+        comments: r.list,
+        ['article.num_comment']: r.list.length
+      })
+    }, hideLoading)
+  },
+  clickComments() {
+    if (!this.data.showComments) {
+      this.loadArticlecomments()
+    }
+    this.setData({
+      showComments: !this.data.showComments
+    })
+  },
+  clickCommemntInput() {
+    this.setData({
+      commentFocus: true
+    })
+  },
+  clickVideo() {
+    this.setData({
+      showInfo: !this.data.showInfo,
+      showComments: false
+    })
+  },
+  loadArticledetails() {
+    icommunity.loadArticledetails({
+      reqdata: {
+        id: this.data.article.id
+      }
+    }, r => {
+      this.setData({
+        article: r.info
+      })
+    })
+  },
+  onLoad(args) {
+    this.setData({
+      allowComments: app.config.open_comment == 1,
+      article: app.data.nav.communityArticle,
+      ['pagination.reqdata.id']: app.data.nav.communityArticle.id
+    })
+    this.loadArticledetails()
+  }
+})

+ 4 - 0
pages/community/videoDetails/videoDetails.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "社区"
+}

+ 54 - 0
pages/community/videoDetails/videoDetails.wxml

@@ -0,0 +1,54 @@
+<view class="flexible">
+  <video autoplay loop controls="false" show-fullscreen-btn="{{false}}" show-center-play-btn="{{false}}" class="full col center" src="{{imgUrl + article.filePath}}" bindtap="clickVideo">
+    <!-- <cover-image src="../../../imgs/video-play.png" class="videoPlay"></cover-image> -->
+    <cover-view class="videoContent {{showComments?'showComments':''}}" wx:if="{{showInfo}}">
+      <cover-view class="wrp row crosscenter">
+        <cover-view class="circle">
+          <cover-image mode="widthFix" src="{{article.avatar}}" class="avatar"></cover-image>
+        </cover-view>
+        <cover-view>{{article.nickname}}</cover-view>
+      </cover-view>
+      <cover-view class="intop txtsub">{{article.articleContent}}</cover-view>
+      <cover-view class="bortop commentsContatiner {{allowComments?'':'hide'}}">
+        <cover-view class="comment row textsub wrp" style="color:#333">
+          <cover-view class="row flexible crosscenter input item" catchtap="clickCommemntInput">
+            <cover-image src="../../../imgs/input.png" mode="scaleToFill"></cover-image>
+            <cover-view class="subtxt" wx:if="{{!commentFocus}}" style="line-height: 1.8em">说点什么...</cover-view>
+            <input wx:if="{{commentFocus}}" placeholder="说点什么..." cursor-spacing="10" class="flexible" focus="{{commentFocus}}" bindfocus="focusComment" bindblur="blurComment"  confirm-type="done" bindconfirm="clickCommentconfirm" bindinput="inputComment" value="{{comment}}"></input>
+          </cover-view>
+          <cover-view class="row crosscenter item" wx:if="{{isFocused}}" bindtap="clickCommentconfirm">确定</cover-view>
+          <cover-view class="row crosscenter subtxt item" wx:if="{{!isFocused}}" bindtap="clickFavor">
+            <cover-view>
+              <cover-image src="../../../imgs/favorite{{article.is_zan=='1'?'-checked':''}}.png" mode="scaleToFill"></cover-image>
+            </cover-view>
+            <cover-view>{{article.num_zan}}</cover-view>
+          </cover-view>
+          <cover-view class="row crosscenter subtxt item" wx:if="{{!isFocused}}" bindtap="clickCollection">
+            <cover-view>
+              <cover-image src="../../../imgs/collection{{article.is_follow=='1'?'-checked':''}}.png" mode="scaleToFill"></cover-image>
+            </cover-view>
+            <cover-view>{{article.num_follow}}</cover-view>
+          </cover-view>
+          <cover-view class="row crosscenter subtxt item" bindtap="clickComments" wx:if="{{!isFocused}}">
+            <cover-view>
+              <cover-image src="../../../imgs/comments.png" mode="scaleToFill"></cover-image>
+            </cover-view>
+            <cover-view>{{article.num_comment}}</cover-view>
+          </cover-view>
+        </cover-view>
+        <cover-view class="comments scrolly">
+          <cover-view class="inright row" wx:for="{{comments}}" wx:key>
+            <cover-image src="{{item.upload_head}}" class="gapright"></cover-image>
+            <cover-view class="col flexible">
+              <cover-view class="txtsub nickname gapbot">{{item.nickname}}</cover-view>
+              <cover-view class="row content wrpright borbot">
+                <cover-view class="flexible" style="color: #333;word-break: break-all;word-wrap:break-word;white-space:pre-line;">{{item.content}}</cover-view>
+                <cover-view class="subtxt">{{item.addtime}}</cover-view>
+              </cover-view>
+            </cover-view>
+          </cover-view>
+        </cover-view>
+      </cover-view>
+    </cover-view>
+  </video>
+</view>

+ 87 - 0
pages/community/videoDetails/videoDetails.wxss

@@ -0,0 +1,87 @@
+page {
+  height: 100vh;
+  width: 100vw;
+  display: -webkit-flex;
+  display: flex;
+  flex-direction: column;
+  background: #fff;
+  overflow: hidden;
+  padding-bottom: constant(safe-area-inset-bottom);
+  padding-bottom: env(safe-area-inset-bottom);
+}
+
+.avatar, .comments cover-image {
+  width: 70rpx;
+  height: 70rpx;
+}
+
+.circle {
+  margin-right: .5em 
+}
+
+.commentsContatiner {
+  background: #fff;
+  padding-bottom: constant(safe-area-inset-bottom);
+  padding-bottom: env(safe-area-inset-bottom);
+}
+
+.comment .input  {
+  background: #efefef;
+  padding: .2em .5em;
+  border-radius: 1em
+}
+
+.comment cover-image {
+  height: 1em;
+  width: 1em;
+  margin-right: .3em;
+}
+
+.comment .row {
+  margin-right: 1em
+}
+
+.comment .row:last-child {
+  margin-right: 0
+}
+
+.comments .nickname {
+  color: #002063;
+}
+
+.comments .content {
+  padding-bottom: 1.2em
+}
+
+.comments {
+  height: 400rpx;
+}
+
+video {
+  position: relative
+}
+
+.videoContent {
+  background: linear-gradient(-180deg, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.70) 100%);
+  position: absolute;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  color: #fff;
+  transform: translateY(400rpx);
+  transition: transform .3s ease-in-out 0s;
+}
+.videoContent.showComments {
+  transform: translateY(0rpx);
+}
+
+
+.videoContent .avatar {
+  height: 70rpx;
+  width: 70rpx;
+}
+
+.videoPlay {
+  height: 100rpx;
+  width: 100rpx;
+}

二进制
pages/home/.DS_Store


+ 504 - 0
pages/home/home.js

@@ -0,0 +1,504 @@
+import {
+  ilogin,
+  ihome,
+  iactivity,
+  icommunity,
+  imine
+} from '../../api/api.js'
+const app = getApp()
+
+Page({
+  loadMyinformation() {
+    imine.loadMyinformation({reqdata: {id:1}},r => {
+      this.setData({
+        user: Object.assign(this.data.user, r.object)
+      })
+      wx.setStorage({
+        key: 'user',
+        data: this.data.user
+      })
+    })
+  },
+  loadMyActivities() {
+    imine.loadMyActivities(this.data.mine.pagination, r => {
+      this.setData({
+        ['mine.curNav']: 3,
+        ['mine.list']: this.data.mine.list.concat(r.list),
+        ['mine.pagination.page']: r.list.length > 0 ? this.data.mine.pagination.page : --this.data.mine.pagination.page
+      })
+    })
+  },
+  loadMyComments() {
+    imine.loadMyComments(this.data.mine.pagination, r => {
+      for (let c of r.list) {
+        c.showtime = new Date(c.comment_addtime).getDateName('hh:mm')
+      }
+      this.setData({
+        ['mine.curNav']: 2,
+        ['mine.list']: this.data.mine.list.concat(r.list),
+        ['mine.pagination.page']: r.list.length > 0 ? this.data.mine.pagination.page : --this.data.mine.pagination.page
+      })
+    })
+  },
+  loadMyPubarticles() {
+    imine.loadMyPubarticles(this.data.mine.pagination, r => {
+      this.setData({
+        ['mine.curNav']: 0,
+        ['mine.list']: this.data.mine.list.concat(r.list),
+        ['mine.pagination.page']: r.list.length > 0 ? this.data.mine.pagination.page : --this.data.mine.pagination.page
+      })
+    })
+  },
+  loadMyCollectedarticles() {
+    imine.loadMyCollectedarticles(this.data.mine.pagination, r => {
+      this.setData({
+        ['mine.curNav']: 1,
+        ['mine.list']: this.data.mine.list.concat(r.list).map(item => {
+          item.status_attend = Date.now() < new Date(item.applyStartTime).valueOf() ? '未开始' : Date.now() > new Date(item.applyEndTime).valueOf() ? '已结束' :''
+          return item
+        }),
+        ['mine.pagination.page']: r.list.length > 0 ? this.data.mine.pagination.page : --this.data.mine.pagination.page
+      })
+    })
+  },
+  data: {
+    showAuthPanel: false,
+    curNav: 0,
+    imgUrl: app.globalData.imgUrl,
+    navs: [{
+      key: 'home',
+      name: '首页'
+    }, {
+      key: 'activity',
+      name: '活动动态'
+    }, {
+      key: 'community',
+      name: '社区'
+    }, {
+      key: 'mine',
+      name: '个人中心'
+    }],
+    searchOn: false,
+    home: {},
+    activity: {
+      list: [],
+      pagination: {
+        page: 1,
+        rows: 10,
+        reqdata: {
+          keyword: ''
+        }
+      }
+    },
+    community: {
+      showAddtidings: false,
+      acts: [{
+        favorite: true
+      }],
+      list: [],
+      pagination: {
+        page: 1,
+        rows: 10,
+        reqdata: {
+          keyword: ''
+        }
+      }
+    },
+    mine: {
+      list: [],
+      curNav: 0,
+      pagination: {
+        page: 1,
+        rows: 10
+      }
+    }
+  },
+  loadArticles() {
+    icommunity.loadArticles(this.data.community.pagination, r => {
+      this.setData({
+        ['community.list']: this.data.community.list.concat(r.list),
+        ['community.pagination.page']: r.list.length > 0 ? this.data.community.pagination.page : --this.data.community.pagination.page
+      })
+      wx.stopPullDownRefresh()
+    })
+  },
+  loadActivities() {
+    iactivity.loadActivities(this.data.activity.pagination, r => {
+      this.setData({
+        ['activity.list']: this.data.activity.list.concat(r.list),
+        ['activity.pagination.page']: r.list.length > 0 ? this.data.activity.pagination.page : --this.data.activity.pagination.page,
+      })
+      wx.stopPullDownRefresh()
+    })
+  },
+  loadHome() {
+    let count = 3
+    ihome.loadBanners({},r => {
+      console.log(r);
+      this.setData({
+        ['home.banners']: r.list
+      })
+      if (count == 1) {
+        wx.stopPullDownRefresh()
+      } else {
+        count--
+      }
+    })
+    ihome.loadPartners({},r => {
+      this.setData({
+        ['home.partners']: r.list
+      })
+      if (count == 1) {
+        wx.stopPullDownRefresh()
+      } else {
+        count--
+      }
+    })
+    ihome.loadHotnews({},r => {
+      this.setData({
+        ['home.hotnews']: r.list
+      })
+      if (count == 1) {
+        wx.stopPullDownRefresh()
+      } else {
+        count--
+      }
+    })
+  },
+  onLoad(args) {
+    this.loadHome()
+    // this.loadConfig()
+  },
+  clickRemoveArticle(e) {
+    console.log(e)
+    wx.showModal({
+      title: '确定删除?',
+      content: '是否删除此动态?',
+      confirmColor: '#f64f5f',
+      success: r => {
+        let {id,minenav,i} = e.currentTarget.dataset
+        if (r.confirm) {
+          icommunity[minenav==0?'loadDeleteArticle':'loadDeleteCollect']({
+            reqdata:{id}
+          }, r => {
+            wx.showToast({
+              title: '删除成功'
+            })
+            this.data.mine.list.splice(i, 1)
+            this.setData({
+              mine: this.data.mine
+            })
+          })
+        }
+      }
+    })
+  },
+  clickFavorite(e) {
+    let {id,isCollect} = e.currentTarget.dataset
+    let scope = this.data.curNav == 2 ? 'community' : 'mine'
+    let item = this.data[scope].list[e.currentTarget.dataset.i]
+    icommunity[isCollect?'loadDeleteCollect':'loadAddArticle']({
+      reqdata:{
+        [isCollect?'id':'collectProjectId']:id,
+        ['collectType']: isCollect?null:1
+      }
+    }, r => {
+      item.isCollect = !item.isCollect
+      item.collectNumber =item.isCollect? parseInt(item.collectNumber) + 1:  parseInt(item.collectNumber) - 1
+      this.setData({
+        [scope + '.list[' + e.currentTarget.dataset.i + ']']: item
+      })
+    })
+  },
+  clickActivity(e) {
+    app.data.nav.activityDetails = this.data.activity.list[e.currentTarget.dataset.i]
+    wx.navigateTo({
+      url: '../activities/activityDetails/activityDetails?id=' + e.currentTarget.dataset.id
+    })
+  },
+  clickArticle(e) {
+    console.log(e)
+    app.data.nav.newsDetails = this.data.home.hotnews[e.currentTarget.dataset.i]
+    wx.navigateTo({
+      url: '../hotnews/newsDetails/newsDetails?id=' + e.currentTarget.dataset.id
+    })
+  },
+  clickHotnewsMore() {
+    wx.navigateTo({
+      url: '../hotnews/hotnews/hotnews'
+    })
+  },
+  clickMyinfo() {
+    wx.navigateTo({
+      url: '../mine/myinfo/edit/edit'
+    })
+  },
+  clickCommunityArticle(e) {
+    app.data.nav.communityArticle = e.currentTarget.dataset.item 
+    wx.navigateTo({
+      url: e.currentTarget.dataset.item.fileType  == 2 ? '../community/videoDetails/videoDetails' : '../community/articleDetails/articleDetails'
+    })
+  },
+  clickUploadpics() {
+    wx.navigateTo({
+      url: '../community/uploadPics/uploadPics'
+    })
+    this.setData({
+      ['community.showAddtidings']: false
+    })
+  },
+  clickUploadvideos() {
+    wx.navigateTo({
+      url: '../community/uploadVideos/uploadVideos'
+    })
+    this.setData({
+      ['community.showAddtidings']: false
+    })
+  },
+  clickClosetidings() {
+    this.setData({
+      ['community.showAddtidings']: false
+    })
+  },
+  clickAddtidings() {
+    // if (!this.data.user) {
+    //   return this.setData({
+    //     showAuthPanel: true
+    //   })
+    // }
+    this.setData({
+      ['community.showAddtidings']: true
+    })
+  },
+  inputSearch(e) {
+    if (this.data.curNav == 1) {
+      this.setData({
+        ['activity.pagination.reqdata.keyword']: e.detail.value,
+        ['activity.pagination.page']: 1,
+        ['activity.list']: [],
+      })
+      this.loadActivities()
+    } else {
+      this.setData({
+        ['community.pagination.reqdata.keyword']: e.detail.value,
+        ['community.pagination.page']: 1,
+        ['community.list']: []
+      })
+      this.loadArticles()
+    }
+  },
+  clickSearch() {
+    this.setData({
+      searchOn: true
+    })
+  },
+  blurSearch(e) {
+    if (!e.detail.value) {
+      this.setData({
+        searchOn: false
+      })
+    }
+  },
+  clickMinenav(e) {
+    this.data.mine.pagination.page = 1
+    this.data.mine.list = []
+    switch (e.currentTarget.dataset.cur) {
+      case '1':
+        {
+          this.loadMyCollectedarticles()
+        };
+        break;
+      case '2':
+        {
+          this.loadMyComments()
+        };
+        break;
+      case '3':
+        {
+          this.loadMyActivities()
+        };
+        break;
+      default:
+        {
+          this.loadMyPubarticles()
+        }
+    }
+  },
+  clickNav(e) {
+    switch (e.currentTarget.dataset.cur) {
+      case '1':
+        this.data.activity.pagination.page = 1
+        this.data.activity.list = []
+        this.loadActivities()
+        break;
+      case '2':
+        this.data.community.pagination.page = 1
+        this.data.community.list = []
+        this.loadArticles()
+        break;
+      case '3':
+        // if (!this.data.user || this.data.user.is_finish_reg == 0) {
+        //   return this.setData({
+        //     showAuthPanel: true
+        //   })
+        // }
+        this.data.mine.pagination.page = 1
+        this.data.mine.list = []
+        this.loadMyinformation()
+        // if (this.data.config.open_space == 1) {
+        //   this.loadMyPubarticles()
+        // } else {
+          // this.loadMyCollectedarticles()
+        // }
+        // this.loadMyCollectedarticles()
+        this.setData({
+          ['mine.curNav']: 0
+        },()=>{
+          this.loadMyPubarticles()
+        })
+        break;
+    }
+    this.setData({
+      curNav: e.currentTarget.dataset.cur
+    })
+    wx.setNavigationBarTitle({
+      title: this.data.navs[e.currentTarget.dataset.cur].name
+    })
+  },
+  clickHideAuthPanel() {
+    this.setData({
+      showAuthPanel: false
+    })
+  },
+  // getUserinfo(e) {
+  //   let {encryptedData,iv} = e.detail
+  //   console.log(e);
+  //   wx.login({
+  //     success: r => {
+  //       ilogin.loadAT({
+  //         reqdata: {
+  //           code: r.code,
+  //           encryptedData,
+  //           iv
+  //         }
+  //       }, r => {
+  //         console.log(r)
+  //       })
+  //     }
+  //   })
+  // },
+  getUserInfo (e) {
+    wx.login({
+      success: r => {
+        wx.getUserInfo({
+          success: e => {
+            // let {encryptedData,iv} = e
+            // ilogin.loadAT({
+            //   reqdata: {
+            //     code: r.code,
+            //     encryptedData,
+            //     iv
+            //   }
+            // }, r => {
+              console.log(r)
+              console.log(e);
+              
+            // })
+          },
+        })
+        // ilogin.loadAT({
+        //   reqdata: {
+        //     code: r.code,
+        //     encryptedData,
+        //     iv
+        //   }
+        // }, r => {
+        //   console.log(r)
+        // })
+      }
+    })
+  },
+  onShow() {
+    wx.getStorage({
+      key: 'user',
+      complete: r => {
+        if (r.data) {
+          this.setData({
+            user: r.data
+          })
+        }
+      }
+    })
+  },
+  onPullDownRefresh() {
+    switch (this.data.curNav) {
+      case 1:
+      case '1':
+        this.data.activity.pagination.page = 1
+        this.data.activity.list = []
+        this.loadActivities()
+        break;
+      case 2:
+      case '2':
+        this.data.community.pagination.page = 1
+        this.data.community.list = []
+        this.loadArticles()
+        break;
+      case 3:
+      case '3':
+        wx.stopPullDownRefresh()
+        break;
+      default:
+        this.loadHome()
+    }
+
+  },
+  onReachBottom() {
+    if (this.data.curNav == 1) {
+      this.data.activity.pagination.page += 1
+      this.loadActivities()
+    }
+    if (this.data.curNav == 2) {
+      this.data.community.pagination.page += 1
+      this.loadArticles()
+    }
+    if (this.data.curNav == 3) {
+      this.data.mine.pagination.page += 1
+      switch (this.data.mine.curNav) {
+        case 1:
+        case '1':
+          this.loadMyCollectedarticles();
+          break;
+        case 2:
+        case '2':
+          this.loadMyComments()
+          break;
+        case 3:
+        case '3':
+          this.loadMyActivities()
+          break;
+        default:
+          this.loadMyPubarticles()
+      }
+    }
+  },
+  loadConfig() {
+    ilogin.loadConfig({},r => {
+      app.config = r
+      this.setData({
+        config: r
+      })
+    })
+  },
+  onShareAppMessage() {
+    return {
+      title: '冰雪小程序',
+      path: '/pages/home/home',
+      imageUrl: '../../imgs/share2.jpg',
+      success: function(res) {},
+      fail: function(res) {
+        console.log(res, '失败')    
+      }
+    }
+  }
+})

+ 5 - 0
pages/home/home.json

@@ -0,0 +1,5 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "首页",
+  "enablePullDownRefresh": true
+}

+ 306 - 0
pages/home/home.wxml

@@ -0,0 +1,306 @@
+<!-- home -->
+<view class="home fg" wx:if="{{curNav == 0}}">
+  <view style="overflow:hidden">
+    <view class="swiperContainer">
+      <swiper indicator-dots indicator-active-color="#eee" autoplay interval="3000" circular>
+        <swiper-item wx:for="{{home.banners}}" wx:key>
+          <image src="{{imgUrl + item.bannerImage}}" class="full" mode="scaleFill"></image>
+        </swiper-item>
+      </swiper>
+    </view>
+  </view>
+
+  <view class="hotNews fg">
+    <view class="title">
+      <view class="row crosscenter">
+        <view class="bar"></view>
+        <text class="txtpro txtbold" style="color: #002063">热点头条</text>
+      </view>
+      <view class="cuIcon-more" bindtap="clickHotnewsMore"></view>
+    </view>
+    <view>
+
+      <view class="article" bindtap="clickArticle" wx:for="{{home.hotnews}}" wx:key data-i="{{index}}" data-id="{{item.id}}">
+        <view class="imgbox">
+          <image class="fullx" src="{{imgUrl + item.coverImage}}" mode="widthFix"></image>
+        </view>
+        <view class="content">
+          <text style="color: #002063" class="txtbold">{{item.headlineTitle}}</text>
+          <view class="imgsmr attr">
+            <image src="../../imgs/clock-attr.png"></image>
+            <text>{{item.releaseTime}}</text>
+          </view>
+          <view class="p">{{item.summary}}</view>
+        </view>
+      </view>
+
+    </view>
+  </view>
+  <view class="partners">
+    <view class="title">
+      <view class="row crosscenter">
+        <view class="bar"></view>
+        <text class="txtpro txtbold" style="color: #002063">合作伙伴</text>
+      </view>
+    </view>
+
+    <view class="partnersContainer">
+
+      <view class="level" wx:for="{{home.partners}}" wx:key>
+        <view class="levelTitle">
+          <view>{{item.title}}</view>
+        </view>
+        <view class="row around wrap">
+          <view class="bor" style="margin-bottom: 1em">
+            <image src="{{imgUrl + item.brandImage}}" mode="scaleToFill"></image>
+          </view>
+        </view>
+      </view>
+
+    </view>
+  </view>
+  <!-- <view class="authorization">
+    <button open-type="getUserInfo" bindgetuserinfo="getUserinfo">点击授权</button>
+  </view> -->
+</view>
+
+<!-- activity -->
+
+<view class="activities fg" wx:if="{{curNav == 1}}">
+  <view class="searchContainer">
+    <view class="row center search" bindtap="clickSearch">
+      <input focus wx:if="{{searchOn}}" bindblur="blurSearch" bindinput="inputSearch"></input>
+      <text class="cuIcon-search" wx:if="{{!searchOn}}"> 请输入活动关键字查询</text>
+    </view>
+  </view>
+  <view class="activityContainer">
+    <view class="activity" bindtap="clickActivity" wx:for="{{activity.list}}" wx:key data-i="{{index}}" data-id="{{item.id}}">
+      <image src="{{imgUrl + item.coverImage}}"></image>
+      <view class="tag {{item.status_attend=='已结束'?'finished':item.status_attend=='未开始'?'ready':'signing'}}" wx:if="{{item.status_attend}}">{{item.status_attend}}</view>
+      <view class="skiing">{{item.activityTitle}}</view>
+    </view>
+
+  </view>
+</view>
+
+<!-- community -->
+
+<view class="community fg" wx:if="{{curNav==2}}">
+  <view class="searchContainer">
+    <view class="row center search" bindtap="clickSearch">
+      <input focus wx:if="{{searchOn}}" bindblur="blurSearch" bindinput="inputSearch"></input>
+      <text class="cuIcon-search" wx:if="{{!searchOn}}"> 请输入活动关键字查询</text>
+    </view>
+  </view>
+  <view class="bfc">
+    <!-- item -->
+    <view wx:for="{{community.list}}" wx:key>
+      <view class="imgtxt" bindtap="clickCommunityArticle" data-item="{{item}}">
+        <view class="img">
+          <!-- <image mode="aspectFill" src="{{imgUrl + item.avatar}}"></image> -->
+          <image mode="aspectFill" src="{{imgUrl + item.coverImage}}"></image>
+          <image mode="scaleToFill" src="../../imgs/video-play.png" class="videoPlay" wx:if="{{item.fileType ==2}}"></image>
+        </view>
+        <view class="text">
+          <view class="textcontent">
+            <text class="txtelldup">{{item.articleTitle||''}}</text>
+          </view>
+          <view class="row between more subtxt">
+            <view class="row crosscenter avatar flexible noscroll">
+              <view class="circle">
+                <image src="{{item.avatar}}" class="full"></image>
+              </view>
+              <view class="flexible noscroll nowrap-ell">
+                <text>{{item.nickname}}</text>
+              </view>
+            </view>
+            <view class="row crosscenter favor" catchtap="clickFavorite" data-i="{{index}}" data-id="{{item.id}}" data-isCollect="{{!!item.isCollect}}">
+              <image class="favorite" src="../../imgs/favorite{{item.isCollect?'-checked':''}}.png"></image>
+              <text>{{item.collectNumber||0}}</text>
+            </view>
+          </view>
+        </view>
+      </view>
+    </view>
+    <!-- item -->
+  </view>
+</view>
+
+<!-- mine -->
+
+<view class="mine col full" wx:if="{{curNav==3}}">
+  <view>
+    <image class="fullx" src="../../imgs/mine-bg.png" mode="widthFix" style="display:block"></image>
+  </view>
+  <view class="wrp row fg" style="height: 200rpx" bindtap="clickMyinfo">
+    <view class="circle shadow posrel bg" style="top: -158rpx; height: 236rpx; width: 236rpx;">
+      <image class="" src="{{user.upload_head || user.avatar}}" class="full"></image>
+      <!-- <image class="" src="{{user.avatarUrl}}" style="padding: 8rpx; height: 220rpx; width: 220rpx;"></image> -->
+    </view>
+    <view class="gapleft">
+      <view class="txtbold txtlg imgsmr row bot gapbot">
+        <text>{{user.realname || user.nickname}}</text>
+        <image src="../../imgs/{{user.sex==1?'male':'female'}}.png" style="margin-bottom: 6rpx" class="gapleft"></image>
+      </view>
+      <text class="txtsub subtxt">{{user.introduction||'这个家伙很懒,什么都没留下...'}}</text>
+    </view>
+  </view>
+  <view class="inbot bory row center mineNav">
+    <view class="{{mine.curNav == 0?'selected':''}}" bindtap="clickMinenav" data-cur="0">
+      我的发布
+    </view>
+    <view class="{{mine.curNav == 1?'selected':''}}" bindtap="clickMinenav" data-cur="1">
+      我的收藏
+    </view>
+    <view class="{{mine.curNav == 2?'selected':''}}" bindtap="clickMinenav" data-cur="2">
+      我的评论
+    </view>
+    <view class="{{mine.curNav == 3?'selected':''}}" bindtap="clickMinenav" data-cur="3">
+      我的活动
+    </view>
+  </view>
+  <view class="fg flexible myPub myCollection" wx:if="{{mine.curNav==1 || mine.curNav==0}}">
+    <view class="bfc">
+      <!-- item -->
+      <view wx:for="{{mine.list}}" wx:key>
+        <view class="imgtxt" bindtap="clickCommunityArticle" data-item="{{item}}">
+          <view class="img">
+            <image mode="aspectFill" src="{{imgUrl + item.coverImage}}"></image>
+            <image mode="scaleToFill" src="../../imgs/video-play.png" class="videoPlay" wx:if="{{item.file_type=='2'}}"></image>
+            <view class="tag {{item.is_prize=='0'?'ready':item.is_prize=='1'?'finished':''}}" wx:if="{{item.is_prize!=2}}">{{item.is_prize==0?'审核中':item.is_prize==1?'未通过':''}}</view>
+            <view class="removeTag circle row center" catchtap="clickRemoveArticle" data-id="{{item.id}}" data-i="{{index}}" data-mineNav="{{mine.curNav}}">
+              <text class="cuIcon-deletefill txtanti"></text>
+            </view>
+          </view>
+          <view class="text">
+            <view class="textcontent">
+              <text>{{item.articleTitle||''}}</text>
+            </view>
+            <view class="row between more subtxt">
+              <view class="row crosscenter avatar flexible noscroll">
+                <view class="circle">
+                  <image src="{{item.avatar}}" class="full"></image>
+                </view>
+                <view class="flexible noscroll nowrap-ell">
+                  <text>{{item.nickname||''}}</text>
+                </view>
+              </view>
+              <view class="row crosscenter favor" catchtap="clickFavorite" wx:if="{{false}}" data-i="{{index}}" data-id="{{item.id}}">
+                <image class="favorite" src="../../imgs/favorite{{item.isCollect?'-checked':''}}.png"></image>
+                <text>{{item.collectNumber||0}}</text>
+              </view>
+            </view>
+          </view>
+        </view>
+      </view>
+      <!-- item -->
+    </view>
+  </view>
+  <view class="myComment flexible" wx:if="{{mine.curNav==2}}">
+
+    <view class="inright row fg comment" wx:for="{{mine.list}}" wx:key>
+      <image src="{{user.avatarUrl}}" class="gapright"></image>
+      <view class="col flexible">
+        <text class="txtsub nickname gapbot">{{user.articleTitle}}</text>
+        <view class="row gapbot wrpright">
+          <text class="flexible">{{item.comments}}</text>
+          <text class="subtxt">{{item.createTime}}</text>
+        </view>
+        <view class="bortop wrpright row txtsub" style="padding-top: 8rpx">
+          <text class="subtxt flexible">{{item.space_title}}</text>
+          <text class="{{item.is_prize_show==1?'txtdanger':'subtxt'}}">{{['','待审核', '已通过', '未通过'][item.status]}}</text>
+        </view>
+      </view>
+    </view>
+
+  </view>
+  <view class="myActivities flexible" wx:if="{{mine.curNav==3}}">
+    <view class="fg wrplg myAct" wx:for="{{mine.list}}" wx:key>
+      <view class="txtbold">{{item.activityTitle}}</view>
+      <view class="txtsub gaptop">
+        <text class="subtxt">活动时间:</text>
+        <text>{{item.activityTime}}</text>
+      </view>
+      <view class="txtsub">
+        <text class="subtxt">活动地点:</text>
+        <text>{{item.activityLocation}}</text>
+      </view>
+    </view>
+  </view>
+
+</view>
+
+<!-- bottom navigation bar -->
+
+<view class="navigation row around fg">
+  <view class="nav col crosscenter {{curNav == 0 && 'act'}}" bindtap="clickNav" data-cur="0">
+    <image src="../../imgs/home{{curNav==0? '-act':''}}.png"></image>
+    <text>首页</text>
+  </view>
+  <view class="nav col crosscenter {{curNav==1&&'act'}}" bindtap="clickNav" data-cur="1">
+    <image src="../../imgs/activity{{curNav==1? '-act':''}}.png"></image>
+    <text>活动</text>
+  </view>
+  <view class="addTidings col crosscenter" bindtap="clickAddtidings" wx:if="{{curNav==2}}">
+    <image src="../../imgs/add-tidings.png"></image>
+  </view>
+  <!--  wx:if="{{config.open_space==1}}" -->
+  <view class="nav col crosscenter {{curNav==2&&'act'}}" bindtap="clickNav" data-cur="2">
+    <image src="../../imgs/community{{curNav==2?'-act':''}}.png"></image>
+    <text>社区</text>
+  </view>
+  <view class="nav col crosscenter {{curNav==3&&'act'}}" bindtap="clickNav" data-cur="3">
+    <image src="../../imgs/mine{{curNav==3?'-act':''}}.png"></image>
+    <text>我的</text>
+  </view>
+</view>
+
+<!-- community img and video upload mask -->
+
+<view class="cover col center" wx:if="{{community.showAddtidings}}" catchtap="clickClosetidings">
+
+  <view class="imglg txtanti txtsub">
+    <view class="txtcenter col" bindtap="clickUploadpics">
+      <image class="gapbot" src="../../imgs/picture.png"></image>
+      <text>图片上传</text>
+    </view>
+    <view class="txtcenter col" style="margin-top: 120rpx" bindtap="clickUploadvideos">
+      <image class="gapbot" src="../../imgs/video.png"></image>
+      <text>视频上传</text>
+    </view>
+  </view>
+  <view class="navigation row around">
+    <view class="nav col crosscenter">
+      <image></image>
+      <text>0</text>
+    </view>
+    <view class="addTidings col crosscenter" bindtap="clickClosetidings">
+      <image src="../../imgs/close-tidings.png" style="margin-top: calc(-32rpx - .4vh)"></image>
+    </view>
+    <view class="nav col crosscenter">
+      <image></image>
+      <text></text>
+    </view>
+  </view>
+</view>
+
+
+<view class="cu-modal {{showAuthPanel&&'show'}}">
+  <view class="cu-dialog">
+    <view class="cu-bar bg-white justify-end">
+      <view class="content">微信授权</view>
+      <view class="action" bindtap="clickHideAuthPanel">
+        <text class="cuIcon-close text-red"></text>
+      </view>
+    </view>
+    <view class="padding-xl">
+      使用小程序需要获取您的公开信息(昵称,头像等)
+    </view>
+    <view class="cu-bar bg-white justify-end">
+      <view class="action">
+        <button class="cu-btn line-green text-green" bindtap="clickHideAuthPanel">取消</button>
+        <button class="cu-btn bg-green margin-left" open-type="getUserInfo" bindtap="getUserInfo">授权</button>
+      </view>
+    </view>
+  </view>
+</view>

+ 380 - 0
pages/home/home.wxss

@@ -0,0 +1,380 @@
+@import "../../lib/style/main.wxss";
+
+page {
+  padding-bottom: 100rpx;
+  padding-bottom: calc(100rpx + constant(safe-area-inset-bottom));
+  padding-bottom: calc(100rpx + env(safe-area-inset-bottom));
+  display: flex;
+  min-height: 100.1vh;
+}
+
+.navigation {
+  position: fixed;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  border-top: var(--themebor);
+  padding: 0.4em;
+  font-size: 0.7em;
+  padding-bottom: 0.4em;
+  padding-bottom: calc(0.4em + constant(safe-area-inset-bottom));
+  padding-bottom: calc(0.4em + env(safe-area-inset-bottom));
+}
+
+.navigation .nav {
+  color: var(--colorp);
+}
+
+.navigation .nav.act {
+  color: var(--themecolor);
+}
+
+.navigation image {
+  margin-bottom: 0.4em;
+  width: 36rpx;
+  height: 36rpx;
+  margin: 0 4rpx;
+}
+
+.home, .activities, .community {
+  flex: 1;
+}
+
+.swiperContainer {
+  border-radius: var(--themerad);
+  margin: var(--sizenor);
+  overflow: hidden;
+}
+
+.swiperContainer swiper {
+  height: 360rpx;
+}
+
+.swiperContainer image {
+  width: 100%;
+  display: block;
+}
+
+.hotNews, .partners {
+  padding: var(--sizenor);
+}
+
+.title, .article, .article .attr, .levelTitle {
+  display: flex;
+  display: -webkit-flex;
+}
+
+.title, .article .attr, .levelTitle {
+  align-items: center;
+}
+
+.title {
+  justify-content: space-between;
+}
+
+.title .bar {
+  background-color: var(--themedanger);
+  height: calc(2 * var(--sizenor));
+  width: 12rpx;
+  margin-right: 0.7em;
+}
+
+.article {
+  padding: var(--sizenor) 0;
+  border-bottom: var(--themebor);
+}
+
+.article .imgbox {
+  width: 240rpx;
+  height: 240rpx;
+  overflow: hidden;
+  margin-right: 0.5em;
+}
+
+.article .content {
+  flex: 1;
+  height: 240rpx;
+  overflow: hidden;
+}
+
+.article .attr {
+  color: var(--colorattr);
+  font-size: var(--txtsub);
+}
+
+.article .attr image {
+  height: 1em;
+  width: 1em;
+  margin-right: 0.2em;
+}
+
+.article .content > view {
+  margin-top: 0.5em;
+}
+
+.article .p {
+  color: var(--colorp);
+  text-overflow: ellipsis;
+  font-size: var(--txtsub);
+}
+
+.partnersContainer {
+  padding: var(--sizenor);
+}
+
+.partnersContainer .level {
+  margin-top: 1em;
+}
+
+.partnersContainer .level:first-child {
+  margin-top: 0;
+}
+
+.partnersContainer .levelTitle {
+  color: #ccc;
+  font-size: var(--txtsub);
+  flex-direction: column;
+  margin-bottom: var(--sizenor);
+}
+
+.level:first-child image {
+  height: 100rpx;
+  width: 300rpx;
+}
+
+.level image {
+  height: 90rpx;
+  width: 270rpx;
+}
+
+.searchContainer {
+  padding: var(--sizenor);
+  color: var(--colorp);
+  font-size: var(--txtsub);
+}
+
+.search {
+  padding: 0.5em 1em;
+  border-radius: 40rpx;
+  background-color: #efefef;
+  height: 45rpx;
+  box-sizing: content-box;
+}
+
+.search input {
+  display: block;
+  text-align: center;
+  width: 100%;
+  color: #333;
+}
+
+.activityContainer {
+  padding: 0 var(--sizenor);
+}
+
+.activity {
+  border-radius: var(--themerad);
+  margin: 0.5em 0 1.2em 0;
+  overflow: hidden;
+  height: 360rpx;
+  position: relative;
+}
+
+.activity image {
+  width: 100%;
+  height: 100%;
+}
+
+.activity .skiing {
+  position: absolute;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  padding: var(--sizesmr) var(--sizenor);
+  color: #fff;
+  background-color: rgba(0, 0, 0, 0.4);
+}
+
+.removeTag {
+  position: absolute;
+  top: 20rpx;
+  left: 20rpx;
+  font-size: 1.4em;
+  width: 1.4em;
+  height: 1.4em;
+}
+
+.tag {
+  color: #fff;
+  position: absolute;
+  top: 19rpx;
+  right: -38rpx;
+  font-size: 0.76em;
+  padding: 2rpx 40rpx;
+  transform: rotate(45deg);
+  -ms-transform: rotate(45deg);
+  -moz-transform: rotate(45deg);
+  -webkit-transform: rotate(45deg);
+  -o-transform: rotate(45deg);
+}
+
+.tag.ready {
+  background-color: #51b84b;
+}
+
+.tag.signing, .removeTag {
+  background-color: #f64f5f;
+}
+
+.tag.finished {
+  background-color: var(--darkgray);
+}
+
+.addTidings image {
+  height: 88rpx;
+  width: 88rpx;
+  margin-top: -32rpx;
+}
+
+.mine {
+  /* di */
+}
+
+.mineNav {
+  background-color: #fff;
+}
+
+.mineNav > view.selected {
+  border-bottom: 4rpx solid var(--theme);
+  color: var(--theme);
+}
+
+.mineNav > view {
+  margin-left: 32rpx;
+  padding-bottom: 12rpx;
+  margin-bottom: 8rpx;
+}
+
+.mineNav > view:first-child {
+  margin-left: 0;
+}
+
+.myComment .comment {
+  padding-bottom: 32rpx;
+}
+
+.comment image {
+  width: 60rpx;
+  height: 60rpx;
+}
+
+.myComment > .comment, .myAct {
+  margin-bottom: 10rpx;
+}
+
+.myComment .nickname {
+  color: #002063;
+}
+
+.myAct > view:last-child {
+  margin-top: 12rpx;
+}
+
+.community {
+  width: 100%;
+}
+
+.cover {
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+
+.cover .navigation {
+  border: none;
+}
+
+.cover .nav {
+  opacity: 0;
+}
+
+.bfc {
+  overflow: hidden;
+  margin: 0 0.75em;
+}
+
+.bfc > view {
+  float: left;
+  width: 49.99999999999%;
+  padding: 0.25em;
+  overflow: hidden;
+  height: calc(402rpx + 5.54em);
+}
+
+.imgtxt .img {
+  overflow: hidden;
+  position: relative;
+  height: 400rpx;
+  border-top-left-radius: 14rpx;
+  border-top-right-radius: 14rpx;
+  border: 1rpx solid #ececec;
+  border-bottom: none;
+}
+
+.imgtxt .img .videoPlay {
+  position: absolute;
+  height: 100rpx;
+  width: 100rpx;
+  top: 50%;
+  left: 50%;
+  margin-top: -50rpx;
+  margin-left: -50rpx;
+}
+
+.imgtxt .img.bordered {
+  border-top-left-radius: 14rpx;
+  border-top-right-radius: 14rpx;
+  border: 1rpx solid #ececec;
+  border-bottom: none;
+}
+
+.imgtxt image {
+  border-top-left-radius: 14rpx;
+  border-top-right-radius: 14rpx;
+  width: 100%;
+  height: 100%;
+}
+
+.imgtxt .text {
+  padding: 0.5em;
+  font-size: 0.88em;
+  border-bottom-left-radius: 14rpx;
+  border-bottom-right-radius: 14rpx;
+  border: 1rpx solid #ececec;
+  border-top: none;
+}
+
+.imgtxt .text .textcontent {
+  height: 2.64em;
+  overflow: hidden;
+}
+
+.imgtxt .more {
+  margin-top: 0.5em;
+}
+
+.imgtxt .avatar .circle, .imgtxt .favor image {
+  margin-right: 0.4em;
+}
+
+.imgtxt .avatar .circle {
+  height: 1.4em;
+  width: 1.4em;
+}
+
+.imgtxt .favorite {
+  height: 1em;
+  width: 1em;
+}

+ 43 - 0
pages/hotnews/hotnews/hotnews.js

@@ -0,0 +1,43 @@
+import {
+  ihome
+} from '../../../api/api.js'
+const app = getApp()
+Page({
+  data: {
+    pagination: {
+      page: 1,
+      pagesize: 3
+    },
+    imgUrl: app.globalData.imgUrl,
+  },
+  clickArticle(e) {
+    app.data.nav.newsDetails = this.data.news[e.currentTarget.dataset.i]
+    wx.navigateTo({
+      url: '../newsDetails/newsDetails?id=' + e.currentTarget.dataset.id
+    })
+  },
+  loadHotnews() {
+    let news = this.data.news,
+      p = this.data.pagination
+    if (p.page == 1) {
+      news = []
+    }
+    ihome.loadHotnews(this.data.pagination, r => {
+      this.setData({
+        news: news.concat(r.list),
+        ['pagination.page']: r.list.length > 0 ? p.page : (p.page - 1)
+      })
+    })
+  },
+  onLoad() {
+    this.loadHotnews()
+  },
+  onPullDownRefresh() {
+    this.data.pagination.page = 1
+    this.loadHotnews()
+  },
+  onReachBottom: function() {
+    this.data.pagination.page += 1
+    this.loadHotnews()
+  },
+})

+ 4 - 0
pages/hotnews/hotnews/hotnews.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "热点头条"
+}

+ 17 - 0
pages/hotnews/hotnews/hotnews.wxml

@@ -0,0 +1,17 @@
+<view class="hotNews">
+
+  <view class="article" bindtap="clickArticle" wx:for="{{news}}" wx:key data-id="{{item.id}}" data-i="{{index}}">
+    <view class="imgbox">
+      <image class="fullx" src="{{imgUrl + item.coverImage}}" mode="widthFix"></image>
+    </view>
+    <view class="content">
+      <text>{{item.headlineTitle}}</text>
+      <view class="imgsmr attr">
+        <image src="../../../imgs/clock-attr.png"></image>
+        <text>{{item.releaseTime}}</text>
+      </view>
+      <view class="p">{{item.summary}}</view>
+    </view>
+  </view>
+  
+</view>

+ 58 - 0
pages/hotnews/hotnews/hotnews.wxss

@@ -0,0 +1,58 @@
+page {
+  background-color: #fff;
+  min-height: 100.1vh
+}
+
+.article {
+  padding: var(--sizenor) 0;
+  border-bottom: var(--themebor);
+}
+
+.article .imgbox {
+  width: 240rpx !important;
+  height: 240rpx;
+  overflow: hidden;
+  margin-right: 0.5em;
+}
+
+.article .content {
+  font-size: var(--txtsub);
+  flex: 1;
+  height: 240rpx;
+  overflow: hidden;
+  text-overflow: ellipsis
+}
+
+.article .attr {
+  color: var(--colorattr);
+  font-size: var(--txtsub);
+}
+
+.article .attr image {
+  height: 1em;
+  width: 1em;
+  margin-right: .2em
+}
+
+.article .content > view {
+  margin-top: 0.5em;
+}
+
+.article .p {
+  color: var(--colorp);
+  text-overflow: ellipsis;
+  font-size: var(--txtsub);
+}
+
+.article, .article .attr {
+  display: flex;
+  display: -webkit-flex;
+}
+
+.hotNews {
+  padding: var(--sizenor);
+}
+
+.article .attr {
+  align-items: center;
+}

+ 19 - 0
pages/hotnews/newsDetails/newsDetails.js

@@ -0,0 +1,19 @@
+import {
+  ihotnews
+} from '../../../api/api.js'
+const app = getApp()
+Page({
+  data: {},
+  onLoad(args) {
+    // ihotnews.loadNewsdetails({
+    //   news_id: args.id
+    // }, r => {})
+    console.log(app)
+    this.setData({
+      news: app.data.nav.newsDetails
+    }, () => {
+      console.log(this.data.news);
+    })
+  },
+  onShareAppMessage () {}
+})

+ 4 - 0
pages/hotnews/newsDetails/newsDetails.json

@@ -0,0 +1,4 @@
+{
+  "navigationBarTitleText": "热点头条",
+  "usingComponents": {}
+}

+ 7 - 0
pages/hotnews/newsDetails/newsDetails.wxml

@@ -0,0 +1,7 @@
+<view class="title">{{news.headlineTitle}}</view>
+
+<view class="txtsub subtxt gaptop">{{news.releaseTime}}</view>
+
+<view class="content">
+  <rich-text class="fullx" nodes="{{news.headlineContent}}"></rich-text>
+</view>

+ 13 - 0
pages/hotnews/newsDetails/newsDetails.wxss

@@ -0,0 +1,13 @@
+page {
+  padding: 1em;
+  background-color: #fff
+}
+
+.title {
+  font-size: 36rpx;
+  font-weight: bold
+}
+
+.content {
+  margin-top: 2.5em
+}

二进制
pages/mine/.DS_Store


二进制
pages/mine/myinfo/.DS_Store


+ 88 - 0
pages/mine/myinfo/edit/edit.js

@@ -0,0 +1,88 @@
+import {
+  imine,
+  ihome
+} from '../../../../api/api.js'
+Page({
+  data: {
+    user: {},
+    modalKeys: {
+      realname: '姓名',
+      mobile: '联系方式',
+      birthday: '出生年月',
+      gender: '性别',
+      brief_intro: '自我介绍'
+    },
+    placeholder: {
+      realname: '请填写姓名',
+      mobile: '请填写手机号',
+      birthday: '请填写出生年月',
+      brief_intro: '请填写自我介绍'
+    }
+  },
+  changeBirthday(e) {
+    this.data.user['birthday'] = e.detail.value
+    imine.loadEditMyinformation(this.data.user, r => {
+      this.loadMyinformation()
+    })
+  },
+  clickConfirm() {
+    this.data.user[this.data.modalKey] = this.data.inputInfo
+    imine.loadEditMyinformation(this.data.user, r => {
+      this.setData({
+        inputInfo: '',
+        modalKey: ''
+      })
+      this.loadMyinformation()
+    })
+  },
+  clickRadio(e) {
+    this.setData({
+      inputInfo: e.currentTarget.dataset.v
+    })
+  },
+  inputInfo(e) {
+    console.log(e)
+    this.setData({
+      inputInfo: e.detail.value
+    })
+  },
+  hideModal() {
+    this.setData({
+      modalKey: ''
+    })
+  },
+  clickInfo(e) {
+    let k = e.currentTarget.dataset.key
+    this.setData({
+      modalKey: k,
+      inputText: this.data.user[k],
+      inputInfo: this.data.user[k]
+    })
+  },
+  loadMyinformation() {
+    imine.loadMyinformation({reqdata:{id:1}},r => {
+      this.setData({
+        user: Object.assign(this.data.user, r.userinfo)
+      })
+      wx.setStorage({
+        key: 'user',
+        data: this.data.user
+      })
+    })
+  },
+  onLoad(args) {
+    wx.getStorage({
+      key: 'user',
+      success: r => {
+        this.setData({
+          user: Object.assign(this.data.user, r.data)
+        })
+      },
+    })
+
+    this.loadMyinformation()
+    this.setData({
+      endDate: new Date().format('yyyy-MM-dd'),
+    })
+  },
+})

+ 4 - 0
pages/mine/myinfo/edit/edit.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "编辑个人资料"
+}

+ 63 - 0
pages/mine/myinfo/edit/edit.wxml

@@ -0,0 +1,63 @@
+<view class="bory">
+  <view class="gapleft">
+    <view class="borbot row crosscenter item">
+      <text>姓名     </text>
+      <view class="subtxt flexible">{{user.realname||user.nickname}}</view>
+      <view class="cuIcon-right wrpy wrprlg" bindtap="clickInfo" data-key="realname"></view>
+    </view>
+    <view class="borbot row crosscenter item">
+      <text>性别     </text>
+      <view class="subtxt flexible">{{user.gender}}</view>
+      <text class="cuIcon-right wrpy wrprlg" bindtap="clickInfo" data-key="gender"></text>
+    </view>
+    <view class="wrpy wrprlg borbot row crosscenter item">
+      <text>出生年月   </text>
+      <picker mode="date" class="flexible" start='1940-01-01' end='{{endDate}}' value="{{user.birthday}}" bindchange="changeBirthday">
+        <view class="row crosscenter full">
+          <view class="flexible subtxt">{{user.birthday||'-'}}</view>
+          <text class="cuIcon-right"></text>
+        </view>
+      </picker>
+    </view>
+    <view class="borbot row crosscenter item">
+      <text>联系方式   </text>
+      <view class="subtxt flexible">{{user.mobile||'-'}}</view>
+      <text class="wrpy wrprlg cuIcon-right" bindtap="clickInfo" data-key="mobile"></text>
+    </view>
+    <view class="borbot row crosscenter item">
+      <text>自我介绍   </text>
+      <view class="subtxt flexible">{{user.brief_intro||'介绍一下,让更多朋友认识你'}}</view>
+      <text class="wrpy wrprlg cuIcon-right" bindtap="clickInfo" data-key="brief_intro"></text>
+    </view>
+  </view>
+</view>
+
+<view class="cu-modal {{modalKey&&'show'}}">
+  <view class="cu-dialog">
+    <view class="cu-bar bg-white justify-end">
+      <view class="content">{{modalKeys[modalKey]}}</view>
+      <view class="action" bindtap="hideModal">
+        <text class="cuIcon-close text-red"></text>
+      </view>
+    </view>
+    <view class="padding-xl">
+      <view class="radioGroup row maincenter" wx:if="{{modalKey=='gender'}}">
+        <view class="radio row crosscenter" bindtap="clickRadio" data-v="男">
+          <image src="../../../../imgs/radio{{inputInfo=='男'?'-checked':''}}.png" mode="aspectFit"></image>
+          <text>男</text>
+        </view>
+        <view class="radio row crosscenter" bindtap="clickRadio" data-v="女">
+          <image src="../../../../imgs/radio{{inputInfo=='女'?'-checked':''}}.png" mode="aspectFit"></image>
+          <text>女</text>
+        </view>
+      </view>
+      <input placeholder="{{placeholder[modalKey]}}" class="borbot" bindinput="inputInfo" value="{{inputText}}" wx:if="{{modalKey!='gender'}}" maxlength="{{modalKey=='mobile'?11:''}}"></input>
+    </view>
+    <view class="cu-bar bg-white justify-end">
+      <view class="action">
+        <button class="cu-btn line-green text-green" bindtap="hideModal">取消</button>
+        <button class="cu-btn bg-green margin-left" bindtap="clickConfirm">确定</button>
+      </view>
+    </view>
+  </view>
+</view>

+ 67 - 0
pages/mine/myinfo/edit/edit.wxss

@@ -0,0 +1,67 @@
+@import "../../../../lib/style/main.wxss";
+
+page {
+  background-color: var(--fg);
+}
+
+.item:last-child {
+  border-bottom: 0;
+}
+
+.radio {
+  margin-right: 1em;
+}
+
+.radio:last-child {
+  margin: 0;
+}
+
+.radioGroup image {
+  height: 1em;
+  width: 1em;
+  margin-right: 0.4em;
+}
+
+.btn {
+  border-radius: var(--raduis);
+  width: 72%;
+  text-align: center;
+  padding: 0.72em;
+}
+
+.danger {
+  background-color: #ff0039;
+}
+
+.btn.danger {
+  color: #fff;
+}
+
+.sponsorsContainer {
+  padding: var(--sizenor);
+}
+
+.sponsorsContainer .level {
+  margin-top: 1em;
+}
+
+.sponsorsContainer .level:first-child {
+  margin-top: 0;
+}
+
+.sponsorsContainer .levelTitle {
+  color: #ccc;
+  font-size: var(--txtsub);
+  flex-direction: column;
+  margin-bottom: var(--sizenor);
+}
+
+.level:first-child image {
+  height: 100rpx;
+  width: 300rpx;
+}
+
+.level image {
+  height: 90rpx;
+  width: 270rpx;
+}

+ 57 - 0
pages/mine/register/register.js

@@ -0,0 +1,57 @@
+import {
+  imine,
+  ihome
+} from '../../../api/api.js'
+
+Page({
+  data: {
+    user: {},
+  },
+  input(e) {
+    this.setData({
+      [`user.${e.currentTarget.dataset.key}`]: e.detail.value
+    })
+  },
+  onLoad(args) {
+    this.setData({
+      endDate: new Date().format('yyyy-MM-dd'),
+    })
+    ihome.loadSponsors(r => {
+      this.setData({
+        sponsors: r.list
+      })
+    })
+    wx.getStorage({
+      key: 'user',
+      success: r => {
+        r.data.realname = r.data.realname || r.data.nickname
+        this.setData({
+          user: Object.assign(this.data.user, r.data)
+        })
+      },
+    })
+
+    this.loadMyinformation()
+  },
+
+  loadMyinformation() {
+    imine.loadMyinformation({reqdata:{id:1}},r => {
+      r.userinfo.realname = r.userinfo.realname || r.userinfo.nickname
+      this.setData({
+        user: Object.assign(this.data.user, r.userinfo)
+      })
+      wx.setStorage({
+        key: 'user',
+        data: this.data.user
+      })
+    })
+  },
+
+  clickRegister() {
+    imine.loadReg(this.data.user, r => {
+      wx.reLaunch({
+        url: '../../home/home',
+      })
+    })
+  },
+})

+ 4 - 0
pages/mine/register/register.json

@@ -0,0 +1,4 @@
+{
+  "navigationBarTitleText": "注册",
+  "usingComponents": {}
+}

+ 48 - 0
pages/mine/register/register.wxml

@@ -0,0 +1,48 @@
+<view class="gaptop gapleft txtb txtsub">姓名</view>
+<view class="wrp fg">
+  <input value="{{user.realname}}" bindinput="input" data-key="realname"></input>
+</view>
+<view class="gaptop gapleft txtb txtsub">性别</view>
+<view class="wrp fg">
+  <radio-group class="row" bindchange="input" data-key="gender">
+    <radio class="gapright" value="男" checked="{{user.gender == '男'}}">
+      <text>男</text>
+    </radio>
+    <radio value="女" checked="{{user.gender == '女'}}">
+      <text>女</text>
+    </radio>
+  </radio-group>
+</view>
+<view class="gaptop gapleft txtb txtsub">出生年月</view>
+<view class="wrp fg">
+  <picker mode="date" class="flexible" start='1940-01-01' end='{{endDate}}' value="{{user.birthday}}" bindchange="input" data-key="birthday">
+    <view class="row crosscenter full">
+      <view class="flexible subtxt">{{user.birthday||' '}}</view>
+    </view>
+  </picker>
+</view>
+<view class="gaptop gapleft txtb txtsub">联系方式</view>
+<view class="wrp fg">
+  <input maxlength="11" type="number" bindinput="input" data-key="mobile"></input>
+</view>
+<view class="gaptop gapleft txtb txtsub">自我介绍</view>
+<view class="wrp fg">
+  <textarea placeholder="介绍一下,让更多朋友认识你" bindinput="input" data-key="brief_intro"></textarea>
+</view>
+
+<view class="row bot maincenter flexible" style="padding: 2em 0">
+  <view class="btn danger" bindtap="clickRegister">注册</view>
+</view>
+
+<view class="sponsorsContainer txtcenter">
+  <view class="level" wx:for="{{sponsors}}" wx:key>
+    <!-- <view class="levelTitle">
+      <view>{{item.title}}</view>
+    </view> -->
+    <view class="row around wrap">
+      <view class="bor fg" style="margin-bottom: 1em">
+        <image src="{{item.pic_show}}" mode="scaleToFill"></image>
+      </view>
+    </view>
+  </view>
+</view>

+ 44 - 0
pages/mine/register/register.wxss

@@ -0,0 +1,44 @@
+.danger {
+  background-color: #ff0039;
+}
+
+.btn {
+  border-radius: var(--raduis);
+  width: 72%;
+  text-align: center;
+  padding: 0.72em;
+}
+
+.btn.danger {
+  color: #fff;
+}
+
+.sponsorsContainer {
+  padding: var(--sizenor);
+}
+
+.sponsorsContainer .level {
+  margin-top: 1em;
+}
+
+.sponsorsContainer .level:first-child {
+  margin-top: 0;
+}
+
+.sponsorsContainer .levelTitle {
+  color: #666;
+  font-size: var(--txtsub);
+  flex-direction: column;
+  margin-bottom: var(--sizenor);
+}
+
+.level:first-child image {
+  height: 100rpx;
+  width: 300rpx;
+}
+
+.level image {
+  height: 90rpx;
+  width: 270rpx;
+}
+

+ 61 - 0
project.config.json

@@ -0,0 +1,61 @@
+{
+	"description": "项目配置文件",
+	"packOptions": {
+		"ignore": []
+	},
+	"setting": {
+		"urlCheck": false,
+		"es6": true,
+		"enhance": false,
+		"postcss": true,
+		"preloadBackgroundData": false,
+		"minified": true,
+		"newFeature": true,
+		"coverView": true,
+		"nodeModules": false,
+		"autoAudits": false,
+		"showShadowRootInWxmlPanel": true,
+		"scopeDataCheck": false,
+		"uglifyFileName": false,
+		"checkInvalidKey": true,
+		"checkSiteMap": true,
+		"uploadWithSourceMap": true,
+		"compileHotReLoad": false,
+		"babelSetting": {
+			"ignore": [],
+			"disablePlugins": [],
+			"outputPath": ""
+		},
+		"useIsolateContext": true,
+		"useCompilerModule": false,
+		"userConfirmedUseCompilerModuleSwitch": false
+	},
+	"compileType": "miniprogram",
+	"libVersion": "2.4.4",
+	"appid": "wx4398d60942bc7710",
+	"projectname": "iSnow2",
+	"debugOptions": {
+		"hidedInDevtools": []
+	},
+	"isGameTourist": false,
+	"simulatorType": "wechat",
+	"simulatorPluginLibVersion": {},
+	"condition": {
+		"search": {
+			"current": -1,
+			"list": []
+		},
+		"conversation": {
+			"current": -1,
+			"list": []
+		},
+		"game": {
+			"currentL": -1,
+			"list": []
+		},
+		"miniprogram": {
+			"current": -1,
+			"list": []
+		}
+	}
+}

+ 7 - 0
sitemap.json

@@ -0,0 +1,7 @@
+{
+  "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
+  "rules": [{
+  "action": "allow",
+  "page": "*"
+  }]
+}

二进制
utils/.DS_Store


+ 115 - 0
utils/http.js

@@ -0,0 +1,115 @@
+const defaultHeader = {
+  'Content-Type': 'application/x-www-form-urlencoded'
+}
+
+const jheader = {
+  'Content-Type': 'application/json'
+}
+
+
+const url = 'http://118.24.176.28:8778'
+
+let RQ = []
+function request(api, method, header, data, hideLoading) {
+  if (RQ.indexOf(api) > -1) {
+    return console.error('http duplicate api:', api)
+  }
+  RQ.push(api)
+  if (!hideLoading) {
+    wx.showLoading({
+      title: '加载中...'
+    })
+  }
+  let pdata = {
+    "companyId": 0,
+    "from": 0,
+    "page": 1,
+    "reqdata": {},
+    "rows": 10,
+    "sidx": "",
+    "sord": "",
+    "token": "",
+    "userId": 1
+  }
+  data = data || {}
+  Object.assign(pdata, data)
+  // data.token = getApp().data.at
+  return new Promise((resolve, reject) => {
+    wx.request({
+      url: url + api,
+      method: method,
+      header: header,
+      data: pdata,
+      success: r => {
+        if (r.statusCode == 200) {
+          resolve(r.data)
+        } else {
+          wx.showToast({
+            title: '系统繁忙!'
+          })
+        }
+      },
+      fail: e => {
+        reject(e)
+      },
+      complete: e => {
+        if (!hideLoading) {
+          wx.hideLoading()
+        }
+        RQ.splice(RQ.indexOf(api), 1)
+      }
+    })
+  })
+}
+
+
+function uploadFile(api, data, file, hideLoading) {
+  if (!hideLoading) {
+    wx.showLoading({
+      title: '上传中...'
+    })
+  }
+  data = data || {}
+  // data.token = getApp().data.at
+  return new Promise((resolve, reject) => {
+    wx.uploadFile({
+      url: url + api,
+      filePath: file,
+      name: 'file',
+      formData: data,
+      success(r) {
+        if (r.statusCode == 200) {
+          console.log(r);
+          resolve({url: r.data, state: 100})
+        } else {
+          console.log(r);
+          console.error(r.errMsg)
+          wx.showToast({
+            title: '系统繁忙!'
+          })
+        }
+      },
+      fail(e) {
+        reject(e)
+      },
+      complete(e) {
+        if (!hideLoading) {
+          wx.hideLoading()
+        }
+      }
+    })
+  })
+}
+
+
+module.exports = {
+  post(api, data, hideLoading) {
+    return request(api, "POST", jheader, data, hideLoading)
+  },
+  get(api, data, hideLoading) {
+    return request(api, "GET", defaultHeader, data, hideLoading)
+  },
+  upload(api, data, file, hideLoading) {
+    return uploadFile(api, data, file, hideLoading)
+  }
+}