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