confirm_order loading
parent
b9437e26e0
commit
3cb4dc104c
|
|
@ -179,7 +179,13 @@
|
|||
addressId: '',
|
||||
couponId: '',
|
||||
goodsList: [],
|
||||
orderInfo: {},
|
||||
orderInfo: {
|
||||
products_total_amount: '',
|
||||
shipping_fee: '',
|
||||
coupon_discount_amount: '',
|
||||
vip_discount_amount: '',
|
||||
total_amount: '',
|
||||
},
|
||||
addressList: [],
|
||||
remarks: '',
|
||||
tempCouponId: '',
|
||||
|
|
@ -194,7 +200,7 @@
|
|||
mid: '',
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
async onLoad(options) {
|
||||
let data = {}
|
||||
if (options.data) {
|
||||
data = JSON.parse(decodeURIComponent(options.data));
|
||||
|
|
@ -206,7 +212,8 @@
|
|||
else if (options.store_cart) {
|
||||
// 桌号 id
|
||||
let desk = uni.getStorageSync('desk')
|
||||
this.$api.get(`/v1/store/desk/${desk}`).then(res => {
|
||||
uni.showLoading()
|
||||
let res = await this.$api.get(`/v1/store/desk/${desk}`)
|
||||
this.desk = res
|
||||
this.type = 'desk'
|
||||
this.remarks = '桌号:' + this.desk.name
|
||||
|
|
@ -214,7 +221,7 @@
|
|||
this.mid = options.mid
|
||||
// 购物车商品 id
|
||||
let ids = options.store_cart.split(',').map(value => parseInt(value))
|
||||
this.$store.dispatch('storeCart/getCart').then(res => {
|
||||
res = await this.$store.dispatch('storeCart/getCart')
|
||||
const goods = res.filter(item => ids.indexOf(item.id) >= 0)
|
||||
this.goods = goods.map(item => {
|
||||
return {
|
||||
|
|
@ -223,8 +230,7 @@
|
|||
}
|
||||
})
|
||||
this.getDetail()
|
||||
})
|
||||
})
|
||||
uni.hideLoading()
|
||||
} else {
|
||||
this.type = data.type;
|
||||
this.goods = data?.goods ?? [];
|
||||
|
|
|
|||
Loading…
Reference in New Issue