优化问题

This commit is contained in:
duan
2024-06-05 15:47:04 +08:00
parent bdd5a6a325
commit ba106d1f96
8 changed files with 48 additions and 25 deletions

View File

@@ -220,6 +220,7 @@
},
onLoad(e) {
// console.log(e, 140)
this.$store.dispatch("set_shopid"); //获取shapid
let res = JSON.parse(e.tableId)
this.listinfo.detailList = res
this.listinfo.amount = e.amount // 算完了的价格
@@ -266,10 +267,9 @@
}
},
async getAount() {
console.log(uni.cache.get('userInfo'), '余额中userId不显示打印')
let res = await this.api.shopUserInfo({
// shopId:店铺ID
"shopId": uni.cache.get('shopUser'),
"shopId": this.$store.state.shopId,
"userId": uni.cache.get('userInfo').id,
})
if (res.code == 0) {
@@ -342,7 +342,7 @@
"isYhq": this.emitorderfoodform.id ? 1 : 0, // 是否使用优惠券( 1 使用, 0 不使用),
"isBuyYhq": this.emitorderfoodform.clickiconone == 1 ? 1 : 0, // 是否购买优惠券( 1 购买, 0 不够买)
"productId": '', //商品id
"shopId": uni.cache.get('shopUser'),
"shopId": this.$store.state.shopId,
"userId": uni.cache.get('userInfo').id,
// tableId:uni.cache.get('tableCode')
}
@@ -365,7 +365,7 @@
"isYhq": this.emitorderfoodform.id ? 1 : 0, // 是否使用优惠券( 1 使用, 0 不使用),
"isBuyYhq": this.emitorderfoodform.clickiconone == 1 ? 1 : 0, // 是否购买优惠券( 1 购买, 0 不够买)
"productId": '', //商品id
"shopId": uni.cache.get('shopUser'),
"shopId": this.$store.state.shopId,
"userId": uni.cache.get('userInfo').id,
// tableId:uni.cache.get('tableCode')
}

View File

@@ -234,13 +234,15 @@
this.ispws = false
},
onLoad(e) {
this.listinfo = JSON.parse(e.tablelist)
// 获取余额
this.getAount()
// this.getAount()
// 获取用户信息,判断是否设置支付密码
this.getuserinfo()
},
onShow() {
// this.$store.dispatch("set_shopid"); //获取shapid
this.getAount()
this.getuserinfo()
},
@@ -267,10 +269,9 @@
}
},
async getAount() {
console.log(uni.cache.get('userInfo'), '余额中userId不显示打印')
let res = await this.api.shopUserInfo({
// shopId:店铺ID
"shopId": uni.cache.get('shopUser'),
"shopId": this.$store.state.shopId,
"userId": uni.cache.get('userInfo').id,
})
if (res.code == 0) {
@@ -343,7 +344,7 @@
"isYhq": this.emitorderfoodform.id ? 1 : 0, // 是否使用优惠券( 1 使用, 0 不使用),
"isBuyYhq": this.emitorderfoodform.clickiconone == 1 ? 1 : 0, // 是否购买优惠券( 1 购买, 0 不够买)
"productId": '', //商品id
"shopId": uni.cache.get('shopUser'),
"shopId": this.$store.state.shopId,
"userId": uni.cache.get('userInfo').id,
// tableId:uni.cache.get('tableCode')
}
@@ -366,7 +367,7 @@
"isYhq": this.emitorderfoodform.id ? 1 : 0, // 是否使用优惠券( 1 使用, 0 不使用),
"isBuyYhq": this.emitorderfoodform.clickiconone == 1 ? 1 : 0, // 是否购买优惠券( 1 购买, 0 不够买)
"productId": '', //商品id
"shopId": uni.cache.get('shopUser'),
"shopId": this.$store.state.shopId,
"userId": uni.cache.get('userInfo').id,
// tableId:uni.cache.get('tableCode')
}