版本提交
Showing
4 changed files
with
19 additions
and
10 deletions
... | @@ -17,7 +17,7 @@ | ... | @@ -17,7 +17,7 @@ |
17 | <view wx:if="{{wishList[1]}}" class="row row2"> | 17 | <view wx:if="{{wishList[1]}}" class="row row2"> |
18 | <view class="wish-item "> | 18 | <view class="wish-item "> |
19 | <view class="desc"> | 19 | <view class="desc"> |
20 | <view class="name">{{wishList[1].productName}}</view> | 20 | <view class="name">{{wishList[1].productName}}</view> |
21 | <view class="val">需弹力值:{{wishList[1].conditionElasticValue}}</view> | 21 | <view class="val">需弹力值:{{wishList[1].conditionElasticValue}}</view> |
22 | </view> | 22 | </view> |
23 | <view class="prod"> | 23 | <view class="prod"> |
... | @@ -26,7 +26,7 @@ | ... | @@ -26,7 +26,7 @@ |
26 | </view> | 26 | </view> |
27 | </view> | 27 | </view> |
28 | <view wx:if="{{wishList[2]}}" class="row"> | 28 | <view wx:if="{{wishList[2]}}" class="row"> |
29 | <view class="wish-item"> | 29 | <view class="wish-item"> |
30 | <view class="prod"> | 30 | <view class="prod"> |
31 | <image mode="widthFix" src="../../image/prize/prize-{{wishList[2].tag}}.png" /> | 31 | <image mode="widthFix" src="../../image/prize/prize-{{wishList[2].tag}}.png" /> |
32 | </view> | 32 | </view> |
... | @@ -40,7 +40,7 @@ | ... | @@ -40,7 +40,7 @@ |
40 | <view class="wish-val"> | 40 | <view class="wish-val"> |
41 | <image class="icon" mode="widthFix" src="../../image/oss/question/question-light.png" /> | 41 | <image class="icon" mode="widthFix" src="../../image/oss/question/question-light.png" /> |
42 | 累计心愿单所需弹力值: | 42 | 累计心愿单所需弹力值: |
43 | <span class="val">2500</span> | 43 | <span class="val">{{eleVal}}</span> |
44 | </view> | 44 | </view> |
45 | </view> | 45 | </view> |
46 | <view class="btn-wrap"> | 46 | <view class="btn-wrap"> | ... | ... |
... | @@ -21,7 +21,7 @@ Page({ | ... | @@ -21,7 +21,7 @@ Page({ |
21 | curStatus: 1, // 当前场景 | 21 | curStatus: 1, // 当前场景 |
22 | candidate: [], // 心愿候选列表 | 22 | candidate: [], // 心愿候选列表 |
23 | myWishList: [], // 我的心愿列表 | 23 | myWishList: [], // 我的心愿列表 |
24 | valTotal:0, // 心愿单累计需要弹力值 | 24 | valElasticTotal: 0, // 心愿单累计需要弹力值 |
25 | curWish: {}, // 当前选择心愿 | 25 | curWish: {}, // 当前选择心愿 |
26 | userInfo: {} | 26 | userInfo: {} |
27 | }, | 27 | }, |
... | @@ -108,12 +108,17 @@ Page({ | ... | @@ -108,12 +108,17 @@ Page({ |
108 | */ | 108 | */ |
109 | onSubmitHandler() { | 109 | onSubmitHandler() { |
110 | this.checkSubmit().then((result) => { | 110 | this.checkSubmit().then((result) => { |
111 | let valTotal = 0; | 111 | let myWishList = this.data.myWishList; |
112 | 112 | let valElasticTotal = 0; | |
113 | myWishList.forEach(element => { | ||
114 | valElasticTotal += element.conditionElasticValue | ||
115 | }); | ||
116 | |||
113 | this.setData({ | 117 | this.setData({ |
114 | tipsWishVisible: true | 118 | tipsWishVisible: true, |
119 | valElasticTotal: valElasticTotal | ||
115 | }) | 120 | }) |
116 | console.log("wish:",this.data.myWishList); | 121 | console.log("wish:", this.data.myWishList); |
117 | }).catch((err) => {});; | 122 | }).catch((err) => {});; |
118 | }, | 123 | }, |
119 | // billCode | 124 | // billCode | ... | ... |
... | @@ -65,7 +65,7 @@ | ... | @@ -65,7 +65,7 @@ |
65 | <tips-new-comp bind:evtcomp="evtcomp" user-info="{{userInfo}}"></tips-new-comp> | 65 | <tips-new-comp bind:evtcomp="evtcomp" user-info="{{userInfo}}"></tips-new-comp> |
66 | </van-popup> | 66 | </van-popup> |
67 | <van-popup show="{{ tipsWishVisible }}"> | 67 | <van-popup show="{{ tipsWishVisible }}"> |
68 | <tips-wish-comp bind:evtcomp="evtcomp" wish-list="{{myWishList}}"></tips-wish-comp> | 68 | <tips-wish-comp bind:evtcomp="evtcomp" wish-list="{{myWishList}}" ele-val="{{valElasticTotal}}"></tips-wish-comp> |
69 | </van-popup> | 69 | </van-popup> |
70 | <van-popup show="{{ tipsShakeVisible }}"> | 70 | <van-popup show="{{ tipsShakeVisible }}"> |
71 | <tips-shake-comp bind:evtcomp="evtcomp"></tips-shake-comp> | 71 | <tips-shake-comp bind:evtcomp="evtcomp"></tips-shake-comp> | ... | ... |
-
Please register or sign in to post a comment