瀏覽代碼

ui/逻辑优化

Rorschach 5 年之前
父節點
當前提交
d322b56f53
共有 36 個文件被更改,包括 280 次插入204 次删除
  1. 4 3
      component/dialog/dialog.wxss
  2. 1 1
      component/follow/follow.wxss
  3. 1 1
      component/group/group.wxml
  4. 8 8
      component/hot/hot.wxss
  5. 1 1
      component/my/my.wxss
  6. 2 2
      component/myToast/myToast.wxss
  7. 2 2
      component/share/share.wxml
  8. 6 0
      pages/groupPage/collage-details/collage-details.js
  9. 2 1
      pages/groupPage/collage-details/collage-details.json
  10. 2 1
      pages/groupPage/collage-details/collage-details.wxml
  11. 1 1
      pages/groupPage/collage-details/collage-details.wxss
  12. 5 9
      pages/groupPage/grade-details/grade-details.js
  13. 69 35
      pages/groupPage/group-details/group-details.js
  14. 4 2
      pages/groupPage/group-details/group-details.wxss
  15. 3 3
      pages/groupPage/make-money/make-money.js
  16. 1 1
      pages/groupPage/make-money/make-money.wxml
  17. 90 86
      pages/groupPage/my-group/my-group.js
  18. 5 0
      pages/groupPage/my-group/my-group.wxss
  19. 2 2
      pages/main/reading/reading.js
  20. 1 1
      pages/main/searchResult/searchResult.wxss
  21. 2 2
      pages/main/week/week.wxml
  22. 9 5
      pages/main/week/week.wxss
  23. 4 5
      pages/social/replyDetail/replyDetail.js
  24. 1 1
      pages/social/replyDetail/replyDetail.wxss
  25. 16 2
      pages/social/works/works.js
  26. 5 5
      pages/social/works/works.wxml
  27. 3 3
      pages/social/works/works.wxss
  28. 1 1
      pages/user/myWallet/myWallet.js
  29. 1 1
      pages/user/myconcern/myconcern.wxml
  30. 4 1
      pages/user/myconcern/myconcern.wxss
  31. 3 2
      pages/user/myworks/myworks.js
  32. 2 2
      pages/user/myworks/myworks.wxml
  33. 0 1
      pages/user/myworks/myworks.wxss
  34. 15 3
      project.config.json
  35. 2 2
      towxml/style/main.wxss
  36. 2 8
      utils/const.js

+ 4 - 3
component/dialog/dialog.wxss

