|
@@ -94,14 +94,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 自定义充值金额 -->
|
|
<!-- 自定义充值金额 -->
|
|
|
- <!-- <view class="h-custom">
|
|
|
|
|
|
|
+ <view class="h-custom">
|
|
|
<view class="h-icon">
|
|
<view class="h-icon">
|
|
|
<u-icon name="rmb" color="#333" size="22"></u-icon>
|
|
<u-icon name="rmb" color="#333" size="22"></u-icon>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="h-money">
|
|
<view class="h-money">
|
|
|
<input v-model="reqOrderParm.rechargeAmount" @click="cancelChooseMoney" placeholder="请输入金额" type="number">
|
|
<input v-model="reqOrderParm.rechargeAmount" @click="cancelChooseMoney" placeholder="请输入金额" type="number">
|
|
|
</view>
|
|
</view>
|
|
|
- </view> -->
|
|
|
|
|
|
|
+ </view>
|
|
|
|
|
|
|
|
<!-- 充值按钮 -->
|
|
<!-- 充值按钮 -->
|
|
|
<view v-if="rechargeList.length > 0" @click="submitOrder()" class="h-submit-btn">
|
|
<view v-if="rechargeList.length > 0" @click="submitOrder()" class="h-submit-btn">
|
|
@@ -203,8 +203,7 @@
|
|
|
},
|
|
},
|
|
|
// 提交订单
|
|
// 提交订单
|
|
|
submitOrder(){
|
|
submitOrder(){
|
|
|
- const that = this;
|
|
|
|
|
-
|
|
|
|
|
|
|
+ const that = this;
|
|
|
if(!this.isSelected){ // 是否确定协议
|
|
if(!this.isSelected){ // 是否确定协议
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
icon: 'none',
|
|
@@ -213,23 +212,46 @@
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if(this.reqOrderParm.strategyId == null){
|
|
|
|
|
|
|
+ if(!this.reqOrderParm.rechargeAmount){
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
- icon: 'none',
|
|
|
|
|
- title: '请选择充值项目!'
|
|
|
|
|
|
|
+ icon: 'none',
|
|
|
|
|
+ title: '请输入或选择充值金额!'
|
|
|
});
|
|
});
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- let promotionParam = uni.getStorageSync('promotionParam')
|
|
|
|
|
- Object.assign(this.reqOrderParm,promotionParam)
|
|
|
|
|
- // 提交订单
|
|
|
|
|
- this.$api.commonGeneralOrder(this.reqOrderParm).then((res)=>{
|
|
|
|
|
- console.log('+++++++++++commonGeneralOrder++++++++++',res)
|
|
|
|
|
- that.reqPayParm.orderNo = res.data.data.orderNo;
|
|
|
|
|
- // 调用微信支付
|
|
|
|
|
- that.wechatPay();
|
|
|
|
|
- })
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if(!this.reqOrderParm.strategyId){
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title: '警告!',
|
|
|
|
|
+ content: '您确定选择自定义充值金额 而自动放弃充值优惠策略',
|
|
|
|
|
+ success: function (res) {
|
|
|
|
|
+ if (res.confirm) {
|
|
|
|
|
+ console.log('用户点击确定');
|
|
|
|
|
+ that.handleCommon()
|
|
|
|
|
+ } else if (res.cancel) {
|
|
|
|
|
+ console.log('用户点击取消');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }else {
|
|
|
|
|
+ this.handleCommon()
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
|
|
+//提交充值订单
|
|
|
|
|
+ handleCommon(){
|
|
|
|
|
+ const that = this;
|
|
|
|
|
+ let promotionParam = uni.getStorageSync('promotionParam')
|
|
|
|
|
+ Object.assign(this.reqOrderParm,promotionParam)
|
|
|
|
|
+ // 提交订单
|
|
|
|
|
+ this.$api.commonGeneralOrder(this.reqOrderParm).then((res)=>{
|
|
|
|
|
+ console.log('+++++++++++commonGeneralOrder++++++++++',res)
|
|
|
|
|
+ that.reqPayParm.orderNo = res.data.data.orderNo;
|
|
|
|
|
+ // 调用微信支付
|
|
|
|
|
+ that.wechatPay();
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
// 微信支付
|
|
// 微信支付
|
|
|
wechatPay(){
|
|
wechatPay(){
|
|
|
const that = this;
|
|
const that = this;
|