|
|
@ -21,14 +21,14 @@ |
|
|
|
{{amount}}元 |
|
|
|
{{amount}}元 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="num"> |
|
|
|
<!-- <view class="num"> |
|
|
|
<view class="text"> |
|
|
|
<view class="text"> |
|
|
|
自定义充值金额 |
|
|
|
自定义充值金额 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="input"> |
|
|
|
<view class="input"> |
|
|
|
<input type="number" maxlength="4" v-model="inputAmount" /> |
|
|
|
<input type="number" maxlength="4" v-model="inputAmount" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> --> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -77,7 +77,7 @@ |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
inputAmount: '', //金额 |
|
|
|
inputAmount: '', //金额 |
|
|
|
amountList: [50, 100, 200], //预设3个可选快捷金额 |
|
|
|
amountList: [50, 100, 150], //预设3个可选快捷金额 |
|
|
|
paytype: 'wxpay', //支付类型 |
|
|
|
paytype: 'wxpay', //支付类型 |
|
|
|
user: "", |
|
|
|
user: "", |
|
|
|
imagewxUrl: app.globalData.imageWxImg, |
|
|
|
imagewxUrl: app.globalData.imageWxImg, |
|
|
@ -105,38 +105,38 @@ |
|
|
|
}); |
|
|
|
}); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (parseFloat(this.inputAmount).toString() == "NaN") { |
|
|
|
// if (parseFloat(this.inputAmount).toString() == "NaN") { |
|
|
|
uni.showToast({ |
|
|
|
// uni.showToast({ |
|
|
|
title: '请输入正确金额', |
|
|
|
// title: '请输入正确金额', |
|
|
|
icon: 'none', |
|
|
|
// icon: 'none', |
|
|
|
duration: 2000 |
|
|
|
// duration: 2000 |
|
|
|
}); |
|
|
|
// }); |
|
|
|
return; |
|
|
|
// return; |
|
|
|
} |
|
|
|
// } |
|
|
|
if (this.inputAmount <= 0) { |
|
|
|
// if (this.inputAmount <= 0) { |
|
|
|
uni.showToast({ |
|
|
|
// uni.showToast({ |
|
|
|
title: '请输入大于0的金额', |
|
|
|
// title: '请输入大于0的金额', |
|
|
|
icon: 'none', |
|
|
|
// icon: 'none', |
|
|
|
duration: 2000 |
|
|
|
// duration: 2000 |
|
|
|
}); |
|
|
|
// }); |
|
|
|
return; |
|
|
|
// return; |
|
|
|
} |
|
|
|
// } |
|
|
|
if (this.inputAmount > 2000) { |
|
|
|
// if (this.inputAmount > 2000) { |
|
|
|
uni.showToast({ |
|
|
|
// uni.showToast({ |
|
|
|
title: '充值金额不能超过大于2000', |
|
|
|
// title: '充值金额不能超过大于2000', |
|
|
|
icon: 'none', |
|
|
|
// icon: 'none', |
|
|
|
duration: 2000 |
|
|
|
// duration: 2000 |
|
|
|
}); |
|
|
|
// }); |
|
|
|
return; |
|
|
|
// return; |
|
|
|
} |
|
|
|
// } |
|
|
|
if (parseFloat(this.inputAmount).toFixed(2) != parseFloat(this.inputAmount)) { |
|
|
|
// if (parseFloat(this.inputAmount).toFixed(2) != parseFloat(this.inputAmount)) { |
|
|
|
uni.showToast({ |
|
|
|
// uni.showToast({ |
|
|
|
title: '最多只能输入两位小数哦~', |
|
|
|
// title: '最多只能输入两位小数哦~', |
|
|
|
icon: 'none', |
|
|
|
// icon: 'none', |
|
|
|
duration: 2000 |
|
|
|
// duration: 2000 |
|
|
|
}); |
|
|
|
// }); |
|
|
|
return; |
|
|
|
// return; |
|
|
|
} |
|
|
|
// } |
|
|
|
uni.showLoading({ |
|
|
|
uni.showLoading({ |
|
|
|
title: '正在提交订单...' |
|
|
|
title: '正在提交订单...' |
|
|
|
}) |
|
|
|
}) |
|
|
|