支付宝优化
This commit is contained in:
@@ -374,6 +374,7 @@
|
||||
shopExtend: null,
|
||||
shopId: "",
|
||||
tableCode: "",
|
||||
orderAMeal: true,
|
||||
}
|
||||
},
|
||||
onPageScroll(e) {
|
||||
@@ -402,16 +403,24 @@
|
||||
this.$store.getters.is_BarHeight.customBar)
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
if (e.q) {
|
||||
this.tableCode = this.getQueryString(decodeURIComponent(e.q), 'code')
|
||||
onLoad(options) {
|
||||
// #ifdef MP-WEIXIN
|
||||
if (options.q) {
|
||||
this.tableCode = this.getQueryString(decodeURIComponent(options.q), 'code')
|
||||
uni.cache.set('tableCode', this.tableCode)
|
||||
}
|
||||
if ( e.shopId ) {
|
||||
this.shopId = e.shopId
|
||||
// #endif
|
||||
// #ifdef MP-ALIPAY
|
||||
if (getApp().globalData.tableCode) {
|
||||
this.tableCode = getApp().globalData.tableCode
|
||||
uni.cache.set('tableCode', this.tableCode)
|
||||
}
|
||||
if ( e.tableCode ) {
|
||||
this.tableCode = e.tableCode
|
||||
// #endif
|
||||
if ( options.shopId ) {
|
||||
this.shopId = options.shopId
|
||||
}
|
||||
if ( options.tableCode ) {
|
||||
this.tableCode = options.tableCode
|
||||
}
|
||||
},
|
||||
|
||||
@@ -431,7 +440,9 @@
|
||||
},
|
||||
async onShow() {
|
||||
let _this = this;
|
||||
|
||||
if (!this.orderAMeal){
|
||||
uni.pro.switchTab('index/index')
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
uni.pageScrollTo({
|
||||
scrollTop: 0,
|
||||
@@ -539,7 +550,8 @@
|
||||
if (this.shopId) {params.shopId = this.shopId}
|
||||
let res = await this.api.productqueryShop(params)
|
||||
if (res.code == 0) {
|
||||
if ( res.data.shopTableInfo && !res.data.shopTableInfo.choseCount) {
|
||||
if ( res.data.shopTableInfo && !res.data.shopTableInfo.choseCount&&this.orderAMeal) {
|
||||
this.orderAMeal = false;
|
||||
uni.pro.navigateTo('/pagesOrder/orderAMeal/index', {
|
||||
tableCode: this.tableCode,
|
||||
shopId: res.data.storeInfo.id,
|
||||
|
||||
Reference in New Issue
Block a user