更改防抖 更改购物车
This commit is contained in:
@@ -274,21 +274,21 @@
|
||||
},
|
||||
async onLoad(e) {
|
||||
if (e.q) {
|
||||
this.tableCode = this.getQueryString(decodeURIComponent(e.q), 'code')
|
||||
uni.cache.set('tableCode', this.tableCode)
|
||||
let tableCode = this.getQueryString(decodeURIComponent(e.q), 'code')
|
||||
uni.cache.set('tableCode', tableCode)
|
||||
// this.scanCodehandle()
|
||||
uni.pro.navigateTo('login/login', {
|
||||
type: 0
|
||||
})
|
||||
} else {
|
||||
this.tableCode = uni.cache.get('tableCode')
|
||||
this.productqueryShopIdByTableCode() //获取shop User id
|
||||
}
|
||||
|
||||
if (!uni.cache.get('token') && uni.cache.get('tableCode')) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login?type=' + 0
|
||||
});
|
||||
// uni.pro.navigateTo('login/login', {
|
||||
// type: 0
|
||||
// })
|
||||
}
|
||||
uni.$on('message', this.getMessage)
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.countTitleTopNum();
|
||||
this.countTitleTopNum(); //导航栏
|
||||
});
|
||||
},
|
||||
onUnload() {
|
||||
@@ -296,7 +296,7 @@
|
||||
uni.$off('message')
|
||||
},
|
||||
onShow() {
|
||||
if (uni.cache.get('token')) {
|
||||
if (uni.cache.get('token') && uni.cache.get('tableCode')) {
|
||||
this.productqueryShopIdByTableCode() //获取shop User id
|
||||
}
|
||||
},
|
||||
@@ -429,7 +429,7 @@
|
||||
uni.cache.set('miniAppOpenId', res.data.userInfo
|
||||
.miniAppOpenId)
|
||||
uni.cache.set('userInfo', res.data.userInfo);
|
||||
this.productqueryShopIdByTableCode()//获取shop User id
|
||||
this.productqueryShopIdByTableCode() //获取shop User id
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
@@ -479,7 +479,7 @@
|
||||
},
|
||||
async productqueryProduct() { //list 数据
|
||||
let res = await this.api.productqueryProduct({
|
||||
code:uni.cache.get('tableCode'),
|
||||
code: uni.cache.get('tableCode'),
|
||||
productGroupId: ''
|
||||
})
|
||||
if (res.code == 0) {
|
||||
|
||||
Reference in New Issue
Block a user