@@ -12,10 +12,10 @@
 .dialog-contain {
     position: absolute;
     left: 0;
-    top: 0;
+    top: -125rpx;
     bottom: 0;
     right: 0;
-    width: 80%;
+    width: 70%;
     height: 470rpx;
     background: #fff;
     margin: auto;
@@ -44,7 +44,7 @@
 
 .text {
     font-size: 28rpx;
-    width: 80%;
+    width: 95%;
     /* border-bottom: 2rpx solid #ccc; */
     padding: 14rpx 0;
 }
@@ -62,6 +62,7 @@
     font-size: 36rpx;
     color: #16B016;
     background: #fff;
+    width: 100%;
 }
 
 .btn::after {

+ 1 - 1
component/follow/follow.wxss

@@ -43,7 +43,7 @@
     font-size: 32rpx;
     letter-spacing: 4rpx;
     margin-left: 28rpx;
-    font-family: MicrosoftYaHei;
+    /* font-family: MicrosoftYaHei; */
 }
 
 .followWareCard .topData {

+ 1 - 1
component/group/group.wxml

@@ -48,7 +48,7 @@
             </view>
           </view>
         </block>
-        <view class="change" bindtap="change">换一换</view>
+        <view class="change" bindtap="change" wx:if="{{groupData.recommendList.length > 0}}">换一换</view>
       </view>
       <view class="title">
         <image class="ren" src="../../static/groupImg/Shape3.png" style="width: 30rpx; height: 38rpx;"></image>

+ 8 - 8
component/hot/hot.wxss

@@ -56,7 +56,7 @@ swiper {
 .searchSection .allBooks {
     font-size: 32rpx;
     color: #41bb32;
-    font-family: PingFangSC-regular;
+    /* font-family: PingFangSC-regular; */
     width: 166rpx;
     text-align: center;
     margin-left: 20rpx;
@@ -101,12 +101,12 @@ swiper {
 
 .hotSection .title text {
     width: 224rpx;
-    letter-spacing: 4rpx;
+    /* letter-spacing: 4rpx; */
     height: 40rpx;
     margin-left: 16rpx;
     font-size: 32rpx;
     line-height: 40rpx;
-    font-family: PingFangSC-regular;
+    /* font-family: PingFangSC-regular; */
     color: #444;
 }
 
@@ -171,9 +171,9 @@ height:28rpx;
     /* text-align: left; */
     color: #414141;
     font-size: 32rpx;
-    letter-spacing: 4rpx;
+    /* letter-spacing: 4rpx; */
     margin-left: 28rpx;
-    font-family: MicrosoftYaHei;
+    /* font-family: MicrosoftYaHei; */
 }
 
 .hotWareCard .bottomData {
@@ -359,12 +359,12 @@ height:28rpx;
 
 .recommdSection .title text {
     width: 224rpx;
-    letter-spacing: 4rpx;
+    /* letter-spacing: 4rpx; */
     height: 40rpx;
     margin-left: 16rpx;
     font-size: 32rpx;
     line-height: 40rpx;
-    font-family: PingFangSC-regular;
+    /* font-family: PingFangSC-regular; */
     color: #444;
 }
 
@@ -420,7 +420,7 @@ height:28rpx;
     /* text-align: left; */
     color: #444;
     font-size: 32rpx;
-    letter-spacing: 4rpx;
+    /* letter-spacing: 4rpx; */
     margin-left: 28rpx;
     font-family: MicrosoftYaHei;
 }

+ 1 - 1
component/my/my.wxss

@@ -250,7 +250,7 @@ image {
   margin-top: 30rpx;
   width: 716rpx;
   height: 88rpx;
-  font-size: 34rpx;
+  font-size: 32rpx;
   color: #444;
   background: #FFFFFF;
   border-radius: 14rpx;

+ 2 - 2
component/myToast/myToast.wxss

@@ -44,7 +44,7 @@
 .line1Text {
     height: 40rpx;
     font-size: 28rpx;
-    font-family: PingFangSC-Regular;
+    /* font-family: PingFangSC-Regular; */
     font-weight: 400;
     color: rgba(37, 37, 37, 1);
     line-height: 40rpx;
@@ -53,7 +53,7 @@
 .line2Text {
     height: 40rpx;
     font-size: 28rpx;
-    font-family: PingFangSC-Regular;
+    /* font-family: PingFangSC-Regular; */
     font-weight: 400;
     color: rgba(37, 37, 37, 1);
     line-height: 40rpx;

+ 2 - 2
component/share/share.wxml

@@ -4,11 +4,11 @@
        <view class="share-btn">
             <button class="share-friend" open-type="share" catchtap="shareFriend">
                <image  src="../../static/groupImg/weixin.png"></image>
-               <text>发送给群/好友</text>
+               <text>群/好友</text>
             </button>
             <view class="share-circle" catchtap="poster">
                <image  src="../../static/groupImg/circle.png"></image>
-               <text>朋友圈</text>
+               <text>朋友圈</text>
             </view>           
        </view>
    </view>

+ 6 - 0
pages/groupPage/collage-details/collage-details.js

@@ -38,6 +38,7 @@ Page({
     organizerUid: '',
     colonelName: '',
     rewardMoney: '',
+    goBackHome: false
   },
   //显示分享页 
   openShare: function () {
@@ -91,6 +92,11 @@ Page({
         read: options.read
       })
     }
+    if(options.goBackHome){
+      this.setData({
+        goBackHome: true
+      })
+    }
     // options.scene = 'QR1541862338777268';
     wx.setNavigationBarTitle({
       title: '拼团详情'

+ 2 - 1
pages/groupPage/collage-details/collage-details.json

@@ -2,6 +2,7 @@
   "component": true,
   "usingComponents": {
       "shareDialog": "/component/share/share",
-      "popup": "/component/popup/popup"
+      "popup": "/component/popup/popup",
+      "goBackHome": "/component/goBackHome/goBackHome"
   }
 }

+ 2 - 1
pages/groupPage/collage-details/collage-details.wxml

@@ -67,4 +67,5 @@
 </view>
 <canvas canvas-id="myCanvas" style="width:375px; height: 668px; position: absolute; left: -999rpx; top: -9999rpx;"></canvas>
 <shareDialog id="share-dialog" shareType='group' shareId="{{orderId}}" />
-<popup typeOf="sendSuccess" title="报告团长" headTextTwo='您发起的团购已经成立,订单号:{{orderId}}' content="{{content}}"></popup>
+<popup typeOf="sendSuccess" title="报告团长" headTextTwo='您发起的团购已经成立,订单号:{{orderId}}' content="{{content}}"></popup>
+<goBackHome id="goBackHome" shareType="{{goBackHome}}" wx:if="{{goBackHome}}" />

+ 1 - 1
pages/groupPage/collage-details/collage-details.wxss

@@ -70,7 +70,7 @@
     border-radius: 20rpx;
     border: 2rpx solid rgba(255, 255, 255, 1);
     font-size: 20rpx;
-    font-family: PingFangSC-Medium;
+    /* font-family: PingFangSC-Medium; */
     font-weight: 500;
     color: rgba(255, 255, 255, 1);
     left: 8rpx;

+ 5 - 9
pages/groupPage/grade-details/grade-details.js

@@ -65,9 +65,7 @@ Page({
       osType
     }).success((res) => {
       console.log('发起团购', res);
-      this.setData({
-        orderId: res.data.data.groupPurchaseOrder.id
-      })
+      
       if (res.data.message) {
         wx.showModal({
           title: '提示',
@@ -82,17 +80,16 @@ Page({
         })
         return false;
       }
-      // this.data.content[2].text = res.data.data.groupPurchaseOrder.organizerPrice === 0 ? '' : `在限定时间内内成功拼团,您将得到${res.data.data.groupPurchaseOrder.organizerPrice}元的奖励金哦。`
-      // this.setData({
-      //   content: this.data.content
-      // })
+      this.setData({
+        orderId: res.data.data.groupPurchaseOrder.id
+      })
       // 如果已经拥有当前课程,则无需支付,直接进入拼团成功页面
       if (res.data.data.groupPurchaseOrder.groupType === 'PROMOTION') {
         let that = this;
         wx.showModal({
           title: '重新发起团购',
           content: '您会获得奖励哦',
-          success(res) {
+          success() {
             console.log(res)
             that.popup.close();
             if (res.data.data.groupPurchaseOrder.headCount !== 1) {
@@ -105,7 +102,6 @@ Page({
                 })
               }, 1800)
             }
-
           }
         })
       } else if (this.data.isIOS) {

+ 69 - 35
pages/groupPage/group-details/group-details.js

@@ -36,7 +36,10 @@ Page({
     flag: true,
     colonelName: '',
     article: '',
-    alertFlag: false
+    alertFlag: false,
+    stillGoing: true,
+    surplusNum: '1',
+    timeList: ['6', '6', '6']
   },
   //tab切换
   tabSwitch: function () {
@@ -50,7 +53,7 @@ Page({
       hide: !this.data.hide
     })
     //登录页信息
-    this.onLoad();
+    this.onLoad(this.data.onLoadOption);
   },
   //发起团购
   sendGroup: function () {
@@ -93,7 +96,7 @@ Page({
   },
   //参团
   jionGroup: function () {
-    if(app.globalData.isIOS){
+    if (app.globalData.isIOS) {
       this.showAlert();
       return;
     }
@@ -121,7 +124,7 @@ Page({
 
     })
   },
-  showAlert: function(){
+  showAlert: function () {
     this.setData({
       alertFlag: !this.data.alertFlag
     })
@@ -168,6 +171,27 @@ Page({
   //拼团详情
   jionSuccess: function (orderId, type) {
     httpRequestApi.getMygroupInfo(orderId).success(res => {
+      // 通过分享进入的用户,如果已经参加过本次团购,则跳转进入邀请好友的页面
+      if (this.data.goBackHome) {
+        const joinUser = res.data.data.joinUserList;
+        const groupId = res.data.data.groupPurchaseOrder.id;
+        const myUid = wx.getStorageSync('uid');
+        if(myUid === res.data.data.organizer.uid){
+          wx.redirectTo({
+            url: `../collage-details/collage-details?orderId=${groupId}&goBackHome=true`
+          })
+          return;
+        }
+        joinUser.forEach(item => {
+          if(item.uid === myUid){
+            wx.redirectTo({
+              url: `../collage-details/collage-details?orderId=${groupId}&goBackHome=true`
+            })
+            return;
+          }
+        })
+      }
+
       console.log('拼团详情', res);
       const groupOrder = res.data.data.groupPurchaseOrder;
       const surplusNum = groupOrder.headcount - groupOrder.joinCount;
@@ -176,6 +200,7 @@ Page({
       }
       this.setData({
         organizer: groupOrder.organizer,
+        productId: res.data.data.groupPurchaseOrder.productId
       })
       if (type === 'join') {
         this.data.surplusList.pop();
@@ -196,8 +221,9 @@ Page({
       }
       let timeList = [];
       const stillGoing = groupOrder.closeTime - Date.parse(new Date()) <= 0 ? false : true
-      if(stillGoing){
+      if (stillGoing) {
         timeList = util.formatTime(groupOrder.closeTime - Date.parse(new Date()));
+        console.log(timeList)
       }
       // 分享进来的并且团购失效 就跳转到详情页面
       // if(this.data.goBackHome && (surplusNum ===0 || !stillGoing) ){
@@ -225,7 +251,7 @@ Page({
           surplusNum: this.data.surplusNum
         })
       }
-      
+
     }).fail(error => {
       console.log('错误', error)
     })
@@ -289,7 +315,7 @@ Page({
   goToDetail: function (detailId) {
     setTimeout(() => {
       wx.redirectTo({
-        url: `/pages/groupPage/collage-details/collage-details?orderId=${detailId}`
+        url: `/pages/groupPage/collage-details/collage-details?orderId=${detailId}&goBackHome=true`
       })
       wx.setNavigationBarTitle({
         title: '拼团详情'
@@ -334,50 +360,54 @@ Page({
     //   })
     //   return
     // }
-    getOpenidSessionKey((res) => {}, (error) => {
-      this.setData({
-        hide: !this.data.hide
-      })
-      return;
-    });
+
+    console.log('onload', options)
     wx.setNavigationBarTitle({
       title: '拼团详情'
     })
-    console.log(options)
-    if (options.orderId) {
-      const orderId = options.id;
-      this.setData({
-        orderId
-      })
-      this.jionSuccess(orderId);
-    } else {
-      // 从分享页面进入的
-      const orderId = options.productId ? options.productId : options.scene ? options.scene.replace('QR', '') : options.shareId;
-      this.setData({
-        orderId
-      })
-      this.jionSuccess(orderId);
-    }
-    if (options.scene || options.shareId) {
+    getOpenidSessionKey((res) => {
+      if (options.orderId) {
+        const orderId = options.id;
+        this.setData({
+          orderId
+        })
+        this.jionSuccess(orderId);
+      } else {
+        // 从分享页面进入的
+        const orderId = options.productId ? options.productId : options.scene ? options.scene.replace('QR', '') : options.shareId;
+        this.setData({
+          orderId
+        })
+        this.jionSuccess(orderId);
+      }
+      if (options.scene || options.shareId) {
+        this.setData({
+          goBackHome: true
+        })
+      }
+    }, (error) => {
       this.setData({
-        goBackHome: true
+        hide: !this.data.hide,
+        onLoadOption: options
       })
-    }
+      return;
+    });
+
   },
   // 下拉刷新
   onPullDownRefresh: function () {
     //当前在团购页下拉加载
     this.setData({
       surplusList: []
-    },()=>{
+    }, () => {
       this.jionSuccess(this.data.orderId);
     })
     wx.showNavigationBarLoading() //在标题栏中显示加载
     //模拟加载
-    setTimeout(function(){
+    setTimeout(function () {
       wx.hideNavigationBarLoading() //完成停止加载
       wx.stopPullDownRefresh() //停止下拉刷新
-    },1500);
+    }, 1500);
   },
   // 获取课本详情
   getBooksInfo: function (productId) {
@@ -430,5 +460,9 @@ Page({
    */
   onReady: function () {
     this.popup = this.selectComponent("#popupup");
-  }
+  },
+  judgeUser: function (callBack) {
+
+  },
+
 })

+ 4 - 2
pages/groupPage/group-details/group-details.wxss

@@ -108,7 +108,7 @@ height:104rpx;
 }
 
 scroll-view {
-    height: 64%;
+    /* height: 74%; */
     width: 100%;
 }
 
@@ -164,8 +164,10 @@ scroll-view {
 }
 
 .know {
-    padding: 18rpx;
+    padding: 18rpx 18rpx 120rpx 18rpx;
     box-sizing: border-box;
+    background: #fff;
+    margin-top: 12rpx;
 }
 
 .catalog-item {

+ 3 - 3
pages/groupPage/make-money/make-money.js

@@ -132,9 +132,9 @@ Page({
    * 用户点击右上角分享
    */
   onShareAppMessage: function () {
-    if (ops.from === 'button') {
-      console.log(ops.target)
-    }
+    // if (ops.from === 'button') {
+    //   console.log(ops.target)
+    // }
     const productId = this.data.productId;
     const groupId = this.data.groupId;
     const id = this.data.orderId;

+ 1 - 1
pages/groupPage/make-money/make-money.wxml

@@ -47,5 +47,5 @@
     </view>
 </view>  
 
-<canvas canvas-id="myCanvas" style="width:370px; height: 507px; position: absolute; left: -999rpx; top: -9999rpx;"></canvas>
+<canvas canvas-id="myCanvas" style="width:375px; height: 668px; position: absolute; left: -999rpx; top: -9999rpx;"></canvas>
 <shareDialog id="share-dialog" shareType='group' bindcustomevent="eventListener"/>

+ 90 - 86
pages/groupPage/my-group/my-group.js

@@ -9,11 +9,11 @@ Page({
    */
   data: {
     myGroupList: [],
-    typeOf:'',
+    typeOf: '',
     title: '',
     headTextOne: '',
     headTextTwo: '',
-    content: [],    
+    content: [],
     productId: '',
     orderId: '',
     groupId: '',
@@ -23,8 +23,10 @@ Page({
     line1: '您还没有拼过团哦',
     line2: '拼过团再来看看吧'
   },
-    //跳转到团购详情页
-  collageDetails: function ({currentTarget}) {
+  //跳转到团购详情页
+  collageDetails: function ({
+    currentTarget
+  }) {
     const orderId = currentTarget.dataset.orderid;
     const productId = currentTarget.dataset.productid;
     const groupId = currentTarget.dataset.groupid;
@@ -35,12 +37,12 @@ Page({
       ind
     })
     console.log(num)
-    if(!num) {
+    if (!num) {
       wx.navigateTo({
         url: `/pages/groupPage/collage-details/collage-details?orderId=${orderId}`
       })
     } else {
-      if(this.data.closeFlags[ind]) {
+      if (this.data.closeFlags[ind]) {
         this.popup.close();
         this.setData({
           productId,
@@ -48,7 +50,7 @@ Page({
           groupId
         })
         this.dialog(uid);
-      }else {
+      } else {
         wx.navigateTo({
           url: `/pages/groupPage/collage-details/collage-details?orderId=${orderId}&read=true`
         })
@@ -68,7 +70,7 @@ Page({
     // }
     if (option && option.title) {
       wx.setNavigationBarTitle({
-        title: option.title//页面标题为路由参数
+        title: option.title //页面标题为路由参数
       });
       this.setData({
         title: option.title
@@ -77,9 +79,9 @@ Page({
     this.getMyGroup();
   },
   // 获取我的拼团
-  getMyGroup: function(){
+  getMyGroup: function () {
     httpRequestApi.getMygroup().success((res) => {
-      if(!res.data.data.list){
+      if (!res.data.data.list) {
         return
       }
       this.setData({
@@ -89,12 +91,12 @@ Page({
       });
       console.log('我的团', res.data.data.list)
       res.data.data.list.forEach(element => {
-        if(element.groupPurchaseOrder.status == 'SUCCESSED') {
+        if (element.groupPurchaseOrder.status == 'SUCCESSED') {
           this.data.closeFlags.push(true);
           this.data.timeList.push(util.formatDate(element.groupPurchaseOrder.gmtModified, 4))
-        }else {
+        } else {
           this.data.closeFlags.push(false);
-          if(element.groupPurchaseOrder.closeTime - Date.parse(new Date()) < 0 ) {
+          if (element.groupPurchaseOrder.closeTime - Date.parse(new Date()) < 0) {
             this.data.timeList.push('时间到了,')
           } else {
             this.data.timeList.push(util.formatTime(element.groupPurchaseOrder.closeTime - Date.parse(new Date())).join(':'))
@@ -106,60 +108,58 @@ Page({
         myGroupList: res.data.data.list,
         timeList: this.data.timeList
       })
-    }).fail( error => {
+    }).fail(error => {
       console.log('错误', error)
     })
   },
   dialog: function (uid) {
-      if(wx.getStorageSync('uid') == uid) {
-        this.setData({
-          typeOf: 'success',
-          title: '恭喜',
-          headTextOne: '您发起的团购拼团成功',
-          headTextTwo: '领袖体质魅力无穷!',
-          content: [
-            {
-                text: " 您可以继续发起新的团购",
-                color: "#F97800"
-            },
-            {
-              text: " 不再需要支付本课程费用",
-              color: "#F97800"
-            },                          
-            {
-                text: " 拼团成功,您将得到奖学金",
-                color: "#F97800"
-            }
-          ],
-          btnContent: '再接再厉 赚奖学金'
-        })
-      }else {
-        this.setData({
-          typeOf: 'success',
-          title: '拼团成功',
-          headTextOne: '您参与的团购拼团成功',
-          headTextTwo: '感谢团长的分享',
-          content: [
-            {
-                text: " 您也可以发起新的团购",
-                color: "#F97800"
-            },
-            {
-                text: "作为新的发起人",
-                color: "#F97800"
-            },
-            {
-              text: "您无需在支付本课程费用",
-              color: "#F97800"
+    if (wx.getStorageSync('uid') == uid) {
+      this.setData({
+        typeOf: 'success',
+        title: '恭喜',
+        headTextOne: '您发起的团购拼团成功',
+        headTextTwo: '领袖体质魅力无穷!',
+        content: [{
+            text: " 您可以继续发起新的团购",
+            color: "#F97800"
           },
-            {
-              text: "拼团成功,您将得到奖学金",
-              color: "#F97800"
-            }                          
-          ],
-          btnContent: '我也试试 赚奖学金'
-        })
-      }
+          {
+            text: " 不再需要支付本课程费用",
+            color: "#F97800"
+          },
+          {
+            text: " 拼团成功,您将得到奖学金",
+            color: "#F97800"
+          }
+        ],
+        btnContent: '再接再厉 赚奖学金'
+      })
+    } else {
+      this.setData({
+        typeOf: 'success',
+        title: '拼团成功',
+        headTextOne: '您参与的团购拼团成功',
+        headTextTwo: '感谢团长的分享',
+        content: [{
+            text: " 您也可以发起新的团购",
+            color: "#F97800"
+          },
+          {
+            text: "作为新的发起人",
+            color: "#F97800"
+          },
+          {
+            text: "您无需在支付本课程费用",
+            color: "#F97800"
+          },
+          {
+            text: "拼团成功,您将得到奖学金",
+            color: "#F97800"
+          }
+        ],
+        btnContent: '我也试试 赚奖学金'
+      })
+    }
   },
   close: function () {
     const ind = this.data.ind;
@@ -175,28 +175,33 @@ Page({
     const productId = this.data.productId;
     const groupId = this.data.groupId;
     const id = this.data.orderId;
+
+    wx.navigateTo({
+      url: `/pages/groupPage/grade-details/grade-details?productId=${productId}`
+    })
+
     //开始发起团购
-    httpRequestApi.SendGroupPurchas({
-      productId,
-      groupId
-    }).success((res) => {
-      console.log('发起团购', res);
-      if (res.data.message) {
-        wx.showModal({
-          title: '提示',
-          content: res.data.message,
-          success:(res) => {
-          }
-        })
-        return false;
-      }
-      wx.navigateTo({
-        url: `/pages/groupPage/make-money/make-money?productId=${productId}&id=${res.data.data.groupPurchaseOrder.id}&groupId=${groupId}`
-      })
-      // this.getMygroup();
-    }).fail((error) => {
+    // httpRequestApi.SendGroupPurchas({
+    //   productId,
+    //   groupId
+    // }).success((res) => {
+    //   console.log('发起团购', res);
+    //   if (res.data.message) {
+    //     wx.showModal({
+    //       title: '提示',
+    //       content: res.data.message,
+    //       success:(res) => {
+    //       }
+    //     })
+    //     return false;
+    //   }
+    //   wx.navigateTo({
+    //     url: `/pages/groupPage/make-money/make-money?productId=${productId}&id=${res.data.data.groupPurchaseOrder.id}&groupId=${groupId}`
+    //   })
+    //   // this.getMygroup();
+    // }).fail((error) => {
 
-    })  
+    // })
   },
 
   /**
@@ -213,14 +218,13 @@ Page({
   },
   onPullDownRefresh: function () {
     this.onLoad();
-    
+
     wx.showNavigationBarLoading() //在标题栏中显示加载
     //模拟加载
-    setTimeout(function()
-    {
+    setTimeout(function () {
       // complete
       wx.hideNavigationBarLoading() //完成停止加载
       wx.stopPullDownRefresh() //停止下拉刷新
-    },1500);
+    }, 1500);
   }
 })

+ 5 - 0
pages/groupPage/my-group/my-group.wxss

@@ -47,6 +47,11 @@
 .group-head text {
     font-size: 32rpx;
     margin-top: 12rpx;
+    width: 150rpx;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    text-align: center;
 }
 
 .group-jion {

+ 2 - 2
pages/main/reading/reading.js

@@ -185,7 +185,7 @@ Page({
           })
         const recordSource = this.data.recordSource;
         wx.uploadFile({
-            url: 'https://readerbase.efunbox.cn/file/upload',
+            url: 'https://reader.lingjiao.cn/readerBase/file/upload',
             filePath: recordSource,
             name: '朗读录音',
             header: {
@@ -218,7 +218,7 @@ Page({
                             duration: 1000,
                             success: ()=>{
                                 console.log(res);
-                                wx.navigateTo({
+                                wx.redirectTo({
                                     url: `../../social/works/works?id=${res.data.data.id}`
                                 })
                             }

+ 1 - 1
pages/main/searchResult/searchResult.wxss

@@ -26,7 +26,7 @@
     color: #444;
     font-size: 32rpx;
     letter-spacing: 4rpx;
-    font-family: MicrosoftYaHei;
+    /* font-family: MicrosoftYaHei; */
     text-overflow: ellipsis;
     overflow: hidden;
     white-space: nowrap;

+ 2 - 2
pages/main/week/week.wxml

@@ -2,8 +2,8 @@
         <view class="hotWares" style="flex-direction:row;">
             <view wx:for="{{recommend}}" bindtap="openClass" wx:key="{{index}}" class="hotWareCard" data-classId="{{item.classId}}" data-title="{{item.title}}">
                 <image class="wareCardImg" src="{{item.img}}" />
-                <text class="wareCardTitle">{{item.title}}</text>
-                <view class="bottomData">
+                <view class="titleSummary">
+                    <text class="wareCardTitle">{{item.title}}</text>
                     <text class="wareCardTip">{{item.grade}}</text>
                 </view>
             </view>

+ 9 - 5
pages/main/week/week.wxss

@@ -21,7 +21,11 @@
     /* box-shadow: 0 8rpx 6rpx 0 rgba(0, 0, 0, .28); */
 }
 
-
+.hotWareCard .titleSummary {
+    display: flex;
+    justify-content: space-between;
+    margin-top: 12rpx;
+}
 
 .hotWareCard .wareCardImg {
     width: 100%;
@@ -37,10 +41,10 @@
     height: 46rpx;
     display: block;
     /* text-align: left; */
-    color: #414141;
+    color: #444;
     font-size: 32rpx;
-    letter-spacing: 4rpx;
-    font-family: MicrosoftYaHei;
+    /* letter-spacing: 4rpx; */
+    /* font-family: MicrosoftYaHei; */
 }
 
 .hotWareCard .bottomData {
@@ -56,6 +60,6 @@
     height: 40rpx;
     display: block;
     text-align: left;
-    color: #414141;
+    color: #444;
     font-size: 24rpx;
 }

+ 4 - 5
pages/social/replyDetail/replyDetail.js

@@ -12,12 +12,10 @@ Page({
         count: ''
     },
     onLoad: function (option) {
-        // console.log(option)
+        console.log(option)
         this.setData({
             postId: option.id,
-            count: option.count
-        },() => {
-          console.log(this.data.count);
+            // count: option.count === 'undefined' ? 0 : option.count
         })
         wx.setNavigationBarTitle({
             // title: option.count + '条回复' //页面标题为路由参数
@@ -74,7 +72,8 @@ Page({
                 console.log(replyTemp);
             });
             this.setData({
-                comment: replyTemp
+                comment: replyTemp,
+                count: replied.replyCount
             })
         });
     },

+ 1 - 1
pages/social/replyDetail/replyDetail.wxss

@@ -43,7 +43,7 @@
   height: 44rpx;
   font-size: 32rpx;
   color: #000;
-  font-family: PingFangSC-Regular;
+  /* font-family: PingFangSC-Regular; */
 }
 
 .commentItem .time {

+ 16 - 2
pages/social/works/works.js

@@ -321,9 +321,9 @@ Page({
     // 打开回复详情页
     goToDetail: function (e) {
         let id = e.currentTarget.dataset.id;
-        let count = e.currentTarget.dataset.count;
+        // let count = e.currentTarget.dataset.count;
         wx.navigateTo({
-            url: `../../social/replyDetail/replyDetail?id=${id}&count=${count}`
+            url: `../../social/replyDetail/replyDetail?id=${id}`
         })
     },
     //  绑定输入框内容
@@ -428,6 +428,20 @@ Page({
         }
         // let uid = wx.getStorageSync('uid');
         httpRequestApi.rewardMoney(this.uid, data).success(res => {
+            if (res.data.message) {
+                wx.showModal({
+                  title: '提示',
+                  content: res.data.message,
+                  success(res) {
+                    if (res.confirm) {
+                      console.log('用户点击确定')
+                    } else if (res.cancel) {
+                      console.log('用户点击取消')
+                    }
+                  }
+                })
+                return false;
+              }
             this.payMoneyt(res.data.data);
         })
 

+ 5 - 5
pages/social/works/works.wxml

@@ -2,10 +2,10 @@
     <view class="videoSection" wx:if="{{!isIOS}}">
         <cover-image wx:if="{{!videoLoad}}" class="video-playBtn" bindtap="videoPlayHandler" src="../../../static/image/play-btn.png"></cover-image>
         <image wx:if="{{!videoLoad}}" class="videoIcon" src="{{iconImg}}" />
-       <video wx:if="{{videoLoad}}" id="worksVideo" class="videoSection" src="{{videoSrc}}" bindplay="videoPlay" bindended="videoEnd" bindpause="videoPause" muted="false" controls="false" enable-progress-gesture="{{gesture}}" show-fullscreen-btn="{{fullScreenBtn}}" show-play-btn="{{playBtn}}"></video>
+       <video wx:if="{{videoLoad}}" id="worksVideo" class="videoSection" src="{{videoSrc}}" bindplay="videoPlay" bindended="videoEnd" bindpause="videoPause" controls="false" enable-progress-gesture="{{gesture}}" show-fullscreen-btn="{{fullScreenBtn}}" show-play-btn="{{playBtn}}"></video>
     </view>
     <!-- <video wx:if="{{isIOS}}" id="worksVideo" class="videoSection" src="{{videoUrl}}" autoPlay="{{autoPlay}}" controls="{{controls}}" show-center-play-btn="{{centerBtn}}" show-fullscreen-btn="{{fullScreenBtn}}" show-play-btn="{{playBtn}}"></video> -->
-    <video wx:if="{{isIOS}}" id="worksVideo" class="videoSection" src="{{videoSrc}}" bindplay="videoPlay" bindended="videoEnd" bindpause="videoPause" muted="false" controls="false" enable-progress-gesture="{{gesture}}" show-fullscreen-btn="{{fullScreenBtn}}" show-play-btn="{{playBtn}}"></video>
+    <video wx:if="{{isIOS}}" id="worksVideo" class="videoSection" src="{{videoSrc}}" bindplay="videoPlay" bindended="videoEnd" bindpause="videoPause" controls="false" enable-progress-gesture="{{gesture}}" show-fullscreen-btn="{{fullScreenBtn}}" show-play-btn="{{playBtn}}"></video>
     <view class="readAuthorSection">
         <image class="avatar" src="{{authorAvatar}}" bindtap="goToUsers" data-uid="{{authorUid}}" />
         <view class="profession" wx:if="{{authorProfession}}">{{authorProfession}}</view>
@@ -14,9 +14,9 @@
             <image src="{{isLike? '../../../static/image/red_like.png' :'../../../static/image/red_like_empty.png'  }}" />
             <text class="likeBtn">{{isLike ? '已' : ''}}点赞</text>
         </view>
-        <view class="follow" wx:if="{{authorUid !== myUid}}">
+        <view class="follow" wx:if="{{authorUid !== myUid}}" bindtap="follow">
             <image src="{{isFans? '../../../static/image/fully_heart.png' : '../../../static/image/empty_heart.png'}}" />
-            <text class="followBtn" bindtap="follow">{{isFans ? '已' : ''}}关注</text>
+            <text class="followBtn" >{{isFans ? '已' : ''}}关注</text>
         </view>
     </view>
     <view class="userSection">
@@ -46,7 +46,7 @@
                 <text class="nickName">{{item.nickName}}</text>
                 <text class="time">{{item.time}}</text>
                 <text class="gut">{{item.text}}</text>
-                <view class="commentAll" bindtap="goToDetail" data-id="{{item.id}}" data-count="{{item.replyCount}}" wx:if="{{item.replyCount}}">
+                <view class="commentAll" bindtap="goToDetail" data-id="{{item.id}}" wx:if="{{item.replyCount}}">
                     共有{{item.replyCount}}条评论
                 </view>
             </view>

+ 3 - 3
pages/social/works/works.wxss

@@ -49,7 +49,7 @@
     border-radius: 166rpx;
     border: 2rpx solid rgba(255, 255, 255, 1);
     font-size: 16rpx;
-    font-family: PingFangSC-Medium;
+    /* font-family: PingFangSC-Medium; */
     font-weight: 500;
     color: rgba(255, 255, 255, 1);
     line-height: 24rpx;
@@ -237,7 +237,7 @@
     border-radius: 166rpx;
     border: 2rpx solid rgba(255, 255, 255, 1);
     font-size: 16rpx;
-    font-family: PingFangSC-Medium;
+    /* font-family: PingFangSC-Medium; */
     font-weight: 500;
     color: rgba(255, 255, 255, 1);
     line-height: 24rpx;
@@ -252,7 +252,7 @@
     height: 44rpx;
     font-size: 32rpx;
     color: #000;
-    font-family: PingFangSC-Regular;
+    /* font-family: PingFangSC-Regular; */
 }
 
 .commentItem .time {

+ 1 - 1
pages/user/myWallet/myWallet.js

@@ -7,7 +7,7 @@ Page({
     title: '',
     totalMoney: 0,
     textDoc: '收到的赏金',
-    textPrompt: '收到的奖励自动转入微信钱包',
+    textPrompt: '赏金将于2019年1月15日自动转入微信钱包',
     walletDetail: '资金明细',
   },
 

+ 1 - 1
pages/user/myconcern/myconcern.wxml

@@ -24,5 +24,5 @@
       </view>
     </view>
   </view>
-  <myPlacerholder imageShow="{{imageShow}}" line1="{{line1}}" line2="{{line2}}" wx:if="{{fanList.length <= 1}}" />        
+  <myPlacerholder class="placerholder" imageShow="{{imageShow}}" line1="{{line1}}" line2="{{line2}}" wx:if="{{fanList.length <= 1}}" />        
 </view>

+ 4 - 1
pages/user/myconcern/myconcern.wxss

@@ -33,7 +33,7 @@ page {
   border-radius: 166rpx;
   border: 2rpx solid rgba(255, 255, 255, 1);
   font-size: 16rpx;
-  font-family: PingFangSC-Medium;
+  /* font-family: PingFangSC-Medium; */
   font-weight: 500;
   color: rgba(255, 255, 255, 1);
   line-height: 24rpx;
@@ -98,4 +98,7 @@ margin-top:-20rpx;
   margin-top: 8rpx;
   color: #686868;
   font-size: 20rpx;
+}
+.placerholder{
+  position: relative;
 }

+ 3 - 2
pages/user/myworks/myworks.js

@@ -25,8 +25,9 @@ Page({
   // 关注用户
   follow: function () {
     let followUid = this.data.uid;
+    const uid = wx.getStorageSync('uid');
     if (this.data.isFans) {
-      APIClient.cancerFollow(this.uid, followUid).success((res) => {
+      APIClient.cancerFollow(uid, followUid).success((res) => {
             this.setData({
                 isFans: false
             })
@@ -37,7 +38,7 @@ Page({
             })
         });
     } else {
-      APIClient.followUser(this.uid, followUid).success((res) => {
+      APIClient.followUser(uid, followUid).success((res) => {
             this.setData({
                 isFans: true
             })

+ 2 - 2
pages/user/myworks/myworks.wxml

@@ -26,9 +26,9 @@
           <view class='avatar-address'>{{ wareCards.user.schoolName }}</view>
         </view>
       </view>
-      <view class="follow" wx:if="{{!isMyself}}">
+      <view class="follow" wx:if="{{!isMyself}}" bindtap="follow">
         <image src="{{isFans? '../../../static/image/fully_heart.png' : '../../../static/image/empty_heart.png'}}" />
-        <text class="followBtn" bindtap="follow">{{isFans ? '已' : ''}}关注</text>
+        <text class="followBtn" >{{isFans ? '已' : ''}}关注</text>
       </view>
     </view>
     <view class='mine-category'>

+ 0 - 1
pages/user/myworks/myworks.wxss

@@ -270,7 +270,6 @@ image {
   justify-content: space-between;
   align-items: flex-end;
   color: #444;
-  font-weight: 500;
 }
 
 .left-detail{

+ 15 - 3
project.config.json

@@ -12,8 +12,8 @@
 	},
 	"compileType": "miniprogram",
 	"libVersion": "2.3.2",
-	"appid": "wx8961a3e5512f307c",
-	"projectname": "reader",
+	"appid": "wxdfa8a4f1623d28db",
+	"projectname": "%E5%B0%8F%E5%AD%A6%E8%AF%BE%E6%96%87%E6%9C%97%E8%AF%BB%E9%85%8D%E9%9F%B3",
 	"debugOptions": {
 		"hidedInDevtools": []
 	},
@@ -36,7 +36,7 @@
 			"list": []
 		},
 		"miniprogram": {
-			"current": 3,
+			"current": 5,
 			"list": [
 				{
 					"id": -1,
@@ -62,6 +62,18 @@
 					"name": "1",
 					"pathName": "pages/social/works/works",
 					"query": "id=1542687807564957&title=【课文1】小蝌蚪找妈妈"
+				},
+				{
+					"id": -1,
+					"name": "make money",
+					"pathName": "pages/groupPage/make-money/make-money",
+					"query": "productId=1&id=1544093407862684&groupId=2"
+				},
+				{
+					"id": -1,
+					"name": "团购",
+					"pathName": "pages/groupPage/group-details/group-details",
+					"query": "productId=1544097403956625"
 				}
 			]
 		}

+ 2 - 2
towxml/style/main.wxss

@@ -84,7 +84,7 @@
 
 /*正文样式*/
 .h2w {
-    font-family: "STHeitiTC-Light", "Microsoft YaHei Light", "Hiragino Sans GB", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
+    /* font-family: "黑体"; */
     font-size: 32rpx;
     line-height: 1.8;
     word-wrap: break-word;
@@ -405,7 +405,7 @@
 /**emoji表情**/
 .h2w__g-emoji {
     margin: 0 0.1em;
-    font-family: "Apple Color Emoji", "Segoe UI", "Segoe UI Emoji", "Segoe UI Symbol";
+    /* font-family: "Apple Color Emoji", "Segoe UI", "Segoe UI Emoji", "Segoe UI Symbol"; */
 }
 
 /**内置元素**/

+ 2 - 8
utils/const.js

@@ -1,11 +1,5 @@
 // 常量列表
 module.exports = {
-
-	// ----测试环境-----
-	productApi: 'https://readerproduct.efunbox.cn/',
-	baseApi: 'https://readerbase.efunbox.cn/'
-
-	// // ----正式环境-----
-	// productApi: 'https://readerproduct.ai160.com/',
-	// baseApi: 'https://readerbase.ai160.com/'
+	productApi: 'https://reader.lingjiao.cn/readerProduct/',
+	baseApi: 'https://reader.lingjiao.cn/readerBase/'
 }