Rorschach 5 years ago
parent
commit
1e51538996
3 changed files with 37 additions and 30 deletions
  1. 32 25
      pages/social/works/works.js
  2. 1 1
      pages/vipPage/vipCode/vipCode.js
  3. 4 4
      utils/const.js

+ 32 - 25
pages/social/works/works.js

@@ -102,13 +102,16 @@ Page({
             if (option.stackSize) {
                 stackSize = option.stackSize;
             }
+            console.log(2222222222222222)
             this.setData({
                 // title: option.title,
-                id,
+                id: id,
                 myUid: this.uid,
                 stackSize
             }, () => {
+                console.log(this.data.id)
                 this.getWorks(this.uid, id);
+                // this.getReply();
             })
 
         }, (error) => {
@@ -164,15 +167,15 @@ Page({
             const others = res.data.data.otherRead;
             const author = res.data.data.user;
             const works = res.data.data.userRead;
-            console.log(11111111,author)
-            console.log(22222222,others)
+            console.log(11111111, author)
+            console.log(22222222, others)
 
             wx.setNavigationBarTitle({
                 title: works.title //页面标题为路由参数
             })
             const othersTemp = [];
             others.forEach((item) => {
-                if(!item) return
+                if (!item) return
                 const temp = {};
                 temp.uid = item.userRead.id;
                 temp.title = item.userRead.title;
@@ -225,16 +228,19 @@ Page({
         });
     },
     onShow() {
-        console.log('------------------------------------------------')
-        if (this.data.myUid) {
-            this.setData({
-                replyList: [],
-                pageNo: 1,
-                pageSize: 8
-            }, () => {
-                this.getReply();
-            })
-        }
+        this.timeOut = setInterval(()=>{
+            if (this.data.id) {
+                clearInterval(this.timeOut)
+                this.setData({
+                    replyList: [],
+                    pageNo: 1,
+                    pageSize: 8
+                }, () => {
+                    this.getReply();
+                })
+            }
+        },200)
+        
     },
     videoPlayHandler: function () {
         if (this.data.readIsRisky === 'DEL') {
@@ -425,16 +431,16 @@ Page({
                         }
                     })
                 } else {
-                    if(this.data.isIOS){
+                    if (this.data.isIOS) {
                         wx.navigateTo({
-                          url: `../../vipPage/wechat/wechat`
+                            url: `../../vipPage/wechat/wechat`
                         })
-                      }else{
+                    } else {
                         this.setData({
-                          modalType: 'androidVIP',
-                          isModalShow: true
-                      })
-                      }
+                            modalType: 'androidVIP',
+                            isModalShow: true
+                        })
+                    }
 
                 }
             })
@@ -531,6 +537,7 @@ Page({
     getReply: function () {
         // let uid = wx.getStorageSync('uid');
         let columnId = this.data.id;
+        console.log(123123123, columnId)
         let pageNo = this.data.pageNo;
         let pageSize = this.data.pageSize;
         httpRequestApi.getReply(this.uid, columnId, pageNo, pageSize).success((res) => {
@@ -755,18 +762,18 @@ Page({
         this.setData({
             isModalShow: false
         })
-        if(this.data.isIOS){
+        if (this.data.isIOS) {
             // wx.navigateTo({
             //   url: `../../vipPage/vipCode/vipCode`
             // })
             wx.navigateTo({
                 url: `../../vipPage/wechat/wechat`
             })
-          }else{
+        } else {
             wx.navigateTo({
-              url: `../../vipPage/vip/vip`
+                url: `../../vipPage/vip/vip`
             })
-          }
+        }
 
     },
     modalCloseHandler: function () {

+ 1 - 1
pages/vipPage/vipCode/vipCode.js

@@ -4,7 +4,7 @@ import APIClient from '../../../utils/APIClient.js'
 Page({
 
   data: {
-    buyBtnText: '立即开通',
+    buyBtnText: '立即激活',
     price: '29',
     originPrice: '99',
     productId: 0,

+ 4 - 4
utils/const.js

@@ -1,9 +1,9 @@
 // 常量列表
 module.exports = {
   // productApi: 'https://reader.lingjiao.cn/readerProduct/',
-  productApi: 'https://readertest.lingjiao.cn:442/readerProduct/',
-  // productApi:  'https://reader-efun.lingjiao.cn/readerProduct/',
+  // productApi: 'https://readertest.lingjiao.cn:442/readerProduct/',
+  productApi:  'https://reader-efun.lingjiao.cn/readerProduct/',
   // baseApi: 'https://reader.lingjiao.cn/readerBase/'
-  baseApi: 'https://readertest.lingjiao.cn:442/readerBase/'
-  // baseApi: 'https://reader-efun.lingjiao.cn/readerBase/'
+  // baseApi: 'https://readertest.lingjiao.cn:442/readerBase/'
+  baseApi: 'https://reader-efun.lingjiao.cn/readerBase/'
 }