Rorschach 6 лет назад
Родитель
Сommit
a2515275a6

+ 19 - 19
pages/groupPage/collage-details/collage-details.js

@@ -34,7 +34,7 @@ Page({
         color: "#FF4600"
       }
     ],
-    read: false,
+    ifGroupSuccessed: false,
     organizerUid: '',
     hosterUid: wx.getStorageSync('uid'),
     colonelName: '',
@@ -44,7 +44,7 @@ Page({
   },
   //显示分享页 
   openShare: function () {
-    if (this.data.read) {
+    if (this.data.ifGroupSuccessed) {
       const productId = this.data.productId;
       const id = this.data.orderId;
       const groupId = this.data.groupId;
@@ -92,7 +92,7 @@ Page({
     // }
     if (options.read) {
       this.setData({
-        read: options.read
+        ifGroupSuccessed: options.read
       })
     }
     if (options.goBackHome == 'true') {
@@ -124,7 +124,7 @@ Page({
       const surplusNum = groupOrder.headcount - groupOrder.joinCount;
       this.setData({
         organizerUid: groupOrder.organizer,
-        read: groupOrder.status === 'SUCCESSED' ? true : false
+        ifGroupSuccessed: groupOrder.status === 'SUCCESSED' ? true : false
       })
       for (var i = 0; i < surplusNum; i++) {
         this.data.surplusList.push(1);
@@ -167,21 +167,21 @@ Page({
       // res.data.data.joinUserList.forEach(item => {
       //     if(item)
       // });
-      let text = '即可获得本课程三年使用权';
-      const joinUserList = res.data.data.joinUserList;
-      for (let i = 0; index < joinUserList; i++) {
-        const item = this.data.hosterUid;
-        if (this.data.hosterUid === groupOrder.organizer) {
-          console.log('团长本人浏览')
-          text = '即可获得本课程三年使用权'
-          return;
-        }
-        if(item.uid === hosterUid){
-            if(groupOrder.os === 'IOS'){
-              text = `即可助力团长`
-            }
-        }
-      }
+      // let text = '即可获得本课程三年使用权';
+      // const joinUserList = res.data.data.joinUserList;
+      // for (let i = 0; index < joinUserList; i++) {
+      //   const item = this.data.hosterUid;
+      //   if (this.data.hosterUid === groupOrder.organizer) {
+      //     console.log('团长本人浏览')
+      //     text = '即可获得本课程三年使用权'
+      //     return;
+      //   }
+      //   if(item.uid === hosterUid){
+      //       if(groupOrder.os === 'IOS'){
+      //         text = `即可助力团长`
+      //       }
+      //   }
+      // }
     })
   },
   /**

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

@@ -21,28 +21,67 @@
             <view class="last-text">{{timeLast}}</view>
         </view>
         <!-- 还剩几人参团 -->
-        <view class="last-member">
-           
+        <view class="last-member" wx:if="{{!ifGroupSuccessed}}">
             <view class="group-regular-text" hidden="{{surplusNum == '0' || !stillGoing}}">
-               还剩<text class="red-text">{{surplusNum}}</text>位好友{{groupOsType === 'IOS' ? '助力' : '参团'}}
+                还剩
+                <text class="red-text">{{surplusNum}}</text>
+                位好友{{groupOsType === 'IOS' ? '助力' : '参团'}}
             </view>
-            <!-- 团长本人浏览话术-->
-            <view class="group-regular-text" wx:if="{{organizerUid === hosterUid}}">即可获得本课程3年试用权</view>
-            <!-- <view class="group-regular-text"></view> -->
-             <view class="group-organizer group-regular-text">
-             <!-- <view class="group-organizer group-regular-text" wx:if="{{colonelName}}"> -->
+            <!-- 团长本人浏览话术 -->
+            <view class="group-regular-text" wx:if="{{organizerUid === hosterUid}}">
+                即可获得本课程3年试用权
+            </view>
+            <!-- 其他人浏览 -->
+            <view class="group-organizer group-regular-text" wx:if="{{organizerUid !== hosterUid}}">
+                <!-- <view class="group-organizer group-regular-text" wx:if="{{colonelName}}"> -->
                 <!-- ios分销团提示小红花 安卓分销团提示获得本课 -->
-                <view wx:if="{{groupOsType === 'IOS'}}" >即可助力团长<text class="red-text">{{organizer.wechatName}}</text>获得本课</view>
-                <view wx:if="{{groupOsType === 'ANDROID'}}" >即可拼团成功</view>
-                <view wx:if="{{groupOsType === 'IOS' && colonelName}}">即可获得300朵<image src="../../../static/image/flower_small.png" /></view>
+                <view wx:if="{{groupOsType === 'IOS'}}">
+                    即可助力团长
+                    <text class="red-text">{{organizer.wechatName}}</text>
+                    获得本课
+                </view>
+                <view wx:if="{{groupOsType === 'ANDROID'}}">即可拼团成功</view>
+                <view wx:if="{{groupOsType === 'IOS' && colonelName}}">
+                    即可获得300朵
+                    <image src="../../../static/image/flower_small.png" />
                 </view>
+            </view>
             <view class="group-regular-text" hidden="{{stillGoing}}">团购已超过时限</view>
             <view class="group-regular-text" hidden="{{surplusNum != '0'}}">
                 {{groupOsType === 'IOS' ? '助力' : '团购'}}成功!快去朗读吧
             </view>
         </view>
+        <view class="group-success" wx:if="{{ifGroupSuccessed}}">
+            <!-- 助力团成功了 团长看到-->
+            <view class="help-success" wx:if="{{groupOsType === 'IOS' && organizerUid === hosterUid}}">
+                <view class="group-regular-text" >
+                    恭喜,好强大的魅力
+                </view>
+                 <view class="group-regular-text" >
+                    您发起的助力团成功了
+                </view>
+            </view>
+            <!-- 助力团成功了 团员看到 -->
+            <view class="help-success" wx:if="{{groupOsType === 'IOS' && organizerUid !== hosterUid}}">
+                <view class="group-regular-text" >
+                    在你的帮助下,{{organizer.wechatName}}的助力团成功啦
+                </view>
+                 <view class="group-regular-text" >
+                    您获得了7天的本课程试用权哦
+                </view>
+            </view>
+            <!-- 团购成功了 -->
+            <view class="help-success" wx:if="{{groupOsType === 'ANDROID'}}">
+                <view class="group-regular-text" >
+                    拼团成功!
+                </view>
+                <view class="group-regular-text" >
+                    你获得了本课3年试用权哦
+                </view>
+            </view>
+        </view>
         <!-- 头像 -->
-          <view class="headImg">
+        <view class="headImg">
             <block wx:for="{{joinUserList}}" wx:key="{{index}}">
                 <view class="headImg-item bg-boder">
                     <view wx:if="{{organizerUid == item.uid}}" class="organizerIcon">团长</view>
@@ -62,7 +101,7 @@
         </view>
         <view class="invitation-btn" bindtap="openShare">
             <!-- <image src="../../../static/groupImg/Invitation.png"></image> -->
-            <text>{{read ? '开始你的表演' : '立即邀请好友助力'}}</text>
+            <text>{{ifGroupSuccessed ? '开始你的表演' : '立即邀请好友助力'}}</text>
         </view>
         <view class="explain" wx:if="{{groupOsType === 'IOS' ? false : true}}">
             <view class="explain-title">拼团规则</view>