Forráskód Böngészése

Merge branch 'master' of http://git.wanbits.io/sin/twong329

joe 4 éve
szülő
commit
32928a148c

+ 5 - 2
view/xcx/components/mine/index.js

@@ -34,7 +34,8 @@ Component({
    */
   methods: {
     show: function() {
-      if (app.globalData.token) {
+      // console.log('show:', app.globalData.token)
+      if (app.globalData.isLog) {
         this.setData({ iShidden:true})
         this.getStatus()
         this.getHistory()
@@ -60,6 +61,7 @@ Component({
     },
 
     getStatus: function() {
+      // console.log('isLog:', app.globalData.isLog)
       if (app.globalData.isLog) {
         var that = this;
         getMineStatus().then(res=>{
@@ -102,7 +104,8 @@ Component({
     },
 
     onLoadFun:function() {
-      if (this.data.displaying){
+      if (this.data.displaying && app.globalData.isLog){
+        // console.log("onLoadFun")
         this.getStatus()
         this.getHistory()
       }

+ 1 - 1
view/xcx/config.js

@@ -1,6 +1,6 @@
 module.exports = {
   // 请求域名 格式: https://您的域名
-  HTTP_REQUEST_URL:'http://twong.h',
+  HTTP_REQUEST_URL:'https://twong.shotshock.shop',
   // Socket链接 暂不做配置
   WSS_SERVER_URL:'wss://twong.shotshock.shop',
 

+ 6 - 6
view/xcx/pages/index/index.js

@@ -139,9 +139,6 @@ Page({
    * 生命周期函数--监听页面初次渲染完成
    */
   onReady: function () {
-    this.setData({
-      cpnMine: this.selectComponent('#mine'),
-    })
   },
 
   /** 轮播监听 */
@@ -293,11 +290,14 @@ Page({
       activeTabIndex: activeTabIndex
     })
     // 黑洞
+    this.setData({
+      cpnMine: this.selectComponent('#mine'),
+    })
     if (this.data.categoryOne.children[activeTabIndex - 1].id === 199) {
-      this.data.cpnMine.show()
+      var _ = this.data.cpnMine && this.data.cpnMine.show()
       return
     } else {
-      this.data.cpnMine.hide()
+      var _ = this.data.cpnMine && this.data.cpnMine.hide()
     }
 
     that.setData({
@@ -479,7 +479,7 @@ Page({
       })
     }
 
-    this.data.cpnMine.hide()
+    var _ = this.data.cpnMine && this.data.cpnMine.hide()
   },
 
   /**

+ 1 - 1
view/xcx/project.config.json

@@ -40,7 +40,7 @@
   },
   "compileType": "miniprogram",
   "libVersion": "2.16.0",
-  "appid": "wx2cfae9c3f26a6f21",
+  "appid": "wx9562ae2eb2fb8835",
   "projectname": "twong",
   "debugOptions": {
     "hidedInDevtools": []