Rorschach 5 years ago
parent
commit
b13dbbbe22
63 changed files with 816 additions and 343 deletions
  1. 2 1
      component/follow/follow.wxss
  2. 2 2
      component/goBackHome/goBackHome.wxss
  3. 2 2
      component/group/group.js
  4. 1 1
      component/group/group.wxml
  5. 7 6
      component/group/group.wxss
  6. 1 0
      component/hot/hot.js
  7. 1 0
      component/hot/hot.wxml
  8. 25 7
      component/hot/hot.wxss
  9. 2 2
      component/my/my.wxml
  10. 1 1
      component/my/my.wxss
  11. 47 0
      component/myModal/myModal.js
  12. 3 0
      component/myModal/myModal.json
  13. 19 0
      component/myModal/myModal.wxml
  14. 73 0
      component/myModal/myModal.wxss
  15. 4 1
      component/myToast/myToast.js
  16. 1 1
      component/myToast/myToast.wxml
  17. 4 1
      component/popup/popup.js
  18. 1 1
      component/popup/popup.wxml
  19. 5 1
      component/share/share.js
  20. 1 1
      component/share/share.wxml
  21. 3 2
      pages/groupPage/collage-details/collage-details.js
  22. 10 13
      pages/groupPage/collage-details/collage-details.wxml
  23. 7 11
      pages/groupPage/collage-details/collage-details.wxss
  24. 149 63
      pages/groupPage/grade-details/grade-details.js
  25. 2 1
      pages/groupPage/grade-details/grade-details.json
  26. 3 1
      pages/groupPage/grade-details/grade-details.wxml
  27. 77 36
      pages/groupPage/group-details/group-details.js
  28. 2 1
      pages/groupPage/group-details/group-details.json
  29. 11 8
      pages/groupPage/group-details/group-details.wxml
  30. 7 5
      pages/groupPage/group-details/group-details.wxss
  31. 7 5
      pages/groupPage/make-money/make-money.js
  32. 13 20
      pages/groupPage/make-money/make-money.wxml
  33. 1 1
      pages/groupPage/my-group/my-group.js
  34. 2 2
      pages/groupPage/my-group/my-group.wxss
  35. 4 2
      pages/index/index.js
  36. 1 1
      pages/main/books/books.js
  37. 46 14
      pages/main/class/class.js
  38. 2 1
      pages/main/class/class.json
  39. 2 1
      pages/main/class/class.wxml
  40. 1 1
      pages/main/class/class.wxss
  41. 18 0
      pages/main/reading/reading.js
  42. 1 1
      pages/main/reading/reading.wxss
  43. 3 3
      pages/social/replyDetail/replyDetail.js
  44. 1 1
      pages/social/replyDetail/replyDetail.wxml
  45. 126 56
      pages/social/works/works.js
  46. 3 1
      pages/social/works/works.json
  47. 16 10
      pages/social/works/works.wxml
  48. 16 7
      pages/social/works/works.wxss
  49. 32 17
      pages/user/myEdit/myEdit.wxss
  50. 2 2
      pages/user/myWallet/myWallet.js
  51. 8 4
      pages/user/mycollection/mycollection.wxss
  52. 1 1
      pages/user/myworks/myworks.js
  53. 1 1
      pages/user/myworks/myworks.wxss
  54. 2 2
      pages/user/walletDetails/walletDetails.wxml
  55. 2 2
      pages/user/walletDetails/walletDetails.wxss
  56. 5 5
      project.config.json
  57. BIN
      static/image/fully_heart.png
  58. BIN
      static/image/goBackHome.png
  59. BIN
      static/image/pay_success.png
  60. BIN
      static/image/purple_heart.png
  61. 8 6
      towxml/style/main.wxss
  62. 5 5
      utils/WXHttpRequest.js
  63. 14 2
      utils/util.js

+ 2 - 1
component/follow/follow.wxss

@@ -35,7 +35,7 @@
 
 .followWareCard .wareCardTitle {
     /* margin: 0 auto; */
-    width: 100%;
+    width: 80%;
     height: 46rpx;
     display: block;
     /* text-align: left; */
@@ -60,6 +60,7 @@
     flex-direction: row;
     flex:1;
     margin-left:10rpx;
+    position:relative;
 
 }
 

+ 2 - 2
component/goBackHome/goBackHome.wxss

