Commit 6b47b7980a0d03ddd4d6cc319ef623ed84ddee2d
Merge branch 'test' of http://git.vipzhuang.cn/wxd/MShopWeApp into qa
Showing
3 changed files
with
45 additions
and
5 deletions
app.js
1 | 1 | var t = require("setting.js"), o = require("./utils/auth.js"), a = require("./utils/request.js"), e = require("./utils/common.js"), ut = require("./utils/util.js"); |
2 | 2 | var os = t; |
3 | 3 | var regeneratorRuntime = require('./utils/runtime.js'); |
4 | -var api = require("./api/api.js") | |
4 | +var api = require("./api/api.js"); | |
5 | + | |
6 | +var wxlog = require("./utils/wxlog.js"); | |
7 | + | |
5 | 8 | |
6 | 9 | //公共方法和变量 |
7 | 10 | App({ |
... | ... | @@ -146,7 +149,7 @@ App({ |
146 | 149 | // }) |
147 | 150 | // } |
148 | 151 | // if(app.globalData.user_id){ //-- 启用默认的user_id -- |
149 | - // | |
152 | + | |
150 | 153 | // app.promiseGet("/api/weshop/users/get/" + app.globalData.setting.stoid + "/" + app.globalData.user_id,{}).then(res=>{ |
151 | 154 | // app.globalData.is_get_login=1; |
152 | 155 | // if(res.data.code==0){ |
... | ... | @@ -154,6 +157,13 @@ App({ |
154 | 157 | // wx.setStorageSync("userinfo",app.globalData.userInfo); |
155 | 158 | // //刷一下导购 |
156 | 159 | // app.promiseGet("/api/weshop/users/getAndUpdateUser/" +app.globalData.setting.stoid + "/" + app.globalData.user_id, {}) |
160 | + // //调用接口判断是不是会员 | |
161 | + // app.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + res.data.data.user_id, {}).then(rs => { | |
162 | + // if (rs.data.code == 0) { | |
163 | + // app.globalData.guide_id = rs.data.data.id; | |
164 | + // app.globalData.guide_pick_id = rs.data.data.pickup_id | |
165 | + // } | |
166 | + // }) | |
157 | 167 | // } |
158 | 168 | // }) |
159 | 169 | // } |
... | ... | @@ -191,8 +201,19 @@ App({ |
191 | 201 | //调用接口判断是不是会员 |
192 | 202 | app.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + e.data.data.user_id, {}).then(res => { |
193 | 203 | if (res.data.code == 0) { |
204 | + | |
205 | + | |
206 | + ut.m_toast('获取到导购:'+res.data.data.id) | |
207 | + | |
194 | 208 | app.globalData.guide_id = res.data.data.id; |
195 | - app.globalData.guide_pick_id = res.data.data.pickup_id | |
209 | + app.globalData.guide_pick_id = res.data.data.pickup_id; | |
210 | + | |
211 | + setTimeout(()=>{ | |
212 | + | |
213 | + ut.m_toast('globalData中导购id:'+app.globalData.guide_id) | |
214 | + },1200) | |
215 | + | |
216 | + | |
196 | 217 | } |
197 | 218 | }) |
198 | 219 | |
... | ... | @@ -204,9 +225,9 @@ App({ |
204 | 225 | } |
205 | 226 | }) |
206 | 227 | //} |
207 | - | |
208 | 228 | |
209 | 229 | } |
230 | + | |
210 | 231 | wx.getSystemInfo({ |
211 | 232 | success: (res) => { |
212 | 233 | // console.log(res) | ... | ... |
packageA/pages/checkin/checkin.js
... | ... | @@ -251,7 +251,7 @@ Page({ |
251 | 251 | if(this.data.td_cked) return false; |
252 | 252 | if(this.data.cking) return false; |
253 | 253 | this.setData({cking:1}); |
254 | - | |
254 | + | |
255 | 255 | const self = this; |
256 | 256 | getApp().request.get("/api/weshop/users/getServerTime", { |
257 | 257 | success: function (res) { |
... | ... | @@ -316,6 +316,11 @@ Page({ |
316 | 316 | }); |
317 | 317 | } else { |
318 | 318 | getApp().showWarning(res2.data.msg); |
319 | + setTimeout(()=>{ | |
320 | + wx.reLaunch({ | |
321 | + url: '/packageA/pages/checkin/checkin', | |
322 | + }) | |
323 | + },2000) | |
319 | 324 | } |
320 | 325 | |
321 | 326 | |
... | ... | @@ -330,6 +335,11 @@ Page({ |
330 | 335 | } else { |
331 | 336 | self.setData({cking:0}); |
332 | 337 | getApp().showWarning(res.data.msg); |
338 | + setTimeout(()=>{ | |
339 | + wx.reLaunch({ | |
340 | + url: '/packageA/pages/checkin/checkin', | |
341 | + }) | |
342 | + },2000) | |
333 | 343 | } |
334 | 344 | } |
335 | 345 | }) |
... | ... | @@ -391,6 +401,11 @@ Page({ |
391 | 401 | }); |
392 | 402 | } else { |
393 | 403 | getApp().showWarning(res.data.msg); |
404 | + setTimeout(()=>{ | |
405 | + wx.reLaunch({ | |
406 | + url: '/packageA/pages/checkin/checkin', | |
407 | + }) | |
408 | + },2000) | |
394 | 409 | } |
395 | 410 | |
396 | 411 | }) | ... | ... |
pages/goods/goodsInfo/goodsInfo.js
... | ... | @@ -1821,6 +1821,10 @@ Page({ |
1821 | 1821 | newd.prom_id = 0; |
1822 | 1822 | } |
1823 | 1823 | |
1824 | + | |
1825 | + | |
1826 | + ut.m_toast('商品详情,购买globalData中导购id:'+getApp().globalData.guide_id ); | |
1827 | + | |
1824 | 1828 | //---是不是从收藏夹出来的--- |
1825 | 1829 | if (th.data.c_guide_id) { |
1826 | 1830 | newd['guide_id'] = th.data.c_guide_id; | ... | ... |