|
@@ -336,6 +336,11 @@ export default {
|
|
|
console.log('花材列表',list)
|
|
console.log('花材列表',list)
|
|
|
|
|
|
|
|
this.setSelectInfoByType({ type: this.pageType, info: list });
|
|
this.setSelectInfoByType({ type: this.pageType, info: list });
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ //记忆已经选择的花材
|
|
|
|
|
+ uni.setStorageSync('selectList'+this.pageType, this.selectList)
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
addCustomNumEvent(item,params1,type) {
|
|
addCustomNumEvent(item,params1,type) {
|
|
@@ -369,6 +374,10 @@ export default {
|
|
|
this.$nextTick(()=>{
|
|
this.$nextTick(()=>{
|
|
|
this.customNum(params1)
|
|
this.customNum(params1)
|
|
|
})
|
|
})
|
|
|
|
|
+
|
|
|
|
|
+ //记忆已经选择的花材
|
|
|
|
|
+ uni.setStorageSync('selectList'+this.pageType, this.selectList)
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 减去商品
|
|
* 减去商品
|
|
@@ -401,10 +410,14 @@ export default {
|
|
|
array[index].userPrice = ((product.bigCount*ratio + product.smallCount)*smallUnitPrice).toFixed(2)
|
|
array[index].userPrice = ((product.bigCount*ratio + product.smallCount)*smallUnitPrice).toFixed(2)
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- console.log('花材列表',list)
|
|
|
|
|
|
|
+
|
|
|
this.setSelectInfoByType({ type: this.pageType, info: list });
|
|
this.setSelectInfoByType({ type: this.pageType, info: list });
|
|
|
|
|
+
|
|
|
|
|
+ //记忆已经选择的花材
|
|
|
|
|
+ uni.setStorageSync('selectList'+this.pageType, this.selectList)
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
- //减去所有商品
|
|
|
|
|
|
|
+ //减去某个花材的数量,不是全部花材的意思 shish 20210803(方法名用All需要优化)
|
|
|
delAllEvent(item) {
|
|
delAllEvent(item) {
|
|
|
let list = this.selectList;
|
|
let list = this.selectList;
|
|
|
console.log('需要减少的花材信息',item)
|
|
console.log('需要减少的花材信息',item)
|
|
@@ -424,6 +437,10 @@ export default {
|
|
|
this.setSelectInfoByType({ type: this.pageType, info: list });
|
|
this.setSelectInfoByType({ type: this.pageType, info: list });
|
|
|
}
|
|
}
|
|
|
console.log('this.selectList','减少花材之后:',this.selectList)
|
|
console.log('this.selectList','减少花材之后:',this.selectList)
|
|
|
|
|
+
|
|
|
|
|
+ //记忆已经选择的花材
|
|
|
|
|
+ uni.setStorageSync('selectList'+this.pageType, this.selectList)
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 更新商品
|
|
* 更新商品
|
|
@@ -470,7 +487,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
//清除已记忆花材
|
|
//清除已记忆花材
|
|
|
removeMemory(){
|
|
removeMemory(){
|
|
|
- uni.removeStorageSync('selectList');
|
|
|
|
|
|
|
+ uni.removeStorageSync('selectList'+this.pageType);
|
|
|
this.resetSelectInfoByType(this.pageType);
|
|
this.resetSelectInfoByType(this.pageType);
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|