Browse Source

针对违规处理

Rorschach 6 years ago
parent
commit
069c2c6de7
41 changed files with 744 additions and 269 deletions
  1. 1 0
      app.json
  2. 7 6
      component/group/group.js
  3. 4 4
      component/group/group.wxml
  4. 10 3
      component/my/my.js
  5. 3 3
      component/my/my.wxml
  6. 4 0
      component/myToast/myToast.js
  7. 14 4
      component/myToast/myToast.wxml
  8. 36 8
      component/myToast/myToast.wxss
  9. 7 1
      component/popup/popup.js
  10. 1 1
      component/popup/popup.wxml
  11. 22 10
      component/share/share.js
  12. 7 3
      pages/groupPage/collage-details/collage-details.js
  13. 22 8
      pages/groupPage/collage-details/collage-details.wxml
  14. 32 1
      pages/groupPage/collage-details/collage-details.wxss
  15. 33 15
      pages/groupPage/grade-details/grade-details.js
  16. 3 1
      pages/groupPage/grade-details/grade-details.json
  17. 58 21
      pages/groupPage/grade-details/grade-details.wxml
  18. 56 28
      pages/groupPage/grade-details/grade-details.wxss
  19. 149 57
      pages/groupPage/group-details/group-details.js
  20. 51 15
      pages/groupPage/group-details/group-details.wxml
  21. 132 28
      pages/groupPage/group-details/group-details.wxss
  22. 2 1
      pages/groupPage/make-money/make-money.js
  23. 37 15
      pages/groupPage/my-group/my-group.js
  24. 4 3
      pages/groupPage/my-group/my-group.wxml
  25. 1 1
      pages/groupPage/my-group/my-group.wxss
  26. 3 8
      pages/social/works/works.js
  27. 2 1
      pages/social/works/works.wxml
  28. 13 1
      pages/social/works/works.wxss
  29. 1 1
      pages/user/mycourse/mycourse.js
  30. 1 1
      pages/user/mycourse/mycourse.wxml
  31. 1 1
      pages/user/myworks/myworks.wxml
  32. 8 15
      project.config.json
  33. BIN
      static/groupImg/group_in_ios.jpg
  34. BIN
      static/image/know_menu_bg.jpg
  35. BIN
      static/image/menu_blue.png
  36. BIN
      static/image/menu_normal.png
  37. BIN
      static/image/you_know_blue.png
  38. BIN
      static/image/you_know_normal.png
  39. 13 3
      utils/APIClient.js
  40. 2 0
      utils/const.js
  41. 4 1
      utils/util.js

+ 1 - 0
app.json

@@ -10,6 +10,7 @@
     "pages/main/searchResult/searchResult",
     "pages/groupPage/discount-group/discount-group",
     "pages/groupPage/group-details/group-details",
+    "pages/groupPage/grade-details/grade-details",
     "pages/groupPage/collage-details/collage-details",
     "pages/groupPage/my-group/my-group",
     "pages/groupPage/make-money/make-money",

+ 7 - 6
component/group/group.js

