|
@@ -20,6 +20,15 @@
|
|
|
<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 2"></radio></label>
|
|
|
</view>
|
|
|
<!-- #endif -->
|
|
|
+ <view class="type-item" @click="changePayType(4)" v-if="is_zero==1">
|
|
|
+ <!-- <text class="icon iconfont iconyue"></text> -->
|
|
|
+ <image src="../../static/icon/task1.png" class="icon iconfont" mode="widthFix" style="width: 40rpx;height: 40rpx;margin-right: 50rpx;"></image>
|
|
|
+ <view class="con">
|
|
|
+ <text class="tit">阅读积分</text>
|
|
|
+ <text>可用阅读积分 ¥{{ userInfo.points }}</text>
|
|
|
+ </view>
|
|
|
+ <label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 4"></radio></label>
|
|
|
+ </view>
|
|
|
<view class="type-item" @click="changePayType(3)" v-if="is_zero==0">
|
|
|
<text class="icon iconfont iconyue"></text>
|
|
|
<view class="con">
|
|
@@ -43,6 +52,7 @@ import weichatObj from '@/plugin/jweixin-module/index.js';
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ now_points: 0,
|
|
|
payType: 2, //支付类型
|
|
|
payName: 'ali',
|
|
|
orderInfo: {},
|
|
@@ -109,6 +119,9 @@ export default {
|
|
|
if (this.payType == 3) {
|
|
|
this.payName = 'yue';
|
|
|
}
|
|
|
+ if (this.payType == 4) {
|
|
|
+ this.payName = 'points';
|
|
|
+ }
|
|
|
},
|
|
|
// 支付金额
|
|
|
orderMoneyPay() {
|
|
@@ -232,6 +245,17 @@ export default {
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
+ // if (obj.payName == 'yue' && +obj.now_money < obj.money) {
|
|
|
+ // uni.showModal({
|
|
|
+ // title: '提示',
|
|
|
+ // content: '账户阅读积分不足!',
|
|
|
+ // showCancel: false,
|
|
|
+ // success: res => {},
|
|
|
+ // fail: () => {},
|
|
|
+ // complete: () => {}
|
|
|
+ // });
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
uni.showLoading({
|
|
|
title: '支付中',
|
|
|
mask: true
|
|
@@ -305,7 +329,7 @@ export default {
|
|
|
// 保存订单号
|
|
|
obj.orderId = data.result.orderId;
|
|
|
// 判断是否为消费积分支付
|
|
|
- if (obj.payName == 'yue') {
|
|
|
+ if (obj.payName == 'yue' || obj.payName == 'points') {
|
|
|
if (status == 200 && data.status == 'SUCCESS') {
|
|
|
obj.paySuccessTo();
|
|
|
} else {
|