ソースを参照

修改团购和权限获取

limengbo 4 年 前
コミット
5158a0b328

+ 4 - 4
component/hot/hot.wxml

@@ -23,11 +23,11 @@
             </view>
         </view>
     </view> -->
-    <view class="messageSection" bindtap="goToMessage" wx:if="{{hotData.unReadMessageContent !== ''}}">
+    <!-- <view class="messageSection" bindtap="goToMessage" wx:if="{{hotData.unReadMessageContent !== ''}}">
         <image class="messageIcon" src="../../static/image/message_icon.png" />
         <text class="messageText">{{hotData.unReadMessageContent}}</text>
-    </view>
-    <view class="myCourseSection">
+    </view> -->
+    <!-- <view class="myCourseSection">
         <view class="title">
             <view class="title-regular">我的课程</view>
             <view class="right" bindtap="toMyCourse" wx:if="{{hotData.myCourse.length > 3}}">
@@ -46,7 +46,7 @@
                 </view>
             </block>
         </view>
-    </view>
+    </view> -->
     <view class="searchSection">
         <input bindinput="inputHandler" value="{{hotData.inputValue}}" focus="{{hotData.inputFocus}}" bindfocus="searchIconDisappear" bindblur="searchIconCome" bindconfirm="searchHandler" placeholder="{{hotData.hotSearch}}" placeholder-style="text-indent:20rpx" confirm-type="search"></input>
         <view>{{searchIcon}}</view>

+ 2 - 3
component/hot/hot.wxss

@@ -187,17 +187,16 @@ swiper {
 
 .searchSection .allBooks {
     font-size: 30rpx;
-    color: #494747;
+    color: #fff;
     font-weight: 800;
     /* font-family: PingFangSC-regular; */
     width: 200rpx;
     text-align: center;
     margin-left: 20rpx;
-    background: #F0F1F5;
     height: 80rpx;
     line-height: 80rpx;
     border-radius: 40rpx;
-    background: #fff;
+    background: #ff890a;
 }
 
 .hotSection {

+ 3 - 3
component/my/my.js

@@ -74,9 +74,9 @@ export const myInit = (that) => {
       });
     },
     that.toWalletDetail = function(e) {
-      wx.navigateTo({
-        url: `../../pages/user/walletDetails/walletDetails?title=资金明细`
-      });
+      // wx.navigateTo({
+      //   url: `../../pages/user/walletDetails/walletDetails?title=资金明细`
+      // });
     },
     that.getFollowWorks(1, 3);
 }

+ 7 - 7
component/my/my.wxml

@@ -30,13 +30,13 @@
           <image class="" src='../../static/image/flower_small.png' />
           <view>小红花:{{myData.user.integralAmount || 0 }}</view>
         </view>
-        <view class="flower-tips" wx:if="{{myData.user.unfinishedAmount > 0}}">
+        <!-- <view class="flower-tips" wx:if="{{myData.user.unfinishedAmount > 0}}">
           <text class="flower-last">{{myData.user.unfinishedAmount }}</text>
           个任务福利还没有完成
         </view>
-                <view class="flower-tips" wx:if="{{myData.user.unfinishedAmount <= 0}}">
+        <view class="flower-tips" wx:if="{{myData.user.unfinishedAmount <= 0}}">
           今天任务全部完成,真棒
-        </view>
+        </view> -->
       </view>
       <!-- android 显示两个 -->
       <view class="wallet-section" wx:if="{{!myData.isIOS}}">
@@ -50,10 +50,10 @@
           <image class="flower-icon" src='../../static/image/flower_small.png' />
           <view class="flower-text">
             <view>小红花:{{myData.user.integralAmount || 0 }}</view>
-            <view class="flower-tips-text">
+            <!-- <view class="flower-tips-text">
               <text class="flower-last">{{myData.user.unfinishedAmount }}</text>
               个任务福利还没有完成
-            </view>
+            </view> -->
           </view>
         </view>
       </view>
@@ -66,10 +66,10 @@
           <image src="../../static/image/collect.png" />
           <view class="btn-title">我的收藏</view>
         </view>
-        <view class="btn" bindtap='toMyCollage' data-title='{{ myData.collage }}'>
+        <!-- <view class="btn" bindtap='toMyCollage' data-title='{{ myData.collage }}'>
           <image src="../../static/image/firends.png" />
           <view class="btn-title">我的{{myData.isIOS? '助力' : '拼团'}}</view>