@@ -20,14 +20,15 @@ export const groupInit = (that) => {
   //推荐团购
   that.recommend = function () {
     console.log(that.data.listLength)
-    httpRequestApi.getGroupList(that.data.groupIndex).success((res) => {
+    let osType = app.globalData.isIOS ? 'IOS' : 'ANDROID'
+    httpRequestApi.getGroupList(that.data.groupIndex,osType).success((res) => {
       
       const recommendListTemp = [];
       res.data.data.list.forEach(item => {
         const temp = {};
         temp.avatar = item.organizer.avatar;
         temp.wechatName = item.organizer.wechatName;
-        temp.groupTitle = item.groupPurchaseOrder.groupTitle;
+        temp.productTitle = item.groupPurchaseOrder.productTitle;
         temp.headCount = item.groupPurchaseOrder.headcount;
         temp.joinCount = item.groupPurchaseOrder.joinCount;
         temp.lastTime = item.groupPurchaseOrder.closeTime - item.currentTime <= 0 ? '时间不足,' : util.lastHours(item.groupPurchaseOrder.closeTime - item.currentTime);
@@ -150,10 +151,10 @@ export const groupInit = (that) => {
   that.groupDetail = function ({
     currentTarget
   }) {
-    if (that.data.groupData.isIOS) {
-      that.showAlert();
-      return;
-    }
+    // if (that.data.groupData.isIOS) {
+    //   that.showAlert();
+    //   return;
+    // }
     const productId = currentTarget.dataset.productid;
     const id = currentTarget.dataset.id;
     const groupId = currentTarget.dataset.groupid;

+ 4 - 4
component/group/group.wxml

@@ -33,7 +33,7 @@
             </view>
             <view class="group-jion">
               <view class="top-title">
-                <text>{{item.groupTitle}}</text>
+                <text>{{item.productTitle}}</text>
                 <text>{{item.headCount}}人团</text>
               </view>
               <view class="group-detail {{groupData.isIOS ? 'specialBorder' : ''}}">
@@ -41,8 +41,8 @@
                   <text>还剩{{item.headCount - item.joinCount}}人成团</text>
                   <text>剩余{{item.lastTime}}结束</text>
                 </view>
-                <view class="jion-btn {{groupData.isIOS ? 'specialBtn' : ''}}" bindtap="groupDetail" data-ind="{{index}}" data-id="{{item.id}}" >
-                  去参团
+                <view class="jion-btn" bindtap="groupDetail" data-ind="{{index}}" data-id="{{item.id}}" >
+                  {{groupData.isIOS ? '助力' : '去参团'}}
                 </view>
               </view>
             </view>
@@ -70,5 +70,5 @@
       </view>
     </scroll-view>
   </view>
-  <MyToast bindShowAlert="showAlert" wx:if="{{groupData.alertFlag}}"  />
+  <!-- <MyToast bindShowAlert="showAlert" wx:if="{{groupData.alertFlag}}"  /> -->
 </template>

+ 10 - 3
component/my/my.js

@@ -55,9 +55,16 @@ export const myInit = (that) => {
     },
     that.toMyCollage = e => {
       let title = e.currentTarget.dataset.title;
-      wx.navigateTo({
-        url: `../../pages/groupPage/my-group/my-group?title=${title}`
-      });
+      if(app.globalData.isIOS){
+        wx.navigateTo({
+          url: `../../pages/groupPage/my-group/my-group?title=我的助力`
+        });
+      }else {
+        wx.navigateTo({
+          url: `../../pages/groupPage/my-group/my-group?title=${title}`
+        });
+      }
+      
     }
     
 }

+ 3 - 3
component/my/my.wxml

@@ -73,8 +73,8 @@
           </view>
         </view>
       </view>
-      <!-- <view class='wallet-module' bindtap='toMyWallet' data-title='{{ myData.wallet }}' wx:if="{{!myData.isIOS}}"> -->
-      <view class='wallet-module' bindtap='toMyWallet' data-title='{{ myData.wallet }}'>
+      <view class='wallet-module' bindtap='toMyWallet' data-title='{{ myData.wallet }}' wx:if="{{!myData.isIOS}}">
+      <!-- <view class='wallet-module' bindtap='toMyWallet' data-title='{{ myData.wallet }}'> -->
         <view class='wallet-center'>
           <view class='wallet-left'>
             <view class='icon-box'>
@@ -107,7 +107,7 @@
             <view class='icon-box'>
               <image src='../../static/image/group.png'></image>
             </view>
-            <text>我的拼团</text>
+            <text>我的{{myData.isIOS? '助力' : '拼团'}}</text>
           </view>
           <view class='wallet-right'>
             <image src='../../static/image/to.png'></image>

+ 4 - 0
component/myToast/myToast.js

@@ -6,6 +6,10 @@ Component({
       flag: {
         type: "Boolean",
         value: false
+      },
+      noRightRules: {
+        type: "String",
+        value: '1'
       }
     },
   

+ 14 - 4
component/myToast/myToast.wxml

@@ -1,11 +1,21 @@
 <view class="myToast" bindtap="close" catchtouchmove="touchMove" >
-    <view class="toastBox">
+    <view class="toastBox" wx:if="{{noRightRules==='1'}}">
         <view class="line1">
-            <image class="myToastIcon" src="../../static/image/alert_icon.png" />
-            <text class="line1Text">规范规定,IOS此功能暂不可用</text>
+            <!-- <image class="myToastIcon" src="../../static/image/alert_icon.png" /> -->
+            <text class="line1Text">无助力资格</text>
         </view>
         <view class="line2">
-            <text class="line2Text">您可以免费开团,成团后获得使用权</text>
+            <text class="line2Text">您已拥有本课使用权或曾拥有过本课临时使用权</text>
         </view>
     </view>
+    <view class="toastBox" wx:if="{{noRightRules==='2'}}">
+        <view class="line1">
+            <!-- <image class="myToastIcon" src="../../static/image/alert_icon.png" /> -->
+            <text class="line3Text" >由于相关规定,您无法参加此团</text>
+        </view>
+        <!-- <view class="line2">
+            <text class="line2Text">不过,您可以邀请好友助力获得使用权</text>
+        </view> -->
+    </view>
+    <image src="../../static/groupImg/cha.png" class="close-img" />
 </view>

+ 36 - 8
component/myToast/myToast.wxss

@@ -5,13 +5,14 @@
     position: absolute;
     top: 0;
     left: 0;
+    z-index:999;
 
 }
 
 .toastBox {
     width: 600rpx;
-    height: 274rpx;
-    border-radius: 8rpx;
+    height: 250rpx;
+    border-radius: 30rpx;
     background: #fff;
     position: absolute;
     left: 0;
@@ -19,16 +20,18 @@
     margin: auto;
     top: 0;
     bottom: 0;
-    padding: 86rpx 0 0 80rpx;
+    padding: 37rpx 28rpx;
     box-sizing: border-box;
 
 }
 
 .line1 {
-    display: flex;
-    flex-direction: row;
+    /* display: flex; */
+    /* flex-direction: row; */
     align-items: center;
     margin: 0 auto 20rpx;
+    
+
 }
 
 .line2 {
@@ -43,18 +46,43 @@
 
 .line1Text {
     height: 40rpx;
-    font-size: 28rpx;
+    font-size: 32rpx;
     /* font-family: PingFangSC-Regular; */
     /* font-weight: 400; */
-    color: rgba(37, 37, 37, 1);
+    color: red;
     line-height: 40rpx;
+    text-align: center;
+    display: block;
 }
 
 .line2Text {
     height: 40rpx;
-    font-size: 28rpx;
+    font-size: 32rpx;
     /* font-family: PingFangSC-Regular; */
     /* font-weight: 400; */
     color: rgba(37, 37, 37, 1);
     line-height: 40rpx;
+    display: block;
+    text-align: center;
+}
+
+.line3Text{
+    height: 40rpx;
+    font-size: 32rpx;
+    /* font-family: PingFangSC-Regular; */
+    /* font-weight: 400; */
+    color: rgba(37, 37, 37, 1);
+    line-height: 166rpx;
+    display: block;
+    text-align: center;
+}
+
+.close-img{
+    width: 78rpx;
+    height: 78rpx;
+    position: absolute;
+    left: 0;
+    right: 0;
+    margin: 38rpx auto 0;
+    top: 60%;
 }

+ 7 - 1
component/popup/popup.js

@@ -1,4 +1,5 @@
 // component/popup/popup.js
+const app = getApp();
 Component({
   /**
    * 组件的属性列表
@@ -27,6 +28,10 @@ Component({
     btnContent: {
       type: "String",
       value: ''
+    },
+    haveReward: {
+      type: 'Boolean',
+      value: false
     }
   },
 
@@ -34,7 +39,8 @@ Component({
    * 组件的初始数据
    */
   data: {
-    flag: true
+    flag: true,
+    os: app.globalData.isIOS
   },
 
   /**

+ 1 - 1
component/popup/popup.wxml

@@ -19,7 +19,7 @@
                 <text style="color: {{item.color}};">{{item.text}}</text>
             </block>
         </view>
-        <view style="font-size: 28rpx; color: #7D7D7D; text-align: center; margin-top: 40rpx;">您收到的奖学金会自动到您的微信钱包</view>
+        <view style="font-size: 28rpx; color: #7D7D7D; text-align: center; margin-top: 40rpx;" wx:if="{{haveReward}}">您收到的奖学金会自动到您的微信钱包</view>
          <view class="send-btn" bindtap="launchGroup">
             <text>{{btnContent}}</text>
         </view>

+ 22 - 10
component/share/share.js

@@ -29,6 +29,7 @@ Component({
     QRCodeImagePath: '',
     QRCodeImageLocalPath: '',
     groupPurchaseInfo: {},
+    groupType:'',
     animationData: {},
     touchMove: true
   },
@@ -103,6 +104,7 @@ Component({
             },
             fail: function (res) {
               //失败回调
+              console.log(res)
             }
           });
         })
@@ -144,7 +146,8 @@ Component({
             scene: data.scene,
             qrCodeId: this.data.shareId
           },
-          groupPurchaseInfo: data.groupPurchaseInfo
+          groupPurchaseInfo: data.groupPurchaseInfo,
+          groupType: data.groupType
         })
       }
 
@@ -356,15 +359,24 @@ Component({
         //   ctx.drawImage('../../../static/share/poster_3.jpg', 12, 176, 351, 145);
         // }
         ctx.setFontSize(17)
-        ctx.setFillStyle('#A95A00')
-        ctx.fillText(`${this.data.groupPurchaseInfo.headcount}人团`, 96, 412)
-        ctx.setFontSize(19)
-        ctx.fillText('每人仅需', 151, 412)
-        // ctx.fillText('元', 120, 495)
-        ctx.setFontSize(28)
-        ctx.setStrokeStyle('red')
-        ctx.setFillStyle('red')
-        ctx.fillText(`${parseFloat(this.data.groupPurchaseInfo.price / 100).toFixed(2)}元`, 235, 415)
+        console.log(this.data.groupType)
+        if(this.data.groupType === 'IOS'){
+          ctx.setFillStyle('#ff670d')
+          ctx.fillText(`助力成功,您还可以获得本课程7天VIP`, (375 - ctx.measureText('助力成功,您还可以获得本课程7天VIP').width) / 2, 412)
+
+          
+        } else {
+          ctx.setFillStyle('#A95A00')
+          ctx.fillText(`${this.data.groupPurchaseInfo.headcount}人团`, 96, 412)
+          ctx.setFontSize(19)
+          ctx.fillText('每人仅需', 151, 412)
+          // ctx.fillText('元', 120, 495)
+          ctx.setFontSize(28)
+          ctx.setStrokeStyle('red')
+          ctx.setFillStyle('red')
+          ctx.fillText(`${parseFloat(this.data.groupPurchaseInfo.price / 100).toFixed(2)}元`, 235, 415)
+        }
+      
         ctx.setFontSize(12)
         ctx.setFillStyle('#666666')
         ctx.fillText('长按识别二维码', (375 - ctx.measureText('长按识别二维码').width) / 2, 574)

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

@@ -38,7 +38,8 @@ Page({
     organizerUid: '',
     colonelName: '',
     rewardMoney: '',
-    goBackHome: false
+    goBackHome: false,
+    dataLoading: true
   },
   //显示分享页 
   openShare: function () {
@@ -58,7 +59,8 @@ Page({
         title: this.data.groupPurchaseInfo.productTitle,
         path: `pages/groupPage/group-details/group-details`,
         scene: `QR${this.data.orderId}`,
-        groupPurchaseInfo: this.data.groupPurchaseInfo
+        groupPurchaseInfo: this.data.groupPurchaseInfo,
+        groupType: this.data.groupOsType
       }
       this.shareDialog.share(data);
     }
@@ -147,7 +149,9 @@ Page({
         stillGoing,
         productId: groupOrder.productId,
         groupId: groupOrder.groupId,
-        rewardMoney: res.data.data.groupPurchaseInfo.organizerPrice / 100
+        rewardMoney: res.data.data.groupPurchaseInfo.organizerPrice / 100,
+        dataLoading:false,
+        groupOsType: groupOrder.os
       })
       if (groupOrder.groupType === 'PROMOTION') {
         //this.data.joinUserList.unshift(res.data.data.organizer);

+ 22 - 8
pages/groupPage/collage-details/collage-details.wxml

@@ -1,13 +1,13 @@
 <!-- pages/groupPage/collage-details/collage-details.wxml -->
 <view class="collage-details">
-    <view class="step">
+    <!-- <view class="step">
         <image src="../../../static/groupImg/step.png"></image>
         <view class="txt">
             <text>1.支付成功</text>
             <text>2.邀请朋友参加</text>
             <text>3.去朗读</text>
         </view>
-    </view>
+    </view> -->
     <view class="details-head">
         <view class="headImg">
             <block wx:for="{{joinUserList}}" wx:key="{{index}}">
@@ -23,15 +23,20 @@
                 </view>
             </block>
         </view>
-        <view class="shengyu">
-            <view class="shengyu-num" wx:if="{{colonelName}}">团长{{colonelName}}发起团购</view>
+        <view class="data-loading" wx:if="{{dataLoading}}">
+                <view class="line1"></view>
+                <view class="line2"></view>
+                <view class="line3"></view>
+            </view>
+        <view class="shengyu" wx:if="{{!dataLoading}}">
+            <view class="shengyu-num" wx:if="{{colonelName}}">{{colonelName}}发起{{groupOsType === 'IOS' ? '助力' : '团购'}}</view>
             <view class="shengyu-num" hidden="{{surplusNum == '0' || !stillGoing}}">
                 仅剩
                 <text>{{surplusNum}}</text>
-                个名额就拼团成功了
+                个名额就{{groupOsType === 'IOS' ? '助力' : '团购'}}成功了
             </view>
             <view class="shengyu-num" hidden="{{stillGoing}}">团购已超过时限</view>
-            <view class="shengyu-num" hidden="{{surplusNum != '0'}}">拼团成功!快去朗读吧</view>
+            <view class="shengyu-num" hidden="{{surplusNum != '0'}}">{{groupOsType === 'IOS' ? '助力' : '团购'}}成功!快去朗读吧</view>
             <view class="shengyu-time" hidden="{{surplusNum == '0'}}">
                 剩余时间:
                 <block wx:for="{{timeList[0]}}" wx:key="{{index}}">
@@ -52,14 +57,23 @@
             <!-- <image src="../../../static/groupImg/Invitation.png"></image> -->
             <text>{{read ? '开始你的表演' : '邀请朋友参加'}}</text>
         </view>
-        <view class="explain">
+        <view class="explain" wx:if="{{groupOsType === 'IOS' ? false : true}}">
             <text style="fontSize:44rpx;">拼团规则</text>
             <view style="margin-top:30rpx;">转发给自己的朋友们,分享好课,追随您一起学习进步</view>
             <view>您的魅力不是吹的</view>
-            <view style="margin-top:20rpx;">在限定时间内成功拼团,将得到{{rewardMoney}}元的奖励金</view>
+            <view style="margin-top:20rpx;">在限定时间内成功拼团,团长将得到{{rewardMoney}}元的奖励金</view>
             <view style="margin-top:20rpx;">如果拼团失败</view>
             <view >您预付的课程费将在48小时内退回您的账户</view>
         </view>
+        <view class="explain" wx:if="{{groupOsType === 'IOS' ? true : false}}">
+            <text style="fontSize:44rpx;">助力规则</text>
+            <view style="margin-top:30rpx;">转发给自己的朋友们,分享好课,追随您一起学习进步</view>
+            <view>您的魅力不是吹的</view>
+            <view style="margin-top:20rpx;">在限定时间内成功助力,团长将得到三年使用权</view>
+            <view style="margin-top:20rpx;">助力者将得到七天的试用权</view>
+            <!-- <view style="margin-top:20rpx;">如果拼团失败</view> -->
+            <!-- <view >您预付的课程费将在48小时内退回您的账户</view> -->
+        </view>
     </view>
 </view>
 <canvas canvas-id="myCanvas" style="width:375px; height: 668px; position: absolute; left: -999rpx; top: -9999rpx;"></canvas>

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

@@ -35,7 +35,7 @@
     /* height: 82%; */
     margin-top: 12rpx;
     background: #fff;
-    min-height: 84%;
+    min-height: 98%;
 
 }
 
@@ -201,4 +201,35 @@
 .explain text {
     display: block;
     font-size: 36rpx;
+}
+.data-loading {
+    width: 100%;
+    height: 200rpx;
+    /* background: #FF4330; */
+}
+
+.data-loading .line1 {
+    width: 300rpx;
+    height: 30rpx;
+    background: rgba(228, 255, 242, .8);
+    margin-top: 20rpx;
+    margin-left: 122rpx;
+    border-radius: 10rpx;
+}
+
+.data-loading .line2 {
+    width: 400rpx;
+    height: 30rpx;
+    background: rgba(228, 255, 242, .8);
+    margin-top: 20rpx;
+    margin-left: 200rpx;
+    border-radius: 10rpx;
+}
+.data-loading .line3 {
+    width: 460rpx;
+    height: 30rpx;
+    background: rgba(228, 255, 242, .8);
+    margin-top: 20rpx;
+    margin-left: 160rpx;
+    border-radius: 10rpx;
 }

+ 33 - 15
pages/groupPage/grade-details/grade-details.js

@@ -30,7 +30,7 @@ Page({
         color: "#FF4600"
       }
     ],
-    share: false,
+    // share: false,
     isIPX: app.globalData.isIPX,
     isIOS: app.globalData.isIOS,
     flag: true,
@@ -52,7 +52,8 @@ Page({
       }
     ],
     isModalShow: false,
-    formIsANAsshole: true
+    formIsANAsshole: true,
+    isPaying: false
   },
   //tab切换
   tabSwitch: function (e) {
@@ -72,11 +73,20 @@ Page({
   //获取团购信息并掉起支付
   pay: function (e) {
     console.log(e)
+    if(this.data.haveTapMoney){
+      return false
+    }
+    this.setData({
+      haveTapMoney : true
+    })
     const productId = this.data.productId;
     const groupId = e.currentTarget.dataset.id;
     const osType = this.data.isIOS ? 'IOS' : 'ANDROID';
     const formId = e.detail.formId
     //开始发起团购
+    this.setData({
+      isPaying: true
+    })
     httpRequestApi.SendGroupPurchas({
       productId,
       groupId,
@@ -107,7 +117,7 @@ Page({
             }
           })
         }
-        
+     
         return false;
       }
       this.setData({
@@ -186,12 +196,7 @@ Page({
     //   isModalShow: true
     // })
     // return
-    if(this.data.haveTapMoney){
-      return false
-    }
-    this.setData({
-      haveTapMoney : true
-    })
+   
     console.log(prePayMap)
     console.log(orderId)
     console.log(num)
@@ -243,16 +248,21 @@ Page({
       }
     })
   },
-
+  showAlert: function () {
+    this.setData({
+      alertFlag: !this.data.alertFlag
+    })
+  },
 
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
     console.log(options)
-    if (options.share) {
+    if (options.goBackHome) {
       this.setData({
-        share: options.share
+        goBackHome: true,
+        alertFlag:true
       })
     }
     // const productId = options.productId;
@@ -270,12 +280,20 @@ Page({
   areYouBookSuper: function (productId) {
     // const productArr = [];
     // productArr.push(productId);
-    httpRequestApi.areYouSuper(productId).success(res => {
+    httpRequestApi.areYouSuperSecond(productId).success(res => {
       console.log(res)
       this.setData({
-        imSuper: res.data.success,
-        lastThreeYears: res.data.success ? util.addThreeYears(res.data.data.gmtModified) : false
+        imSuper: res.data.data.auth ? true : false,
+        lastThreeYears: res.data.data.auth ? util.addThreeYears(res.data.data.auth.endTime) : false,
+        knowFlag: res.data.data.auth ? false : true,
+        menuFlag: res.data.data.auth ? true : false,
+        haveCreatedHelp: res.data.data.createdShare, // 创建过助力团
+        haveJoinHelp: res.data.data.joinShare, // 参加过助力团
+        haveJoinNormal: res.data.data.joinOrder, // 参加过支付团
+        tasteDay: res.data.data.auth ? util.formatDate(res.data.data.auth.endTime - res.data.data.currentTime,5) : ''
+
       })
+      console.log(this.data.imSuper)
       console.log(this.data.lastThreeYears)
     })
   },

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

@@ -2,6 +2,8 @@
     "component": true,
     "usingComponents": {
         "popup": "/component/popup/popup",
-        "myModal": "/component/myModal/myModal"
+        "myModal": "/component/myModal/myModal",
+        "goBackHome": "/component/goBackHome/goBackHome",
+        "myToast": "/component/myToast/myToast"
     } 
 }

+ 58 - 21
pages/groupPage/grade-details/grade-details.wxml

@@ -6,9 +6,16 @@
             <text class="lastThreeYears" wx:if="{{lastThreeYears}}">使用期限至:{{lastThreeYears}}</text>
         </view>
         <view class="catalog">
-            <image class="bg2" src="../../../static/groupImg/Rectangle_9.png"></image>
-            <text class="{{knowFlag ? 'select' : ''}}" bindtap="tabSwitch" data-flag="know">您需要知道</text>
-            <text class="{{menuFlag ? 'select' : ''}}" bindtap="tabSwitch" data-flag="menu">课文目录</text>
+            <!-- <image class="bg2" src="../../../static/groupImg/Rectangle_9.png"></image>  -->
+            <view class="switch {{knowFlag ? 'select' : ''}}" data-flag="know" bindtap="tabSwitch">
+                <image src="../../../static/image/know_menu_bg.jpg" wx:if="{{knowFlag}}"></image> 
+                <text >您需要知道</text>  
+            </view>
+              
+            <view class="switch {{menuFlag ? 'select' : ''}}" bindtap="tabSwitch" data-flag="menu" bindtap="tabSwitch">
+                <image src="../../../static/image/know_menu_bg.jpg" wx:if="{{menuFlag}}"></image> 
+                <text >课文目录</text>  
+            </view>
         </view>
         <view class="catalog-list" hidden="{{!menuFlag}}">
             <view class="catalog-item" wx:for="{{lessonList}}" wx:key="{{index}}" data-id="{{item.id}}" data-title="{{item.title}}" bindtap="goToClass">
@@ -16,7 +23,7 @@
                 <view class="right">
                     <!-- <image src="../../../static/image/play.png"></image>
                     <text>{{item.readNum}}</text> -->
-                    <image  src="../../../static/image/to.png"></image>
+                    <image src="../../../static/image/to.png"></image>
                 </view>
             </view>
         </view>
@@ -26,39 +33,69 @@
             <template is="entry" data="{{...article}}" />
         </view>
     </scroll-view>
-    <view class="group-btn {{isIPX ? 'bottomx' :''}}" wx:if="{{!imSuper? !isIOS : null}}">
+    <!-- 安卓界面 -->
+    <view class="group-btn {{isIPX ? 'bottomx' :''}}" wx:if="{{!isIOS ? haveJoinNormal ? false : haveCreatedHelp  ? false : haveJoinHelp ? true : true : false}}">
+    <image class="btn-image" src="../../../static/groupImg/group_in_ios.jpg" />
         <image class="bg1" src="../../../static/groupImg/baise.png"></image>
-        <image class="bg2" src="../../../static/groupImg/baise.png"></image>      
+        <!-- <image class="bg2" src="../../../static/groupImg/baise.png"></image> -->
         <block wx:for="{{payList}}" wx:key="{{index}}">
-            <form class="Price" bindsubmit="pay" report-submit="{{formIsANAsshole}}" data-id="{{item.id}}" wx:if="{{share ? (index != 0) : true }}">
-                <text class="formFit">¥{{item.price / 100}}</text>
-                <text class="formFit">{{item.headcount == '1' ? '单' : item.headcount}}人{{item.headcount == '1' ? '购' : '团'}}</text>
+            <form class="Price" bindsubmit="pay" report-submit="{{formIsANAsshole}}" data-id="{{item.id}}" wx:if="{{item.headcount === 5 ? false : true }}">
+                <text class="formFit two-line-1">{{item.price / 100}}元</text>
+                <text class="formFit two-line-2">{{item.headcount == '1' ? '单人购买' : '开团获得使用权'}}
+                </text>
                 <button class="formBtn" form-type="submit"></button>
             </form>
         </block>
     </view>
-    <view class="group-btn {{isIPX ? 'bottomx' :''}}" wx:if="{{!imSuper? isIOS : null}}">
-        <image class="bg1" src="../../../static/groupImg/baise.png" style="left: 50%"></image>
-        <block wx:for="{{payList}}" wx:key="{{index}}">
-            <form class="Price" bindsubmit="pay" report-submit="{{formIsANAsshole}}" data-id="{{item.id}}" wx:if="{{share ? (index != 0) : item.headcount === 1 ? false : true }}">
-                <text class="formFit">{{item.price / 100}}元/{{item.headcount - 1}}人帮忙</text>
-                <text class="formFit" style="fontSize: 24rpx">免费开团</text>
+    <!-- ios界面 -->
+    <view class="group-btn {{isIPX ? 'bottomx' :''}}" wx:if="{{isIOS ? haveCreatedHelp ? false : haveJoinNormal ? false : true :false }}">
+    <image class="btn-image" src="../../../static/groupImg/group_in_ios.jpg" />
+        <!-- <image class="bg1" src="../../../static/groupImg/baise.png" style="left: 50%"></image> -->
+        <block wx:for="{{payList}}" wx:key="{{index}}" wx:if="{{!imSuper}}">
+            <form class="Price" bindsubmit="pay" report-submit="{{formIsANAsshole}}" data-id="{{item.id}}" wx:if="{{index != 0 && index != 2 }}">
+                <!-- <text class="formFit">{{item.price / 100}}元/{{item.headcount - 1}}人帮忙</text> -->
+                <!-- <text class="formFit">两个小伙伴助力</text> -->
+                <text class="formFit one-line-text">邀请好友助力获得本课使用权</text>
+                <button class="formBtn" form-type="submit"></button>
+            </form>
+        </block>
+        <!-- 已有权限的界面 并且是ios-->
+        <block wx:for="{{payList}}" wx:key="{{index}}"  wx:if="{{imSuper}}">
+            <form class="Price" bindsubmit="pay" report-submit="{{formIsANAsshole}}" data-id="{{item.id}}" wx:if="{{item.headcount == 1 || item.headcount == 5 ? false : true }}">
+                 <text class="formFit two-line-2">试用期还有{{tasteDay}}天</text>
+                <text class="formFit two-line-1">邀请好友助力获得本课使用权</text>
                 <button class="formBtn" form-type="submit"></button>
             </form>
         </block>
     </view>
-    <view class="group-btn {{isIPX ? 'bottomx' :''}}" wx:if="{{imSuper}}">
-        <image class="bg1" style="left: 50%" src="../../../static/groupImg/baise.png" ></image>   
+    <!-- 已有权限的界面 安卓 -->
+    <view class="group-btn {{isIPX ? 'bottomx' :''}}" wx:if="{{!isIOS ? haveJoinNormal ? true : haveCreatedHelp ? true : false : false}}">
+        <image class="btn-image" src="../../../static/groupImg/group_in_ios.jpg" />
+        <!-- <image class="bg1" style="left: 50%" src="../../../static/groupImg/baise.png"></image> -->
         <block wx:for="{{payList}}" wx:key="{{index}}">
-            <form class="Price" bindsubmit="pay" report-submit="{{formIsANAsshole}}" data-id="{{item.id}}" wx:if="{{imSuper ? (index != 0) : true }}">
-                <view>继续开团 赚奖学金</view>
+            <form class="Price" bindsubmit="pay" report-submit="{{formIsANAsshole}}" data-id="{{item.id}}" wx:if="{{index != 0 && index != 2 }}">
+                <view>继续开团赚奖学金</view>
                 <!-- <view class="formFit"> -->
-                    <text class="formFit">{{item.headcount}}人团</text>
+                <!-- <text class="formFit">{{item.headcount}}人团</text> -->
                 <!-- </view> -->
                 <button class="formBtn" form-type="submit"></button>
             </form>
         </block>
     </view>
+    <!-- 已有权限的界面 并且是ios-->
+    <!-- <view class="group-btn {{isIPX ? 'bottomx' :''}}" wx:if="{{isIOS ? haveCreatedHelp ? false : haveJoinHelp ? true : false : false  }}">
+        <image class="btn-image" src="../../../static/groupImg/group_in_ios.jpg" />
+        <!-- <image class="bg1" style="left: 50%" src="../../../static/groupImg/baise.png"></image> -->
+        <!-- <block wx:for="{{payList}}" wx:key="{{index}}">
+            <form class="Price" bindsubmit="pay" report-submit="{{formIsANAsshole}}" data-id="{{item.id}}" wx:if="{{item.headcount == 1 || item.headcount == 5 ? false : true }}">
+                 <text class="formFit two-line-2">试用期还有n天</text>
+                <text class="formFit two-line-1">邀请好友助力获得本课使用权</text>
+                <button class="formBtn" form-type="submit"></button>
+            </form>
+        </block> -->
+    <!-- </view>  -->
 </view>
 <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" />
+<myModal id="myModal" type="{{modalType}}" isCloseShow="{{isCloseShow}}" text="{{modalText}}" wx:if="{{isModalShow}}" bindconfirm="modalConfirmHandler" bindclose="modalCloseHandler" />
+<goBackHome id="goBackHome" shareType="{{goBackHome}}" wx:if="{{goBackHome}}" />
+<myToast bindShowAlert="showAlert" noRightRules="2"  wx:if="{{alertFlag}}" />

+ 56 - 28
pages/groupPage/grade-details/grade-details.wxss

@@ -19,7 +19,8 @@
 
 
 scroll-view {
-    height: 98%;
+    /* height: 98%; */
+    height: 100%;
     width: 100%;
 }
 
@@ -27,7 +28,7 @@ scroll-view {
     background: #fff;
     display: flex;
     flex-direction: column;
-    padding: 24rpx 24rpx 0 24rpx;
+    padding: 24rpx 24rpx 24rpx 24rpx;
 }
 
 .grade-details image {
@@ -38,41 +39,51 @@ scroll-view {
 
 .catalog {
     display: flex;
-    align-items: center;
+    align-items: flex-end;
     width: 100%;
-    height: 110rpx;
+    height: 100rpx;
     background: #fff;
     position: relative;
-    margin-bottom: 18rpx;
+    background: rgba(240, 241, 245, 1);
+    padding: 0 40rpx;
 
 }
-
-
-.catalog image {
-    position: absolute;
-    left: 374rpx;
-    top: 26rpx;
-    width: 2rpx;
-    height: 60rpx;
+.select{
+    color: #61CA54
 }
 
-.catalog text {
+.switch text {
+    flex: 1;
     height: 60rpx;
     text-align: center;
     font-size: 36rpx;
-    /* margin: 0 110rpx; */
-    margin: 0 104rpx;
+    /* margin: 0 90rpx; */
     box-sizing: border-box;
+    position: relative;
+    z-index: 1;
+    width: 100%;
+    display: block;
+    line-height:66rpx;
 }
 
-.catalog .select {
-    border-bottom: 4rpx solid #61CA54;
-    color: #61CA54;
+.switch {
+    width: 335rpx;
+    height: 70rpx;
+    position: relative;
 }
 
+.switch image {
+    width: 100%;
+    height: 100%;
+    position: absolute;
+    left: 0;
+    top: 0;
+    z-index: 0;
+}
 .catalog-list {
     width: 100%;
-    padding: 0 18rpx 100rpx;
+    padding: 0 18rpx 18rpx 18rpx ;
+    margin-bottom: 120rpx;
     box-sizing: border-box;
 
 }
@@ -81,7 +92,7 @@ scroll-view {
     padding: 18rpx 18rpx 120rpx 18rpx;
     box-sizing: border-box;
     background: #fff;
-    margin-top: 12rpx;
+    /* margin-top: 12rpx; */
 }
 
 .catalog-item {
@@ -132,13 +143,15 @@ scroll-view {
 .group-btn {
     width: 100%;
     height: 102rpx;
-    background: #FF9209;
+    background: none;
     display: flex;
     position: absolute;
     bottom: 0;
     color: #fff;
 }
-
+/* .noBg{
+    background: none;
+} */
 .bottomx {
     bottom: 20rpx;
 }
@@ -150,17 +163,32 @@ scroll-view {
     flex-direction: column;
     justify-content: center;
     align-items: center;
+    z-index: 1;
 }
-
-.group-btn .Price text:nth-child(1) {
+.group-btn .btn-image{
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    left: 0;
+    top: 0;
+    z-index: 0;
+}
+/* .group-btn .Price text:nth-child(1) {
     font-size: 28rpx;
 }
 
 .group-btn .Price text:nth-child(2) {
     font-size: 32rpx;
+} */
+.group-btn .Price .one-line-text{
+    font-size: 40rpx;
+}
+.two-line-1{
+    font-size: 32rpx;
+}
+.two-line-2{
+    font-size: 28rpx;
 }
-
-
 .group-btn .bg1,
 .group-btn .bg2 {
     position: absolute;
@@ -170,7 +198,7 @@ scroll-view {
 }
 
 .group-btn .bg1 {
-    left: 35%;
+    left: 50%;
 }
 
 .group-btn .bg2 {

+ 149 - 57
pages/groupPage/group-details/group-details.js

@@ -53,13 +53,31 @@ Page({
       }
     ],
     groupStatus: false,
-    formIsANAsshole: true
+    formIsANAsshole: true,
+    dataLoading: true,
+    isLoading: false,
+    isIOS: app.globalData.isIOS,
+    damnDialogLine1: '您已拥有本课三年使用权或曾获得过体验权',
+    // damnDialogLine2:'',
+    damnDialogShow: false,
+    knowFlag: true,
+    menuFlag: false
   },
   //tab切换
-  tabSwitch: function () {
-    this.setData({
-      flag: !this.data.flag
-    })
+  //tab切换
+  tabSwitch: function (e) {
+    if (e.currentTarget.dataset.flag === "know" && this.data.knowFlag === false) {
+      this.setData({
+        knowFlag: true,
+        menuFlag: false
+      })
+    }
+    if (e.currentTarget.dataset.flag === "menu" && this.data.menuFlag === false) {
+      this.setData({
+        knowFlag: false,
+        menuFlag: true
+      })
+    }
   },
   jurisdiction: function () {
     //隐藏弹框
@@ -110,40 +128,86 @@ Page({
   },
   //参团
   jionGroup: function (e) {
-    if (app.globalData.isIOS) {
-      this.showAlert();
-      return;
-    }
+    // if (app.globalData.isIOS) {
+    //   this.showAlert();
+    //   return;
+    // }
     const orderId = this.data.orderId;
     const formId = e.detail.formId
     console.log(e)
     //开始发起团购
-    httpRequestApi.JoinGroupPurchas(orderId,formId).success((res) => {
-      
+    httpRequestApi.JoinGroupPurchas(orderId, formId).success((res) => {
       console.log('参加团购', res);
       if (res.data.message) {
-        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('用户点击取消')
+        // 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('用户点击取消')
+        //       }
+        //     }
+        //   })
+        // }
+        switch (res.data.code) {
+          case 801:
+            this.setData({
+              isModalShow: true,
+              modalType: 'text'
+            })
+            break;
+          case 802:
+            this.setData({
+              // damnDialogLine1:'您已拥有本课程使用权',
+              // damnDialogLine2:'快去朗读吧',
+              damnDialogShow: true
+            })
+            break;
+          case 806:
+            wx.pageScrollTo({
+              scrollTop: 0,
+              duration: 17
+            })
+            this.setData({
+              // isModalShow: true,
+              // modalType: 'text'
+              alertFlag: true
+            })
+            // wx.navigateTo({
+            //   url:'/pages/groupPage/my-group/my-group'
+            // })
+            break;
+          default:
+            wx.showModal({
+              title: '提示',
+              content: res.data.message,
+              success(res) {
+                if (res.confirm) {
+                  console.log('用户点击确定')
+                } else if (res.cancel) {
+                  console.log('用户点击取消')
+                }
               }
-            }
-          })
+            })
+            break;
         }
         return false;
       }
       //掉起支付
-      this.prePayMap(res.data.data.prePayMap, 'join');
+      if (res.data.data.groupPurchaseOrder.os === 'IOS') {
+        this.jionSuccess(res.data.data.groupPurchaseOrder.id, 'join');
+      } else {
+        this.prePayMap(res.data.data.prePayMap, 'join');
+      }
+
     }).fail((error) => {
 
     })
@@ -156,11 +220,11 @@ Page({
   //支付
   prePayMap: function (prePayMap, type) {
     console.log(prePayMap)
-    if(this.data.haveTapMoney){
+    if (this.data.haveTapMoney) {
       return false
     }
     this.setData({
-      haveTapMoney : true
+      haveTapMoney: true
     })
     // const that = this;
     this.setData({
@@ -211,26 +275,28 @@ Page({
   //拼团详情
   jionSuccess: function (orderId, type) {
     httpRequestApi.getMygroupInfo(orderId).success(res => {
+      this.data.surplusList = [];
       // 通过分享进入的用户,如果已经参加过本次团购,则跳转进入邀请好友的页面
-      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) {
+      console.log(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=${this.data.goBackHome}`
+        })
+        return;
+      }
+      joinUser.forEach(item => {
+        if (item.uid === myUid) {
           wx.redirectTo({
             url: `../collage-details/collage-details?orderId=${groupId}&goBackHome=${this.data.goBackHome}`
           })
           return;
         }
-        joinUser.forEach(item => {
-          if (item.uid === myUid) {
-            wx.redirectTo({
-              url: `../collage-details/collage-details?orderId=${groupId}&goBackHome=${this.data.goBackHome}`
-            })
-            return;
-          }
-        })
-      }
+      })
+      // }
 
       console.log('拼团详情', res);
       const groupOrder = res.data.data.groupPurchaseOrder;
@@ -242,8 +308,11 @@ Page({
         organizer: groupOrder.organizer,
         productId: res.data.data.groupPurchaseOrder.productId
       })
+      for (var i = 0; i < surplusNum; i++) {
+        this.data.surplusList.push(1);
+      }
       if (type === 'join') {
-        this.data.surplusList.pop();
+        // this.data.surplusList.pop();
         if (groupOrder.status === 'SUCCESSED') {
           this.showSuccess(groupOrder.organizer, groupOrder.organizerPrice)
         } else {
@@ -255,13 +324,13 @@ Page({
           orderId: groupOrder.id
         })
       } else {
-        for (var i = 0; i < surplusNum; i++) {
-          this.data.surplusList.push(1);
-        }
+        // for (var i = 0; i < surplusNum; i++) {
+        //   this.data.surplusList.push(1);
+        // }
       }
       let timeList = [];
       // || groupOrder.status ==='SUCCESSED'
-      const stillGoing = groupOrder.closeTime - Date.parse(new Date()) <= 0  ? false : true
+      const stillGoing = groupOrder.closeTime - Date.parse(new Date()) <= 0 ? false : true
       if (stillGoing) {
         timeList = util.lastHoursInGroup(groupOrder.closeTime - Date.parse(new Date()));
         console.log(timeList)
@@ -274,7 +343,7 @@ Page({
       //   })
       // }
       // const groupStatus = false;
-      if (groupOrder.status === 'SUCCESSED'){
+      if (groupOrder.status === 'SUCCESSED') {
         this.data.groupStatus = true
       }
       this.setData({
@@ -283,8 +352,18 @@ Page({
         surplusList: this.data.surplusList,
         timeList,
         stillGoing,
-        groupStatus: this.data.groupStatus
+        groupStatus: this.data.groupStatus,
+        dataLoading: false,
+        groupOSType: groupOrder.os,
+        isLoading: false
+      },()=>{
+        if(groupOrder.os === 'ANDROID' && app.globalData.isIOS){
+          wx.redirectTo({
+            url: `/pages/groupPage/grade-details/grade-details?productId=${res.data.data.groupPurchaseOrder.productId}&goBackHome=1`
+          })
+        }
       })
+
       if (groupOrder.groupType === 'PROMOTION') {
         //this.data.joinUserList.unshift(res.data.data.organizer);
         this.setData({
@@ -399,12 +478,13 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    // if (app.globalData.isIOS) {
-    //   wx.redirectTo({
-    //     url: '../../index/index'
-    //   })
-    //   return
-    // }
+    console.log(this.data.isIOS)
+    if (options.scene || options.shareId) {
+      console.log(123)
+      this.setData({
+        isLoading: true
+      })
+    }
 
     console.log('onload', options)
     wx.setNavigationBarTitle({
@@ -429,6 +509,7 @@ Page({
         this.setData({
           goBackHome: true
         })
+
       }
     }, (error) => {
       this.setData({
@@ -439,6 +520,17 @@ Page({
     });
 
   },
+  // 鉴权
+  areYouSuperSecond: function (productId) {
+    httpRequestApi.areYouSuperSecond(productId).success(() => {
+      console.log(res)
+      this.setData({
+        imSuper: res.data.data.auth ? true : false,
+        haveCreatedHelp: res.data.data.createdShare, // 创建过助力团
+        haveJoinHelp: res.data.data.joinShare, // 参加过助力团
+      })
+    });
+  },
   // 下拉刷新
   onPullDownRefresh: function () {
     //当前在团购页下拉加载

+ 51 - 15
pages/groupPage/group-details/group-details.wxml

@@ -1,6 +1,9 @@
 <!--pages/group-details/group-details.wxml-->
 <view class="group-details">
-    <view class="details-head" bindtap="collage">
+    <view class="loading" wx:if="{{isLoading}}">
+        <view class="loading-text">Loading...</view>
+    </view>
+    <view class="details-head" bindtap="collage" wx:if="{{!isLoading}}">
         <view class="headImg">
             <block wx:for="{{joinUserList}}" wx:key="{{index}}">
                 <view class="headImg-item {{organizer == item.uid ? 'bg-boder' : ''}}">
@@ -14,11 +17,17 @@
                 </view>  
             </block>                      
         </view>
-        <view class="shengyu">
+        <view class="data-loading" wx:if="{{dataLoading}}">
+                <view class="line1"></view>
+                <view class="line2"></view>
+                <view class="line3"></view>
+            </view>
+        <view class="shengyu" wx:if="{{!dataLoading}}">
+            
             <view class="shengyu-num" wx:if="{{colonelName}}">团长{{colonelName}}发起团购</view>
-            <view class="shengyu-num" hidden="{{surplusNum == '0' || !stillGoing || groupStatus}}">仅剩<text>{{surplusNum}}</text>个名额就拼团成功了</view>
-            <view class="shengyu-num" hidden="{{stillGoing || !groupStatus}}">团购已超过时限</view>
-            <view class="shengyu-num" hidden="{{surplusNum != '0'}}">拼团成功!快去朗读吧</view>
+            <view class="shengyu-num"  hidden="{{surplusNum == '0' || !stillGoing || groupStatus}}">仅剩<text>{{surplusNum}}</text>个名额就{{groupOSType === 'IOS' ? '助力' : '拼团'}}成功了</view>
+            <view class="shengyu-num" hidden="{{stillGoing}}">团购已超过时限</view>
+            <view class="shengyu-num" hidden="{{surplusNum != '0'}}">{{groupOSType === 'IOS' ? '助力' : '拼团'}}成功!</view>
             <view class="shengyu-time" hidden="{{!stillGoing || groupStatus}}">
                 剩余时间:
                 <block wx:for="{{timeList[0]}}" wx:key="{{index}}">
@@ -42,16 +51,23 @@
             </view>
         </view>
     </view>
-    <scroll-view scroll-y="{{true}}">
+    <scroll-view scroll-y="{{true}}" wx:if="{{!isLoading}}">
         <view class="grade-details" bindtap="gradeDetails">
             <image src="{{titleIcon}}" ></image>
         </view>
         <view class="catalog">
-            <image class="bg2" src="../../../static/groupImg/Rectangle_9.png"></image> 
-            <text class="{{!flag ? '' : 'select'}}" bindtap="tabSwitch">您需要知道</text>    
-            <text class="{{!flag ? 'select' : ''}}" bindtap="tabSwitch">课文目录</text>
+            <!-- <image class="bg2" src="../../../static/groupImg/Rectangle_9.png"></image>  -->
+            <view class="switch {{knowFlag ? 'select' : ''}}" data-flag="know" bindtap="tabSwitch">
+                <image src="../../../static/image/know_menu_bg.jpg" wx:if="{{knowFlag}}"></image> 
+                <text >您需要知道</text>  
+            </view>
+              
+            <view class="switch {{menuFlag ? 'select' : ''}}" bindtap="tabSwitch" data-flag="menu" bindtap="tabSwitch">
+                <image src="../../../static/image/know_menu_bg.jpg" wx:if="{{menuFlag}}"></image> 
+                <text >课文目录</text>  
+            </view>
         </view>
-        <view class="catalog-list" hidden="{{flag}}">
+        <view class="catalog-list" hidden="{{!menuFlag}}">
             <view class="catalog-item" wx:for="{{lessonList}}" wx:key="{{index}}" data-id="{{item.id}}" data-title="{{item.title}}" bindtap="goToClass">
                 <text class="left">{{item.title}}</text>
                 <view class="right">
@@ -60,13 +76,14 @@
                 </view>
             </view>           
         </view>
-        <view class="know" hidden="{{!flag}}">
+        <view class="know" hidden="{{!knowFlag}}">
          <import src="../../../towxml/entry.wxml" />
             <template is="entry" data="{{...article}}" />
         </view>
     </scroll-view>
     <!-- 底部按钮 -->
-    <view class="group-details-btn {{isIPX ? 'bottomx' :''}}" hidden="{{surplusNum == '0' || !stillGoing }}">
+    <view class="group-details-btn {{isIPX ? 'bottomx' :''}}" hidden="{{surplusNum == '0' || !stillGoing }}" wx:if="{{!isLoading && (groupOSType === 'ANDROID') }}">
+          <image class="btn-image" src="../../../static/groupImg/group_in_ios.jpg" />
         <view class="left-btn" bindtap="sendGroup">
             开团
         </view>
@@ -75,14 +92,31 @@
             <button class="formBtn" form-type="submit"></button>
         </form>
     </view>
-    <view class="group-details-btn {{isIPX ? 'bottomx' :''}}" hidden="{{stillGoing }}">
+    <view class="group-details-btn {{isIPX ? 'bottomx' :''}}" hidden="{{stillGoing }}" wx:if="{{!isIOS}}">
+          <image class="btn-image" src="../../../static/groupImg/group_in_ios.jpg" />
         <view class="only-one-btn" bindtap="sendGroup">
             重新开团
         </view>
     </view>
+    <!-- ios界面的底部按钮 -->
+    <view class="group-details-btn {{isIPX ? 'bottomx' :''}}" wx:if="{{groupOSType === 'IOS' && stillGoing && !groupStatus }}">
+          <image class="btn-image" src="../../../static/groupImg/group_in_ios.jpg" />
+        
+        <form class="only-one-btn {{isIPX ? 'bottomx' :''}}" report-submit="{{formIsANAsshole}}" bindsubmit="jionGroup">
+            我来助力!获得七天试用权
+            <button class="formBtn" form-type="submit"></button>
+        </form>
+    </view>
+    <!-- <view class="group-details-btn {{isIPX ? 'bottomx' :''}}" hidden="{{surplusNum == '0' || !stillGoing }}" wx:if="{{!isLoading && isIOS}}">
+          <image class="btn-image" src="../../../static/groupImg/group_in_ios.jpg" />
+        <form class="only-one-btn {{isIPX ? 'bottomx' :''}}" report-submit="{{formIsANAsshole}}" bindsubmit="jionGroup">
+            我来助力
+            <button class="formBtn" form-type="submit"></button>
+        </form>
+    </view> -->
 </view>
 
-<view class="group-popup" bindtap="sendGroup" hidden="{{sendGroupFlag}}">
+<view class="group-popup" bindtap="sendGroup" hidden="{{sendGroupFlag}}" wx:if="{{!isLoading}}">
     <view class="group-content">
         <view class="group-title">请选择课本</view>
         <view class="group-list">
@@ -116,4 +150,6 @@
   <Dialog bindmyevent="jurisdiction" />
 </view>
 <myToast bindShowAlert="showAlert" wx:if="{{alertFlag}}" />
- <myModal id="myModal" type="{{modalType}}" isCloseShow="{{modalCloseShow}}"  text="{{modalText}}" wx:if="{{isModalShow}}" bindconfirm="modalConfirmHandler" bindclose="modalCloseHandler" />
+ <myModal id="myModal" type="{{modalType}}" isCloseShow="{{modalCloseShow}}"  text="{{modalText}}" wx:if="{{isModalShow}}" bindconfirm="modalConfirmHandler" bindclose="modalCloseHandler" />
+
+  <!-- <MyToast bindShowAlert="showAlert" wx:if="{{damnDialogShow}}"  /> -->

+ 132 - 28
pages/groupPage/group-details/group-details.wxss

@@ -10,12 +10,30 @@
 
 /**主题配色(深色样式)**/
 @import '../../../towxml/style/theme/dark.wxss';
+
 .group-details {
-    
+
     width: 100%;
     background: rgba(240, 241, 245, 1);
 }
 
+.loading {
+    width: 750rpx;
+    height: 1334rpx;
+    position: relative;
+}
+
+.loading .loading-text {
+    position: absolute;
+    left: 0;
+    right: 0;
+    top: 0;
+    bottom: 0;
+    margin: auto;
+    width: 150rpx;
+    height: 88rpx;
+}
+
 .details-head {
     width: 100%;
     background: #fff;
@@ -31,8 +49,8 @@
 
 .headImg-item {
     position: relative;
-    width:104rpx;
-height:104rpx;
+    width: 104rpx;
+    height: 104rpx;
     border-radius: 50%;
     margin: 20rpx 22rpx;
 }
@@ -44,12 +62,12 @@ height:104rpx;
 }
 
 .headImg-item .tuanzhangIcon {
-   position:absolute;
-right:13rpx;
-width:78rpx;
-height:30rpx;
-bottom:-10rpx;
-border-radius:0;
+    position: absolute;
+    right: 13rpx;
+    width: 78rpx;
+    height: 30rpx;
+    bottom: -10rpx;
+    border-radius: 0;
 
 }
 
@@ -125,42 +143,56 @@ scroll-view {
     width: 100%;
     height: 290rpx;
     border-radius: 20rpx;
+    background: rgba(228, 255, 242, .8);
 }
 
 .catalog {
     display: flex;
-    align-items: center;
+    align-items: flex-end;
     width: 100%;
-    height: 110rpx;
+    height: 100rpx;
     background: #fff;
     position: relative;
-}
+    background: rgba(240, 241, 245, 1);
+    padding: 0 40rpx;
 
-.catalog image {
-    position: absolute;
-    left: 374rpx;
-    top: 20rpx;
-    width: 2rpx;
-    height: 66rpx;
+}
+.select{
+    color: #61CA54
 }
 
-.catalog text {
+.switch text {
     flex: 1;
     height: 60rpx;
     text-align: center;
     font-size: 36rpx;
-    margin: 0 90rpx;
+    /* margin: 0 90rpx; */
     box-sizing: border-box;
+    position: relative;
+    z-index: 1;
+    width: 100%;
+    display: block;
+    line-height:66rpx;
 }
 
-.catalog .select {
-    border-bottom: 2rpx solid #61CA54;
-    color: #61CA54;
+.switch {
+    width: 335rpx;
+    height: 70rpx;
+    position: relative;
+}
+
+.switch image {
+    width: 100%;
+    height: 100%;
+    position: absolute;
+    left: 0;
+    top: 0;
+    z-index: 0;
 }
 
 .catalog-list {
     width: 100%;
-    padding: 18rpx;
+    padding: 0 18rpx 18rpx 18rpx ;
     margin-bottom: 120rpx;
     box-sizing: border-box;
 }
@@ -169,7 +201,7 @@ scroll-view {
     padding: 18rpx 18rpx 120rpx 18rpx;
     box-sizing: border-box;
     background: #fff;
-    margin-top: 12rpx;
+    /* margin-top: 12rpx; */
 }
 
 .catalog-item {
@@ -213,19 +245,27 @@ scroll-view {
     align-items: center;
     width: 100%;
     height: 100rpx;
-    background: #FF9209;
+    /* background: #FF9209; */
     color: #fff;
     z-index: 99;
 }
 
+.group-details-btn .btn-image {
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    left: 0;
+    top: 0;
+    z-index: 0;
+}
+
 .bottomx {
     bottom: 20rpx;
 }
 
 .left-btn,
 .right-btn,
-.only-one-btn
-{
+.only-one-btn {
     flex: 1;
     height: 100%;
     display: flex;
@@ -316,6 +356,7 @@ scroll-view {
     width: 214rpx;
     height: 278rpx;
 }
+
 .formBtn {
     margin: 0;
     padding: 0;
@@ -330,4 +371,67 @@ scroll-view {
 
 .formBtn::after {
     border: none;
+}
+
+.data-loading {
+    width: 100%;
+    height: 200rpx;
+    /* background: #FF4330; */
+}
+
+.data-loading .line1 {
+    width: 300rpx;
+    height: 30rpx;
+    background: rgba(228, 255, 242, .8);
+    margin-top: 20rpx;
+    margin-left: 122rpx;
+    border-radius: 10rpx;
+}
+
+.data-loading .line2 {
+    width: 400rpx;
+    height: 30rpx;
+    background: rgba(228, 255, 242, .8);
+    margin-top: 20rpx;
+    margin-left: 200rpx;
+    border-radius: 10rpx;
+}
+
+.data-loading .line3 {
+    width: 460rpx;
+    height: 30rpx;
+    background: rgba(228, 255, 242, .8);
+    margin-top: 20rpx;
+    margin-left: 160rpx;
+    border-radius: 10rpx;
+}
+
+.damn-dialog {
+    width: 100%;
+    height: 100%;
+    position: absolute;
+    left: 0;
+    top: 0;
+    z-index: 999;
+    background: rgba(0, 0, 0, .5)
+}
+
+.damn-dialog .box {
+    width: 600rpx;
+    height: 200rpx;
+    margin: 50% auto;
+    background: #fff;
+    border-radius: 30rpx;
+}
+
+.damn-dialog .box .title {
+    text-align: center;
+    color: #FF4330;
+    font-size: 34rpx;
+}
+
+.damn-dialog .box .damn-dialog-1 {
+    text-align: center;
+    font-size: 32rpx;
+    color: #000
 }

+ 2 - 1
pages/groupPage/make-money/make-money.js

@@ -71,7 +71,8 @@ Page({
         this.data.surplusList.push(1);
       }
       //时间转换
-      const timeList = util.lastHoursInGroup(res.data.data.groupPurchaseOrder.closeTime - res.data.data.groupPurchaseOrder.gmtModified);
+      const timeList = util.lastHoursInGroup(res.data.data.groupPurchaseOrder.closeTime - res.data.data.currentTime);
+      console.log(timeList)
       this.setData({
         groupPurchaseInfo: res.data.data.groupPurchaseInfo,
         organizer: res.data.data.organizer,

+ 37 - 15
pages/groupPage/my-group/my-group.js

@@ -31,8 +31,28 @@ Page({
     const productId = currentTarget.dataset.productid;
     const groupId = currentTarget.dataset.groupid;
     const uid = currentTarget.dataset.uid;
+    const myUid = wx.getStorageSync('uid');
     const num = currentTarget.dataset.num;
     const ind = currentTarget.dataset.ind;
+    const groupType = currentTarget.dataset.grouptype;
+    if(app.globalData.isIOS ){
+      if( groupType==='IOS' ){
+        if( uid === myUid){
+          wx.navigateTo({
+            url: `/pages/groupPage/collage-details/collage-details?orderId=${orderId}&read=true`
+          })
+          return;
+        } else {
+
+        }
+      } else {
+        wx.navigateTo({
+          url: `/pages/groupPage/collage-details/collage-details?orderId=${orderId}&read=true`
+        })
+        return;
+      }  
+    } 
+    
     this.setData({
       ind
     })
@@ -49,7 +69,7 @@ Page({
           orderId,
           groupId
         })
-        this.dialog(uid);
+        this.dialog(uid, groupType);
       } else {
         wx.navigateTo({
           url: `/pages/groupPage/collage-details/collage-details?orderId=${orderId}&read=true`
@@ -112,52 +132,54 @@ Page({
       console.log('错误', error)
     })
   },
-  dialog: function (uid) {
+  dialog: function (uid,type) {
     if (wx.getStorageSync('uid') == uid) {
       this.setData({
         typeOf: 'success',
         title: '恭喜',
-        headTextOne: '您发起的团购拼团成功',
-        headTextTwo: '领袖体质魅力无穷!',
+        headTextOne: type === 'IOS' ? '您发起的助力团成功' : '您发起的团购拼团成功',
+        headTextTwo: type === 'IOS' ? '真是魅力无穷啊' : '领袖体质魅力无穷!',
         content: [{
-            text: " 您可以继续发起新的团购",
+            text: type === 'IOS' || app.globalData.isIOS ? '快快去朗读吧' : '您可以继续发起新的团购',
             color: "#F97800"
           },
           {
-            text: " 不再需要支付本课程费用",
+            text: type === 'IOS' || app.globalData.isIOS ? '让更多人听到你美妙的读书声吧' : '不再需要支付本课程费用',
             color: "#F97800"
           },
           {
-            text: " 拼团成功,您将得到奖学金",
+            text: type === 'IOS' || app.globalData.isIOS ? '' : '拼团成功,您将得到奖学金',
             color: "#F97800"
           }
         ],
-        btnContent: '再接再厉 赚奖学金'
+        haveReward: type === 'IOS' ? false : true,
+        btnContent: type === 'IOS' ? '我要去朗读' : '再接再厉 赚奖学金'
       })
     } else {
       this.setData({
         typeOf: 'success',
-        title: '拼团成功',
-        headTextOne: '您参与的团购拼团成功',
+        title: '恭喜',
+        headTextOne: type === 'IOS' ? '您助力的团成功啦' : '您参与的团购拼团成功',
         headTextTwo: '感谢团长的分享',
         content: [{
-            text: " 您也可以发起新的团购",
+            text: type === 'IOS'|| app.globalData.isIOS ? '您还可以自己发团' : " 您也可以发起新的团购",
             color: "#F97800"
           },
           {
-            text: "作为新的发起人",
+            text: type === 'IOS' || app.globalData.isIOS? '获得本课程三年使用权哦' :"作为新的发起人",
             color: "#F97800"
           },
           {
-            text: "您无需在支付本课程费用",
+            text: type === 'IOS'|| app.globalData.isIOS ? '' : "您无需在支付本课程费用",
             color: "#F97800"
           },
           {
-            text: "拼团成功,您将得到奖学金",
+            text: type === 'IOS'|| app.globalData.isIOS ? '' : "拼团成功,您将得到奖学金",
             color: "#F97800"
           }
         ],
-        btnContent: '我也试试 赚奖学金'
+        haveReward: type === 'IOS' || app.globalData.isIOS ? false : true,
+        btnContent: type === 'IOS' || app.globalData.isIOS ? '我要去朗读' : '我也试试 赚奖学金'
       })
     }
   },

+ 4 - 3
pages/groupPage/my-group/my-group.wxml

@@ -10,17 +10,17 @@
                 </view>
                 <view class="group-jion">
                 <view class="top-title">
-                    <text>{{item.groupPurchaseOrder.groupTitle}}</text>
+                    <text>{{item.groupPurchaseOrder.productTitle}}</text>
                     <text>{{item.groupPurchaseOrder.headcount}}人团</text>
                 </view>
                 <view class="group-detail {{item.groupPurchaseOrder.status =='SUCCESSED' ? 'success-border' : ''}}">
                     <view class="number">
                         <text wx:if="{{item.groupPurchaseOrder.headcount - item.groupPurchaseOrder.joinCount}}">还剩{{item.groupPurchaseOrder.headcount - item.groupPurchaseOrder.joinCount}}人成团</text>
-                        <text wx:if="{{!(item.groupPurchaseOrder.headcount - item.groupPurchaseOrder.joinCount)}}">拼团成功</text>
+                        <text wx:if="{{!(item.groupPurchaseOrder.headcount - item.groupPurchaseOrder.joinCount)}}">{{item.groupPurchaseOrder.os === 'IOS' ? '助力成功' : '拼团成功'}}</text>
                         <text wx:if="{{item.groupPurchaseOrder.headcount - item.groupPurchaseOrder.joinCount}}">剩余{{timeList[index]}}结束</text>
                         <text wx:if="{{!(item.groupPurchaseOrder.headcount - item.groupPurchaseOrder.joinCount)}}">{{timeList[index]}}</text>
                     </view>
-                    <view class="jion-btn {{item.groupPurchaseOrder.status =='SUCCESSED' ? 'success-bg' : ''}}"  bindtap="collageDetails" data-ind="{{index}}" data-num="{{item.groupPurchaseOrder.status==='SUCCESSED'}}" data-orderId="{{item.groupPurchaseOrder.id}}" data-groupId="{{item.groupPurchaseOrder.groupId}}" data-productId="{{item.groupPurchaseOrder.productId}}" data-uid="{{item.groupPurchaseOrder.organizer}}">
+                    <view class="jion-btn {{item.groupPurchaseOrder.status =='SUCCESSED' ? 'success-bg' : ''}}"  bindtap="collageDetails" data-ind="{{index}}" data-num="{{item.groupPurchaseOrder.status==='SUCCESSED'}}" data-orderId="{{item.groupPurchaseOrder.id}}" data-grouptype="{{item.groupPurchaseOrder.os}}" data-groupId="{{item.groupPurchaseOrder.groupId}}" data-productId="{{item.groupPurchaseOrder.productId}}" data-uid="{{item.groupPurchaseOrder.organizer}}">
                         {{item.groupPurchaseOrder.status =='SUCCESSED' ? '已成功' : '进行中'}}
                     </view>
                 </view>
@@ -39,6 +39,7 @@
     headTextOne="{{headTextOne}}"
     headTextTwo="{{headTextTwo}}"
     content="{{content}}"
+    haveReward="{{haveReward}}"
     btnContent="{{btnContent}}"
     bindGroup="group"
     bindClose="close"

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

@@ -94,7 +94,7 @@
     justify-content: center;
     width: 36%;
     height: 100%;
-    background: #FF3E55;
+    background: #ff6e00;
     color: #fff;
     font-size: 36rpx;
     line-height: 100%;

+ 3 - 8
pages/social/works/works.js

@@ -505,14 +505,9 @@ Page({
         })
     },
     reward: function () {
-        // if(this.data.isIOS){
-        //     wx.showToast({
-        //         title: '奖励成功!',
-        //         icon: 'success',
-        //         duration: 1000
-        //     })
-        //     return 
-        // };
+        if(this.data.isIOS){
+            return 
+        };
         this.setData({
             ifReward: true
         })

+ 2 - 1
pages/social/works/works.wxml

@@ -69,7 +69,8 @@
     </view>
     <view class="footSection">
         <image class="blackbord" src="../../../static/image/blackbord.png" />
-        <view class="collectBtn footerBtn" bindtap="reward">
+        <view class="collectBtn footerBtn {{isIOS? 'get-opacity' : null}}" bindtap="reward">
+            <!-- <view wx:if="{{isIOS}}" class="stop-default"></view> -->
             <image src="../../../static/image/bonus.png" />
             <text>奖励</text>
         </view>

+ 13 - 1
pages/social/works/works.wxss

@@ -368,8 +368,20 @@
     display: flex;
     flex-direction: column;
     margin-top: 60rpx;
+    position: relative;
 }
-
+.get-opacity{
+    opacity: 0;
+}
+/* .stop-default{
+    width: 148rpx;
+    height: 148rpx;
+    position: absolute;
+    left: 0;
+    height: 0;
+    background: #fff;
+    z-index: 2;
+} */
 .collectBtn {
     margin-left: 80rpx
 }

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

@@ -34,7 +34,7 @@ Page({
     APIClient.myCourse().success(res => {
       console.log(res.data.data.list);
       this.setData({
-        bookList: res.data.data.list
+        bookList: res.data.data
       },() => {
         console.log(this.data.bookList);
       });

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

@@ -4,7 +4,7 @@
       <view class='book-box' bindtap='toCourse' data-productId='{{ item.productId }}' data-productTitle='{{ item.productTitle }}'>
         <image class="item-img" src="{{ item.iconImg }}"></image>
       </view>
-      <view class='item-title'>{{ item.groupTitle }}</view>
+      <view class='item-title'>{{ item.productTitle }}</view>
     </view>    
   </block> 
   <myPlacerholder line1="{{line1}}" line2="{{line2}}" wx:if="{{bookList.length <= 0}}" />            

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

@@ -47,7 +47,7 @@
           <view class='red-heart'>
             <image src='../../../static/image/purple_heart.png'></image>
           </view>
-          <text>关注</text>
+          <text>粉丝</text>
         </view>
       </view>
       <view class='point-count'>

+ 8 - 15
project.config.json

@@ -36,26 +36,19 @@
 			"list": []
 		},
 		"miniprogram": {
-			"current": 2,
+			"current": 1,
 			"list": [
 				{
-					"id": 0,
-					"name": "团购",
-					"pathName": "pages/groupPage/group-details/group-details",
-					"query": "productId=1544780663806827",
-					"scene": "1012"
+					"id": -1,
+					"name": "5",
+					"pathName": "pages/groupPage/grade-details/grade-details",
+					"query": "productId=1&title=一年级上册课文朗读【部编版】"
 				},
 				{
 					"id": 1,
-					"name": "1",
-					"pathName": "pages/social/works/works",
-					"query": "id=1544608002793997&title=【课文2】小小的船&shareCard=true"
-				},
-				{
-					"id": -1,
-					"name": "作品",
-					"pathName": "pages/social/works/works",
-					"query": "id=1544781565949256&title=【课文2】小小的船&shareCard=true",
+					"name": "分享团",
+					"pathName": "pages/groupPage/group-details/group-details",
+					"query": "share=true&shareId=1545234853489961",
 					"scene": "1012"
 				}
 			]

BIN
static/groupImg/group_in_ios.jpg


BIN
static/image/know_menu_bg.jpg


BIN
static/image/menu_blue.png


BIN
static/image/menu_normal.png


BIN
static/image/you_know_blue.png


BIN
static/image/you_know_normal.png


+ 13 - 3
utils/APIClient.js

@@ -187,13 +187,14 @@ module.exports = {
     }).url(url).data(data).method('POST').send();
   },
   // 获取推荐团购信息
-  getGroupList(pageNo) {
+  getGroupList(pageNo,osType) {
     let url = getBaseUrl(`wx/groupPurchaseInfo/recommend`);
     return request.getInstance().header({
       uid: wx.getStorageSync('uid')
     }).url(url).data({
       pageNo,
-      pageSize: 3
+      pageSize: 3,
+      osType: osType
     }).send();
   },
   // 获取课程团购信息
@@ -341,9 +342,18 @@ module.exports = {
       productId
     }).send();
   },
+  // 课程鉴权 包括助力团
+  areYouSuperSecond(productId) {
+    let url = getBaseUrl(`wx/groupPurchase/authAll`);
+    return request.getInstance().header({
+      uid: wx.getStorageSync('uid')
+    }).url(url).data({
+      productId
+    }).send();
+  },
   // // 课本鉴权
   // areYouBookSuper(productArr){
-  //   let url = getBaseUrl(`wx/groupPurchase/auth`);
+  //   let url = getBaseUrl(`wx/groupPurchase/authAll`);
   //   return request.getInstance().header({
   //     uid: wx.getStorageSync('uid')
   //   }).url(url).data(productArr).method('POST').send();

+ 2 - 0
utils/const.js

@@ -1,5 +1,7 @@
 // 常量列表
 module.exports = {
 	productApi: 'https://reader.lingjiao.cn/readerProduct/',
+	// productApi: 'https://readertest.lingjiao.cn/readerProduct/',
 	baseApi: 'https://reader.lingjiao.cn/readerBase/'
+	// baseApi: 'https://readertest.lingjiao.cn/readerBase/'
 }

+ 4 - 1
utils/util.js

@@ -13,7 +13,8 @@ const lastHours = date => {
 	return h + '小时' + m + '分'
 }
 const addThreeYears = date => {
-		const t = date + (31536000000 * 3)
+		// const t = date + (31536000000 * 3)
+		const t = date
 		return formatDate(t,4)
 }
 const lastHoursInGroup = date => {
@@ -45,6 +46,8 @@ function formatDate(time, flag) {
 		return month + '-' + day + ' ' + hour + ':' + minute;
 	}else if( flag == 4) {
 		return year + '年' + month + '月' + day + '日';
+	}else if( flag == 5){
+		return day.toString().substring(1,2)
 	}
 }
 function GetQueryString(str,name){