自动登录

main
yangsai 4 months 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 index: 3
}) })
} }
setTimeout((res)=>{ if (this.isLogin) {
if(this.showTemplateTwo){ setTimeout((res)=>{
this.$refs.classTwo.getCartNum() if(this.showTemplateTwo){
}else if(this.showTemplateThree){ this.$refs.classTwo.getCartNum()
this.$refs.classThree.getCartNum() }else if(this.showTemplateThree){
} 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');
@ -406,7 +410,7 @@
}) })
}, },
methods: { methods: {
openCart() { openCart() {
if (this.footerOpen) { if (this.footerOpen) {
this.getCartList(0) this.getCartList(0)
@ -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