tanyanfei 2 rokov pred
rodič
commit
fcfabcabe9
2 zmenil súbory, kde vykonal 98 pridanie a 68 odobranie
  1. 43 13
      pages/index/index.js
  2. 55 55
      project.config.json

+ 43 - 13
pages/index/index.js

@@ -14,6 +14,8 @@ Page({
     defendList:[],
     winList:[],
     hotFollowList:[],
+    hotbuyList:[],
+    championList:[],
     page:1,
     total:-1,
     page1: 1,
@@ -214,7 +216,7 @@ Page({
           }
           this.getFollow()
         case 1:
-          if (this.data.hotbuyList) {
+          if (this.data.hotbuyList.length>0) {
             return
           }
           this.getHot()
@@ -229,7 +231,7 @@ Page({
           }
           this.getWin()
         case 4:
-          if (this.data.championList) {
+          if (this.data.championList.length>0) {
             return
           }
           this.getData()
@@ -294,18 +296,46 @@ Page({
     this.getHot()
   },
   onShow: function (e) {
-    if (app.globalData.follow){
-      this.setData({
-        page: 1,
-        total: -1,
-        followList: [],
-      })
-      app.globalData.follow=0
-      this.getFollow()
+    this.setData({
+      followList:[],
+      defendList:[],
+      winList:[],
+      hotFollowList:[],
+      hotbuyList:[],
+      championList:[],
+      page:1,
+      total:-1,
+      page1: 1,
+      total1: 0,
+      page2: 1,
+      total2: 0,
+      page3: 1,
+      total3: 0
+    })
+    switch(this.data.cur){
+      case 0:
+        this.getFollow()
+      case 1:
+        this.getHot()
+      case 2:
+        this.getHotFollowList()
+      case 3:
+        this.getWin()
+      case 4:
+        this.getData()
     }
+    // if (app.globalData.follow){
+    //   this.setData({
+    //     page: 1,
+    //     total: -1,
+    //     followList: [],
+    //   })
+    //   app.globalData.follow=0
+    //   this.getFollow()
+    // }
     
-    if (this.data.error) {
-      this.onLoad()
-    }
+    // if (this.data.error) {
+    //   this.onLoad()
+    // }
   },
 })

+ 55 - 55
project.config.json

@@ -1,57 +1,57 @@
 {
-	"description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
-	"packOptions": {
-		"ignore": [],
-		"include": []
-	},
-	"setting": {
-		"urlCheck": true,
-		"es6": true,
-		"enhance": true,
-		"postcss": true,
-		"preloadBackgroundData": false,
-		"minified": true,
-		"newFeature": true,
-		"coverView": true,
-		"nodeModules": false,
-		"autoAudits": false,
-		"showShadowRootInWxmlPanel": true,
-		"scopeDataCheck": false,
-		"uglifyFileName": false,
-		"checkInvalidKey": true,
-		"checkSiteMap": true,
-		"uploadWithSourceMap": true,
-		"compileHotReLoad": false,
-		"lazyloadPlaceholderEnable": false,
-		"useMultiFrameRuntime": true,
-		"useApiHook": true,
-		"useApiHostProcess": true,
-		"babelSetting": {
-			"ignore": [],
-			"disablePlugins": [],
-			"outputPath": ""
-		},
-		"useIsolateContext": false,
-		"userConfirmedBundleSwitch": false,
-		"packNpmManually": false,
-		"packNpmRelationList": [],
-		"minifyWXSS": true,
-		"disableUseStrict": false,
-		"minifyWXML": true,
-		"showES6CompileOption": false,
-		"useCompilerPlugins": false,
-		"ignoreUploadUnusedFiles": true,
-		"useStaticServer": true
-	},
-	"compileType": "miniprogram",
-	"libVersion": "2.15.0",
-	"appid": "wx2938132b773c7b5a",
-	"projectname": "newwzb_xcx",
-	"simulatorType": "wechat",
-	"simulatorPluginLibVersion": {},
-	"editorSetting": {
-		"tabIndent": "insertSpaces",
-		"tabSize": 2
-	},
-	"condition": {}
+  "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
+  "packOptions": {
+    "ignore": [],
+    "include": []
+  },
+  "setting": {
+    "urlCheck": true,
+    "es6": true,
+    "enhance": true,
+    "postcss": true,
+    "preloadBackgroundData": false,
+    "minified": true,
+    "newFeature": true,
+    "coverView": true,
+    "nodeModules": false,
+    "autoAudits": false,
+    "showShadowRootInWxmlPanel": true,
+    "scopeDataCheck": false,
+    "uglifyFileName": false,
+    "checkInvalidKey": true,
+    "checkSiteMap": true,
+    "uploadWithSourceMap": true,
+    "compileHotReLoad": false,
+    "lazyloadPlaceholderEnable": false,
+    "useMultiFrameRuntime": true,
+    "useApiHook": true,
+    "useApiHostProcess": true,
+    "babelSetting": {
+      "ignore": [],
+      "disablePlugins": [],
+      "outputPath": ""
+    },
+    "useIsolateContext": false,
+    "userConfirmedBundleSwitch": false,
+    "packNpmManually": false,
+    "packNpmRelationList": [],
+    "minifyWXSS": true,
+    "disableUseStrict": false,
+    "minifyWXML": true,
+    "showES6CompileOption": false,
+    "useCompilerPlugins": false,
+    "ignoreUploadUnusedFiles": true,
+    "useStaticServer": true
+  },
+  "compileType": "miniprogram",
+  "libVersion": "2.15.0",
+  "appid": "wx2938132b773c7b5a",
+  "projectname": "newwzb_xcx",
+  "simulatorType": "wechat",
+  "simulatorPluginLibVersion": {},
+  "editorSetting": {
+    "tabIndent": "insertSpaces",
+    "tabSize": 2
+  },
+  "condition": {}
 }