Commit 433bc1df6a8a8bc84672aa5e38cc3e91dd2956c1
1 parent
1c966d7f
购买卡券
Showing
2 changed files
with
16 additions
and
6 deletions
pages/businessCard/businessCard.vue
| ... | ... | @@ -112,9 +112,19 @@ export default { |
| 112 | 112 | }) |
| 113 | 113 | }, |
| 114 | 114 | toBuy(i) { |
| 115 | - uni.navigateTo({ | |
| 116 | - url: '../businessCard/buyCard?optionData=' + JSON.stringify(i) | |
| 117 | - }); | |
| 115 | + console.log(i.cardNum) | |
| 116 | + if(i.cardNum==0){ | |
| 117 | + uni.showToast({ | |
| 118 | + title: '暂无卡券库存,无法购买', | |
| 119 | + icon: 'none', | |
| 120 | + duration: 2000 | |
| 121 | + }); | |
| 122 | + }else{ | |
| 123 | + uni.navigateTo({ | |
| 124 | + url: '../businessCard/buyCard?optionData=' + JSON.stringify(i) | |
| 125 | + }); | |
| 126 | + } | |
| 127 | + | |
| 118 | 128 | }, |
| 119 | 129 | printClick(i) { |
| 120 | 130 | uni.navigateTo({ | ... | ... |
pages/businessCard/buyCard.vue
| ... | ... | @@ -173,8 +173,8 @@ export default { |
| 173 | 173 | tobuy() { |
| 174 | 174 | let that = this |
| 175 | 175 | let paramsData = { |
| 176 | - buyNum: this.vModelValue, | |
| 177 | - totalPrice: this.needPay, | |
| 176 | + buyNum: this.vModelValue.toString(), | |
| 177 | + totalPrice: this.needPay.toString(), | |
| 178 | 178 | cardRelParkNo: this.cardRelParkNo, |
| 179 | 179 | cardRuleNo: this.cardRuleNo |
| 180 | 180 | } |
| ... | ... | @@ -195,7 +195,7 @@ export default { |
| 195 | 195 | payType: '35', // '35' 商户余额支付 |
| 196 | 196 | paySrcType: '501', // '101' : 停车付款单, '501': '商户优惠券购买' |
| 197 | 197 | orderId: orderId, |
| 198 | - payFee: this.needPay | |
| 198 | + payFee: this.needPay.toString() | |
| 199 | 199 | } |
| 200 | 200 | // 首页信息获取 接口 |
| 201 | 201 | that.$myRequest({ | ... | ... |