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

+ 1 - 1
component/hot/hot.wxml

@@ -1,7 +1,7 @@
 <template name="hot">
     <view class="messageSection">
         <image class="messageIcon" src="../../static/image/message_icon.png" />
-        <text class="messageText">您有<text class="red-text">5</text>条消息【立即查看】</text>
+        <text class="messageText">您有<text class="red-text">5</text>条未读消息【立即查看】</text>
     </view>
     <view class="myCourseSection">
         <view class="title-regular">我的课程</view>

+ 5 - 2
component/my/my.wxml

@@ -72,14 +72,17 @@
         </view>
       </view>
       <view class="my-reading-section">
-        <view class="my-reading-title">
+        <view class="my-reading-title" wx:if="{{myData.user.myRead}}">
           <view class="title-left">我的作品</view>
           <view class="title-right" bindtap="toMyRead">
             更多
             <image src="../../static/image/black_to.png" />
           </view>
         </view>
-        <view class="my-reading-gut">
+        <view class="my-reading-section-placeholder" wx:if="{{!myData.user.myRead}}">
+          您还没有朗读过,快去留下声音吧
+        </view>
+        <view class="my-reading-gut" wx:if="{{myData.user.myRead}}">
           <view  class="worksCard" style="margin-bottom: 0;" bindtap="openWorks" data-readId="{{myData.user.myRead.id}}" data-title="{{myData.user.myRead.title}}">
             <view class="topData">
               <view class="worksLeft">

+ 8 - 0
component/my/my.wxss

@@ -320,6 +320,14 @@ image {
   box-sizing: border-box;
 }
 