-        </view>
+        </view> -->
         <view class="btn">
           <image src="../../static/image/message.png" bindtap="goToMessage" />
           <view class="btn-title">消息/客服</view>

+ 1 - 1
component/share/share.js

@@ -321,7 +321,7 @@ Component({
                 // })
                 wx.showModal({
                   title: '无法保存分享图片到相册',
-                  content: '点击右上角浮点按钮->进入关于->点击右上角按钮->设置,进行授权',
+                  content: '点击右上角浮点按钮->设置,进行授权',
                   confirmText: '我知道了',
                   showCancel: false,
                   success(res) {

+ 1 - 1
component/share/shareTemp.js

@@ -385,7 +385,7 @@ Component({
                 // })
                 wx.showModal({
                   title: '无法保存分享图片到相册',
-                  content: '点击右上角浮点按钮->进入关于->点击右上角按钮->设置,进行授权',
+                  content: '点击右上角浮点按钮->设置,进行授权',
                   confirmText: '我知道了',
                   showCancel: false,
                   success(res) {

+ 12 - 22
pages/groupPage/grade-details/grade-details.wxml

@@ -3,7 +3,7 @@
     <scroll-view scroll-y="{{true}}">
         <view class="grade-details">
             <image src="{{titleIcon}}"></image>
-            <text class="lastThreeYears" wx:if="{{lastThreeYears}}">使用期限至:{{lastThreeYears}}</text>
+            <!-- <text class="lastThreeYears" wx:if="{{lastThreeYears}}">使用期限至:{{lastThreeYears}}</text> -->
         </view>
         <view class="catalog">
             <!-- <image class="bg2" src="../../../static/groupImg/Rectangle_9.png"></image>  -->
@@ -34,10 +34,9 @@
         </view>
     </scroll-view>
     <!-- 安卓界面 -->
-    <view class="group-btn {{isIPX ? 'bottomx' :''}}" wx:if="{{!isIOS ? haveJoinNormal ? false : haveCreatedHelp  ? false : haveJoinHelp ? true : true : false}}">
+    <!-- <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> -->
         <block wx:for="{{payList}}" wx:key="{{index}}">
             <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>
@@ -46,51 +45,42 @@
                 <button class="formBtn" form-type="submit"></button>
             </form>
         </block>
-    </view>
+    </view> -->
     <!-- 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> -->
+    <!-- <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" />
         <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>
+        </block> -->
         <!-- ios 七天权限的界面-->
-        <block wx:for="{{payList}}" wx:key="{{index}}"  wx:if="{{imSuper && haveJoinHelp}}">
+        <!-- <block wx:for="{{payList}}" wx:key="{{index}}"  wx:if="{{imSuper && haveJoinHelp}}">
             <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>
+        </block> -->
         <!-- ios 三年权限的界面 支持继续开团 -->
-        <block wx:for="{{payList}}" wx:key="{{index}}" wx:if="{{imSuper && !haveJoinHelp}}">
+        <!-- <block wx:for="{{payList}}" wx:key="{{index}}" wx:if="{{imSuper && !haveJoinHelp}}">
             <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>
-    </view>
+    </view> -->
     <!-- 已有权限的界面 安卓 -->
-    <view class="group-btn {{isIPX ? 'bottomx' :''}}" wx:if="{{!isIOS ? haveJoinNormal ? true : haveCreatedHelp ? true : false : false}}">
+    <!-- <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="{{index != 0 && index != 2 }}">
                 <view>继续开团赚取奖学金吧</view>
-                <!-- <view class="formFit"> -->
-                <!-- <text class="formFit">{{item.headcount}}人团</text> -->
-                <!-- </view> -->
                 <button class="formBtn" form-type="submit"></button>
             </form>
         </block>
-    </view>
+    </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" />

+ 22 - 22
pages/index/index.js

@@ -43,10 +43,10 @@ Page({
         name: '发现',
         templates: 'hot',
       },
-      {
-        name: '热团',
-        templates: 'group',
-      },
+      // {
+      //   name: '热团',
+      //   templates: 'group',
+      // },
       // {
       //   name: '动态',
       //   templates: 'follow',
@@ -179,20 +179,20 @@ Page({
       title: '小学课文朗读配音'
     })
     // this.init();
-    if (wx.getStorageSync('uid')) {
+    getOpenidNoLogin((res) => {
       hotInit(this)
-    } else {
-      getOpenidNoLogin((res) => {
-        hotInit(this)
-      }, (error) => {
-        // console.log(error)
-        wx.setStorageSync('userSourseType', 'normal')
-        return;
-      });
-      if (this.data.myIndex === 0) {
-        // 从修改信息页面退回
-        this.getUserWorksInfo(true);
-      }
+    }, (error) => {
+      // console.log(error)
+
+      wx.setStorageSync('userSourseType', 'normal')
+      this.setData({
+        hide: !this.data.hide
+      })
+      return;
+    });
+    if (this.data.myIndex === 0) {
+      // 从修改信息页面退回
+      this.getUserWorksInfo(true);
     }
   },
   onHide: function() {
@@ -333,11 +333,11 @@ Page({
       url: `../../pages/user/mycourse/mycourse?title=我的课程`
     });
   },
-  goToFlower: function() {
-    wx.navigateTo({
-      url: `../../pages/social/littleFlower/littleFlower`
-    });
-  },
+  // goToFlower: function() {
+  //   wx.navigateTo({
+  //     url: `../../pages/social/littleFlower/littleFlower`
+  //   });
+  // },
   signInBtn: function(e) {
     this.setData({
       indexSignDialog: false

+ 4 - 4
pages/index/index.wxml

@@ -30,16 +30,16 @@
 <view hidden="{{hide}}">
   <Dialog bindmyevent="jurisdiction" />
 </view>
-<view class="index-dialog" wx:if="{{indexSignDialog}}">
+<!-- <view class="index-dialog" wx:if="{{indexSignDialog}}">
   <form bindsubmit="signInBtn" report-submit="{{true}}" class="index-dialog-wrapper" >
     <view class="index-dialog-text">签到领取小红花哦</view>
     <view class="index-dialog-btn" >去签到</view>
     <button class="index-dialog-btn-hide" form-type="submit"></button>
   </form>
-</view>
-<view class="index-dialog" wx:if="{{indexMissionDialog}}">
+</view> -->
+<!-- <view class="index-dialog" wx:if="{{indexMissionDialog}}">
   <view class="index-dialog-wrapper" bindtap="missionBtn" >
     <view class="index-dialog-text">还有<text class="red-text">{{unfinishedCount}}</text>个小红花任务哦</view>
     <view class="index-dialog-btn" >查看任务</view>
   </view>
-</view>
+</view> -->

+ 1 - 1
pages/index/index.wxss

@@ -33,7 +33,7 @@
   align-items: center;
   /* margin-bottom: 15rpx; */
   z-index: 999;
-  padding: 0 82rpx 0 82rpx;
+  padding: 0 152rpx 0 152rpx;
 
 }
 

+ 24 - 2
pages/main/class/class.js

@@ -133,8 +133,27 @@ Page({
     getOpenidSessionKey((res) => {
       httpRequestApi.areYouSuper(this.data.productId).success(res => {
         if (res.data.success) {
-          wx.navigateTo({
-            url: `../../main/reading/reading?id=${this.data.id}`
+          wx.authorize({
+            scope: 'scope.record',
+            success () {
+                // 用户已经同意小程序使用录音功能,后续调用 wx.startRecord 接口不会弹窗询问
+                console.log('成功')
+                wx.navigateTo({
+                  url: `../../main/reading/reading?id=${this.data.id}`
+                })
+            },
+            fail () {
+                wx.showModal({
+                    title: '无法开启您的录音权限',
+                    content: '点击右上角浮点按钮->设置,进行授权',
+                    confirmText: '我知道了',
+                    showCancel: false,
+                    success(res) {
+                        console.log('用户点击确定')
+                        dialogFlag = false;
+                    }
+                })
+            }
           })
         } else {
           // ios用户 并且没有购买过此书
@@ -175,6 +194,9 @@ Page({
         this.setData({
             hide: !this.data.hide
         })
+        if (this.videoClassCtx) {
+          this.videoClassCtx.stop();
+        }
         return;
     });
 

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

@@ -1,6 +1,6 @@
 <view class="classPage">
     <view class="videoSection" wx:if="{{!isIOS}}">
-        <cover-image wx:if="{{!videoLoad}}" class="video-playBtn" bindtap="videoPlayHandler" src="../../../static/image/play-btn.png"></cover-image>
+        <image wx:if="{{!videoLoad}}" class="video-playBtn" bindtap="videoPlayHandler" src="../../../static/image/play-btn.png"/>
         <image wx:if="{{!videoLoad}}" class="videoIcon" src="{{iconImg}}" />
         <video wx:if="{{videoLoad}}" bindtimeupdate="videoTimeChange" id="classVideo" class="videoSection" src="{{videoUrl}}" autoPlay="{{autoPlay}}" controls="{{controls}}" show-center-play-btn="{{centerBtn}}" show-fullscreen-btn="{{fullScreenBtn}}" show-play-btn="{{playBtn}}"></video>
     </view>

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

@@ -11,7 +11,7 @@
     left: 0;
     right: 0;
     margin: 0 auto;
-    z-index: 99999;
+    z-index: 999;
     top: 136rpx;
 }
 

+ 39 - 16
pages/main/reading/reading.js

@@ -23,7 +23,6 @@ Page({
     onLoad: function (option) {
         console.log(option);
         this.videoCtx = null;
-
         const uid = wx.getStorageSync('uid')
         httpRequestApi.getClassDetail(uid, option.id).success(res => {
             console.log(res)
@@ -82,19 +81,25 @@ Page({
         //         duration: 500
         //     })
         // })
+        let dialogFlag = true;
         this.recorderManager.onError(() => {
             wx.getSetting({
                 success(res) {
-                    if (!res.authSetting['scope.record']) {
+                    if (!res.authSetting['scope.record'] && dialogFlag) {
                         wx.showModal({
                             title: '无法开启您的录音权限',
-                            content: '点击右上角浮点按钮->进入关于->点击右上角按钮->设置,进行授权',
+                            content: '点击右上角浮点按钮->设置,进行授权',
                             confirmText: '我知道了',
                             showCancel: false,
                             success(res) {
                                 console.log('用户点击确定')
+                                dialogFlag = false;
                             }
                         })
+                        dialogFlag = false;
+                        setTimeout(() => {
+                            dialogFlag = true;
+                        },1000)
                     }
                     // else {
                     //     wx.showToast({
@@ -126,22 +131,26 @@ Page({
     },
     onHide: function () {
         console.log('onhide')
-        if (this.data.btnImgFlag) {
-            this.recorderManager.stop();
-        }
+        // if (this.data.btnImgFlag) {
+        //     this.recorderManager.stop();
+        // }
+
+        // if (this.innerAudioContext) {
+        //     this.innerAudioContext.stop();
+        // }
+        this.setData({
+            recordFlag: 0
+        })
 
-        if (this.innerAudioContext) {
-            this.innerAudioContext.stop();
-        }
     },
     onUnload: function () {
         console.log('onUnload')
-        if (this.recorderManager) {
-            this.recorderManager.stop();
-        }
-        if (this.innerAudioContext) {
-            this.innerAudioContext.stop();
-        }
+        // if (this.recorderManager) {
+        //     this.recorderManager.stop();
+        // }
+        // if (this.innerAudioContext) {
+        //     this.innerAudioContext.stop();
+        // }
     },
     // onShow:function(){
 
@@ -195,7 +204,21 @@ Page({
             if (this.innerAudioContext) {
                 this.innerAudioContext.stop();
             }
-            this.videoComplete();
+            const that = this;
+            wx.getSetting({
+                success(res) {
+                    if (res.authSetting['scope.record']) {
+                        that.videoComplete();
+                    }
+                    // else {
+                    //     wx.showToast({
+                    //         title: 'onError',
+                    //         icon: 'fail',
+                    //         duration: 500
+                    //     })
+                    // }
+                }
+            })
             return;
         }
         // 录音结束后

+ 83 - 48
pages/social/works/works.js

@@ -3,6 +3,9 @@ import {
     formatDate
 } from '../../../utils/util';
 import {
+    getOpenidNoLogin
+} from '../../../utils/httpUtilNoLogin';
+import {
     getOpenidSessionKey
 } from '../../../utils/httpUtil';
 const app = getApp()
@@ -74,7 +77,8 @@ Page({
                 })
             }
         }
-        getOpenidSessionKey((res) => {
+        // getOpenidNoLogin
+        getOpenidNoLogin((res) => {
             let id = option.id ? option.id : option.scene.replace('QR', '')
             if (option.scene || option.shareCard) {
                 this.setData({
@@ -100,10 +104,10 @@ Page({
             
         }, (error) => {
             wx.setStorageSync('userSourseType','reading')
-            this.setData({
-                hide: !this.data.hide,
-                onLoadOption: option
-            })
+            // this.setData({
+            //     hide: !this.data.hide,
+            //     onLoadOption: option
+            // })
             return;
         });
     },
@@ -210,6 +214,7 @@ Page({
             videoLoad: true
         }, () => {
             this.videoCtx = wx.createVideoContext('worksVideo', this);
+            debugger
             this.videoCtx.play();
         })
     },
@@ -325,49 +330,78 @@ Page({
     },
     goToReading: function () {
         const classId = this.data.classId;
-
-
-        httpRequestApi.areYouSuper(this.data.productId).success(res => {
-            if (res.data.success) {
-                wx.navigateTo({
-                    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;
-                // }
-                console.log('chulaiba')
-                this.setData({
-                    isModalShow: true
-                })
-                // wx.showModal({
-                //     title: '您未购买过本书,不能朗读',
-                //     content: '超值团购进行中,快去看看',
-                //     success(res) {
-                //         if (res.confirm) {
-                //             console.log('用户点击确定')
-                //             wx.navigateTo({
-                //                 url: `../../groupPage/grade-details/grade-details?productId=${productId}`
-                //             })
-                //         } else if (res.cancel) {
-                //             console.log('用户点击取消')
-                //         }
-                //     }
-                // })
+        getOpenidSessionKey((res) => {
+            httpRequestApi.areYouSuper(this.data.productId).success(res => {
+                if (res.data.success) {
+                    wx.authorize({
+                        scope: 'scope.record',
+                        success () {
+                            // 用户已经同意小程序使用录音功能,后续调用 wx.startRecord 接口不会弹窗询问
+                            console.log('成功')
+                            wx.navigateTo({
+                                url: `../../main/reading/reading?id=${classId}`
+                            })
+                        },
+                        fail () {
+                            wx.showModal({
+                                title: '无法开启您的录音权限',
+                                content: '点击右上角浮点按钮->设置,进行授权',
+                                confirmText: '我知道了',
+                                showCancel: false,
+                                success(res) {
+                                    console.log('用户点击确定')
+                                    dialogFlag = false;
+                                }
+                            })
+                        }
+                    })
+                } else {
+                    // ios用户 并且没有购买过此书
+                    // if (this.data.isIOS) {
+                    //     wx.showModal({
+                    //         title: '暂不支持',
+                    //         content: '十分抱歉,由于相关规定,您暂时无法在这里朗读',
+                    //         success(res) {
+                    //             if (res.confirm) {
+                    //                 console.log('用户点击确定')
+                    //             } else if (res.cancel) {
+                    //                 console.log('用户点击取消')
+                    //             }
+                    //         }
+                    //     })
+                    //     return;
+                    // }
+                    console.log('chulaiba')
+                    this.setData({
+                        isModalShow: true
+                    })
+                    // wx.showModal({
+                    //     title: '您未购买过本书,不能朗读',
+                    //     content: '超值团购进行中,快去看看',
+                    //     success(res) {
+                    //         if (res.confirm) {
+                    //             console.log('用户点击确定')
+                    //             wx.navigateTo({
+                    //                 url: `../../groupPage/grade-details/grade-details?productId=${productId}`
+                    //             })
+                    //         } else if (res.cancel) {
+                    //             console.log('用户点击取消')
+                    //         }
+                    //     }
+                    // })
+                }
+            })
+        }, (error) => {
+            this.setData({
+                hide: !this.data.hide
+            })
+            if (this.innerAudioContext && this.videoCtx) {
+                this.videoCtx.stop();
+                this.innerAudioContext.pause();
+                console.log('关闭音频')
             }
-        })
+            return;
+        });
     },
     onShareAppMessage: function () {
         console.log(this.data.productId);
@@ -704,7 +738,8 @@ Page({
             hide: !this.data.hide
         })
         //登录页信息
-        this.onLoad(this.data.onLoadOption);
+        // this.onLoad(this.data.onLoadOption);
+        this.goToReading();
     },
     goToClass: function () {
 

+ 6 - 6
pages/social/works/works.wxml

@@ -1,6 +1,6 @@
 <view class="works-page {{noScroll}}">
     <view class="videoSection" wx:if="{{!isIOS}}">
-        <cover-image wx:if="{{!videoLoad}}" class="video-playBtn" bindtap="videoPlayHandler" src="../../../static/image/play-btn.png"></cover-image>
+        <image wx:if="{{!videoLoad}}" class="video-playBtn" bindtap="videoPlayHandler" src="../../../static/image/play-btn.png"/>
         <image wx:if="{{!videoLoad}}" class="videoIcon" src="{{iconImg}}" />
         <video wx:if="{{videoLoad}}" id="worksVideo" class="videoSection" src="{{videoSrc}}" bindplay="videoPlay" bindtimeupdate="videoTimeupdate" bindprogress="videoProgress" bindwaiting="videoWaiting" bindended="videoEnd" bindpause="videoPause" controls="false" enable-progress-gesture="{{gesture}}" show-fullscreen-btn="{{fullScreenBtn}}" show-play-btn="{{playBtn}}"></video>
     </view>
@@ -35,7 +35,7 @@
             <text class="animation-flower {{addComeOut}}">+1</text>
             <image src="../../../static/image/add_flower.png" />
         </view>
-        <input class="commentInput" bindconfirm="sendHandler" value="{{inputValue}}" confirm-type="send" placeholder="听了这么多,说点什么吧" bindinput="inputValue"></input>
+        <!-- <input class="commentInput" bindconfirm="sendHandler" value="{{inputValue}}" confirm-type="send" placeholder="听了这么多,说点什么吧" bindinput="inputValue"></input> -->
     </view>
     <view class="commentArea">
         <view class="commentItem" wx:for="{{replyList}}" wx:key="{{index}}">
@@ -50,9 +50,9 @@
                     <text class="gutInGut">{{item.text}}</text>
                     <text wx:if="{{item.text.length >=22}}" class="whole" bindtap="goToDetail" data-id="{{item.id}}">全文</text>
                 </view>
-                <view class="commentAll" bindtap="goToDetail" data-id="{{item.id}}" wx:if="{{item.replyCount}}">
+                <!-- <view class="commentAll" bindtap="goToDetail" data-id="{{item.id}}" wx:if="{{item.replyCount}}">
                     <text>共有{{item.replyCount}}条评论</text>
-                </view>
+                </view> -->
             </view>
             <view class="btnWrapper">
                 <!-- <image class="commentBtn" src="../../../static/image/comment.png" bindtap="goToDetail" data-count="{{item.replyCount}}" data-id="{{item.id}}" data-index="{{index}}" />
@@ -61,10 +61,10 @@
                     <image class="likeBtn" src="{{item.isLike? '../../../static/image/point.png' : '../../../static/image/like.png'}}" />
                     <text class="likeText">{{item.likes}}</text>
                 </view>
-                <view class="hotAreaBigBigBig" bindtap="goToDetail" data-id="{{item.id}}" data-index="{{index}}">
+                <!-- <view class="hotAreaBigBigBig" bindtap="goToDetail" data-id="{{item.id}}" data-index="{{index}}">
                     <image class="commentBtn" src="../../../static/image/comment.png" />
                     <text class="commentText">回复</text>
-                </view>
+                </view> -->
             </view>
         </view>
     </view>

+ 2 - 2
pages/social/works/works.wxss

@@ -22,7 +22,7 @@
     left: 0;
     right: 0;
     margin: 0 auto;
-    z-index: 9999;
+    z-index: 999;
     top: 136rpx;
 }
 
@@ -232,7 +232,7 @@
 
 .commentSection {
     width: 100%;
-    height: 158rpx;
+    height: 88rpx;
 }
 
 .commentSection .title {

+ 2 - 2
utils/const.js

@@ -2,6 +2,6 @@
 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:442/readerBase/'
+  baseApi: 'https://reader.lingjiao.cn/readerBase/'
+  // baseApi: 'https://readertest.lingjiao.cn:442/readerBase/'
 }

+ 6 - 6
utils/httpUtilNoLogin.js

@@ -12,12 +12,12 @@ function genAPIUrl(action) {
 
 // 登录
 function wxLogin(successcallback, failcallback) {
-    // wx.showToast({
-    //     title: '登录中...',
-    //     icon: 'loading',
-    //     duration: 1500,
-    //     mask: true
-    // })
+    wx.showToast({
+        title: '加载中...',
+        icon: 'loading',
+        duration: 1500,
+        mask: true
+    })
     wx.login({
         success: function (res) {
             if (res.code) {