自动登录

main
yangsai 4 months ago
parent 7d982b25f1
commit 1eaf229d43
  1. 3
      pages/goods_cate/goods_cate.vue
  2. 10
      pages/goods_cate/template/template3.vue
  3. 1
      pages/user/index.vue

@ -73,6 +73,7 @@
index: 3 index: 3
}) })
} }
if (this.isLogin) {
setTimeout((res)=>{ setTimeout((res)=>{
if(this.showTemplateTwo){ if(this.showTemplateTwo){
this.$refs.classTwo.getCartNum() this.$refs.classTwo.getCartNum()
@ -80,6 +81,8 @@
this.$refs.classThree.getCartNum() this.$refs.classThree.getCartNum()
} }
},100) },100)
}
}, },
data() { data() {
return { return {

@ -344,6 +344,7 @@
topNavShow: true, topNavShow: true,
selectSku: {}, selectSku: {},
skuArr: [], skuArr: [],
store_id:0,
getHeight: this.$util.getWXStatusHeight(), getHeight: this.$util.getWXStatusHeight(),
footerOpen: true footerOpen: true
} }
@ -361,13 +362,16 @@
}), }),
...mapGetters(['isLogin', 'uid', 'cartNum']), ...mapGetters(['isLogin', 'uid', 'cartNum']),
}, },
mounted() { mounted() {
this.getUserInfo() this.store_id=uni.getStorageSync('mendianstore_id')
this.getAllCategory(); this.getAllCategory();
setTimeout(() => { setTimeout(() => {
this.getScrollHeight(); this.getScrollHeight();
}, 500) }, 500)
if (this.isLogin) { if (this.isLogin) {
this.getUserInfo()
this.getCartList(1); this.getCartList(1);
} }
uni.$off('newAttrNum'); uni.$off('newAttrNum');
@ -458,7 +462,9 @@
type: 1, type: 1,
cid: that.cid, cid: that.cid,
sid: that.sid, sid: that.sid,
tid: that.tid tid: that.tid,
store_id:that.store_id,
relation_id:that.store_id,
}).then(res => { }).then(res => {
let list = res.data, let list = res.data,
loadend = list.length < that.limit; loadend = list.length < that.limit;

@ -238,7 +238,6 @@ export default {
onShow() { onShow() {
if (!this.isLogin) { if (!this.isLogin) {
this.userInfo = ''; this.userInfo = '';
toLogin();
return; return;
} }
if (this.cartNum > 0) { if (this.cartNum > 0) {

Loading…
Cancel
Save