+.my-reading-section-placeholder{
+  width: 100%;
+  font-size: 24rpx;
+  color: #393939;
+  text-align: center;
+  line-height: 80rpx;
+}
+
 .title-right {
   display: flex;
   flex-direction: row;

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

@@ -36,6 +36,7 @@ Page({
     ],
     read: false,
     organizerUid: '',
+    hosterUid: wx.getStorageSync('uid'),
     colonelName: '',
     rewardMoney: '',
     goBackHome: false,
@@ -131,10 +132,10 @@ Page({
       }
       //console.log(res.data.data.groupPurchaseOrder.closeTime - res.data.data.groupPurchaseOrder.gmtModified)
       //时间转换
-      let timeList = [];
+      let timeLast = '';
       const stillGoing = groupOrder.closeTime - Date.parse(new Date()) <= 0 ? false : true
       if (stillGoing) {
-        timeList = util.lastHoursInGroup(groupOrder.closeTime - Date.parse(new Date()));
+        timeLast = util.lastHours(groupOrder.closeTime - Date.parse(new Date()));
       }
       // const timeList = util.formatTime(groupOrder.closeTime - Date.parse(new Date()));
       // console.log(timeList)
@@ -145,7 +146,7 @@ Page({
         surplusNum,
         joinUserList: res.data.data.joinUserList,
         surplusList: this.data.surplusList,
-        timeList,
+        timeLast,
         stillGoing,
         productId: groupOrder.productId,
         groupId: groupOrder.groupId,
@@ -153,6 +154,7 @@ Page({
         dataLoading:false,
         groupOsType: groupOrder.os
       })
+      console.log(this.data.groupOsType)
       if (groupOrder.groupType === 'PROMOTION') {
         //this.data.joinUserList.unshift(res.data.data.organizer);
         this.setData({

+ 48 - 45
pages/groupPage/collage-details/collage-details.wxml

@@ -8,11 +8,41 @@
             <text>3.去朗读</text>
         </view>
     </view> -->
+    <view class="green-placerholder"></view>
+    <image class="class-icon" src="{{groupPurchaseInfo.bgImg}}" />
     <view class="details-head">
-        <view class="headImg">
+        <!-- 剩余时间盒子 -->
+        <view class="last-time-box" wx:if="{{!dataLoading}}">
+            <view class="last-time">
+                <image class="left-icon" src="../../../static/groupImg/right_icon.png" />
+                <text class="last-time-end">距结束</text>
+                <image class="right-icon" src="../../../static/groupImg/left_icon.png" />
+            </view>
+            <view class="last-text">{{timeLast}}</view>
+        </view>
+        <!-- 还剩几人参团 -->
+        <view class="last-member">
+           
+            <view class="group-regular-text" hidden="{{surplusNum == '0' || !stillGoing}}">
+               还剩<text class="red-text">{{surplusNum}}</text>位好友{{groupOsType === 'IOS' ? '助力' : '参团'}}
+            </view>
+            <!-- 团长本人浏览情况 -->
+            <view class="group-regular-text" wx:if="{{organizerUid === hosterUid}}">即可获得本课程3年试用权</view>
+             <view class="group-organizer group-regular-text" wx:if="{{colonelName}}">
+                <!-- ios分销团提示小红花 安卓分销团提示获得本课 -->
+                <view wx:if="{{groupOsType === 'ANDROID'}}" >即可助力团长<text class="red-text">{{colonelName}}</text>获得本课</view>
+                <view>123123123{{groupOsType}}</view>
+                <view wx:if="{{groupOsType === 'IOS'}}">即可获得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="headImg">
             <block wx:for="{{joinUserList}}" wx:key="{{index}}">
-                <view class="headImg-item {{organizerUid == item.uid ? 'bg-boder' : ''}}">
-                    <!-- <image wx:if="{{organizerUid == item.uid}}" class="tuanzhangIcon" src="../../../static/groupImg/tuanzhangIcon.png"></image> -->
+                <view class="headImg-item bg-boder">
                     <view wx:if="{{organizerUid == item.uid}}" class="organizerIcon">团长</view>
                     <image src="{{item.avatar}}"></image>
                 </view>
@@ -24,55 +54,28 @@
             </block>
         </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'}}">{{groupOsType === 'IOS' ? '助力' : '团购'}}成功!快去朗读吧</view>
-            <view class="shengyu-time" hidden="{{surplusNum == '0'}}">
-                剩余时间:
-                <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 class="line1"></view>
+            <view class="line2"></view>
+            <view class="line3"></view>
         </view>
         <view class="invitation-btn" bindtap="openShare">
             <!-- <image src="../../../static/groupImg/Invitation.png"></image> -->
-            <text>{{read ? '开始你的表演' : '邀请朋友参加'}}</text>
+            <text>{{read ? '开始你的表演' : '立即邀请好友助力'}}</text>
         </view>
         <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;">如果拼团失败</view>
-            <view >您预付的课程费将在48小时内退回您的账户</view>
+            <view class="explain-title">拼团规则</view>
+            <view class="explain-gut">转发给自己的朋友们,分享好课,追随您一起学习进步</view>
+            <view class="explain-gut">您的魅力不是吹的</view>
+            <view class="explain-gut">在限定时间内成功拼团,团长将得到{{rewardMoney}}元的奖励金</view>
+            <view class="explain-gut">如果拼团失败</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 class="explain-title">助力规则</view>
+            <view class="explain-gut">在限定时间内成功助力,团长将获得本课程3年试用权</view>
+            <view class="explain-gut">继续发起,将获得300朵小红花</view>
+            <view class="explain-gut">助力者将获得7天的试用权</view>
+            <view class="explain-gut">据我们统计:分享到3个群,成功率高达98.2%</view>
         </view>
     </view>
 </view>

+ 90 - 51
pages/groupPage/collage-details/collage-details.wxss

@@ -2,10 +2,30 @@
 .collage-details {
     height: 100%;
     width: 100%;
-    background: rgba(240, 241, 245, 1);
+    background: #fff;
     overflow: hidden;
 }
 
+.green-placerholder {
+    width: 100%;
+    height: 132rpx;
+    background: #12c962;
+    position: absolute;
+    top: 0;
+}
+
+.class-icon {
+    width: 704rpx;
+    height: 294rpx;
+    border-radius: 20rpx;
+    box-shadow: 0 0 15rpx 0rpx rgba(0, 0, 0, .4);
+    margin: 0 auto;
+    display: block;
+    z-index: 1;
+    position: relative;
+    top: 15rpx;
+}
+
 .step {
     width: 100%;
     height: 250rpx;
@@ -49,10 +69,11 @@
 
 .headImg-item {
     position: relative;
-    width: 104rpx;
-    height: 104rpx;
+    width: 140rpx;
+    height: 140rpx;
     border-radius: 50%;
     margin: 20rpx 22rpx;
+    box-sizing:border-box;
 }
 
 .headImg-item image {
@@ -64,69 +85,80 @@
 .headImg-item .organizerIcon {
     position: absolute;
     bottom: -15rpx;
-    width: 86rpx;
-    height: 30rpx;
-    background: #61ca54;
-    border-radius: 20rpx;
-    border: 2rpx solid rgba(255, 255, 255, 1);
-    font-size: 20rpx;
+    width: 70rpx;
+    height: 32rpx;
+    line-height: 32rpx;
+    background: #f7b21d;
+    border-radius: 16rpx;
+    /* border: 2rpx solid rgba(255, 255, 255, 1); */
+    font-size: 24rpx;
     /* font-family: PingFangSC-Medium; */
     /* font-weight: 500; */
     color: rgba(255, 255, 255, 1);
-    left: 8rpx;
+    left: 0;
+    right: 0;
+    margin: 0 auto;
     text-align: center;
 }
 
 .bg-boder {
-    border: 2px solid #61CA54;
+    border: 2px solid #f7b21d;
 }
 
-.shengyu {
+.last-time-box {
+    width: 100%;
     display: flex;
     flex-direction: column;
-    color: #696969;
+    align-items: center;
+    margin-top:30rpx;
 }
 
-.shengyu-num {
-    text-align: center;
+.last-time {
+    display: flex;
+    flex-direction: row;
+    align-items: center;
 }
 
-.shengyu-num text {
-    color: #FF4330;
+.last-time-end {
+    width: 88rpx;
+    height: 38rpx;
+    font-size: 30rpx;
+    font-weight: 800;
+    color: #f14025;
+    margin: 0 15rpx;
 }
 
-.shengyu-time {
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    margin-top: 8rpx;
+.left-icon {
+    width: 80rpx;
+    height: 20rpx;
 }
 
-.shengyu-time .time {
-    position: relative;
-    width: 32rpx;
-    height: 36rpx;
-    margin: 0 8rpx;
+.right-icon {
+    width: 80rpx;
+    height: 20rpx;
 }
 
-.shengyu-time .time image {
-    width: 24rpx;
-    height: 40rpx;
+.last-text {
+    width: 100%;
+    text-align: center;
+    font-size: 30rpx;
+    font-weight: 800;
+    color: #f14025;
+    margin-top: 8rpx;
 }
 
-.shengyu-time .time text {
-    position: absolute;
-    left: 2rpx;
-    top: 0;
-    z-index: 2;
-    color: #fff;
-    font-size: 28rpx;
-    width: 32rpx;
-    height: 36rpx;
-    line-height: 36rpx;
-    background: #ff9209;
+.group-regular-text {
+    font-size: 30rpx;
+    font-weight: 800;
+    color: rgba(12, 10, 10, 1);
+    width: 100%;
     text-align: center;
-    border-radius: 4rpx;
+    line-height: 45rpx;
+}
+
+.last-member{
+    margin-top: 17rpx;
+    
 }
 
 .invitation-btn {
@@ -136,7 +168,7 @@
     /* transform: translate(-50%); */
     width: 434rpx;
     height: 80rpx;
-    margin: 80rpx auto 20rpx;
+    margin: 0 auto 20rpx;
 }
 
 .invitation-btn image {
@@ -156,9 +188,15 @@
     line-height: 80rpx;
     z-index: 2;
     color: #fff;
-    background: #ff9209;
+    background: #FF653A;
     border-radius: 56rpx;
+    font-size: 36rpx;
+    font-weight: 800;
+
+}
 
+.red-text{
+    color: #f13e25
 }
 
 .rule {
@@ -188,20 +226,20 @@
 }
 
 .explain {
-    color: #414141;
+    color: #8E8B8C;
     width: 100%;
-    padding: 0 70rpx;
     box-sizing: border-box;
     text-align: center;
     font-size: 24rpx;
-    /* line-height: 50rpx; */
-    margin-top:50rpx;
+    line-height: 40rpx;
+    position: absolute;
+    bottom: 20rpx;
 }
 
-.explain text {
-    display: block;
-    font-size: 36rpx;
+.explain-title{
+    font-weight: 800;
 }
+
 .data-loading {
     width: 100%;
     height: 200rpx;
@@ -225,6 +263,7 @@
     margin-left: 200rpx;
     border-radius: 10rpx;
 }
+
 .data-loading .line3 {
     width: 460rpx;
     height: 30rpx;

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

@@ -130,9 +130,8 @@ Page({
       })
       // 如果已经拥有当前课程,则无需支付,直接进入拼团成功页面
       if (res.data.data.groupPurchaseOrder.groupType === 'PROMOTION') {
-        
-        wx.redirectTo({
-          url: `/pages/groupPage/make-money/make-money?productId=${productId}&id=${res.data.data.groupPurchaseOrder.id}&groupId=${groupId}`
+        wx.navigateTo({
+          url: `/pages/groupPage/collage-details/collage-details?orderId=${res.data.data.groupPurchaseOrder.id}`
         })
         wx.setNavigationBarTitle({
           title: '拼团详情'

+ 3 - 1
pages/index/index.js

@@ -161,7 +161,9 @@ Page({
     httpRequestApi.getUserWorksInfo().success(res => {
       this.data.myData.user = res.data.data;
       this.data.myData.user.user.birthday = this.data.myData.user.user.birthday ?  formatDate(res.data.data.user.birthday,3) : '2018年1月1日';
-      this.data.myData.user.myRead.gmtCreated = formatDate(this.data.myData.user.myRead.gmtCreated,4)
+      if(this.data.myData.user.myRead){
+        this.data.myData.user.myRead.gmtCreated = formatDate(this.data.myData.user.myRead.gmtCreated,4)
+      }
       this.setData({
         myData: this.data.myData,
       });

+ 3 - 3
project.config.json

@@ -12,7 +12,7 @@
 	},
 	"compileType": "miniprogram",
 	"libVersion": "2.3.2",
-	"appid": "wxdfa8a4f1623d28db",
+	"appid": "wx8961a3e5512f307c",
 	"projectname": "%E5%B0%8F%E5%AD%A6%E8%AF%BE%E6%96%87%E6%9C%97%E8%AF%BB%E9%85%8D%E9%9F%B3",
 	"debugOptions": {
 		"hidedInDevtools": []
@@ -47,8 +47,8 @@
 				{
 					"id": 1,
 					"name": "分享团",
-					"pathName": "pages/groupPage/group-details/group-details",
-					"query": "share=true&shareId=1544872514724307",
+					"pathName": "pages/groupPage/collage-details/collage-details",
+					"query": "orderId=1546590174010482&read=true",
 					"scene": "1012"
 				}
 			]

BIN
static/groupImg/left_icon.png


BIN
static/groupImg/no_head.png


BIN
static/groupImg/right_icon.png


BIN
static/share/class_icon.jpg


BIN
static/share/group_icon.jpg


BIN
static/share/poster_grade_1.jpg


BIN
static/share/poster_grade_2.jpg


BIN
static/share/poster_grade_3.jpg


BIN
static/share/works_icon.jpg


+ 1 - 0
utils/httpUtil.js

@@ -21,6 +21,7 @@ function wxLogin(successcallback, failcallback) {
         success: function(res) {
             if (res.code) {
                 // 获取openid
+                console.log(res)
                  let url = genAPIUrl('wx/user/openId')
                  let data = { code: res.code }
                  return request.getInstance().url(url).data(data).send().success(successcallback).fail(failcallback);