|
@@ -53,6 +53,7 @@ var payContainer = new Vue({
|
|
is_Wechat_bowcr:false,
|
|
is_Wechat_bowcr:false,
|
|
comboInfo: null, //选中的svip套餐信息
|
|
comboInfo: null, //选中的svip套餐信息
|
|
vipRecordId: undefined,
|
|
vipRecordId: undefined,
|
|
|
|
+ couponRecordId:undefined,
|
|
couponId:undefined,
|
|
couponId:undefined,
|
|
userId:0
|
|
userId:0
|
|
},
|
|
},
|
|
@@ -521,28 +522,36 @@ var payContainer = new Vue({
|
|
},
|
|
},
|
|
RefreshBody:function(){//刷新页面
|
|
RefreshBody:function(){//刷新页面
|
|
var _self = this;
|
|
var _self = this;
|
|
- // 验证支付(支付会员)
|
|
|
|
- if(_self.pageType == 2){
|
|
|
|
- PayApi.PayOrderFindOrderStatus({mbOrderId:_self.mbOrderId},function(response){
|
|
|
|
- _self.isPayAlert = false;
|
|
|
|
- var data = response.data.data;
|
|
|
|
- if(data.status === '1'){
|
|
|
|
- _self.windowLocationHref('success');
|
|
|
|
- }else{
|
|
|
|
- _self.windowLocationHref('error');
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
if(_self.payInfo.payBankNum == 'WEIXIN'){
|
|
if(_self.payInfo.payBankNum == 'WEIXIN'){
|
|
- PayApi.PayOrderPayWhetherSuccess({orderId: _self.payInfo.payOrderId, paySuccessCounter:_self.paySuccessCounter},function(response){
|
|
|
|
- _self.isPayAlert = false;
|
|
|
|
- if(response.code === 0){
|
|
|
|
- _self.windowLocationHref('success');
|
|
|
|
- }else{
|
|
|
|
- _self.windowLocationHref('error');
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ if( _self.pageType == '2' ){ // 验证支付(支付会员)
|
|
|
|
+ PayApi.PayOrderPayVipCheck({recordId : _self.vipRecordId},function(response){
|
|
|
|
+ // console.log(response);
|
|
|
|
+ if(response.code === 0){
|
|
|
|
+ _self.windowLocationHref('success');
|
|
|
|
+ }else{
|
|
|
|
+ _self.windowLocationHref('error');
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }else if(_self.pageType == '3'){ // 验证支付(优惠券)
|
|
|
|
+ PayApi.PayOrderPayCouponCheck({ couponRecordId: _self.couponRecordId },function(response){
|
|
|
|
+ // console.log(response);
|
|
|
|
+ if(response.code === 0){
|
|
|
|
+ _self.windowLocationHref('success');
|
|
|
|
+ }else{
|
|
|
|
+ _self.windowLocationHref('error');
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }else{
|
|
|
|
+ PayApi.PayOrderPayWhetherSuccess({orderId: _self.payInfo.payOrderId, paySuccessCounter:_self.paySuccessCounter},function(response){
|
|
|
|
+ _self.isPayAlert = false;
|
|
|
|
+ if(response.code === 0){
|
|
|
|
+ _self.windowLocationHref('success');
|
|
|
|
+ }else{
|
|
|
|
+ _self.windowLocationHref('error');
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
}else{
|
|
}else{
|
|
PayApi.PayOrderFindOrderStatus({mbOrderId:_self.mbOrderId},function(response){
|
|
PayApi.PayOrderFindOrderStatus({mbOrderId:_self.mbOrderId},function(response){
|
|
_self.isPayAlert = false;
|
|
_self.isPayAlert = false;
|
|
@@ -561,6 +570,8 @@ var payContainer = new Vue({
|
|
window.location.href = '/pay/success.html?pageType=second&type='+state+'&payAmount='+_self.payAmount;
|
|
window.location.href = '/pay/success.html?pageType=second&type='+state+'&payAmount='+_self.payAmount;
|
|
}else if(_self.pageType === '2'){
|
|
}else if(_self.pageType === '2'){
|
|
window.location.href = '/pay/success.html?pageType=vip&type='+state+'&payAmount='+_self.payAmount;
|
|
window.location.href = '/pay/success.html?pageType=vip&type='+state+'&payAmount='+_self.payAmount;
|
|
|
|
+ }else if(_self.pageType === '3') {
|
|
|
|
+ window.location.href = '/pay/success.html?pageType=coupon&type=' + state + '&payAmount=' + _self.couponInfo.moneyCouponPrice;
|
|
}else{
|
|
}else{
|
|
window.location.href = '/pay/success.html?pageType=www&type='+state+'&payAmount='+_self.payAmount;
|
|
window.location.href = '/pay/success.html?pageType=www&type='+state+'&payAmount='+_self.payAmount;
|
|
}
|
|
}
|
|
@@ -681,6 +692,7 @@ var payContainer = new Vue({
|
|
returnUrl: 'https://www.caimei365.com/pay/success.html?pageType=www&type=success&payAmount='+_self.couponInfo.moneyCouponPrice,
|
|
returnUrl: 'https://www.caimei365.com/pay/success.html?pageType=www&type=success&payAmount='+_self.couponInfo.moneyCouponPrice,
|
|
userType: _self.payInfo.payUserType,
|
|
userType: _self.payInfo.payUserType,
|
|
couponId: _self.couponId,
|
|
couponId: _self.couponId,
|
|
|
|
+ couponRecordId:_self.couponRecordId,
|
|
userId:_self.userId,
|
|
userId:_self.userId,
|
|
source:2 //支付来源 1 小程序 2 WWW
|
|
source:2 //支付来源 1 小程序 2 WWW
|
|
};
|
|
};
|
|
@@ -711,9 +723,10 @@ var payContainer = new Vue({
|
|
if (!isPC) {
|
|
if (!isPC) {
|
|
var orderInfo = {//普通订单微信二维码参数
|
|
var orderInfo = {//普通订单微信二维码参数
|
|
pageType: 3,
|
|
pageType: 3,
|
|
- vipId: this.comboInfo.id,
|
|
|
|
- vipRecordId: this.vipRecordId,
|
|
|
|
- payAmount: this.payAmount
|
|
|
|
|
|
+ payAmount: this.couponInfo.moneyCouponPrice,
|
|
|
|
+ couponRecordId:this.couponRecordId,
|
|
|
|
+ couponId: this.couponId,
|
|
|
|
+ userId : this.userId
|
|
};
|
|
};
|
|
this.payInfo.payMobileUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx91c4152b60ca91a3&redirect_uri=https://www.caimei365.com/pay/wechatpay.html&response_type=code&scope=snsapi_base&state=" + JSON.stringify(orderInfo) + "#wechat_redirect";
|
|
this.payInfo.payMobileUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx91c4152b60ca91a3&redirect_uri=https://www.caimei365.com/pay/wechatpay.html&response_type=code&scope=snsapi_base&state=" + JSON.stringify(orderInfo) + "#wechat_redirect";
|
|
location.href = this.payInfo.payMobileUrl;
|
|
location.href = this.payInfo.payMobileUrl;
|
|
@@ -723,6 +736,7 @@ var payContainer = new Vue({
|
|
amount: this.couponInfo.moneyCouponPrice,
|
|
amount: this.couponInfo.moneyCouponPrice,
|
|
url: this.payInfo.payMobileUrl,
|
|
url: this.payInfo.payMobileUrl,
|
|
couponId:this.couponId,
|
|
couponId:this.couponId,
|
|
|
|
+ couponRecordId:this.couponRecordId,
|
|
userId:this.userId
|
|
userId:this.userId
|
|
};
|
|
};
|
|
CAIMEI.Storage.setItem('payData', JSON.stringify(this.payInfo.payData));
|
|
CAIMEI.Storage.setItem('payData', JSON.stringify(this.payInfo.payData));
|
|
@@ -738,6 +752,7 @@ var payContainer = new Vue({
|
|
returnUrl: 'https://www.caimei365.com/',
|
|
returnUrl: 'https://www.caimei365.com/',
|
|
couponId: _self.couponInfo.couponId,
|
|
couponId: _self.couponInfo.couponId,
|
|
userId:_self.userId,
|
|
userId:_self.userId,
|
|
|
|
+ couponRecordId:_self.couponRecordId,
|
|
source:2 //支付来源 1 小程序 2 WWW
|
|
source:2 //支付来源 1 小程序 2 WWW
|
|
};
|
|
};
|
|
PayApi.PayCouponMiniAliPay(params, function(response){
|
|
PayApi.PayCouponMiniAliPay(params, function(response){
|
|
@@ -788,6 +803,7 @@ var payContainer = new Vue({
|
|
this.getBankList();
|
|
this.getBankList();
|
|
} else if(this.pageType === '3') {// 支付优惠券
|
|
} else if(this.pageType === '3') {// 支付优惠券
|
|
this.couponId = parseInt(CAIMEI.getUrlParam('couponId'));
|
|
this.couponId = parseInt(CAIMEI.getUrlParam('couponId'));
|
|
|
|
+ this.couponRecordId = parseInt(CAIMEI.getUrlParam('couponRecordId'));
|
|
this.initCouponDetail(this.couponId);
|
|
this.initCouponDetail(this.couponId);
|
|
this.PayOrderOnLineSwitch();
|
|
this.PayOrderOnLineSwitch();
|
|
this.getBankList();
|
|
this.getBankList();
|