@@ -1,6 +1,6 @@
 .goBackHome {
-    width: 100rpx;
-    height: 100rpx;
+    width: 140rpx;
+    height: 140rpx;
     position: fixed;
     bottom: 168rpx;
     right: 45rpx;

+ 2 - 2
component/group/group.js

@@ -30,7 +30,7 @@ export const groupInit = (that) => {
         temp.groupTitle = item.groupPurchaseOrder.groupTitle;
         temp.headCount = item.groupPurchaseOrder.headcount;
         temp.joinCount = item.groupPurchaseOrder.joinCount;
-        temp.lastTime = item.groupPurchaseOrder.closeTime - item.currentTime <= 0 ? '时间不足,' : util.formatTime(item.groupPurchaseOrder.closeTime - item.currentTime).join(':');
+        temp.lastTime = item.groupPurchaseOrder.closeTime - item.currentTime <= 0 ? '时间不足,' : util.lastHours(item.groupPurchaseOrder.closeTime - item.currentTime);
         temp.id = item.groupPurchaseOrder.id;
         // that.data.groupData.recommendList.push(temp);
         recommendListTemp.push(temp);
@@ -69,7 +69,7 @@ export const groupInit = (that) => {
   //点击换一换
   that.change = function () {
     that.data.groupIndex++
-    if (that.data.groupIndex >= that.data.listLength) {
+    if (that.data.groupIndex > that.data.listLength) {
       that.setData({
         groupIndex: 1
       })

+ 1 - 1
component/group/group.wxml

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

+ 7 - 6
component/group/group.wxss

@@ -84,7 +84,7 @@ scroll-view {
     display: flex;
     flex-direction: column;
     justify-content: center;
-    margin-left: 34rpx;
+    margin-left: 22rpx;
     font-size: 28rpx;
     color: #4A4A4A;
 }
@@ -170,11 +170,12 @@ scroll-view {
 }
 
 .group-box {
-    display: flex;
-    width: 105%;
-    flex-wrap: wrap;
-    flex-direction: row;
-    /* justify-content: space-between; */
+    display:flex;
+width:106%;
+flex-wrap:wrap;
+flex-direction:row;
+overflow-x:hidden;
+
 }
 
 .group-item {

+ 1 - 0
component/hot/hot.js

@@ -127,6 +127,7 @@ export const hotInit = (that) => {
         temp.classId = item.userRead.id;
         temp.time = formatDate(item.userRead.gmtCreated, 3);
         temp.avatar = item.user.avatar;
+        temp.profession = item.user.profession;
         temp.uid = item.user.uid;
         // temp.avatar = item.user.avatar;
         temp.nickName = item.user.wechatName;

+ 1 - 0
component/hot/hot.wxml

@@ -50,6 +50,7 @@
                 <view class="topData">
                     <view class="worksLeft" catchtap="goToUsers" data-uid="{{item.uid}}">
                         <image class="authorAvatar" lazy-load="true" src="{{item.avatar}}" />
+                        <view class="profession" wx:if="{{item.profession}}">{{item.profession}}</view>
                         <view class="worksInfo">
                             <view class="authorName">{{item.nickName}}</view>
                             <view class="time">{{item.time}}</view>

+ 25 - 7
component/hot/hot.wxss

@@ -60,7 +60,7 @@ swiper {
     width: 166rpx;
     text-align: center;
     margin-left: 20rpx;
-    background:#F0F1F5;
+    background: #F0F1F5;
     height: 56rpx;
     line-height: 56rpx;
     border-radius: 10rpx;
@@ -123,8 +123,8 @@ swiper {
 }
 
 .title .moreBtn image {
-    width:16rpx;
-height:28rpx;
+    width: 16rpx;
+    height: 28rpx;
 
 }
 
@@ -165,7 +165,7 @@ height:28rpx;
 
 .hotWareCard .wareCardTitle {
     /* margin: 0 auto; */
-    width: 100%;
+    width: 80%;
     height: 46rpx;
     display: block;
     /* text-align: left; */
@@ -402,7 +402,7 @@ height:28rpx;
     display: block;
     width: 662rpx;
     height: 272rpx;
-    margin: 12rpx auto 0;
+    margin: 14rpx auto 0;
     border-radius: 20rpx;
 }
 
@@ -414,7 +414,7 @@ height:28rpx;
 
 .worksCard .wareCardTitle {
     /* margin: 0 auto; */
-    width: 100%;
+    width: 80%;
     height: 46rpx;
     display: block;
     /* text-align: left; */
@@ -470,10 +470,28 @@ height:28rpx;
     height: 92rpx;
     margin: 0 22rpx 0 22rpx;
     display: block;
-
+    border: 4rpx solid #61CA54;
     border-radius: 50%;
 }
 
+.worksCard .topData .profession {
+    width: 68rpx;
+    height: 24rpx;
+    background: rgba(97, 202, 84, 1);
+    border-radius: 166rpx;
+    border: 2rpx solid rgba(255, 255, 255, 1);
+    font-size: 16rpx;
+    /* font-family: PingFangSC-Medium; */
+    font-weight: 500;
+    color: rgba(255, 255, 255, 1);
+    line-height: 24rpx;
+    text-align: center;
+    position: absolute;
+    bottom: -7rpx;
+    left: 37rpx;
+
+}
+
 .topData .numberInfo {
     display: flex;
     flex-direction: column;

+ 2 - 2
component/my/my.wxml

@@ -49,9 +49,9 @@
           <view class='color' style="padding-right:48rpx;">{{ myData.user.fansAmount || 0 }}</view>
           <view class='border-right'>
             <view class='red-heart'>
-              <image src='../../static/image/fully_heart.png'></image>
+              <image src='../../static/image/purple_heart.png'></image>
             </view>
-            <text>关注</text>
+            <text>粉丝</text>
           </view>
         </view>
         <view class='point-count'>

+ 1 - 1
component/my/my.wxss

@@ -166,7 +166,7 @@ page {
 }
 
 .red-heart {
-  width: 26rpx;
+  width: 24rpx;
   height: 22rpx;
   margin-right: 6rpx;
   margin-bottom: 6rpx;

+ 47 - 0
component/myModal/myModal.js

@@ -0,0 +1,47 @@
+Component({
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+
+        haveImage: {
+            type: "Boolean",
+            value: false
+        },
+        text: {
+            type: "Array",
+            value: []
+        },
+        type: {
+            type: "String",
+            value: ""
+        },
+        isCloseShow: {
+            type: "Boolean",
+            value: true
+        },
+        btnText:{
+            type: "String",
+            value: '确定'
+        }
+    },
+
+    /**
+     * 组件的初始数据
+     */
+    data: {
+        flag: true,
+    },
+
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+        confirm: function () {
+            this.triggerEvent('confirm', {})
+        },
+        close: function(){
+            this.triggerEvent('close', {})
+        }
+    }
+})

+ 3 - 0
component/myModal/myModal.json

@@ -0,0 +1,3 @@
+{
+    "component": true
+  }

+ 19 - 0
component/myModal/myModal.wxml

@@ -0,0 +1,19 @@
+<cover-view class="myModal">
+    <cover-view class="box havePadding" wx:if="{{type === 'text'}}">
+        <cover-view class="text" wx:for="{{text}}" wx:key="{{index}}">
+            <cover-view class="{{item.type === 'bigOrange' ? 'orange' : 'normal'}}">
+                {{item.text}}
+            </cover-view>
+        </cover-view>
+        <cover-view class="btn" bindtap="confirm">{{btnText}}</cover-view>
+    </cover-view>
+    <cover-view class="box" wx:if="{{type === 'image'}}">
+        <!-- <cover-view class="text" wx:for="{{text}}"></cover-view> -->
+        <cover-image class="paySuccessImg" src="../../static/image/pay_success.png"></cover-image>
+        <cover-view class="paySuccess">恭喜您支付成功</cover-view>
+        <cover-view class="btn" bindtap="confirm">确定</cover-view>
+    </cover-view>
+    <cover-image class="close" src="../../static/groupImg/cha.png" bindtap="close" wx:if="{{isCloseShow}}">
+        <!-- <cover-image src="" /> -->
+    </cover-image>
+</cover-view>

+ 73 - 0
component/myModal/myModal.wxss

@@ -0,0 +1,73 @@
+.myModal {
+    width: 100%;
+    height: 100%;
+    overflow: hidden;
+    background: rgba(0, 0, 0, .6);
+    position: absolute;
+    top: 0;
+    z-index: 9999;
+}
+
+.box {
+    width: 644rpx;
+    height: 400rpx;
+    background: rgba(255, 255, 255, 1);
+    border-radius: 8rpx;
+    margin: 322rpx auto 0;
+    left: 0;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    position: relative;
+    /* padding-top: 66rpx; */
+    box-sizing:border-box;
+}
+.havePadding{
+    padding-top: 66rpx;
+}
+.btn{
+    width: 464rpx;
+    height: 80rpx;
+    line-height: 80rpx;
+    border-radius: 56rpx;
+    font-size: 40rpx;
+    color: #fff;
+    text-align: center;
+    background: #ff9209;
+    position: absolute;
+    bottom: 40rpx;
+    left: 0;
+    right: 0;
+    margin: auto;
+}
+.orange {
+    font-size: 40rpx;
+    text-align: center;
+    color: #f66c1c;
+    line-height: 56rpx;
+}
+
+.normal {
+    text-align: center;
+    color: #252525;
+    font-size: 28rpx;
+    margin-top: 20rpx;
+}
+.close{
+    width: 78rpx;
+    height: 78rpx;
+    position: absolute;
+    left: 0;
+    right: 0;
+    margin: 38rpx auto 0;
+}
+.paySuccess{
+    color: #6bc74c;
+    font-size: 36rpx;
+    text-align: center
+}
+.paySuccessImg{
+    width: 160rpx;
+    height: 160rpx;
+    margin: 46rpx auto 14rpx;
+}

+ 4 - 1
component/myToast/myToast.js

@@ -6,7 +6,7 @@ Component({
       flag: {
         type: "Boolean",
         value: false
-      },
+      }
     },
   
     /**
@@ -23,5 +23,8 @@ Component({
       close: function () {
         this.triggerEvent('ShowAlert', {})
       },
+      touchMove: function(){
+        return false
+      }
     }
   })

+ 1 - 1
component/myToast/myToast.wxml

@@ -1,4 +1,4 @@
-<view class="myToast" bindtap="close" >
+<view class="myToast" bindtap="close" catchtouchmove="touchMove" >
     <view class="toastBox">
         <view class="line1">
             <image class="myToastIcon" src="../../static/image/alert_icon.png" />

+ 4 - 1
component/popup/popup.js

@@ -41,6 +41,9 @@ Component({
    * 组件的方法列表
    */
   methods: {
+    touchMove: function () {
+      return false;
+    },
     close: function () {
       this.setData({
         flag: !this.data.flag
@@ -51,4 +54,4 @@ Component({
       this.triggerEvent('Group', {})
     }
   }
-})
+})

+ 1 - 1
component/popup/popup.wxml

@@ -1,5 +1,5 @@
 <!--component/popup/popup.wxml-->
-<view class="popup" hidden="{{flag}}">
+<view class="popup" hidden="{{flag}}" catchtouchmove="touchMove">
     <!--成功-->
     <view class="popup-container" wx:if="{{typeOf == 'success' ? true : false}}">
         <view class="head-img" style="height: 240rpx">

+ 5 - 1
component/share/share.js

@@ -29,13 +29,17 @@ Component({
     QRCodeImagePath: '',
     QRCodeImageLocalPath: '',
     groupPurchaseInfo: {},
-    animationData: {}
+    animationData: {},
+    touchMove: true
   },
 
   /**
    * 组件的方法列表
    */
   methods: {
+    touchMove: function(){
+      return false
+    },
     poster: function () {
       const that = this;
       const ctx = wx.createCanvasContext('myCanvas');

+ 1 - 1
component/share/share.wxml

@@ -1,4 +1,4 @@
-<view class="share" bindtap="close" wx:if="{{shareFlag}}" catchtouchmove='true'>
+<view class="share" bindtap="close" wx:if="{{shareFlag}}" catchtouchmove="touchMove">
    <view class="btn" animation="{{animationData}}" wx:if="{{!imgUrls}}" id="btnArea" bindtap="nothing">
        <image class="bg" src="../../static/groupImg/share.png"></image>
        <view class="share-btn">

+ 3 - 2
pages/groupPage/collage-details/collage-details.js

@@ -92,7 +92,7 @@ Page({
         read: options.read
       })
     }
-    if(options.goBackHome){
+    if(options.goBackHome == 'true'){
       this.setData({
         goBackHome: true
       })
@@ -122,6 +122,7 @@ Page({
       const surplusNum = groupOrder.headcount - groupOrder.joinCount;
       this.setData({
         organizerUid: groupOrder.organizer,
+        read: groupOrder.status === 'SUCCESSED' ? true : false
       })
       for (var i = 0; i < surplusNum; i++) {
         this.data.surplusList.push(1);
@@ -131,7 +132,7 @@ Page({
       let timeList = [];
       const stillGoing = groupOrder.closeTime - Date.parse(new Date()) <= 0 ? false : true
       if (stillGoing) {
-        timeList = util.formatTime(groupOrder.closeTime - Date.parse(new Date()));
+        timeList = util.lastHoursInGroup(groupOrder.closeTime - Date.parse(new Date()));
       }
       // const timeList = util.formatTime(groupOrder.closeTime - Date.parse(new Date()));
       // console.log(timeList)

+ 10 - 13
pages/groupPage/collage-details/collage-details.wxml

@@ -32,24 +32,20 @@
             </view>
             <view class="shengyu-num" hidden="{{stillGoing}}">团购已超过时限</view>
             <view class="shengyu-num" hidden="{{surplusNum != '0'}}">拼团成功!快去朗读吧</view>
-            <view class="shengyu-time" hidden="{{!stillGoing}}">
+            <view class="shengyu-time" hidden="{{surplusNum == '0'}}">
                 剩余时间:
-                <view class="time">
-                    <text>{{timeList[0]}}</text>
-                </view>
-                天
-                <block wx:for="{{timeList[1]}}" wx:key="{{index}}">
+                <block wx:for="{{timeList[0]}}" wx:key="{{index}}">
                     <view class="time">
                         <text>{{item}}</text>
                     </view>
                 </block>
-                时
-                <block wx:for="{{timeList[2]}}" wx:key="{{index}}">
+                
+                <block wx:for="{{timeList[1]}}" wx:key="{{index}}">
                     <view class="time">
                         <text>{{item}}</text>
                     </view>
                 </block>
-                分
+                分
             </view>
         </view>
         <view class="invitation-btn" bindtap="openShare">
@@ -57,11 +53,12 @@
             <text>{{read ? '开始你的表演' : '邀请朋友参加'}}</text>
         </view>
         <view class="explain">
-            <text>拼团规则</text>
-            <view style="margin-top:30rpx;">转发给自己的朋友们,分享好课, 追随您一起学习进步 您的魅力不是吹的</view>
+            <text style="fontSize:44rpx;">拼团规则</text>
+            <view style="margin-top:30rpx;">转发给自己的朋友们,分享好课,追随您一起学习进步</view>
+            <view>您的魅力不是吹的</view>
             <view style="margin-top:20rpx;">在限定时间内成功拼团,您将得到{{rewardMoney}}元的奖励金</view>
-            <view>如果拼团失败</view>
-            <view style="margin-top:20rpx;">您预付的课程费将在48小时内退回您的账户</view>
+            <view style="margin-top:20rpx;">如果拼团失败</view>
+            <view >您预付的课程费将在48小时内退回您的账户</view>
         </view>
     </view>
 </view>

+ 7 - 11
pages/groupPage/collage-details/collage-details.wxss

@@ -35,7 +35,7 @@
     /* height: 82%; */
     margin-top: 12rpx;
     background: #fff;
-    min-height:84%;
+    min-height: 84%;
 
 }
 
@@ -136,7 +136,7 @@
     /* transform: translate(-50%); */
     width: 434rpx;
     height: 80rpx;
-    margin:80rpx auto;
+    margin: 80rpx auto 20rpx;
 }
 
 .invitation-btn image {
@@ -188,18 +188,14 @@
 }
 
 .explain {
-    /* position: absolute;
-    top: 65%;
-    left: 0; */
-    margin-top: 50rpx;
-    color: #444;
-    font-size: 32rpx;
+    color: #414141;
     width: 100%;
-    padding: 0 80rpx;
+    padding: 0 70rpx;
     box-sizing: border-box;
     text-align: center;
-    font-size: 28rpx;
-    line-height: 50rpx;
+    font-size: 24rpx;
+    /* line-height: 50rpx; */
+    margin-top:50rpx;
 }
 
 .explain text {

+ 149 - 63
pages/groupPage/grade-details/grade-details.js

@@ -34,7 +34,23 @@ Page({
     isIOS: app.globalData.isIOS,
     flag: true,
     knowFlag: true,
-    menuFlag: false
+    menuFlag: false,
+    modalType: "text",
+    isCloseShow: false,
+    modalText: [{
+        text: '您发起的团购尚未完成',
+        type: 'bigOrange'
+      },
+      {
+        text: '拼团成功,才能发起新的团购',
+        type: 'bigOrange'
+      },
+      {
+        text: '快喊朋友们一起助力',
+        type: 'bigOrange'
+      }
+    ],
+    isModalShow: false
   },
   //tab切换
   tabSwitch: function (e) {
@@ -67,17 +83,28 @@ Page({
       console.log('发起团购', 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('用户点击取消')
+        if(res.data.code == '803'){
+          // this.setData({
+          //   modalType: 'text',
+          //   isModalShow: true
+          // })
+          wx.navigateTo({
+            url:`/pages/groupPage/my-group/my-group`
+          })
+        }else{
+          wx.showModal({
+            title: '提示',
+            content: res.data.message,
+            success(res) {
+              if (res.confirm) {
+                console.log('用户点击确定')
+              } else if (res.cancel) {
+                console.log('用户点击取消')
+              }
             }
-          }
-        })
+          })
+        }
+        
         return false;
       }
       this.setData({
@@ -85,46 +112,64 @@ Page({
       })
       // 如果已经拥有当前课程,则无需支付,直接进入拼团成功页面
       if (res.data.data.groupPurchaseOrder.groupType === 'PROMOTION') {
-        let that = this;
-        wx.showModal({
-          title: '重新发起团购',
-          content: '您会获得奖励哦',
-          success() {
-            console.log(res)
-            that.popup.close();
-            if (res.data.data.groupPurchaseOrder.headCount !== 1) {
-              setTimeout(() => {
-                wx.redirectTo({
-                  url: `/pages/groupPage/make-money/make-money?productId=${productId}&id=${res.data.data.groupPurchaseOrder.id}&groupId=${groupId}`
-                })
-                wx.setNavigationBarTitle({
-                  title: '拼团详情'
-                })
-              }, 1800)
-            }
-          }
+        
+        wx.redirectTo({
+          url: `/pages/groupPage/make-money/make-money?productId=${productId}&id=${res.data.data.groupPurchaseOrder.id}&groupId=${groupId}`
+        })
+        wx.setNavigationBarTitle({
+          title: '拼团详情'
         })
+        // let that = this;
+        // wx.showModal({
+        //   title: '重新发起团购',
+        //   content: '您会获得奖励哦',
+        //   success() {
+        //     console.log(res)
+        //     that.popup.close();
+        //     if (res.data.data.groupPurchaseOrder.headCount !== 1) {
+        //       setTimeout(() => {
+        //         wx.redirectTo({
+        //           url: `/pages/groupPage/make-money/make-money?productId=${productId}&id=${res.data.data.groupPurchaseOrder.id}&groupId=${groupId}`
+        //         })
+        //         wx.setNavigationBarTitle({
+        //           title: '拼团详情'
+        //         })
+        //       }, 1800)
+        //     }
+        //   }
+        // })
       } else if (this.data.isIOS) {
         let that = this;
-        wx.showModal({
-          title: '提示',
-          content: '开团成功',
-          success(res) {
-            console.log(res)
-            that.popup.close();
-            setTimeout(() => {
-              wx.navigateTo({
-                url: `/pages/groupPage/collage-details/collage-details?orderId=${that.data.orderId}`
-              })
-              wx.setNavigationBarTitle({
-                title: '拼团详情'
-              })
-            }, 1800)
-          }
+        wx.navigateTo({
+          url: `/pages/groupPage/collage-details/collage-details?orderId=${that.data.orderId}`
         })
+        wx.setNavigationBarTitle({
+          title: '拼团详情'
+        })
+        // wx.showModal({
+        //   title: '提示',
+        //   content: '开团成功',
+        //   success(res) {
+        //     console.log(res)
+        //     that.popup.close();
+        //     setTimeout(() => {
+        //       wx.navigateTo({
+        //         url: `/pages/groupPage/collage-details/collage-details?orderId=${that.data.orderId}`
+        //       })
+        //       wx.setNavigationBarTitle({
+        //         title: '拼团详情'
+        //       })
+        //     }, 1800)
+        //   }
+        // })
       } else {
         //掉起支付
-        this.prePayMap(res.data.data.prePayMap, res.data.data.groupPurchaseOrder.id, res.data.data.groupPurchaseOrder.headCount);
+        console.log(res.data.data.groupPurchaseOrder)
+        this.setData({
+          groupCount:res.data.data.groupPurchaseOrder.headcount
+        })
+        // this.prePayMap(res.data.data.prePayMap, res.data.data.groupPurchaseOrder.id, res.data.data.groupPurchaseOrder.headcount);
+        this.prePayMap(res.data.data.prePayMap, res.data.data.groupPurchaseOrder.id);
       }
 
     }).fail((error) => {
@@ -133,7 +178,14 @@ Page({
   },
   //支付
   prePayMap: function (prePayMap, orderId, num) {
+    // this.setData({
+    //   modalType: 'image',
+    //   isModalShow: true
+    // })
+    // return
     console.log(prePayMap)
+    console.log(orderId)
+    console.log(num)
     const that = this;
     //console.log(new Date().getTime())
     wx.requestPayment({
@@ -144,26 +196,33 @@ Page({
       'signType': 'MD5',
       'paySign': prePayMap.sign,
       'success': function (res) {
+        that.setData({
+          modalType: 'image',
+          isModalShow: true
+        })
         console.log('支付成功', res)
-        wx.showModal({
-          title: '提示',
-          content: '支付成功',
-          success(res) {
-            console.log(res)
-            that.popup.close();
-            if (num !== 1) {
-              setTimeout(() => {
-                wx.navigateTo({
-                  url: `/pages/groupPage/collage-details/collage-details?orderId=${orderId}`
-                })
-                wx.setNavigationBarTitle({
-                  title: '拼团详情'
-                })
-              }, 1800)
-            }
+        // wx.showModal({
+        //   title: '提示',
+        //   content: '支付成功',
+        //   success(res) {
+        //     if (num !== 1) {
+        //       that.popup.close();
+        //       setTimeout(() => {
+        //         wx.navigateTo({
+        //           url: `/pages/groupPage/collage-details/collage-details?orderId=${orderId}`
+        //         })
+        //         wx.setNavigationBarTitle({
+        //           title: '拼团详情'
+        //         })
+        //       }, 1800)
+        //     } else {
+        //       wx.redirectTo({
+        //         url: `/pages/groupPage/grade-details/grade-details?productId=${that.data.productId}`
+        //       })
+        //     }
 
-          }
-        })
+        //   }
+        // })
 
       },
       'fail': function (res) {
@@ -260,5 +319,32 @@ Page({
   onReady: function () {
     //获取弹窗组件
     this.popup = this.selectComponent("#popup");
+  },
+  modalConfirmHandler: function(){
+    this.setData({
+      isModalShow: false
+    })
+    if(this.data.modalType === 'image'){
+      if (this.data.groupCount !== 1) {
+        this.popup.close();
+        setTimeout(() => {
+          wx.navigateTo({
+            url: `/pages/groupPage/collage-details/collage-details?orderId=${this.data.orderId}`
+          })
+          wx.setNavigationBarTitle({
+            title: '拼团详情'
+          })
+        }, 1800)
+      } else {
+        wx.redirectTo({
+          url: `/pages/groupPage/grade-details/grade-details?productId=${this.data.productId}`
+        })
+      }
+    }
+  },
+  modalCloseHandler: function(){
+    this.setData({
+      isModalShow: false
+    })
   }
 })

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

@@ -1,6 +1,7 @@
 {
     "component": true,
     "usingComponents": {
-        "popup": "/component/popup/popup"
+        "popup": "/component/popup/popup",
+        "myModal": "/component/myModal/myModal"
     } 
 }

+ 3 - 1
pages/groupPage/grade-details/grade-details.wxml

@@ -3,6 +3,7 @@
     <scroll-view scroll-y="{{true}}">
         <view class="grade-details">
             <image src="{{titleIcon}}"></image>
+            <!-- <text class="limitTime">{{limitTime}}</text> -->
         </view>
         <view class="catalog">
             <image class="bg2" src="../../../static/groupImg/Rectangle_9.png"></image>
@@ -56,4 +57,5 @@
         </block>
     </view>
 </view>
-<popup id="popup" typeOf="sendSuccess" title="报告团长" headTextOne="您发起的团购已经成立" headTextTwo="订单号:{{orderId}}" content="{{content}}"></popup>
+<popup id="popup" typeOf="sendSuccess" title="报告团长" headTextOne="您发起的团购已经成立" headTextTwo="订单号:{{orderId}}" content="{{content}}"></popup>
+ <myModal id="myModal" type="{{modalType}}"  isCloseShow="{{isCloseShow}}" text="{{modalText}}" wx:if="{{isModalShow}}" bindconfirm="modalConfirmHandler" bindclose="modalCloseHandler" />

+ 77 - 36
pages/groupPage/group-details/group-details.js

@@ -39,7 +39,19 @@ Page({
     alertFlag: false,
     stillGoing: true,
     surplusNum: '1',
-    timeList: ['6', '6', '6']
+    timeList: ['6', '6', '6'],
+    modalType: "image",
+    isModalShow: false,
+    modalCloseShow: false,
+    modalText: [{
+        text: '您已经参加过本次团购',
+        type: 'bigOrange'
+      },
+      {
+        text: '快喊朋友们一起助力',
+        type: 'bigOrange'
+      }
+    ],
   },
   //tab切换
   tabSwitch: function () {
@@ -105,17 +117,24 @@ Page({
     httpRequestApi.JoinGroupPurchas(orderId).success((res) => {
       console.log('参加团购', 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('用户点击取消')
+        if (res.data.code === 801) {
+          this.setData({
+            isModalShow: true,
+            modalType: 'text'
+          })
+        } else {
+          wx.showModal({
+            title: '提示',
+            content: res.data.message,
+            success(res) {
+              if (res.confirm) {
+                console.log('用户点击确定')
+              } else if (res.cancel) {
+                console.log('用户点击取消')
+              }
             }
-          }
-        })
+          })
+        }
         return false;
       }
       //掉起支付
@@ -132,7 +151,10 @@ Page({
   //支付
   prePayMap: function (prePayMap, type) {
     console.log(prePayMap)
-    const that = this;
+    // const that = this;
+    this.setData({
+      joinGroupType: type
+    })
     wx.requestPayment({
       'appId': prePayMap.appId,
       'timeStamp': prePayMap.timeStamp,
@@ -140,27 +162,30 @@ Page({
       'package': prePayMap.package,
       'signType': 'MD5',
       'paySign': prePayMap.sign,
-      'success': function (res) {
+      'success': res => {
         console.log('支付成功')
-        const type1 = type;
-        wx.showModal({
-          title: '提示',
-          content: '支付成功',
-          success(res) {
-            //获取拼团信息
-            console.log(that.data.orderId)
-            wx.showLoading({
-              title: '支付查询中...',
-              mask: true
-            })
-            setTimeout(() => {
-              wx.hideLoading();
-              console.log(that.data.orderId)
-              that.jionSuccess(that.data.orderId, type1);
-              // that.groupSuccess(orderId, detailId);
-            }, 800)
-          }
+        this.setData({
+          isModalShow: true
         })
+        // const type1 = type;
+        // wx.showModal({
+        //   title: '提示',
+        //   content: '支付成功',
+        //   success(res) {
+        //     //获取拼团信息
+        //     console.log(that.data.orderId)
+        //     wx.showLoading({
+        //       title: '支付查询中...',
+        //       mask: true
+        //     })
+        //     setTimeout(() => {
+        //       wx.hideLoading();
+        //       console.log(that.data.orderId)
+        //       that.jionSuccess(that.data.orderId, type1);
+        //       // that.groupSuccess(orderId, detailId);
+        //     }, 800)
+        //   }
+        // })
 
       },
       'fail': function (res) {
@@ -176,16 +201,16 @@ Page({
         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){
+        if (myUid === res.data.data.organizer.uid) {
           wx.redirectTo({
-            url: `../collage-details/collage-details?orderId=${groupId}&goBackHome=true`
+            url: `../collage-details/collage-details?orderId=${groupId}&goBackHome=${this.data.goBackHome}`
           })
           return;
         }
         joinUser.forEach(item => {
-          if(item.uid === myUid){
+          if (item.uid === myUid) {
             wx.redirectTo({
-              url: `../collage-details/collage-details?orderId=${groupId}&goBackHome=true`
+              url: `../collage-details/collage-details?orderId=${groupId}&goBackHome=${this.data.goBackHome}`
             })
             return;
           }
@@ -222,7 +247,7 @@ Page({
       let timeList = [];
       const stillGoing = groupOrder.closeTime - Date.parse(new Date()) <= 0 ? false : true
       if (stillGoing) {
-        timeList = util.formatTime(groupOrder.closeTime - Date.parse(new Date()));
+        timeList = util.lastHoursInGroup(groupOrder.closeTime - Date.parse(new Date()));
         console.log(timeList)
       }
       // 分享进来的并且团购失效 就跳转到详情页面
@@ -464,5 +489,21 @@ Page({
   judgeUser: function (callBack) {
 
   },
+  modalConfirmHandler: function () {
+    this.setData({
+      isModalShow: false
+    })
+    if (this.data.modalType === 'image') {
+      this.jionSuccess(this.data.orderId, this.data.joinGroupType);
+    }
 
+  },
+  modalCloseHandler: function () {
+    this.setData({
+      isModalShow: false
+    })
+    if (this.data.modalType === 'image') {
+      this.jionSuccess(this.data.orderId, this.data.joinGroupType);
+    }
+  },
 })

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

@@ -4,6 +4,7 @@
         "popup": "/component/popup/popup",
         "Dialog": "/component/dialog/dialog",
         "goBackHome": "/component/goBackHome/goBackHome",
-        "myToast": "/component/myToast/myToast"
+        "myToast": "/component/myToast/myToast",
+        "myModal": "/component/myModal/myModal"
     }
 }

+ 11 - 8
pages/groupPage/group-details/group-details.wxml

@@ -21,22 +21,24 @@
             <view class="shengyu-num" hidden="{{surplusNum != '0'}}">拼团成功!快去朗读吧</view>
             <view class="shengyu-time" hidden="{{!stillGoing}}">
                 剩余时间:
-                <view class="time">
-                    <text>{{timeList[0]}}</text>
-                </view>
-                天
+                <block wx:for="{{timeList[0]}}" wx:key="{{index}}">
+                    <view class="time">
+                        <text>{{item}}</text>
+                    </view>
+                </block>
+                小时
                 <block wx:for="{{timeList[1]}}" wx:key="{{index}}">
                     <view class="time">
                         <text>{{item}}</text>
                     </view>
                 </block>
-                       
-                <block wx:for="{{timeList[2]}}" wx:key="{{index}}">
+                分钟       
+                <!-- <block wx:for="{{timeList[2]}}" wx:key="{{index}}">
                     <view class="time">
                         <text>{{item}}</text>
                     </view>
                 </block>                
-                分             
+                分              -->
             </view>
         </view>
     </view>
@@ -112,4 +114,5 @@
 <view hidden="{{hide}}">
   <Dialog bindmyevent="jurisdiction" />
 </view>
-<myToast bindShowAlert="showAlert" wx:if="{{alertFlag}}" />
+<myToast bindShowAlert="showAlert" wx:if="{{alertFlag}}" />
+ <myModal id="myModal" type="{{modalType}}" isCloseShow="{{modalCloseShow}}"  text="{{modalText}}" wx:if="{{isModalShow}}" bindconfirm="modalConfirmHandler" bindclose="modalCloseHandler" />

+ 7 - 5
pages/groupPage/group-details/group-details.wxss

@@ -44,11 +44,13 @@ height:104rpx;
 }
 
 .headImg-item .tuanzhangIcon {
-    position: absolute;
-    right: -20rpx;
-    top: -10rpx;
-    width: 80rpx;
-    height: 30rpx;
+   position:absolute;
+right:13rpx;
+width:78rpx;
+height:30rpx;
+bottom:-10rpx;
+border-radius:0;
+
 }
 
 .bg-boder {

+ 7 - 5
pages/groupPage/make-money/make-money.js

@@ -27,7 +27,7 @@ Page({
       author: this.data.organizer.wechatName,
       iconImg: this.data.groupPurchaseInfo.bgImg,
       title: this.data.groupPurchaseInfo.productTitle,
-      path: `pages/groupPage/collage-details/collage-details`,
+      path: `pages/groupPage/group-details/group-details`,
       scene: `QR${this.data.orderId}`,
       groupPurchaseInfo: this.data.groupPurchaseInfo
     }
@@ -71,7 +71,7 @@ Page({
         this.data.surplusList.push(1);
       }
       //时间转换
-      const timeList = util.formatTime(res.data.data.groupPurchaseOrder.closeTime - res.data.data.groupPurchaseOrder.gmtModified);
+      const timeList = util.lastHoursInGroup(res.data.data.groupPurchaseOrder.closeTime - res.data.data.groupPurchaseOrder.gmtModified);
       this.setData({
         groupPurchaseInfo: res.data.data.groupPurchaseInfo,
         organizer: res.data.data.organizer,
@@ -135,12 +135,14 @@ Page({
     // if (ops.from === 'button') {
     //   console.log(ops.target)
     // }
-    const productId = this.data.productId;
-    const groupId = this.data.groupId;
+    // const productId = this.data.productId;
+    // const groupId = this.data.groupId;
     const id = this.data.orderId;
+    console.log(id)
+
     return {
       title: '老师同学都在玩的配音show,你还在等什么?',
-      path: `pages/groupPage/group-details/group-details?productId=${productId}&id=${id}&groupId=${groupId}`,
+      path: `pages/groupPage/group-details/group-details?share=true&shareId=${id}`,
       imageUrl: '../../../static/share/group_icon.jpg',
       success: function (res) {
         // 转发成功

+ 13 - 20
pages/groupPage/make-money/make-money.wxml

@@ -20,25 +20,18 @@
         <view class="shengyu-num">仅剩<text>{{surplusNum}}</text>个名额就拼团成功了</view>
         <view class="shengyu-time">
             剩余时间:
-            <view class="time">
-                <!-- <image src="../../../static/groupImg/Rectangle_31.png"></image> -->
-                <text>{{timeList[0]}}</text>
-            </view>
-            天
-            <block wx:for="{{timeList[1]}}" wx:key="{{index}}">
-                <view class="time">
-                    <!-- <image src="../../../static/groupImg/Rectangle_31.png"></image> -->
-                    <text>{{item}}</text>
-                </view>
-            </block>
-            时             
-            <block wx:for="{{timeList[2]}}" wx:key="{{index}}">
-                <view class="time">
-                    <!-- <image src="../../../static/groupImg/Rectangle_31.png"></image> -->
-                    <text>{{item}}</text>
-                </view>
-            </block>               
-            分             
+             <block wx:for="{{timeList[0]}}" wx:key="{{index}}">
+                    <view class="time">
+                        <text>{{item}}</text>
+                    </view>
+                </block>
+                小时
+                <block wx:for="{{timeList[1]}}" wx:key="{{index}}">
+                    <view class="time">
+                        <text>{{item}}</text>
+                    </view>
+                </block>
+                分钟   
         </view>
     </view>
     <view class="invitation-btn" bindtap="share">
@@ -48,4 +41,4 @@
 </view>  
 
 <canvas canvas-id="myCanvas" style="width:375px; height: 668px; position: absolute; left: -999rpx; top: -9999rpx;"></canvas>
-<shareDialog id="share-dialog" shareType='group' bindcustomevent="eventListener"/>
+<shareDialog id="share-dialog" shareType='group' shareId="{{orderId}}"/>

+ 1 - 1
pages/groupPage/my-group/my-group.js

@@ -99,7 +99,7 @@ Page({
           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(':'))
+            this.data.timeList.push(util.lastHours(element.groupPurchaseOrder.closeTime - Date.parse(new Date())))
           }
         }
       });

+ 2 - 2
pages/groupPage/my-group/my-group.wxss

@@ -15,7 +15,7 @@
     display: flex;
     justify-content: row;
     flex-wrap: wrap;
-    padding: 0 16rpx;
+    padding: 0 16rpx 50rpx;
     box-sizing: border-box;
 }
 
@@ -83,7 +83,7 @@
     display: flex;
     flex-direction: column;
     justify-content: center;
-    margin-left: 34rpx;
+    margin-left: 20rpx;
     font-size: 28rpx;
     color: #4A4A4A;
 }

+ 4 - 2
pages/index/index.js

@@ -122,7 +122,9 @@ Page({
 
   },
   onShow: function () {
-
+    wx.setNavigationBarTitle({
+      title: '小学课文朗读配音'
+    })
     // this.init();
     getOpenidSessionKey((res) => {}, (error) => {
       // console.log(error)
@@ -183,7 +185,7 @@ Page({
         followPageNo: this.data.followPageNo + 1
       })
       if (this.data.followPageNo <= this.data.followPageTotalNo) {
-        this.getWorks(this.uid, this.data.followPageNo, 5);
+        this.getWorks(this.data.followPageNo, 5);
 
       } else {
         console.log('没有更多')

+ 1 - 1
pages/main/books/books.js

@@ -14,7 +14,7 @@ Page({
                 let temp = {};
                 temp.id = item.id;
                 temp.iconImg = item.iconImg;
-                temp.title = item.title.substring(0,5);
+                temp.title = item.subTitle;
                 booksTemp.push(temp);
             });
             this.setData({

+ 46 - 14
pages/main/class/class.js

@@ -24,7 +24,20 @@ Page({
     collectFlag: false,
     goBackHome: false,
     lazyVideoUrl: '',
-    isIOS: app.globalData.isIOS
+    isIOS: app.globalData.isIOS,
+    modalType: "text",
+    
+    modalText: [{
+        text: '您还不是本课程的会员',
+        type: 'bigOrange'
+      },
+      {
+        text: '您可以开团,拼团成功获得使用权',
+        type: 'normal'
+      }
+    ],
+    modalBtnText:'去开团',
+    isModalShow: false
   },
   onLoad: function (option) {
     console.log(option);
@@ -85,6 +98,9 @@ Page({
     let classId = this.data.id;
     httpRequestApi.checkLesson(classId).success(res => {
       const productId = res.data.data[0];
+      this.setData({
+        productId
+      })
       // wx.navigateTo({
       //   url: `../../main/reading/reading?id=${classId}`
       // })
@@ -110,25 +126,41 @@ Page({
           //   })
           //   return;
           // }
-          wx.showModal({
-            title: '您未购买过本书,不能朗读',
-            content: '超值团购进行中,快去看看',
-            success(res) {
-              if (res.confirm) {
-                console.log('用户点击确定')
-                wx.navigateTo({
-                  url: `../../groupPage/grade-details/grade-details?productId=${productId}`
-                })
-              } else if (res.cancel) {
-                console.log('用户点击取消')
-              }
-            }
+          this.setData({
+            isModalShow: true
           })
+          // wx.showModal({
+          //   title: '您未购买过本书,不能朗读',
+          //   content: '超值团购进行中,快去看看',
+          //   success(res) {
+          //     if (res.confirm) {
+          //       console.log('用户点击确定')
+          //       wx.navigateTo({
+          //         url: `../../groupPage/grade-details/grade-details?productId=${productId}`
+          //       })
+          //     } else if (res.cancel) {
+          //       console.log('用户点击取消')
+          //     }
+          //   }
+          // })
         }
       })
     });
 
   },
+  modalConfirmHandler: function () {
+    this.setData({
+      isModalShow: false
+    })
+    wx.navigateTo({
+      url: `../../groupPage/grade-details/grade-details?productId=${this.data.productId}`
+    })
+  },
+  modalCloseHandler: function (){
+    this.setData({
+      isModalShow: false
+    })
+  },
   openShare: function (e) {
     // this.setData({
     //     shareFlag: !this.data.shareFlag

+ 2 - 1
pages/main/class/class.json

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

+ 2 - 1
pages/main/class/class.wxml

@@ -8,7 +8,7 @@
     <view class="readWorksSection">
         <view class="peopleNum">
             <image class="peoplesIcon" src="../../../static/image/peoples.png" />
-            <view class="title">共有{{total}}人完成了录音</view>
+            <view class="title">共有{{total}}个录音作品</view>
         </view>
         <view class="workCard" wx:for="{{works}}" wx:key="{{index}}" bindtap="goToWorks" data-id="{{item.id}}">
             <image class="avatar" lazy-load="true" src="{{item.avatar}}" />
@@ -44,4 +44,5 @@
     <canvas canvas-id="myCanvas" style="width:370px;z-index=99999; height: 507px; position: absolute; left: -999rpx; top: -9999rpx;"></canvas>
     <shareDialog id="share-dialog" shareType='class' />
     <goBackHome id="goBackHome" shareType="{{goBackHome}}" wx:if="{{goBackHome}}" />
+    <myModal id="myModal"  btnText="{{modalBtnText}}"  type="{{modalType}}" text="{{modalText}}" wx:if="{{isModalShow}}" bindconfirm="modalConfirmHandler" bindclose="modalCloseHandler" />
 </view>

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

@@ -16,7 +16,7 @@
 }
 
 .videoIcon {
-    width: 825rpx;
+    width: 750rpx;
     height: 363rpx;
     position: absolute;
     top: 20rpx;

+ 18 - 0
pages/main/reading/reading.js

@@ -70,11 +70,20 @@ Page({
         })
     },
     onHide: function(){
+        console.log('onhide')
+        if(this.recorderManager){
+            this.recorderManager.stop();
+        }
+        
         if(this.innerAudioContext){
             this.innerAudioContext.stop();
         }
     },
     onUnload: function(){
+        console.log('onUnload')
+        if(this.recorderManager){
+            this.recorderManager.stop();
+        }
         if(this.innerAudioContext){
             this.innerAudioContext.stop();
         }
@@ -115,6 +124,15 @@ Page({
         if (this.data.recordFlag === 0) {
             // this.recordStart();
             // this.saveVideo();
+            if(this.videoCtx){
+                this.videoCtx.stop();
+            }
+            if(this.recorderManager){
+                this.recorderManager.stop();
+            }
+            if(this.innerAudioContext){
+                this.innerAudioContext.stop();
+            }
             this.videoComplete();
             return;
         }

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

@@ -18,7 +18,7 @@ audio {
 .textSection .textContent{
     font-size: 32rpx;
     line-height: 56rpx;
-    /* text-align: center; */
+    text-align: center; 
     display: block;
     margin: 0 50rpx;
     color: #444;

+ 3 - 3
pages/social/replyDetail/replyDetail.js

@@ -33,7 +33,7 @@ Page({
     replyDone:function(){
       const data = {
         postsId: this.data.postId,
-        content: this.data.replyInfo
+        content: encodeURI(this.data.replyInfo)
       }
       if(this.data.replyInfo){
         httpRequestApi.postReplyComment(this.uid, data).success(res => {
@@ -55,7 +55,7 @@ Page({
             const replyTemp = [];
             const authorDetail = {};
             authorDetail.name = replied.user.wechatName;
-            authorDetail.text = replied.detailDesc;
+            authorDetail.text = decodeURI(replied.detailDesc);
             authorDetail.time = formatDate(replied.gmtModified,3);
             authorDetail.likes = replied.postsAttributeInfo.favors;
             authorDetail.avatar = replied.user.avatar;
@@ -63,7 +63,7 @@ Page({
             replyList.forEach(item => {
                 const temp = {};
                 temp.name = item.user.wechatName;
-                temp.text = item.content;
+                temp.text = decodeURI(item.content);
                 temp.time = formatDate(item.gmtModified,3);
                 temp.likes = 0;
                 temp.id = item.postId;

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

@@ -22,7 +22,7 @@
   </view>
   
   <view class='reply-msg'>
-    <input name='reply' class='reply-input' placeholder='回复@{{ comment[0].name }}' value='{{ replyInfo }}' bindinput='saveValue' confirm-type ="send">
+    <input name='reply' class='reply-input' bindconfirm="replyDone" placeholder='回复@{{ comment[0].name }}' value='{{ replyInfo }}' bindinput='saveValue' confirm-type ="send">
     </input>
     <text class='reply-btn' bindtap='replyDone'>回复</text>
   </view>

+ 126 - 56
pages/social/works/works.js

@@ -27,9 +27,28 @@ Page({
         pageNo: 1,
         pageSize: 3,
         goBackHome: false,
-        isIOS: app.globalData.isIOS
+        isIOS: app.globalData.isIOS,
+        alertFlag: false,
+        modalType: "text",
+        modalText: [{
+                text: '您还不是本课程的会员',
+                type: 'bigOrange'
+            },
+            {
+                text: '您可以开团,拼团成功获得使用权',
+                type: 'normal'
+            }
+        ],
+        modalBtnText:'去开团',
+        isModalShow: false,
+        modalCloseShow: true
         // shareFlag: false
     },
+    showAlert: function () {
+        this.setData({
+            alertFlag: !this.data.alertFlag
+        })
+    },
     onLoad: function (option) {
         let id = option.id ? option.id : option.scene.replace('QR', '')
         if (option.scene || option.shareCard) {
@@ -42,7 +61,6 @@ Page({
         })
         this.uid = wx.getStorageSync('uid');
         let stackSize = 1;
-        console.log(option.stackSize)
         if (option.stackSize) {
             stackSize = option.stackSize;
         }
@@ -65,7 +83,7 @@ Page({
     },
     onUnload: function () {
         if (this.innerAudioContext) {
-            this.innerAudioContext.pause();
+            this.innerAudioContext.destroy();
         }
         let videoCtx = wx.createVideoContext('worksVideo', this);
         videoCtx.stop();
@@ -118,12 +136,12 @@ Page({
     },
     videoPlayHandler: function () {
         this.setData({
-          videoLoad: true
+            videoLoad: true
         }, () => {
-          this.videoCtx = wx.createVideoContext('worksVideo', this);
-          this.videoCtx.play();
+            this.videoCtx = wx.createVideoContext('worksVideo', this);
+            this.videoCtx.play();
         })
-      },
+    },
     likeWorks: function (e) {
         if (this.data.isLike) {
             wx.showToast({
@@ -161,12 +179,24 @@ Page({
         this.shareDialog.share(data);
     },
     videoPlay: function () {
+        // 视频开始 先结束 再开始
         this.innerAudioContext.play();
-        httpRequestApi.playWorks(this.uid, this.data.id);
+        this.innerAudioContext.pause();
+        wx.showToast({
+            title: '加载中',
+            icon: 'loading',
+            duration: 600
+        })
+        setTimeout(() => {
+            this.innerAudioContext.play();
+        }, 800)
+        httpRequestApi.playWorks(this.uid, this.data.id).success(() => {
+            console.log('容个错')
+        });
     },
     // 视频播放完毕销毁录音
     videoEnd: function () {
-        this.innerAudioContext.destroy();
+        this.innerAudioContext.stop();
     },
     videoPause: function () {
         this.innerAudioContext.pause();
@@ -175,6 +205,9 @@ Page({
         const classId = this.data.classId;
         httpRequestApi.checkLesson(classId).success(res => {
             const productId = res.data.data[0];
+            this.setData({
+                productId
+            })
             httpRequestApi.areYouSuper(res.data.data).success(res => {
                 if (res.data.success) {
                     wx.navigateTo({
@@ -196,20 +229,24 @@ Page({
                     //     })
                     //     return;
                     // }
-                    wx.showModal({
-                        title: '您未购买过本书,不能朗读',
-                        content: '超值团购进行中,快去看看',
-                        success(res) {
-                            if (res.confirm) {
-                                console.log('用户点击确定')
-                                wx.navigateTo({
-                                    url: `../../groupPage/grade-details/grade-details?productId=${productId}`
-                                })
-                            } else if (res.cancel) {
-                                console.log('用户点击取消')
-                            }
-                        }
+                    console.log('chulaiba')
+                    this.setData({
+                        isModalShow: true
                     })
+                    // wx.showModal({
+                    //     title: '您未购买过本书,不能朗读',
+                    //     content: '超值团购进行中,快去看看',
+                    //     success(res) {
+                    //         if (res.confirm) {
+                    //             console.log('用户点击确定')
+                    //             wx.navigateTo({
+                    //                 url: `../../groupPage/grade-details/grade-details?productId=${productId}`
+                    //             })
+                    //         } else if (res.cancel) {
+                    //             console.log('用户点击取消')
+                    //         }
+                    //     }
+                    // })
                 }
             })
         });
@@ -257,11 +294,13 @@ Page({
         // let uid = wx.getStorageSync('uid');
         let followUid = e.currentTarget.dataset.id;
         let index = e.currentTarget.dataset.index;
-        httpRequestApi.likeCommend(this.uid, followUid).success(res => {            
+        httpRequestApi.likeCommend(this.uid, followUid).success(res => {
             console.log(res);
             const str = `replyList[${index}].likes`;
+            const strImg = `replyList[${index}].isLike`;
             this.setData({
-                [str]: res.data.data.favors
+                [str]: res.data.data.favors,
+                [strImg]: true
             })
         });
     },
@@ -277,12 +316,12 @@ Page({
         this.data.stackSize++;
         console.log(this.data.stackSize)
         if (this.data.stackSize >= 3) {
-            console.log('跳转',this.data.stackSize)
+            console.log('跳转', this.data.stackSize)
             wx.redirectTo({
                 url: `../../social/works/works?id=${e.currentTarget.dataset.uid}&title=${e.currentTarget.dataset.title}&stackSize=${this.data.stackSize}`
             })
         } else {
-            console.log('下一个页面',this.data.stackSize)
+            console.log('下一个页面', this.data.stackSize)
             wx.navigateTo({
                 url: `../../social/works/works?id=${e.currentTarget.dataset.uid}&title=${e.currentTarget.dataset.title}&stackSize=${this.data.stackSize}`
             })
@@ -304,11 +343,12 @@ Page({
                 temp.avatar = item.user.avatar;
                 temp.profession = item.user.profession;
                 temp.uid = item.user.uid;
-                temp.text = item.detailDesc;
+                temp.text = decodeURI(item.detailDesc);
                 temp.id = item.id;
                 temp.replyCount = item.replyCount;
-                temp.time = formatDate(item.gmtModified, 3);
+                temp.time = formatDate(item.gmtCreated, 3);
                 temp.likes = item.postsAttributeInfo.favors || 0;
+                temp.isLike = item.isLike;
                 this.data.replyList.push(temp);
             });
             this.setData({
@@ -339,7 +379,7 @@ Page({
             let data = {
                 "columnId": this.data.id,
                 colunmNames: 'what',
-                "detailDesc": this.data.inputValue
+                "detailDesc": encodeURI(this.data.inputValue)
             }
             httpRequestApi.postReply(this.uid, data).success(res => {
                 this.setData({
@@ -430,24 +470,24 @@ Page({
         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('用户点击取消')
+                    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);
+            }
+            this.payMoney(res.data.data);
         })
 
     },
     //支付
-    payMoneyt: function (orderInfo) {
+    payMoney: function (orderInfo) {
         wx.requestPayment({
             'appId': orderInfo.appId,
             'timeStamp': orderInfo.timeStamp,
@@ -455,22 +495,28 @@ Page({
             'package': orderInfo.package,
             'signType': orderInfo.signType,
             'paySign': orderInfo.sign,
-            'success': function (res) {
-                wx.showModal({
-                    title: '提示',
-                    content: '支付成功',
-                    success(res) {
-                        if (res.confirm) {
-                            this.setData({
-                                ifReward: false
-                            })
-                        } else if (res.cancel) {
-                            this.setData({
-                                ifReward: false
-                            })
-                        }
-                    }
+            'success': res => {
+                this.setData({
+                    modalType: 'image',
+                    isModalShow: true,
+                    modalCloseShow: false,
+                    modalBtnText: '确定'
                 })
+                // wx.showModal({
+                //     title: '提示',
+                //     content: '支付成功',
+                //     success(res) {
+                //         if (res.confirm) {
+                //             this.setData({
+                //                 ifReward: false
+                //             })
+                //         } else if (res.cancel) {
+                //             this.setData({
+                //                 ifReward: false
+                //             })
+                //         }
+                //     }
+                // })
 
             },
             'fail': function (res) {
@@ -486,5 +532,29 @@ Page({
         wx.redirectTo({
             url: '../../index/index'
         })
-    }
+    },
+    modalConfirmHandler: function () {
+        
+        if (this.data.modalType === 'image') {
+            this.setData({
+                modalType: 'text',
+                isModalShow: false,
+                ifReward: false,
+                modalCloseShow: true,
+                modalBtnText: "去开团"
+            })
+            return false
+        }
+        this.setData({
+            isModalShow: false
+        })
+        wx.navigateTo({
+            url: `../../groupPage/grade-details/grade-details?productId=${this.data.productId}`
+        })
+    },
+    modalCloseHandler: function () {
+        this.setData({
+            isModalShow: false
+        })
+    },
 })

+ 3 - 1
pages/social/works/works.json

@@ -4,7 +4,9 @@
     "usingComponents": {
         "shareDialog": "/component/share/share",
         "popup": "/component/popup/popup",
-        "goBackHome": "/component/goBackHome/goBackHome"
+        "goBackHome": "/component/goBackHome/goBackHome",
+        "myToast":"/component/myToast/myToast",
+        "myModal": "/component/myModal/myModal"
     },
     "window": {
         "onReachBottomDistance": 50

+ 16 - 10
pages/social/works/works.wxml

@@ -2,7 +2,7 @@
     <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" 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" controls="false" enable-progress-gesture="{{gesture}}" show-fullscreen-btn="{{fullScreenBtn}}" show-play-btn="{{playBtn}}"></video>
@@ -10,13 +10,13 @@
         <image class="avatar" src="{{authorAvatar}}" bindtap="goToUsers" data-uid="{{authorUid}}" />
         <view class="profession" wx:if="{{authorProfession}}">{{authorProfession}}</view>
         <text class="nickName" bindtap="goToUsers" data-uid="{{authorUid}}">{{author}}</text>
-        <view class="like" bindtap="likeWorks" wx:if="{{authorUid !== myUid}}">
+        <view class="like" bindtap="likeWorks" wx:if="{{authorUid !== myUid}}" style="{{authorUid === 'c7f0a8fdd3a549ea9109a7b7486775f2'? 'margin-left:160rpx' : null}}">
             <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}}" bindtap="follow">
+        <view class="follow" wx:if="{{authorUid !== myUid && authorUid !== 'c7f0a8fdd3a549ea9109a7b7486775f2'}}" bindtap="follow">
             <image src="{{isFans? '../../../static/image/fully_heart.png' : '../../../static/image/empty_heart.png'}}" />
-            <text class="followBtn" >{{isFans ? '已' : ''}}关注</text>
+            <text class="followBtn">{{isFans ? '已' : ''}}关注</text>
         </view>
     </view>
     <view class="userSection">
@@ -34,7 +34,7 @@
     </view>
     <view class="commentSection">
         <view class="title">评论({{total}})</view>
-        <input class="commentInput" bindconfirm="sendHandler" confirm-type="send" placeholder="听了这么多,说点什么吧" bindinput="inputValue"></input>
+        <input class="commentInput" bindconfirm="sendHandler" value="{{inputValue}}" confirm-type="send" placeholder="听了这么多,说点什么吧" bindinput="inputValue"></input>
     </view>
     <view class="commentArea">
         <view class="commentItem" wx:for="{{replyList}}" wx:key="{{index}}">
@@ -45,21 +45,24 @@
             <view class="commentCore">
                 <text class="nickName">{{item.nickName}}</text>
                 <text class="time">{{item.time}}</text>
-                <text class="gut">{{item.text}}</text>
+                <view class="gut">
+                    <text class="gutInGut">{{item.text}}</text>
+                    <text wx:if="{{item.text.length >=10}}" class="whole" bindtap="goToDetail" data-id="{{item.id}}">全文
+                    </text>
+                </view>
                 <view class="commentAll" bindtap="goToDetail" data-id="{{item.id}}" wx:if="{{item.replyCount}}">
                     共有{{item.replyCount}}条评论
                 </view>
             </view>
             <view class="btnWrapper">
-            <!-- <image class="commentBtn" src="../../../static/image/comment.png" bindtap="goToDetail" data-count="{{item.replyCount}}" data-id="{{item.id}}" data-index="{{index}}" />
+                <!-- <image class="commentBtn" src="../../../static/image/comment.png" bindtap="goToDetail" data-count="{{item.replyCount}}" data-id="{{item.id}}" data-index="{{index}}" />
                 <text class="commentText" bindtap="goToDetail" data-id="{{item.id}}" data-count="{{item.replyCount}}" data-index="{{index}}">评论</text> -->
-                <image class="likeBtn" src="../../../static/image/like.png" data-index="{{index}}" data-likes="{{item.likes}}" data-id="{{item.id}}" bindtap="likeCommend" />
-                <text class="likeText" data-index="{{index}}" data-likes="{{item.likes}}" data-id="{{item.id}}" bindtap="likeCommend">{{item.likes}}
+                <image class="likeBtn" src="{{item.isLike? '../../../static/image/point.png' : '../../../static/image/like.png'}}" data-index="{{index}}" data-likes="{{item.likes}}" data-id="{{item.id}}" bindtap="{{item.isLike? null:'likeCommend'}}" />
+                <text class="likeText" data-index="{{index}}" data-likes="{{item.likes}}" data-id="{{item.id}}" bindtap="{{item.isLike? null:'likeCommend'}}">{{item.likes}}
                 </text>
                 <image class="commentBtn" src="../../../static/image/comment.png" bindtap="goToDetail" data-id="{{item.id}}" data-index="{{index}}" />
                 <text class="commentText" bindtap="goToDetail" data-id="{{item.id}}" data-index="{{index}}">回复
                 </text>
-                
             </view>
         </view>
     </view>
@@ -100,6 +103,7 @@
             <cover-view class="sologan">声情并茂  悦耳动听</cover-view>
             <cover-view class="moneyArea">
                 <cover-view class="{{howMuch ==='100' ? 'money moneySelect' : 'money moneyNormal'}}" bindtap="setMoney" data-money="100">
+                    <!-- <cover-view class="{{howMuch ==='1' ? 'money moneySelect' : 'money moneyNormal'}}" bindtap="setMoney" data-money="1"> -->
                     1.0元
                 </cover-view>
                 <cover-view class="{{howMuch ==='200' ? 'money moneySelect' : 'money moneyNormal'}}" bindtap="setMoney" data-money="200">
@@ -118,4 +122,6 @@
         <image src="../../../static/image/goBackHome.png" />
     </view> -->
     <goBackHome id="goBackHome" shareType="{{goBackHome}}" wx:if="{{goBackHome}}" />
+    <MyToast bindShowAlert="showAlert" wx:if="{{alertFlag}}" />
+    <myModal id="myModal" btnText="{{modalBtnText}}" type="{{modalType}}" isCloseShow="{{modalCloseShow}}" text="{{modalText}}" wx:if="{{isModalShow}}" bindconfirm="modalConfirmHandler" bindclose="modalCloseHandler" />
 </view>

+ 16 - 7
pages/social/works/works.wxss

@@ -16,7 +16,7 @@
 }
 
 .videoIcon {
-    width: 825rpx;
+    width: 750rpx;
     height: 363rpx;
     position: absolute;
     top: 20rpx;
@@ -109,7 +109,7 @@
 
 .readAuthorSection .follow image {
     width: 36rpx;
-    height: 36rpx;
+    height: 32rpx;
     margin-right: 15rpx;
 
 }
@@ -196,7 +196,7 @@
 
 .commentArea {
     width: 100%;
-    margin-bottom: 160rpx;
+    padding-bottom: 240rpx;
 }
 
 .commentArea .commentItem {
@@ -251,7 +251,7 @@
     margin-top: 18rpx;
     height: 44rpx;
     font-size: 32rpx;
-    color: #000;
+    color: #414141;
     /* font-family: PingFangSC-Regular; */
 }
 
@@ -264,15 +264,24 @@
 
 .commentItem .gut {
     margin-top: 12rpx;
-    width: 420rpx;
+    width: 520rpx;
     height: 44rpx;
     font-size: 32rpx;
-    color: #000;
+    color: #414141;
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+}
+.commentItem .gut .gutInGut{
+    width: 330rpx;
     overflow: hidden;
     text-overflow: ellipsis;
     white-space: nowrap;
+    display: block
+}
+.whole{
+    color: #61ca54
 }
-
 .commentItem .commentAll {
     margin-top: 10rpx;
     width: 263rpx;

+ 32 - 17
pages/user/myEdit/myEdit.wxss

@@ -1,15 +1,19 @@
-page{
+/* page{
   width: 750rpx;
   height: 1206rpx;
   padding-top: 0;
   background: #F7F7F7;
-}
+} */
 
 .setting-info{
-  width: 716rpx;
+  width: 100%;
+  height: 100%;
+  overflow: hidden;
+  padding: 0 17rpx;
   margin: 0 auto;
   font-size: 32rpx;
   color: #5E5E5E;
+  background: #F7F7F7;
 }
 
 .nickname-box{
@@ -26,8 +30,9 @@ page{
 }
 
 .user-action{
-  min-width: 100rpx;
-  max-width: 400rpx;
+  /* min-width: 100rpx; */
+  /* max-width: 400rpx; */
+  width: 100%;
 }
 
 .nickname{
@@ -46,7 +51,7 @@ page{
 
 .edit-img{
   position: absolute;
-  right:130rpx;
+  right:50rpx;
   top: 24rpx;
   width: 22rpx;
   height: 32rpx;
@@ -75,21 +80,26 @@ page{
 
 .radio-group{
   display: flex;
+  height: 42rpx;
+  overflow: hidden;
+  /* margin-top: -8rpx; */
 }
 
-.sex-title{
+/* .sex-title{
   position: relative;
   top: 10rpx;
-}
+} */
 
 .radio{
   margin-right: 50rpx;
+  display: flex;
+  
 }
 
 radio .wx-radio-input.wx-radio-input-checked::before{
    border-radius: 50%;
-   width: 12rpx; 
-   height: 12rpx; 
+   width: 8rpx; 
+   height: 8rpx; 
    text-align: center;
    font-size:0rpx; /* 对勾大小 去掉 */
    background-color: #FF5E00; 
@@ -100,15 +110,16 @@ radio .wx-radio-input.wx-radio-input-checked::before{
 radio{
   margin-left: 20rpx;
   border-radius: 50%;
-  width: 32rpx;/* 最好是4的倍数,不然会不在中间 */
-  height: 32rpx;
+  width: 28rpx;/* 最好是4的倍数,不然会不在中间 */
+  height: 28rpx;
   border: 4rpx solid #FF8100;/* 设置边框(外圆) */
   font-size: 0;/* 让边框重合 */
+  margin-top: 6rpx;
 }
 radio .wx-radio-input{
    border-radius: 50%;
-   width: 32rpx;
-   height: 32rpx; 
+   width: 28rpx;
+   height: 28rpx; 
    border: none;/* 替换边框(隐藏原有边框) */
 }
 
@@ -157,13 +168,14 @@ radio .wx-radio-input.wx-radio-input-checked{
 }
 
 .address{
-  width: 420rpx;
-  height: 88rpx;
+  /* width: 420rpx; */
+  /* height: 88rpx; */
+  width: 100%;
 }
 
 .edit-image{
   position: absolute;
-  right: 130rpx;
+  right: 50rpx;
   top: 24rpx;
   width: 22rpx;
   height: 32rpx;
@@ -187,5 +199,8 @@ radio .wx-radio-input.wx-radio-input-checked{
   background: #FF9209;
 }
 
+picker {
+  width: 100%;
+}
 
 

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

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

+ 8 - 4
pages/user/mycollection/mycollection.wxss

@@ -25,22 +25,26 @@
 
 .content-title{
   margin-top: 10rpx;
-  width: 100%;
+  width:80%;
   height: 52rpx;
   font-size: 32rpx;
-  font-weight: 500;
   color: #414141;
+  display:inline-block;
+
 }
 
 .content-detail{
-  width: 100%;
+  /* width: 100%; */
+  
   height: 50rpx;
   display: flex;
   justify-content: space-between;
   align-items: center;
   font-size: 24rpx;
+  display:inline-block;
+
 }
 
 .left{
-  width: 200rpx;
+  /* width: 200rpx; */
 }

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

@@ -80,7 +80,7 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    if(options.uid === wx.getStorageSync('uid')){
+    if(options.uid === wx.getStorageSync('uid') || options.uid === 'c7f0a8fdd3a549ea9109a7b7486775f2'){
       this.setData({
         isMyself: true
       })

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

@@ -48,7 +48,7 @@ height:58rpx;
 
 .follow image {
   width: 36rpx;
-  height: 36rpx;
+  height: 32rpx;
   margin-right: 15rpx;
 
 }

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

@@ -13,11 +13,11 @@
         </view>
       </view>
       <view class="walletDetails-right">
-        <view class="avatar-value-pos" wx:if="{{ item.type === 'INCOME' }}">
+        <view class="avatar-value-neg" wx:if="{{ item.type === 'INCOME' }}">
           <text class="avatar-symbol getMoney">+</text>
           <text class="getMoney">{{ item.price / 100 }}</text>
         </view>
-        <view class="avatar-value-neg" wx:else>
+        <view class="avatar-value-pos" wx:else>
           <text class="avatar-symbol">-</text>
           <text>{{ item.price / 100 }}</text>
         </view>

+ 2 - 2
pages/user/walletDetails/walletDetails.wxss

@@ -69,6 +69,6 @@ image {
     font-weight: bold;
     margin-right: 4rpx;
 }
-.getMoney{
+/* .getMoney{
     color: #61CA54;
-}
+} */

+ 5 - 5
project.config.json

@@ -36,7 +36,7 @@
 			"list": []
 		},
 		"miniprogram": {
-			"current": 5,
+			"current": 2,
 			"list": [
 				{
 					"id": -1,
@@ -51,10 +51,10 @@
 					"query": "orderId=1542621051065701"
 				},
 				{
-					"id": -1,
+					"id": 2,
 					"name": "团购分享",
 					"pathName": "pages/groupPage/group-details/group-details",
-					"query": "orderId=1542621051065701",
+					"query": "shareId=1544436540903097&share=true",
 					"scene": "1012"
 				},
 				{
@@ -64,10 +64,10 @@
 					"query": "id=1542687807564957&title=【课文1】小蝌蚪找妈妈"
 				},
 				{
-					"id": -1,
+					"id": 4,
 					"name": "make money",
 					"pathName": "pages/groupPage/make-money/make-money",
-					"query": "productId=1&id=1544093407862684&groupId=2"
+					"query": "productId=1&id=1544436540903097&groupId=2"
 				},
 				{
 					"id": -1,

BIN
static/image/fully_heart.png


BIN
static/image/goBackHome.png


BIN
static/image/pay_success.png


BIN
static/image/purple_heart.png


+ 8 - 6
towxml/style/main.wxss

@@ -130,11 +130,12 @@
 }
 
 .h2w__h4 {
-    font-size: 36rpx;
-    padding-bottom: 4rpx;
-    margin-bottom: 12rpx;
-    text-align: center;
-    border:2rpx solid #000;
+    font-size: 40rpx;
+    margin-bottom:70rpx;
+margin-top:70rpx;
+
+    /* text-align: center;
+    border:2rpx solid #000; */
 
 }
 
@@ -250,7 +251,7 @@
 
 .h2w__pre .h2w__code {
     white-space: pre;
-    width: 9999px;
+    /* width: 9999px; */
     display: block;
     font-size: 80%;
 }
@@ -349,6 +350,7 @@
 .h2w__b,
 .h2w__strong {
     font-weight: bold;
+    color:#555
 }
 
 .h2w__i,

+ 5 - 5
utils/WXHttpRequest.js

@@ -1,10 +1,10 @@
 module.exports = {
 	getInstance: function() {
-		wx.showToast({
-			title: '加载中...',
-			icon: 'loading',
-			duration: 600
-		})
+		// wx.showToast({
+		// 	title: '加载中...',
+		// 	icon: 'loading',
+		// 	duration: 600
+		// })
 		return {
 			_sucCallback: null,
 			_failCallback: null,

+ 14 - 2
utils/util.js

@@ -7,7 +7,17 @@ const formatTime = date => {
   arr.unshift(day);
   return arr
 }
-
+const lastHours = date => {
+	let h = parseInt((date % (1000 * 60 * 60 * 72 )) / (1000 * 60 * 60));
+	let m = parseInt((date % (1000 * 60 * 60)) / (1000 * 60));
+	return h + '小时' + m + '分'
+}
+const lastHoursInGroup = date => {
+	// const temp = [];
+	let h = parseInt((date % (1000 * 60 * 60 * 72 )) / (1000 * 60 * 60));
+	let m = parseInt((date % (1000 * 60 * 60)) / (1000 * 60));
+	return [h.toString(),m.toString()]
+}
 const formatNumber = n => {
   n = n.toString()
   return n[1] ? n : '0' + n
@@ -42,5 +52,7 @@ function GetQueryString(str,name){
 module.exports = {
   formatTime: formatTime,
 	formatDate,
-	GetQueryString
+	GetQueryString,
+	lastHours,
+	lastHoursInGroup
 }