|
|
|
@ -98,9 +98,9 @@ Page({ |
|
|
|
info: res.data |
|
|
|
}) |
|
|
|
var arr = [] |
|
|
|
console.log(this.data.info); |
|
|
|
res.data.product.forEach(item => { |
|
|
|
res.data.product.forEach((item,index) => { |
|
|
|
item.sku.forEach(itemB=>{ |
|
|
|
itemB.proIndex = index |
|
|
|
arr.push(itemB) |
|
|
|
}) |
|
|
|
}); |
|
|
|
@ -269,16 +269,12 @@ Page({ |
|
|
|
app.globalData.retailId = this.data.retailId; |
|
|
|
// let sku = e.currentTarget.dataset.sku,product = e.currentTarget.dataset.product;
|
|
|
|
// let sku = {sku:e.currentTarget.dataset.product.sku[this.data.skuIndex]},product = {product: e.currentTarget.dataset.product}
|
|
|
|
let sku = {sku:this.data.skuList[this.data.skuIndex]},product = {product: e.currentTarget.dataset.product} |
|
|
|
let sku = {sku:this.data.skuList[this.data.skuIndex]},product = {product:this.data.info.product[this.data.skuList[this.data.skuIndex].proIndex]} |
|
|
|
app.globalData.product = {...sku,...product} |
|
|
|
console.log(this.data.skuIndex); |
|
|
|
console.log(app.globalData.product); |
|
|
|
// app.globalData.product = e.currentTarget.dataset;
|
|
|
|
wx.navigateTo({ |
|
|
|
url: '/pages/order/scene/index', |
|
|
|
}) |
|
|
|
}else { |
|
|
|
console.log('111'); |
|
|
|
commonApi.user_post("cart/add_sku", { |
|
|
|
sku_id: this.data.skuList[this.data.skuIndex].id, |
|
|
|
num: this.data.producNum |
|
|
|
@ -372,7 +368,6 @@ Page({ |
|
|
|
}) |
|
|
|
}, |
|
|
|
complete(res) { |
|
|
|
console.log(res); |
|
|
|
/* 这里判断一下如果没有授权重新打开设置选项 */ |
|
|
|
wx.getSetting({ |
|
|
|
success(res) { |
|
|
|
|