|
@@ -31,7 +31,8 @@ Page({
|
|
|
spec: ""
|
|
|
},
|
|
|
privacyFieldC: [],
|
|
|
- isShowFavorites: false
|
|
|
+ isShowFavorites: false,
|
|
|
+ UniqueLine: false
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
let data = JSON.parse(options.params);
|
|
@@ -56,6 +57,7 @@ Page({
|
|
|
getDetail(init = false, getCustom = true) {
|
|
|
let content = this.data.content;
|
|
|
if (sys_enterpriseid) content.sys_enterpriseid = sys_enterpriseid;
|
|
|
+ if (this.data.UniqueLine)['spec', 'cheek', 'material', 'color'].forEach(key => content[key] = '')
|
|
|
_Http.basic({
|
|
|
"id": "20221223165503",
|
|
|
content
|
|
@@ -88,11 +90,14 @@ Page({
|
|
|
};
|
|
|
|
|
|
let obj = {},
|
|
|
- auto = true;
|
|
|
+ auto = true,
|
|
|
+ UniqueLine = true;
|
|
|
['spec', 'cheek', 'material', 'color'].forEach(key => obj[key] = ros[key + 'Rows'].filter(v => v.flag))
|
|
|
-
|
|
|
for (const key in obj) {
|
|
|
- if (obj[key].length > 1) auto = false;
|
|
|
+ if (obj[key].length > 1) {
|
|
|
+ auto = false
|
|
|
+ UniqueLine = false;
|
|
|
+ }
|
|
|
}
|
|
|
if (auto) {
|
|
|
for (const key in obj) {
|
|
@@ -105,7 +110,8 @@ Page({
|
|
|
...ros,
|
|
|
loading: false,
|
|
|
itemCount: ['specRows', 'cheekRows', 'materialRows', 'colorRows'].filter(v => res.data[v].length).length,
|
|
|
- selectCount: ['cheek', 'color', 'material', 'spec'].filter(v => content[v].length).length
|
|
|
+ selectCount: ['cheek', 'color', 'material', 'spec'].filter(v => content[v].length).length,
|
|
|
+ UniqueLine
|
|
|
});
|
|
|
//是否定制
|
|
|
if (getCustom && item.iscustomsize == 1) this.selectComponent("#customMade").init(item);
|
|
@@ -170,6 +176,7 @@ Page({
|
|
|
title: '加载中...',
|
|
|
mask: true
|
|
|
})
|
|
|
+ // UniqueLine
|
|
|
content[valuename] = (content[valuename] == value.parm) ? "" : value.parm;
|
|
|
this.setData({
|
|
|
selectCount: ['cheek', 'color', 'material', 'spec'].filter(v => content[v].length).length
|
|
@@ -320,7 +327,7 @@ Page({
|
|
|
}
|
|
|
//是否为定制项
|
|
|
if (detail.iscustomsize == 1) custom = this.selectComponent("#customMade").getResult(true);
|
|
|
- console.log("custom",custom)
|
|
|
+ console.log("custom", custom)
|
|
|
if (typeof custom == "boolean") return;
|
|
|
content.items = [Object.assign({
|
|
|
sa_orderitemsid: 0,
|