|
@@ -35,6 +35,7 @@ Page({
|
|
|
"id": "20221223165503",
|
|
|
content
|
|
|
}).then(res => {
|
|
|
+ wx.hideLoading();
|
|
|
console.log("商品详情", res)
|
|
|
if (res.msg != '成功') return wx.showToast({
|
|
|
title: res.msg,
|
|
@@ -53,16 +54,14 @@ Page({
|
|
|
res.data.item[0].gradeprice = CNY(res.data.item[0].gradeprice);
|
|
|
res.data.item[0].marketprice = CNY(res.data.item[0].marketprice);
|
|
|
this.setData({
|
|
|
+ content,
|
|
|
detail: res.data.item[0],
|
|
|
- content: Object.assign(this.data.content, res.data.rows[0]),
|
|
|
- loading: false
|
|
|
- });
|
|
|
- if (init) this.setData({
|
|
|
specRows: res.data.specRows,
|
|
|
cheekRows: res.data.cheekRows,
|
|
|
materialRows: res.data.materialRows,
|
|
|
colorRows: res.data.colorRows,
|
|
|
- })
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
})
|
|
|
},
|
|
|
/* 预览媒体 */
|
|
@@ -120,8 +119,12 @@ Page({
|
|
|
valuename
|
|
|
} = e.currentTarget.dataset,
|
|
|
content = this.data.content;
|
|
|
- if (content[valuename] == value) return;
|
|
|
- content[valuename] = value;
|
|
|
+ if (!value.flag) return;
|
|
|
+ wx.showLoading({
|
|
|
+ title: '加载中...',
|
|
|
+ mask: true
|
|
|
+ })
|
|
|
+ content[valuename] = (content[valuename] == value.parm) ? "" : value.parm;
|
|
|
this.getDetail()
|
|
|
},
|
|
|
clickBut() {
|