|
@@ -120,7 +120,8 @@
|
|
scrollTop: 0,
|
|
scrollTop: 0,
|
|
count: 1,
|
|
count: 1,
|
|
dataDel: {},
|
|
dataDel: {},
|
|
- toList: []
|
|
|
|
|
|
+ toList: [],
|
|
|
|
+ selel: false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
@@ -232,11 +233,13 @@
|
|
},
|
|
},
|
|
//根据skuid获取选择商品信息
|
|
//根据skuid获取选择商品信息
|
|
async seChanged(e) {
|
|
async seChanged(e) {
|
|
- // console.log('==================3e', e)
|
|
|
|
|
|
+
|
|
|
|
+ console.log('==================3e', e)
|
|
this.specValue = e.item
|
|
this.specValue = e.item
|
|
this.count = e.count
|
|
this.count = e.count
|
|
const res = await this.$request('get', `/item/sku/queryItem/${e.id}`)
|
|
const res = await this.$request('get', `/item/sku/queryItem/${e.id}`)
|
|
this.detailMsg = res.data
|
|
this.detailMsg = res.data
|
|
|
|
+ this.selel = true
|
|
console.log('this.detailMsg', this.detailMsg)
|
|
console.log('this.detailMsg', this.detailMsg)
|
|
},
|
|
},
|
|
totalPrice() {
|
|
totalPrice() {
|
|
@@ -268,15 +271,26 @@
|
|
},
|
|
},
|
|
// 去购买
|
|
// 去购买
|
|
toBuy() {
|
|
toBuy() {
|
|
- this.totalPrice()
|
|
|
|
- const carlist = {
|
|
|
|
- carlist: this.toList,
|
|
|
|
- total: this.total
|
|
|
|
|
|
+ console.log('this.detailMsg', this.detailMsg)
|
|
|
|
+ if (this.selel == true) {
|
|
|
|
+ this.totalPrice()
|
|
|
|
+ const carlist = {
|
|
|
|
+ carlist: this.toList,
|
|
|
|
+ total: this.total
|
|
|
|
+ }
|
|
|
|
+ console.log('carlist', carlist)
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: `/pages/order/submitOrder/submitOrder?data=${encodeURIComponent(JSON.stringify(carlist))}`
|
|
|
|
+ })
|
|
|
|
+ this.toList = []
|
|
|
|
+ } else {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '请选择规格',
|
|
|
|
+ icon: 'error',
|
|
|
|
+ duration: 2000
|
|
|
|
+ });
|
|
|
|
+
|
|
}
|
|
}
|
|
- uni.navigateTo({
|
|
|
|
- url: `/pages/order/submitOrder/submitOrder?data=${encodeURIComponent(JSON.stringify(carlist))}`
|
|
|
|
- })
|
|
|
|
- this.toList = []
|
|
|
|
// uni.navigateTo({
|
|
// uni.navigateTo({
|
|
// url: `/pages/order/submitOrder/submitOrder`
|
|
// url: `/pages/order/submitOrder/submitOrder`
|
|
// })
|
|
// })
|