版本提交
Showing
4 changed files
with
16 additions
and
7 deletions
| ... | @@ -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 | let valElasticTotal = 0; | ||
| 113 | myWishList.forEach(element => { | ||
| 114 | valElasticTotal += element.conditionElasticValue | ||
| 115 | }); | ||
| 112 | 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