|
|
@@ -180,11 +180,7 @@
|
|
|
<view class="module-com">
|
|
|
<view class="commodity-view">
|
|
|
<view class="commodity-list">
|
|
|
- <view
|
|
|
- class="commodity-item"
|
|
|
- v-for="(item, index) in selectList"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
+ <view class="commodity-item" v-for="(item, index) in list" :key="index">
|
|
|
<image class="item-icon" :src="item.cover" alt="商品图" />
|
|
|
|
|
|
<view class="item-info">
|
|
|
@@ -201,9 +197,7 @@
|
|
|
<view class="info-line">
|
|
|
<text class="item-type">{{ item.rank }}级</text>
|
|
|
<text class="item-count">
|
|
|
- <text v-if="item.bigCount > 0 || item.smallCount > 0">{{
|
|
|
- `${item.bigCount}`
|
|
|
- }}</text>
|
|
|
+ <text v-if="item.bigCount > 0 || item.smallCount > 0">{{`${item.bigCount}`}}</text>
|
|
|
<text v-if="item.smallCount > 0">/</text>
|
|
|
<text v-if="item.smallCount > 0">{{ `${item.smallCount}` }}</text>
|
|
|
</text>
|
|
|
@@ -217,9 +211,9 @@
|
|
|
重选花材
|
|
|
</view>
|
|
|
<view class="describe-view">
|
|
|
- 共{{ allCount.bigLength }}/{{ allCount.smallLength }}种,
|
|
|
+ 共{{ allCountFun.bigLength }}/{{ allCountFun.smallLength }}种,
|
|
|
<!-- 共16扎9支, -->
|
|
|
- 合计 ¥<text class="price">{{ allPrice }}</text>
|
|
|
+ 合计 ¥<text class="price">{{ allPriceFun }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -301,6 +295,7 @@ export default {
|
|
|
mixins: [productMins],
|
|
|
data() {
|
|
|
return {
|
|
|
+ list:[],
|
|
|
autoLoad: false,
|
|
|
ghsMsg:'',
|
|
|
sendTime:'',
|
|
|
@@ -347,6 +342,26 @@ export default {
|
|
|
this.getGhsData(e.id);
|
|
|
},
|
|
|
onShow() {
|
|
|
+ console.log(this.selectList,'selectList')
|
|
|
+ let selectList = this.$util.copyObject(this.selectList);
|
|
|
+ let list = [];
|
|
|
+ for (let i=0;i<selectList.length;i++){
|
|
|
+ if(list==''){
|
|
|
+ list.push(selectList[i])
|
|
|
+ }else{
|
|
|
+ list.forEach(res=>{
|
|
|
+ if(res.id==selectList[i].id){
|
|
|
+ res.bigCount = (res.bigCount+selectList[i].bigCount)
|
|
|
+ res.smallCount = (res.smallCount+selectList[i].smallCount)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.selectList.map(ele=>{
|
|
|
+
|
|
|
+ })
|
|
|
+ this.list = list;
|
|
|
+ console.log(list,'list')
|
|
|
if(uni.getStorageSync('selectCouponInfo').couponSum) {
|
|
|
this.couponSumText = uni.getStorageSync('selectCouponInfo').couponSum
|
|
|
this.couponText = '-¥' + this.couponSumText
|
|
|
@@ -450,7 +465,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
affirmFormSubmit(){
|
|
|
- const product = this.selectList.map(ele => {
|
|
|
+ const product = this.list.map(ele => {
|
|
|
return { productId: ele.id, bigNum: ele.bigCount, smallNum: ele.smallCount,classId:ele.classId,itemId:ele.itemId };
|
|
|
});
|
|
|
let parameter = {
|