Commit 6fc46e49083a7bf85a74ef871bfa164199e88d8a
1 parent
f47c7ea2
1.要清理定时器, 2. 要计算获取会员信息
Showing
1 changed file
with
14 additions
and
3 deletions
app.js
... | ... | @@ -92,8 +92,15 @@ App({ |
92 | 92 | if(!app.globalData.userInfo){ |
93 | 93 | var user = wx.getStorageSync("userinfo"); |
94 | 94 | if (user && user.user_id){ |
95 | - app.globalData.userInfo=wx.getStorageSync("userinfo"); | |
96 | - app.globalData.user_id= app.globalData.userInfo.user_id; | |
95 | + //--生成会员 -- | |
96 | + app.promiseGet("/api/weshop/users/get/" + user.store_id + "/" + user.user_id,{}).then(res=>{ | |
97 | + if(res.data.code==0){ | |
98 | + user=res.data.data; | |
99 | + app.globalData.userInfo=user; | |
100 | + app.globalData.user_id= user.user_id; | |
101 | + wx.setStorageSync("userinfo",user); | |
102 | + } | |
103 | + }) | |
97 | 104 | } |
98 | 105 | } |
99 | 106 | wx.getSystemInfo({ |
... | ... | @@ -561,7 +568,11 @@ App({ |
561 | 568 | this.globalData.room_id=null; //关闭要把房间号关闭 |
562 | 569 | this.globalData.room_goods_id=null; //关闭要把物流清空 |
563 | 570 | this.globalData.config2=null; //清除config2的缓存 |
564 | - this.globalData.config=null; //清除config的缓存 | |
571 | + this.globalData.config=null; //清除config的缓存 | |
572 | + this.globalData.gr_index=0; //商品分组的序列 | |
573 | + for(var i = 1; i < 50; i++) { | |
574 | + clearInterval(i); | |
575 | + } | |
565 | 576 | }, |
566 | 577 | |
567 | 578 | clear_word:function (word) { | ... | ... |