Commit 61c2eff15b782a8628b7c66b391217c1bd554294
1 parent
332ba4d51e
Exists in
master
and in
2 other branches
基础服务收费改版
Showing 3 changed files with 26 additions and 7 deletions
littleApp_child/pages/Guide/guide.js
View file @
61c2eff
| ... | ... | @@ -44,8 +44,16 @@ |
| 44 | 44 | hasMore = true |
| 45 | 45 | |
| 46 | 46 | if (current_index == 0) { |
| 47 | + hasMore = false, | |
| 48 | + this.setData({ | |
| 49 | + list: [], | |
| 50 | + }) | |
| 47 | 51 | this.requestData() |
| 48 | 52 | } else { |
| 53 | + hasMore = false, | |
| 54 | + this.setData({ | |
| 55 | + list: [], | |
| 56 | + }) | |
| 49 | 57 | this.requestGuideData() |
| 50 | 58 | } |
| 51 | 59 | }, |
| 52 | 60 | |
| ... | ... | @@ -101,9 +109,12 @@ |
| 101 | 109 | this.requestData(); |
| 102 | 110 | }, |
| 103 | 111 | myScroll: function(e) { |
| 104 | - if (e.detail.scrollTop >= e.detail.scrollHeight - wx.getSystemInfoSync().windowHeight - 3) { | |
| 112 | + console.log("e:", e) | |
| 113 | + // console.log("aaaaaaaaaaaaaaaaaaaaaaaaa " + e.detail.scrollTop + " ==== " + e.detail.scrollHeight + " === " + wx.getSystemInfoSync().windowHeight) | |
| 114 | + // if (e.detail.scrollTop >= (e.detail.scrollHeight - wx.getSystemInfoSync().windowHeight - 3)) { | |
| 115 | + console.log("bbbbbbbb") | |
| 105 | 116 | this.loadMore() |
| 106 | - } | |
| 117 | + // } | |
| 107 | 118 | }, |
| 108 | 119 | /*---------自定义函数--------*/ |
| 109 | 120 | requestGuideData(id) { |
| ... | ... | @@ -119,7 +130,7 @@ |
| 119 | 130 | console.log(res) |
| 120 | 131 | isRefresh = false |
| 121 | 132 | var arr = [] |
| 122 | - | |
| 133 | + | |
| 123 | 134 | arr = arr.concat(res.data.data) |
| 124 | 135 | var temp = self.data.category |
| 125 | 136 | self.setData({ |
| 126 | 137 | |
| ... | ... | @@ -142,10 +153,12 @@ |
| 142 | 153 | categoryId: self.data.id, |
| 143 | 154 | days: getApp().globalData.days |
| 144 | 155 | } |
| 156 | + console.log(" categoryId ========= " + " ==== " + self.data.id) | |
| 145 | 157 | if (!param.categoryId) { |
| 146 | 158 | param.categoryId = 4316 |
| 147 | 159 | } |
| 148 | 160 | networkUtil._get(api.articleList, param, function(res) { |
| 161 | + console.log(param) | |
| 149 | 162 | console.log(res) |
| 150 | 163 | isRefresh = false |
| 151 | 164 | var arr = [] |
| ... | ... | @@ -158,6 +171,7 @@ |
| 158 | 171 | arr = arr.concat(res.data.data) |
| 159 | 172 | var temp = self.data.category |
| 160 | 173 | self.setData({ |
| 174 | + | |
| 161 | 175 | list: arr, |
| 162 | 176 | hasMore: hasMore, |
| 163 | 177 | category: temp |
| ... | ... | @@ -178,7 +192,7 @@ |
| 178 | 192 | console.log(res) |
| 179 | 193 | isRefresh = false |
| 180 | 194 | var arr = [] |
| 181 | - if (page > 0) { // 加载更多模式 | |
| 195 | + if (page > 1) { // 加载更多模式 | |
| 182 | 196 | arr = self.data.list |
| 183 | 197 | } |
| 184 | 198 | if (res.data.list.length < 15) { |
littleApp_child/pages/home/home.js
View file @
61c2eff
| ... | ... | @@ -362,7 +362,7 @@ |
| 362 | 362 | if (item.id == 7) { |
| 363 | 363 | if (item.status == 1) { |
| 364 | 364 | self.setData({ |
| 365 | - riskGuide: true, | |
| 365 | + // riskGuide: true, | |
| 366 | 366 | }) |
| 367 | 367 | } |
| 368 | 368 | } |
| ... | ... | @@ -408,6 +408,11 @@ |
| 408 | 408 | self.data.riskBase=true; |
| 409 | 409 | }else{ |
| 410 | 410 | self.data.riskBase=false; |
| 411 | + } | |
| 412 | + if (res.data.data.status == 1){ | |
| 413 | + self.data.riskGuide=true; | |
| 414 | + }else{ | |
| 415 | + self.data.riskGuide = false; | |
| 411 | 416 | } |
| 412 | 417 | self.getArticleInfo(res.data.data.days) |
| 413 | 418 | self.setUserInfo(res.data.data) |
littleApp_child/utils/network_util.js
View file @
61c2eff
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | // 测试用户‘花雪莲’,手机号15928512992,验证码666666 |
| 3 | 3 | |
| 4 | 4 | // 0测试环境 1正式环境 2演示环境 3衡水 |
| 5 | -var Builing_Release_AppStore = 0 | |
| 5 | +var Builing_Release_AppStore = 1 | |
| 6 | 6 | // 获取服务器地址 |
| 7 | 7 | function kServerBaseUrl() { |
| 8 | 8 | switch (Builing_Release_AppStore) { |
| ... | ... | @@ -24,7 +24,7 @@ |
| 24 | 24 | * fail: 失败回调 类型function |
| 25 | 25 | */ |
| 26 | 26 | function _get(port, params, success, fail) { |
| 27 | - console.log('---------------request_get-----------url:' + kServerBaseUrl() + port) | |
| 27 | + console.log('---------------request_get-----------url:== ' + getApp().globalData.token+' === ' + kServerBaseUrl() + port) | |
| 28 | 28 | wx.request({ |
| 29 | 29 | url: kServerBaseUrl() + port, |
| 30 | 30 | data: params, |