소스 검색

针对ios修改

Rorschach 6 년 전
부모
커밋
bef3818b41

+ 13 - 5
app.js

@@ -1,22 +1,30 @@
 //app.js
-import {GetQueryString} from 'utils/util'
-const Towxml = require('/towxml/main'); 
+import {
+  GetQueryString
+} from 'utils/util'
+const Towxml = require('/towxml/main');
 App({
   onLaunch: function (options) {
-   // 判断设备是否为 iPhone X
-   this.checkIsIPhoneX()
+    // 判断设备是否为 iPhone X
+    this.checkIsIPhoneX()
   },
   globalData: {
     isIPX: false, // 当前设备是否为 iPhone X
+    isIOS: false, // 判断设备是否为苹果
   },
-  checkIsIPhoneX: function() {
+  checkIsIPhoneX: function () {
     const self = this
     wx.getSystemInfo({
       success: function (res) {
         // 根据 model 进行判断
+        console.log(res)
+        console.log(res.system.search('iOS'))
         if (res.model.search('iPhone X') != -1) {
           self.globalData.isIPX = true
         }
+        if (res.system.search('iOS') != -1) {
+          self.globalData.isIOS = true
+        }
       }
     })
   },

+ 1 - 1
component/follow/follow.wxml

@@ -24,7 +24,7 @@
     </view>
   </view> -->
   <view class="followWares">
-    <view wx:for="{{followData}}" wx:key="{{index}}" class="followWareCard" bindtap="openWorks" data-readid="{{item.classId}}" data-title="{{item.title}}">
+    <view wx:for="{{followData}}" wx:key="{{index}}" class="followWareCard" bindtap="openWorks" data-readid="{{item.id}}" data-title="{{item.title}}">
       <view class="topData">
         <view class="worksLeft">
           <image class="authorAvatar" src="{{item.avatar}}" />

+ 3 - 1
component/my/my.js

@@ -1,4 +1,5 @@
 import APIClient from '../../utils/APIClient';
+const app = getApp();
 export const myInit = (that) => {
   that.setData({
     myData: {
@@ -11,7 +12,8 @@ export const myInit = (that) => {
       wallet: '我的钱包',
       schoolCity: '',
       schoolName: '',
-      user: {}
+      user: {},
+      isIOS: app.globalData.isIOS
     }
   });
   that.getUserWorksInfo();

+ 2 - 2
component/my/my.wxml

@@ -89,7 +89,7 @@
           </view>
         </view>
       </view>
-      <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-center'>
           <view class='wallet-left'>
             <view class='icon-box'>
@@ -115,7 +115,7 @@
           </view>
         </view>
       </view>
-      <view class='group-module' bindtap='toMyCollage' data-title='{{ myData.collage }}'>
+      <view class='group-module' bindtap='toMyCollage' data-title='{{ myData.collage }}' wx:if="{{!myData.isIOS}}">
         <view class='wallet-center'>
           <view class='wallet-left'>
             <view class='icon-box'>

+ 4 - 0
component/popup/popup.js

@@ -23,6 +23,10 @@ Component({
     content: {
       type: "Array",
       value: ''
+    },
+    btnContent: {
+      type: "String",
+      value: ''
     }
   },
 

+ 3 - 3
component/popup/popup.wxml

@@ -19,9 +19,9 @@
                 <text style="color: {{item.color}};">{{item.text}}</text>
             </block>
         </view>
-        <view style="font-size: 28rpx; color: #7D7D7D; text-align: center; margin-top: 20rpx">您收到的奖学金会自动到您的微信钱包</view>
+        <view style="font-size: 28rpx; color: #7D7D7D; text-align: center; margin-top: 84rpx">您收到的奖学金会自动到您的微信钱包</view>
          <view class="send-btn" bindtap="launchGroup">
-            <text>再接再厉赚 取奖学金</text>
+            <text>{{btnContent}}</text>
         </view>
     </view>
     <!--失败 -->
@@ -30,7 +30,7 @@
             <image src="../../static/groupImg/error.png"></image>
         </view>
         <view class="head-txt">
-            <view class="title" style="margin-top: 80rpx; color: #4A90E2;">很遗憾拼团失败</view>
+            <view class="title" style="margin-top: 80rpx; color: #4A90E2;">很遗憾 拼团失败</view>
             <view class="head-con" style="color: #000">
                 您发起的团购拼团成功
             </view>

+ 2 - 2
component/popup/popup.wxss

@@ -46,7 +46,7 @@
 }
 
 .head-txt .head-con {
-    margin: 20rpx 0;
+    margin: 20rpx 0 0;
 }
 
 .content {
@@ -65,7 +65,7 @@
 .send-btn {
     width: 70%;
     height: 80rpx;
-    margin: 72rpx auto 40rpx auto;
+    margin: 32rpx auto 40rpx auto;
     background: #FF9209;
     border-radius: 80rpx;
 }

+ 2 - 2
component/share/share.js

@@ -118,6 +118,7 @@ Component({
 
     },
     share: function (data) {
+      console.log(data)
       if (this.data.shareType === 'works') {
 
         this.setData({
@@ -179,8 +180,7 @@ Component({
         let QRCode = () => {
           // 生成二维码并下载
           httpRequestApi.createQRCode(this.data.QRData).success(res => {
-            // let base64 = wx.arrayBufferToBase64(res.data);
-            // console.log(a)
+            console.log(this.data.QRData);
             this.setData({
               QRCodeImagePath: res.data.data
             })

+ 1 - 0
component/share/share.wxss

@@ -69,6 +69,7 @@
     text-align: center;
     line-height: 80rpx;
     border-radius: 44rpx;
+    z-index: 999;
 }
 
 .share-friend {

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

@@ -1,6 +1,7 @@
 // pages/groupPage/collage-details/collage-details.js
 import httpRequestApi from '../../../utils/APIClient';
 import util from '../../../utils/util';
+const app = getApp()
 Page({
 
   /**
@@ -16,18 +17,17 @@ Page({
     productId: '',
     orderId: '',
     groupId: '',
-    content: [
-      {
-          text: "转发给自己的朋友们,分享好课,",
-          color: "#000"
+    content: [{
+        text: "转发给自己的朋友们,分享好课,",
+        color: "#000"
       },
       {
-          text: " 追随您一起学习进步。您的魅力不是吹的!",
-          color: "#000"
+        text: " 追随您一起学习进步。您的魅力不是吹的!",
+        color: "#000"
       },
       {
-          text: "在限定时间内内成功拼团,您将得到xx元的奖励金哦。",
-          color: "#FF4600"
+        text: "在限定时间内内成功拼团,您将得到xx元的奖励金哦。",
+        color: "#FF4600"
       }
     ],
     read: false,
@@ -36,14 +36,14 @@ Page({
   },
   //显示分享页 
   openShare: function () {
-    if(this.data.read){
+    if (this.data.read) {
       const productId = this.data.productId;
       const id = this.data.orderId;
       const groupId = this.data.groupId;
       wx.navigateTo({
         url: `/pages/groupPage/grade-details/grade-details?productId=${productId}&id=${id}&groupId=${groupId}&share=true`
       })
-    }else {
+    } else {
       this.shareDialog = this.selectComponent("#share-dialog");
       const data = {
         avatar: this.data.organizer.avatar,
@@ -61,31 +61,40 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    if(options.read) {
+    if (app.globalData.isIOS) {
+      wx.redirectTo({
+        url: '../../index/index'
+      })
+      return 
+    }
+    if (options.read) {
       this.setData({
         read: options.read
       })
     }
-    options.scene = 'QR1541862338777268';
+    // options.scene = 'QR1541862338777268';
     wx.setNavigationBarTitle({
       title: '拼团详情'
     })
+    console.log(options);
     console.log(options.orderId);
-    if(!options.orderId) {
+    const orderId = options.orderId ? options.orderId : options.scene.replace('QR', '');
+    if (options.orderId) {
       return false;
     }
-    const orderId = options.orderId ? options.orderId : options.scene.replace('QR', '');
+    
+    console.log(orderId)
     this.setData({
       orderId
     })
-    httpRequestApi.getMygroupInfo(orderId).success( res => {
+    httpRequestApi.getMygroupInfo(orderId).success(res => {
       console.log(res);
       const groupOrder = res.data.data.groupPurchaseOrder;
       const surplusNum = groupOrder.headcount - groupOrder.joinCount;
       this.setData({
         organizerUid: groupOrder.organizer,
       })
-      for(var i = 0; i < surplusNum; i++) {
+      for (var i = 0; i < surplusNum; i++) {
         this.data.surplusList.push(1);
       }
       //console.log(res.data.data.groupPurchaseOrder.closeTime - res.data.data.groupPurchaseOrder.gmtModified)
@@ -103,7 +112,7 @@ Page({
         productId: groupOrder.productId,
         groupId: groupOrder.groupId
       })
-      if(groupOrder.groupType === 'PROMOTION'){
+      if (groupOrder.groupType === 'PROMOTION') {
         //this.data.joinUserList.unshift(res.data.data.organizer);
         this.setData({
           colonelName: res.data.data.organizer.wechatName
@@ -112,7 +121,7 @@ Page({
           joinUserList: this.data.joinUserList,
         })
       }
-    }).fail( error => {
+    }).fail(error => {
       console.log('错误', error)
     })
   },
@@ -122,7 +131,7 @@ Page({
    */
   onReady: function () {
     this.shareDialog = this.selectComponent("#share-dialog");
-    
+
   },
 
   /**

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

@@ -32,20 +32,20 @@
             <view class="shengyu-time" >
                 剩余时间:
                 <view class="time">
-                    <image src="../../../static/groupImg/Rectangle_31.png"></image>
+                    <!-- <image src="../../../static/groupImg/Rectangle_31.png"></image> -->
                     <text>{{timeList[0]}}</text>
                 </view>
                 <block wx:for="{{timeList[1]}}" wx:key="{{index}}">
                     <view class="time">
-                        <image src="../../../static/groupImg/Rectangle_31.png"></image>
+                        <!-- <image src="../../../static/groupImg/Rectangle_31.png"></image> -->
                         <text>{{item}}</text>
                     </view>
                 </block>
                 <block wx:for="{{timeList[2]}}" wx:key="{{index}}">
                     <view class="time">
-                        <image src="../../../static/groupImg/Rectangle_31.png"></image>
+                        <!-- <image src="../../../static/groupImg/Rectangle_31.png"></image> -->
                         <text>{{item}}</text>
                     </view>
                 </block>               

+ 27 - 21
pages/groupPage/collage-details/collage-details.wxss

@@ -2,7 +2,7 @@
 .collage-details {
     height: 100%;
     width: 100%;
-    background:rgba(240,241,245,1);    
+    background: rgba(240, 241, 245, 1);
     overflow: hidden;
 }
 
@@ -60,12 +60,12 @@
 }
 
 .headImg-item .tuanzhangIcon {
-    position:absolute;
-right:-40rpx;
-top:20rpx;
-width:80rpx;
-height:30rpx;
-background:#61ca54;
+    position: absolute;
+    right: -40rpx;
+    top: 20rpx;
+    width: 80rpx;
+    height: 30rpx;
+    background: #61ca54;
 
 }
 
@@ -74,13 +74,13 @@ background:#61ca54;
 }
 
 .shengyu {
- display: flex;
- flex-direction: column;   
- color: #696969;
+    display: flex;
+    flex-direction: column;
+    color: #696969;
 }
 
 .shengyu-num {
-    text-align:center;    
+    text-align: center;
 }
 
 .shengyu-num text {
@@ -90,15 +90,15 @@ background:#61ca54;
 .shengyu-time {
     display: flex;
     justify-content: center;
-    align-items: center; 
-    margin-top: 8rpx;  
+    align-items: center;
+    margin-top: 8rpx;
 }
 
 .shengyu-time .time {
     position: relative;
-    width: 20rpx;
-    height: 40rpx;
-    margin:  0 8rpx;
+    width: 32rpx;
+    height: 36rpx;
+    margin: 0 8rpx;
 }
 
 .shengyu-time .time image {
@@ -106,13 +106,19 @@ background:#61ca54;
     height: 40rpx;
 }
 
-.shengyu-time .time  text{
+.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;
+    text-align: center;
+    border-radius: 4rpx;
 }
 
 .invitation-btn {
@@ -124,7 +130,7 @@ background:#61ca54;
     height: 80rpx;
 }
 
-.invitation-btn image{
+.invitation-btn image {
     position: absolute;
     left: 0;
     top: 0;
@@ -132,7 +138,7 @@ background:#61ca54;
     height: 100%;
 }
 
-.invitation-btn text{
+.invitation-btn text {
     position: absolute;
     width: 100%;
     height: 100%;
@@ -149,7 +155,7 @@ background:#61ca54;
     top: 82%;
     width: 84rpx;
     height: 88rpx;
-    z-index:2;    
+    z-index: 2;
 }
 
 .rule image {
@@ -181,7 +187,7 @@ background:#61ca54;
     text-align: center;
     font-size: 28rpx;
     line-height: 50rpx;
-} 
+}
 
 .explain text {
     display: block;

+ 7 - 0
pages/groupPage/discount-group/discount-group.js

@@ -1,5 +1,6 @@
 // pages/groupPage//discount-group/discount-group.js
 import httpRequestApi from '../../../utils/APIClient';
+const app = getApp()
 Page({
 
   /**
@@ -34,6 +35,12 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
+    if (app.globalData.isIOS) {
+      wx.redirectTo({
+        url: '../../index/index'
+      })
+      return 
+    }
     wx.setNavigationBarTitle({
       title: '优惠团购'
     })

+ 7 - 0
pages/groupPage/grade-details/grade-details.js

@@ -31,6 +31,7 @@ Page({
     ],
     share: false,
     isIPX: app.globalData.isIPX,
+    isIOS: app.globalData.isIOS,
     flag: true
   },
   //tab切换
@@ -148,6 +149,12 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
+    // if (app.globalData.isIOS) {
+    //   wx.redirectTo({
+    //     url: '../../index/index'
+    //   })
+    //   return 
+    // }
     console.log(options)
     if(options.share){
       this.setData({

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

@@ -13,8 +13,8 @@
             <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">
-                    <image src="../../../static/groupImg/bofnag.png"></image>
-                    <text>{{item.readNum}}</text>
+                    <!-- <image src="../../../static/groupImg/bofnag.png"></image>
+                    <text>{{item.readNum}}</text> -->
                     <image style="margin-left: 10rpx; width: 22rpx; height: 22rpx;" src="../../../static/groupImg/jiantou.png"></image>
                 </view>
             </view>
@@ -25,7 +25,7 @@
             <template is="entry" data="{{...article}}" />
         </view>
     </scroll-view>
-    <view class="group-btn {{isIPX ? 'bottomx' :''}}" wx:if="{{!share}}">
+    <view class="group-btn {{isIPX ? 'bottomx' :''}}" wx:if="{{isIOS? false : !share}}">
         <image class="bg1" src="../../../static/groupImg/baise.png"></image>
         <image class="bg2" src="../../../static/groupImg/baise.png"></image>      
         <block wx:for="{{payList}}" wx:key="{{index}}">
@@ -35,7 +35,7 @@
             </view>
         </block>
     </view>
-    <view class="group-btn {{isIPX ? 'bottomx' :''}}" wx:if="{{share}}">
+    <view class="group-btn {{isIPX ? 'bottomx' :''}}" wx:if="{{isIOS? false : share}}">
         <image class="bg1" src="../../../static/groupImg/baise.png" style="left: 50%"></image>   
         <block wx:for="{{payList}}" wx:key="{{index}}">
             <view class="Price" bindtap="pay" data-id="{{item.id}}" wx:if="{{share ? (index != 0) : true }}">

+ 6 - 0
pages/groupPage/group-details/group-details.js

@@ -345,6 +345,12 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
+    if (app.globalData.isIOS) {
+      wx.redirectTo({
+        url: '../../index/index'
+      })
+      return 
+    }
     getOpenidSessionKey((res) => {}, (error) => {
       this.setData({
         hide: !this.data.hide

+ 3 - 3
pages/groupPage/group-details/group-details.wxml

@@ -21,20 +21,20 @@
             <view class="shengyu-time" hidden="{{surplusNum == '0'}}">
                 剩余时间:
                 <view class="time">
-                    <image src="../../../static/groupImg/Rectangle_31.png"></image>
+                    <!-- <image src="../../../static/groupImg/Rectangle_31.png"></image> -->
                     <text>{{timeList[0]}}</text>
                 </view>
                 <block wx:for="{{timeList[1]}}" wx:key="{{index}}">
                     <view class="time">
-                        <image src="../../../static/groupImg/Rectangle_31.png"></image>
+                        <!-- <image src="../../../static/groupImg/Rectangle_31.png"></image> -->
                         <text>{{item}}</text>
                     </view>
                 </block>
                 <block wx:for="{{timeList[2]}}" wx:key="{{index}}">
                     <view class="time">
-                        <image src="../../../static/groupImg/Rectangle_31.png"></image>
+                        <!-- <image src="../../../static/groupImg/Rectangle_31.png"></image> -->
                         <text>{{item}}</text>
                     </view>
                 </block>                

+ 25 - 17
pages/groupPage/group-details/group-details.wxss

@@ -2,7 +2,7 @@
 .group-details {
     height: 100%;
     width: 100%;
-    background:rgba(240,241,245,1);    
+    background: rgba(240, 241, 245, 1);
 }
 
 .details-head {
@@ -45,14 +45,14 @@
 }
 
 .shengyu {
- display: flex;
- flex-direction: column;   
- color: #696969;
- padding-bottom:20px;
+    display: flex;
+    flex-direction: column;
+    color: #696969;
+    padding-bottom: 20px;
 }
 
 .shengyu-num {
-    text-align:center;    
+    text-align: center;
 }
 
 .shengyu-num text {
@@ -62,15 +62,15 @@
 .shengyu-time {
     display: flex;
     justify-content: center;
-    align-items: center; 
-    margin-top: 8rpx;  
+    align-items: center;
+    margin-top: 8rpx;
 }
 
 .shengyu-time .time {
     position: relative;
-    width: 20rpx;
-    height: 40rpx;
-    margin:  0 8rpx;
+    width: 32rpx;
+    height: 36rpx;
+    margin: 0 8rpx;
 }
 
 .shengyu-time .time image {
@@ -81,13 +81,19 @@
     height: 40rpx;
 }
 
-.shengyu-time .time  text{
+.shengyu-time .time text {
     position: absolute;
     left: 4rpx;
     top: 0;
     z-index: 2;
     color: #fff;
     font-size: 28rpx;
+    width: 32rpx;
+    height: 36rpx;
+    line-height: 36rpx;
+    background: #ff9209;
+    text-align: center;
+    border-radius: 4rpx;
 }
 
 scroll-view {
@@ -102,7 +108,7 @@ scroll-view {
     padding: 24rpx;
 }
 
-.grade-details image{
+.grade-details image {
     width: 100%;
     height: 290rpx;
     border-radius: 20rpx;
@@ -228,7 +234,7 @@ scroll-view {
     position: absolute;
     left: 50%;
     top: 50%;
-    transform: translate(-50%,-50%);
+    transform: translate(-50%, -50%);
     width: 80%;
     background: #fff;
     border-radius: 20rpx;
@@ -245,13 +251,15 @@ scroll-view {
     flex-wrap: wrap;
     padding: 0 62rpx;
 }
-.group-list .group-item{
+
+.group-list .group-item {
     position: relative;
     display: flex;
-    margin-right:0;
+    margin-right: 0;
     justify-content: space-between;
-    flex-direction: column; 
+    flex-direction: column;
 }
+
 .group-content-img {
     width: 214rpx;
     height: 290rpx;

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

@@ -1,6 +1,7 @@
 // pages/groupPage/make-money/make-money.js
 import httpRequestApi from '../../../utils/APIClient';
 import util from '../../../utils/util';
+const app = getApp();
 Page({
 
   /**
@@ -37,6 +38,12 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
+    if (app.globalData.isIOS) {
+      wx.redirectTo({
+        url: '../../index/index'
+      })
+      return 
+    }
     wx.setNavigationBarTitle({
       title: '邀请赚取奖学金'
     })

+ 3 - 3
pages/groupPage/make-money/make-money.wxml

@@ -21,20 +21,20 @@
         <view class="shengyu-time">
             剩余时间:
             <view class="time">
-                <image src="../../../static/groupImg/Rectangle_31.png"></image>
+                <!-- <image src="../../../static/groupImg/Rectangle_31.png"></image> -->
                 <text>{{timeList[0]}}</text>
             </view>
             <block wx:for="{{timeList[1]}}" wx:key="{{index}}">
                 <view class="time">
-                    <image src="../../../static/groupImg/Rectangle_31.png"></image>
+                    <!-- <image src="../../../static/groupImg/Rectangle_31.png"></image> -->
                     <text>{{item}}</text>
                 </view>
             </block>
             <block wx:for="{{timeList[2]}}" wx:key="{{index}}">
                 <view class="time">
-                    <image src="../../../static/groupImg/Rectangle_31.png"></image>
+                    <!-- <image src="../../../static/groupImg/Rectangle_31.png"></image> -->
                     <text>{{item}}</text>
                 </view>
             </block>               

+ 20 - 14
pages/groupPage/make-money/make-money.wxss

@@ -12,7 +12,7 @@
     justify-content: center;
     padding: 40rpx 0;
     box-sizing: border-box;
-    margin-top:180rpx;    
+    margin-top: 180rpx;
 }
 
 .headImg-item-faqiren {
@@ -51,13 +51,13 @@
 }
 
 .shengyu {
- display: flex;
- flex-direction: column;   
- color: #696969;
+    display: flex;
+    flex-direction: column;
+    color: #696969;
 }
 
 .shengyu-num {
-    text-align:center;    
+    text-align: center;
 }
 
 .shengyu-num text {
@@ -67,15 +67,15 @@
 .shengyu-time {
     display: flex;
     justify-content: center;
-    align-items: center; 
-    margin-top: 8rpx;  
+    align-items: center;
+    margin-top: 8rpx;
 }
 
 .shengyu-time .time {
     position: relative;
-    width: 20rpx;
-    height: 40rpx;
-    margin:  0 8rpx;
+    width: 32rpx;
+    height: 36rpx;
+    margin: 0 8rpx;
 }
 
 .shengyu-time .time image {
@@ -83,13 +83,19 @@
     height: 40rpx;
 }
 
-.shengyu-time .time  text{
+.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;
+    text-align: center;
+    border-radius: 4rpx;
 }
 
 .invitation-btn {
@@ -101,7 +107,7 @@
     height: 80rpx;
 }
 
-.invitation-btn image{
+.invitation-btn image {
     position: absolute;
     left: 0;
     top: 0;
@@ -109,7 +115,7 @@
     height: 100%;
 }
 
-.invitation-btn text{
+.invitation-btn text {
     position: absolute;
     width: 100%;
     height: 100%;
@@ -118,4 +124,4 @@
     line-height: 80rpx;
     z-index: 2;
     color: #fff;
-}
+}

+ 28 - 25
pages/groupPage/my-group/my-group.js

@@ -1,6 +1,7 @@
 // pages/groupPage/my-group/my-group.js
 import httpRequestApi from '../../../utils/APIClient';
 import util from '../../../utils/util';
+const app = getApp();
 Page({
 
   /**
@@ -57,6 +58,12 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (option) {
+    if (app.globalData.isIOS) {
+      wx.redirectTo({
+        url: '../../index/index'
+      })
+      return 
+    }
     if (option && option.title) {
       wx.setNavigationBarTitle({
         title: option.title//页面标题为路由参数
@@ -96,51 +103,50 @@ Page({
       if(wx.getStorageSync('uid') == uid) {
         this.setData({
           typeOf: 'success',
-          title: '恭喜 !',
+          title: '恭喜',
           headTextOne: '您发起的团购拼团成功',
+          headTextTwo: '领袖体质魅力无穷!',
           content: [
             {
-                text: "领袖体质魅力无穷!",
-                color: "#000"
+                text: " 您可以继续发起新的团购",
+                color: "#F97800"
             },
             {
-                text: " 您可以继续发起新的团购,",
-                color: "#000"
-            },
-            {
-              text: " 不再需要支付本课程费用,拼团成功,",
-              color: "#FF9B00"
+              text: " 不再需要支付本课程费用",
+              color: "#F97800"
             },                          
             {
-                text: " 您将得到xxx元奖励。",
-                color: "#FF0000"
+                text: " 拼团成功,您将得到奖学金",
+                color: "#F97800"
             }
           ],
+          btnContent: '再接再厉 赚奖学金'
         })
       }else {
         this.setData({
           typeOf: 'success',
-          title: '拼团成功 ! ',
+          title: '拼团成功',
           headTextOne: '您参与的团购拼团成功',
-          headTextTwo: '订单号:12344',
+          headTextTwo: '感谢团长的分享',
           content: [
             {
-                text: "感谢团长的分享",
-                color: "#000"
+                text: " 您也可以发起新的团购",
+                color: "#F97800"
             },
             {
-                text: " 您也可以发起新的团购分享给需要的朋友们,",
-                color: "#000"
+                text: "作为新的发起人",
+                color: "#F97800"
             },
             {
-                text: "作为新的发起人,您无需在支付本课程费用",
-                color: "#FF0000"
-            },
+              text: "您无需在支付本课程费用",
+              color: "#F97800"
+          },
             {
-              text: "团购成功,您将得到xxx元奖励。",
-              color: "#FF0000"
+              text: "拼团成功,您将得到奖学金",
+              color: "#F97800"
             }                          
           ],
+          btnContent: '我也试试 赚奖学金'
         })
       }
   },
@@ -155,18 +161,15 @@ Page({
 
   //再次发起团
   group: function () {
-    debugger;
     const productId = this.data.productId;
     const groupId = this.data.groupId;
     const id = this.data.orderId;
-    debugger;
     //开始发起团购
     httpRequestApi.SendGroupPurchas({
       productId,
       groupId
     }).success((res) => {
       console.log('发起团购', res);
-      debugger;
       if (res.data.message) {
         wx.showModal({
           title: '提示',

+ 1 - 0
pages/groupPage/my-group/my-group.wxml

@@ -47,6 +47,7 @@
     headTextOne="{{headTextOne}}"
     headTextTwo="{{headTextTwo}}"
     content="{{content}}"
+    btnContent="{{btnContent}}"
     bindGroup="group"
     bindClose="close"
 ></popup>

+ 3 - 9
pages/index/index.js

@@ -56,7 +56,8 @@ Page({
     jurisdictionFlag: true,
     hotInput: '12345',
     mineSettingInfo: '528',
-    hide: true
+    hide: true,
+    isIOS:app.globalData.isIOS,
   },
   jurisdiction: function () {
     //隐藏弹框
@@ -81,7 +82,6 @@ Page({
       templates
     });
     if (myIndex == 0) {
-
       groupInit(this);
     }
     if (myIndex == 1) {
@@ -97,14 +97,8 @@ Page({
       followInit(this);
     }
     if (myIndex == 3) {
+      // console.log(this.data.isIOS)
       myInit(this);
-      // getOpenidSessionKey( res => {
-      //   console.log(res);
-      // }, (error) => {
-      //   this.setData({
-      //     hide: !this.data.hide
-      //   });
-      // });
     }
   },
   onLoad: function (options) {

+ 2 - 2
pages/index/index.wxml

@@ -10,8 +10,8 @@
   <!-- 顶部导航 -->
   <view class="top-tab">
     <block wx:for="{{tab}}" wx:key="{{index}}">
-      <view class="tabbar {{index == myIndex ? 'select':' '}}" bindtap="switcher" data-index="{{index}}">
-        <text>{{item.name}}</text>
+      <view class="tabbar {{index == myIndex ? 'select':' '}}" bindtap="switcher" data-index="{{index}}" wx:if="{{isIOS ? index === 0?  false : true : true}}">
+        <text >{{item.name}}</text>
       </view>
     </block>
   </view>

+ 16 - 0
pages/main/class/class.js

@@ -2,6 +2,7 @@ import httpRequestApi from '../../../utils/APIClient';
 import {
   formatDate
 } from '../../../utils/util';
+const app = getApp()
 Page({
   data: {
     fullScreenBtn: false,
@@ -69,6 +70,21 @@ Page({
             url: `../../main/reading/reading?id=${classId}`
           })
         } else {
+           // ios用户 并且没有购买过此书
+           if(app.globalData.isIOS){
+            wx.showModal({
+                title: '暂不支持',
+                content: '十分抱歉,由于相关规定,您暂时无法在这里朗读',
+                success(res) {
+                    if (res.confirm) {
+                        console.log('用户点击确定')
+                    } else if (res.cancel) {
+                        console.log('用户点击取消')
+                    }
+                }
+            })
+            return;
+        }
           wx.showModal({
             title: '您未购买过本书,不能朗读',
             content: '超值团购进行中,快去看看',

+ 27 - 1
pages/social/works/works.js

@@ -2,6 +2,7 @@ import httpRequestApi from '../../../utils/APIClient';
 import {
     formatDate
 } from '../../../utils/util';
+const app = getApp()
 Page({
     data: {
         fullScreenBtn: false,
@@ -25,7 +26,8 @@ Page({
         totalRead: 0,
         pageNo: 1,
         pageSize: 3,
-        goBackHome: false
+        goBackHome: false,
+        isIOS: app.globalData.isIOS
         // shareFlag: false
     },
     onLoad: function (option) {
@@ -177,6 +179,21 @@ Page({
                         url: `../../main/reading/reading?id=${classId}`
                     })
                 } else {
+                    // ios用户 并且没有购买过此书
+                    if(this.data.isIOS){
+                        wx.showModal({
+                            title: '暂不支持',
+                            content: '十分抱歉,由于相关规定,您暂时无法在这里朗读',
+                            success(res) {
+                                if (res.confirm) {
+                                    console.log('用户点击确定')
+                                } else if (res.cancel) {
+                                    console.log('用户点击取消')
+                                }
+                            }
+                        })
+                        return;
+                    }
                     wx.showModal({
                         title: '您未购买过本书,不能朗读',
                         content: '超值团购进行中,快去看看',
@@ -374,6 +391,14 @@ Page({
         })
     },
     reward: function () {
+        if(this.data.isIOS){
+            wx.showToast({
+                title: '奖励成功!',
+                icon: 'success',
+                duration: 1000
+            })
+            return 
+        };
         this.setData({
             ifReward: true
         })
@@ -385,6 +410,7 @@ Page({
     },
     // 奖励
     rewardMoney: function () {
+        
         console.log(this.data.authorUid);
         const data = {
             targetUid: this.data.authorUid,

+ 3 - 0
towxml/style/main.wxss

@@ -133,6 +133,9 @@
     font-size: 36rpx;
     padding-bottom: 4rpx;
     margin-bottom: 12rpx;
+    text-align: center;
+    border:2rpx solid #000;
+
 }
 
 .h2w__h5 {