|
@@ -245,26 +245,20 @@ Page({
|
|
|
/* 加入收藏夹 */
|
|
|
addToFavorites() {
|
|
|
let detail = this.data.detail,
|
|
|
- content = this.data.content,
|
|
|
- iscollection = this.data.detail.iscollection == 1 ? false : true
|
|
|
-
|
|
|
- if (iscollection && detail.iscustomsize == 1) {
|
|
|
- if (detail.widthschemeid != 0 && content.dwidth == 0) return wx.showToast({
|
|
|
- title: '请完成定制宽选项',
|
|
|
- icon: "none"
|
|
|
- })
|
|
|
- if (detail.lengthschemeid != 0 && content.dlength == 0) return wx.showToast({
|
|
|
- title: '请完成定制长选项',
|
|
|
- icon: "none"
|
|
|
- })
|
|
|
- }
|
|
|
+ iscollection = detail.iscollection == 1 ? false : true,
|
|
|
+ custom = {
|
|
|
+ length: 0,
|
|
|
+ width: 0
|
|
|
+ };
|
|
|
+ //是否为定制项
|
|
|
+ if (detail.iscustomsize == 1) custom = this.selectComponent("#customMade").getResult(true);
|
|
|
+ if (typeof custom == "boolean") return;
|
|
|
_Http.basic({
|
|
|
"id": 20231121143403,
|
|
|
"content": {
|
|
|
"itemid": this.data.detail.itemid, //货品id
|
|
|
"qty": detail.orderminqty, //数量
|
|
|
- width: content.dwidth || 0,
|
|
|
- length: content.dlength || 0,
|
|
|
+ ...custom,
|
|
|
iscollection
|
|
|
},
|
|
|
}).then(res => {
|