自动登录

main
yangsai 1 month ago
parent 7d982b25f1
commit 1eaf229d43
  1. 17
      pages/goods_cate/goods_cate.vue
  2. 12
      pages/goods_cate/template/template3.vue
  3. 1
      pages/user/index.vue

@ -73,13 +73,16 @@
index: 3
})
}
setTimeout((res)=>{
if(this.showTemplateTwo){
this.$refs.classTwo.getCartNum()
}else if(this.showTemplateThree){
this.$refs.classThree.getCartNum()
}
},100)
if (this.isLogin) {
setTimeout((res)=>{
if(this.showTemplateTwo){
this.$refs.classTwo.getCartNum()
}else if(this.showTemplateThree){
this.$refs.classThree.getCartNum()
}
},100)
}
},
data() {
return {

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

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

Loading…
Cancel
Save