Kaynağa Gözat

逻辑优化 ui优化

Rorschach 6 yıl önce
ebeveyn
işleme
3462a0bee1

+ 1 - 1
component/dialog/dialog.wxss

@@ -45,7 +45,7 @@
 .text {
     font-size: 28rpx;
     width: 80%;
-    border-bottom: 2rpx solid #ccc;
+    /* border-bottom: 2rpx solid #ccc; */
     padding: 14rpx 0;
 }
 

+ 1 - 1
component/hot/hot.wxss

@@ -195,7 +195,7 @@ height:28rpx;
     text-align: left;
     color: #444;
     font-size: 24rpx;
-    line-height: 40rpx;
+    line-height: 41rpx;
 
 }
 

+ 3 - 1
component/my/my.wxss

@@ -52,7 +52,7 @@ page{
   height: 138rpx;
   border-radius: 50%;
   z-index: 300;
-  margin:8rpx auto;
+  margin:6rpx auto;
 }
 
 .avatar-image{
@@ -249,6 +249,8 @@ image{
   width: 60rpx;
   height: 60rpx;
   margin-right: 16rpx;  
+  margin-top:2rpx;
+
 }
 
 .wallet-left{

+ 2 - 2
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: 84rpx">您收到的奖学金会自动到您的微信钱包</view>
+        <view style="font-size: 28rpx; color: #7D7D7D; text-align: center; margin-top: 40rpx;">您收到的奖学金会自动到您的微信钱包</view>
          <view class="send-btn" bindtap="launchGroup">
             <text>{{btnContent}}</text>
         </view>
@@ -75,6 +75,6 @@
         </view>
     </view>
     <view class="cha" bindtap="close">
-        <image src="../../static/groupImg/cha.png"></image>
+        <image src="../../static/image/lollipop.png"></image>
     </view>
 </view>

+ 16 - 15
component/popup/popup.wxss

@@ -10,15 +10,16 @@
 }
 
 .popup-container {
-    position: absolute;
-    left: 5%;
-    top: 50%;
-    transform: translateY(-50%);
-    background: #fff;
-    width: 90%;
-    height: auto;
-    border-radius: 20rpx;
-    overflow: hidden;
+    position:absolute;
+left:5%;
+top:251rpx;
+/* transform:translateY(-50%); */
+background:#fff;
+width:90%;
+height:auto;
+border-radius:20rpx;
+overflow:hidden;
+
 }
 
 .head-img {
@@ -81,12 +82,12 @@
 }
 
 .cha {
-    position: absolute;
-    left: 50%;
-    bottom: 5%;
-    transform: translateX(-50%);
-    width: 80rpx;
-    height: 80rpx;
+   position:absolute;
+left:80rpx;
+width:72rpx;
+height:104rpx;
+top:151rpx;
+
 }
 
 .cha image {

+ 1 - 1
component/share/share.wxss

@@ -61,7 +61,7 @@
 .Preservation {
     position: absolute;
     left: 15%;
-    top: 1000rpx;
+    top: 1020rpx;
     width: 536rpx;
     height: 80rpx;
     color: #fff;

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

@@ -32,7 +32,8 @@ Page({
     ],
     read: false,
     organizerUid: '',
-    colonelName: ''
+    colonelName: '',
+    rewardMoney:'',
   },
   //显示分享页 
   openShare: function () {
@@ -50,7 +51,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
       }
@@ -110,7 +111,8 @@ Page({
         surplusList: this.data.surplusList,
         timeList,
         productId: groupOrder.productId,
-        groupId: groupOrder.groupId
+        groupId: groupOrder.groupId,
+        rewardMoney: res.data.data.groupPurchaseInfo.organizerPrice / 100
       })
       if (groupOrder.groupType === 'PROMOTION') {
         //this.data.joinUserList.unshift(res.data.data.organizer);
@@ -176,12 +178,12 @@ 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;
     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) {
         // 转发成功

+ 4 - 4
pages/groupPage/collage-details/collage-details.wxml

@@ -29,7 +29,7 @@
             <view class="shengyu-num" hidden="{{surplusNum == '0'}}">即可获得一年级语文同步辅导(上学期)</view>
             -->
             <view class="shengyu-num" hidden="{{surplusNum != '0'}}">拼团成功!快去朗读吧</view>
-            <view class="shengyu-time" >
+            <view class="shengyu-time" hidden="{{surplusNum == '0'}}" >
                 剩余时间:
                 <view class="time">
                     <!-- <image src="../../../static/groupImg/Rectangle_31.png"></image> -->
@@ -53,14 +53,14 @@
             </view>
         </view>
         <view class="invitation-btn" bindtap="openShare">
-            <image src="../../../static/groupImg/Invitation.png"></image>
+            <!-- <image src="../../../static/groupImg/Invitation.png"></image> -->
             <text>{{read ? '开始你的表演' : '邀请朋友参加'}}</text>
         </view>
     </view>  
     <view class="explain">
         <text>拼团规则</text>
         <view style="margin-top:30rpx;">转发给自己的朋友们,分享好课, 追随您一起学习进步 您的魅力不是吹的</view>
-        <view style="margin-top:20rpx;">在限定时间内成功拼团,您将得到xx元的奖励金</view>
+        <view style="margin-top:20rpx;">在限定时间内成功拼团,您将得到{{rewardMoney}}元的奖励金</view>
         <view>如果拼团失败 </view>
         <view style="margin-top:20rpx;">您预付的课程费将在48小时内退回您的账户</view>
     </view>
@@ -71,7 +71,7 @@
 <popup
     typeOf="sendSuccess"
     title="报告团长"
-    headTextTwo="您发起的团购已经成立,订单号:12345"
+    headTextTwo='您发起的团购已经成立,订单号:{{orderId}}'
     content="{{content}}"
 ></popup>
 

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

@@ -47,8 +47,8 @@
 
 .headImg-item {
     position: relative;
-    width: 106rpx;
-    height: 106rpx;
+    width: 104rpx;
+    height: 104rpx;
     border-radius: 50%;
     margin: 20rpx 22rpx;
 }
@@ -63,9 +63,10 @@
     position: absolute;
     right: -40rpx;
     top: 20rpx;
-    width: 80rpx;
+    width: 78rpx;
     height: 30rpx;
     background: #61ca54;
+border-radius:20rpx;
 
 }
 
@@ -147,6 +148,9 @@
     line-height: 80rpx;
     z-index: 2;
     color: #fff;
+    background:#ff9209;
+border-radius:56rpx;
+
 }
 
 .rule {

+ 4 - 4
pages/groupPage/grade-details/grade-details.wxml

@@ -6,10 +6,10 @@
         </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>
+            <text class="{{!flag ? '' : 'select'}}" bindtap="tabSwitch">您需要知道</text>
+            <text class="{{!flag ? 'select' : ''}}" bindtap="tabSwitch">课文目录</text>
         </view>
-        <view class="catalog-list" hidden="{{!flag}}">
+        <view class="catalog-list" hidden="{{flag}}">
             <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">
@@ -20,7 +20,7 @@
             </view>
         </view>
         <!-- 你需要知道 -->
-        <view class="know" hidden="{{flag}}">
+        <view class="know" hidden="{{!flag}}">
             <import src="../../../towxml/entry.wxml" />
             <template is="entry" data="{{...article}}" />
         </view>

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

@@ -57,7 +57,8 @@ scroll-view {
     height: 60rpx;
     text-align: center;
     font-size: 36rpx;
-    margin: 0 110rpx;
+    /* margin: 0 110rpx; */
+    margin:0 104rpx;
     box-sizing: border-box;
 }
 

+ 64 - 34
pages/groupPage/group-details/group-details.js

@@ -34,7 +34,8 @@ Page({
     sendGroupFlag: true,
     selectFlag: [],
     flag: true,
-    colonelName: ''
+    colonelName: '',
+    article: ''
   },
   //tab切换
   tabSwitch: function () {
@@ -57,13 +58,15 @@ Page({
     })
   },
   //选中团购课程
-  selectImg: function ({ currentTarget }) {
+  selectImg: function ({
+    currentTarget
+  }) {
     const ind = currentTarget.dataset.ind;
     //判断单选
     this.data.selectFlag.forEach((item, index) => {
-      if(index == ind) {
+      if (index == ind) {
         this.data.selectFlag[ind] = !this.data.selectFlag[ind];
-      }else {
+      } else {
         this.data.selectFlag[index] = true;
       }
     })
@@ -73,8 +76,8 @@ Page({
   },
   //点击确定
   sure: function () {
-    this.data.selectFlag.forEach( (item ,index) => {
-      if(!item) {
+    this.data.selectFlag.forEach((item, index) => {
+      if (!item) {
         const productId = this.data.bookList[index].id;
         const title = this.data.bookList[index].title
         this.setData({
@@ -111,7 +114,7 @@ Page({
   //       })
   //       return false;
   //     }
-      
+
   //     if (res.data.data.groupPurchaseOrder.groupType === 'BASE') {
   //       debugger;
   //       //掉起支付
@@ -194,15 +197,17 @@ Page({
   },
   //拼团详情
   jionSuccess: function (orderId, type) {
-    debugger;
     httpRequestApi.getMygroupInfo(orderId).success(res => {
-      console.log('拼团详情', res.data.data);
+      console.log('拼团详情', res);
       const groupOrder = res.data.data.groupPurchaseOrder;
       const surplusNum = groupOrder.headcount - groupOrder.joinCount;
+      if (this.data.article === '') {
+        this.getBooksInfo(res.data.data.groupPurchaseOrder.productId)
+      }
+
       this.setData({
         organizer: groupOrder.organizer,
       })
-      debugger
       if (type === 'join') {
         this.data.surplusList.pop();
         if (groupOrder.status === 'SUCCESSED') {
@@ -232,7 +237,7 @@ Page({
         surplusList: this.data.surplusList,
         timeList,
       })
-      if(groupOrder.groupType === 'PROMOTION'){
+      if (groupOrder.groupType === 'PROMOTION') {
         //this.data.joinUserList.unshift(res.data.data.organizer);
         this.setData({
           colonelName: res.data.data.organizer.wechatName
@@ -259,8 +264,7 @@ Page({
         titles: '恭喜 !',
         headTextOne: '您发起的团购拼团成功',
         headTextTwo: '领袖体质魅力无穷!',
-        content: [
-          {
+        content: [{
             text: " 您可以继续发起新的团购,",
             color: "#F97800"
           },
@@ -273,7 +277,7 @@ Page({
             color: "#F97800"
           }
         ],
-      },()=>{
+      }, () => {
         this.popup.close()
       })
     } else {
@@ -282,8 +286,7 @@ Page({
         titles: '拼团成功 ! ',
         headTextOne: '您参与的团购拼团成功',
         headTextTwo: '感谢团长的分享',
-        content: [
-          {
+        content: [{
             text: " 您也可以发起新的团购",
             color: "#F97800"
           },
@@ -300,7 +303,7 @@ Page({
             color: "#F97800"
           }
         ],
-      },()=>{
+      }, () => {
         this.popup.close()
       })
     }
@@ -349,7 +352,7 @@ Page({
       wx.redirectTo({
         url: '../../index/index'
       })
-      return 
+      return
     }
     getOpenidSessionKey((res) => {}, (error) => {
       this.setData({
@@ -360,24 +363,54 @@ Page({
     wx.setNavigationBarTitle({
       title: '拼团详情'
     })
-    if (!options.productId) return false;
-    const productId = options.productId;
-    const groupId = options.groupId;
-    const orderId = options.id;
-    this.setData({
-      productId,
-      groupId,
-      orderId
-    })
+    console.log(options)
+
+
+    // if (oprions.shareId) {
+    //   const orderId = options.shareId
+    // }
+    if (options.orderId) {
+      // const productId = options.productId;
+      // const groupId = options.groupId;
+      const orderId = options.id;
+      this.setData({
+        // productId,
+        // groupId,
+        orderId
+      })
+      this.jionSuccess(orderId);
+    } else {
+      // 从分享页面进入的
+      const orderId = options.productId ? options.productId : options.scene ? options.scene.replace('QR', '') : options.shareId;
+      this.jionSuccess(orderId);
+    }
+    if (options.scene || options.shareId) {
+      this.setData({
+        goBackHome: true
+      })
+    }
+
+
+    //获取拼团信息
+
+  },
+  // 获取课本详情
+  getBooksInfo: function (productId) {
     //课本详情
     httpRequestApi.getBookDetail(wx.getStorageSync('uid'), productId).success((res) => {
       console.log('课本详情', res.data.data);
       const bookInfo = res.data.data.product;
       const lessonList = res.data.data.lessonList;
+      const data = app.towxml.toJson(
+        bookInfo.description,
+        'markdown',
+        this
+      )
       this.setData({
         titleIcon: bookInfo.bgImg,
         title: bookInfo.title,
-        bookInfo: bookInfo.description
+        bookInfo: bookInfo.description,
+        article: data
       })
       const lessonTemp = [];
       lessonList.forEach(item => {
@@ -388,14 +421,14 @@ Page({
         lessonTemp.push(temp);
       });
       this.setData({
-        lessonList: lessonTemp
+        lessonList: lessonTemp,
       });
     }).fail((error) => {
 
     })
     //全部课本
     httpRequestApi.getAllBooks(1, 10).success((res) => {
-      console.log('全部课',res.data.data.list)
+      console.log('全部课', res.data.data.list)
       res.data.data.list.forEach(element => {
         this.data.selectFlag.push(true);
       });
@@ -404,12 +437,9 @@ Page({
         selectFlag: this.data.selectFlag
       })
     }).fail((error) => {
-      console.log('错误',error)
+      console.log('错误', error)
     })
-    //获取拼团信息
-    this.jionSuccess(orderId);
   },
-
   /**
    * 生命周期函数--监听页面初次渲染完成
    */

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

@@ -2,7 +2,7 @@
     "component": true,
     "usingComponents": {
         "popup": "/component/popup/popup",
-        "Dialog": "/component/dialog/dialog"
-
+        "Dialog": "/component/dialog/dialog",
+        "goBackHome": "/component/goBackHome/goBackHome"
     }  
 }

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

@@ -48,10 +48,10 @@
         </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>
+            <text class="{{!flag ? '' : 'select'}}" bindtap="tabSwitch">您需要知道</text>    
+            <text class="{{!flag ? 'select' : ''}}" bindtap="tabSwitch">课文目录</text>
         </view>
-        <view class="catalog-list" hidden="{{!flag}}">
+        <view class="catalog-list" hidden="{{flag}}">
             <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">
@@ -61,7 +61,9 @@
                 </view>
             </view>           
         </view>
-        <view class="know" hidden="{{flag}}">
+        <view class="know" hidden="{{!flag}}">
+         <import src="../../../towxml/entry.wxml" />
+            <template is="entry" data="{{...article}}" />
         </view>
     </scroll-view>
     <view class="group-details-btn {{isIPX ? 'bottomx' :''}}" hidden="{{surplusNum == '0'}}">
@@ -107,7 +109,7 @@
     content="{{content}}"
     bindGroup="group"
 ></popup>
-
+ <goBackHome id="goBackHome" shareType="{{goBackHome}}" wx:if="{{goBackHome}}" />
 <view hidden="{{hide}}">
   <Dialog bindmyevent="jurisdiction" />
 </view>

+ 11 - 0
pages/groupPage/group-details/group-details.wxss

@@ -1,4 +1,15 @@
 /* pages/group-details/group-details.wxss */
+/**基础风格样式**/
+@import '../../../towxml/style/main.wxss';
+
+
+/**如果页面有动态主题切换,则需要将使用到的样式全部引入**/
+
+/**主题配色(浅色样式)**/
+@import '../../../towxml/style/theme/light.wxss';
+
+/**主题配色(深色样式)**/
+@import '../../../towxml/style/theme/dark.wxss';
 .group-details {
     height: 100%;
     width: 100%;

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

@@ -6,7 +6,7 @@ const app = getApp()
 Page({
   data: {
     fullScreenBtn: false,
-    playBtn: false,
+    playBtn: true,
     gesture: true,
     videoUrl: '',
     poster: '',

+ 3 - 2
pages/user/myread/myread.wxss

@@ -148,8 +148,9 @@
 }
 
 .play-img{
-  width: 20rpx;
-  height: 22rpx;
+  width:24rpx;
+height:22rpx;
+
 }
 
 .point-img{

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

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

+ 4 - 0
pages/user/walletDetails/walletDetails.wxss

@@ -58,11 +58,15 @@ image {
 }
 .avatar-value-pos {
     color: #FF5200;
+    font-size: 24rpx;
+    font-weight:bold;
+
 }
 .avatar-value-neg{
     color: #61CA54;
 }
 .avatar-symbol {
     font-weight: bold;
+    margin-right: 4rpx;
 }
 

+ 5 - 5
project.config.json

@@ -46,16 +46,16 @@
 				},
 				{
 					"id": -1,
-					"name": "课程详情",
+					"name": "团购分享",
 					"pathName": "pages/groupPage/collage-details/collage-details",
-					"query": "orderId=1542270071624081",
-					"scene": "1012"
+					"query": "orderId=1542621051065701"
 				},
 				{
 					"id": -1,
 					"name": "团购分享",
-					"pathName": "pages/groupPage/collage-details/collage-details",
-					"query": "orderId=1542621051065701"
+					"pathName": "pages/groupPage/group-details/group-details",
+					"query": "orderId=1542621051065701",
+					"scene": "1012"
 				}
 			]
 		}

BIN
static/groupImg/bai.png


BIN
static/image/concernback.png


BIN
static/image/concerned.png


BIN
static/image/flower.png


BIN
static/image/lollipop.png


+ 5 - 1
utils/const.js

@@ -3,5 +3,9 @@ module.exports = {
 
 	// ----测试环境-----
 	productApi: 'https://readerproduct.efunbox.cn/',
-  baseApi: 'https://readerbase.efunbox.cn/'
+	baseApi: 'https://readerbase.efunbox.cn/'
+	
+	// // ----测试环境-----
+	// productApi: 'https://readerproduct.ai160.com/',
+	// baseApi: 'https://readerbase.ai160.com/'
 }