|
@@ -12,17 +12,16 @@ var payContainer = new Vue({
|
|
|
payAmount: 0,//本次支付金额
|
|
|
payMobileUrl: '',//二维码生成链接
|
|
|
payData:{}, //支付数据
|
|
|
- payUserType:'ENTERPRISE',
|
|
|
+ payUserType:'B2B',
|
|
|
payType:'',
|
|
|
},
|
|
|
- B2BbankData:bank.b2BbankData,
|
|
|
- B2CbankData:bank.b2CbankData,
|
|
|
+ bankListData:[],
|
|
|
methodTab:['线上支付','转账支付'],
|
|
|
mobileData:[
|
|
|
{imgUrl:'/img/pay/iconbank-ali@2x.png',bankName:'支付宝支付',bankNum:'ALIPAY'},
|
|
|
{imgUrl:'/img/pay/iconbank-wx@2x.png',bankName:'微信支付',bankNum:'WEIXIN'},
|
|
|
- {imgUrl:'/img/pay/iconbank-B2Bbank@2x.png',bankName:'网银支付',bankNum:'ICBC_B2B'},
|
|
|
- {imgUrl:'/img/pay/iconbank-B2Cbank@2x.png',bankName:'个人网银',bankNum:'ICBC_B2C'}
|
|
|
+ {imgUrl:'/img/pay/iconbank-B2Bbank@2x.png',bankName:'网银支付',bankNum:'ICBC'},
|
|
|
+ {imgUrl:'/img/pay/iconbank-B2Cbank@2x.png',bankName:'个人网银',bankNum:'ICBC'}
|
|
|
],
|
|
|
pageType:'',//页面跳转类型 1 二手支付
|
|
|
paidAmount:'',//订单待付金额
|
|
@@ -53,6 +52,7 @@ var payContainer = new Vue({
|
|
|
is_Wechat_bowcr:false,
|
|
|
comboInfo: null, //选中的svip套餐信息
|
|
|
vipRecordId: undefined,
|
|
|
+ iframe:''
|
|
|
},
|
|
|
filters: {
|
|
|
NumFormat:function(value) {
|
|
@@ -106,6 +106,16 @@ var payContainer = new Vue({
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ getBankList:function () {
|
|
|
+ var _self = this;
|
|
|
+ PayApi.PayGetBankCode({},function(response){
|
|
|
+ if(response.code == 0){
|
|
|
+ _self.bankListData = response.data.list;
|
|
|
+ }else{
|
|
|
+ console.log('获取网银支付银行列表异常')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
PayOrderOnLineSwitch:function(){//获取是否可以先上支付
|
|
|
var _self = this;
|
|
|
PayApi.PayOrderOnLineSwitch({},function(response){
|
|
@@ -162,85 +172,21 @@ var payContainer = new Vue({
|
|
|
CAIMEI.Alert(_self.paymentIimitText,'知道了');
|
|
|
return;
|
|
|
}
|
|
|
- if(_self.payInfo.payBankNum == "WEIXIN"){
|
|
|
- if(_self.pageType === '1'){
|
|
|
- if(!isPC){
|
|
|
- var orderInfo = {//二手微信二维码参数
|
|
|
- pageType:1,
|
|
|
- productId:_self.productID,
|
|
|
- payAmount:_self.payAmount
|
|
|
- };
|
|
|
- _self.payInfo.payMobileUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxea43a0f9ebce9e66&redirect_uri=https://www.caimei365.com/pay/wechatpay.html&response_type=code&scope=snsapi_base&state="+JSON.stringify(orderInfo)+"#wechat_redirect";
|
|
|
- location.href = _self.payInfo.payMobileUrl;
|
|
|
- }else{
|
|
|
- _self.payInfo.payData = {//二手
|
|
|
- type:_self.payInfo.payBankNum,
|
|
|
- productId:_self.productID,
|
|
|
- amount:_self.payAmount,
|
|
|
- url:_self.payInfo.payMobileUrl
|
|
|
- };
|
|
|
- CAIMEI.Storage.setItem('payData',JSON.stringify(_self.payInfo.payData));
|
|
|
- window.open("/pay/caimei-paymobile.html?pageType=1");
|
|
|
- _self.isPayAlert = true;
|
|
|
- }
|
|
|
- }else if(_self.pageType === '2'){ // 微信支付会员
|
|
|
+ if(_self.payInfo.payBankNum == "WEIXIN"){// 微信
|
|
|
+ if(_self.pageType === '1'){ // 二手
|
|
|
+ _self.PaySecondMiniWxPay();
|
|
|
+ }else if(_self.pageType === '2'){ // 会员
|
|
|
_self.payVipMiniWxPay();
|
|
|
- }else{
|
|
|
- if(!isPC){
|
|
|
- var orderInfo = {//普通订单微信二维码参数
|
|
|
- pageType:0,
|
|
|
- orderID:_self.payInfo.payOrderId,
|
|
|
- payAmount:_self.payAmount
|
|
|
- };
|
|
|
- _self.payInfo.payMobileUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxea43a0f9ebce9e66&redirect_uri=https://www.caimei365.com/pay/wechatpay.html&response_type=code&scope=snsapi_base&state="+JSON.stringify(orderInfo)+"#wechat_redirect";
|
|
|
- location.href = _self.payInfo.payMobileUrl;
|
|
|
- }else{
|
|
|
- _self.payInfo.payData = {//正常订单
|
|
|
- type:_self.payInfo.payBankNum,
|
|
|
- orderid:_self.payInfo.payOrderId,
|
|
|
- amount:_self.payAmount,
|
|
|
- url:_self.payInfo.payMobileUrl
|
|
|
- };
|
|
|
- CAIMEI.Storage.setItem('payData',JSON.stringify(_self.payInfo.payData));
|
|
|
- window.open("/pay/caimei-paymobile.html?pageType=0");
|
|
|
- _self.isPayAlert = true;
|
|
|
- }
|
|
|
+ }else{ // 正常订单
|
|
|
+ _self.PayOrderMiniWxPay();
|
|
|
}
|
|
|
- }else if(_self.payInfo.payBankNum == "ALIPAY"){//支付宝支付
|
|
|
+ }else if(_self.payInfo.payBankNum == "ALIPAY"){// 支付宝
|
|
|
if(_self.pageType === '1'){// 二手
|
|
|
- var params = {//二手
|
|
|
- returnUrl:'https://www.caimei365.com/',
|
|
|
- productId:_self.productID,
|
|
|
- };
|
|
|
- _self.PayOrdersecondAliPay(params);
|
|
|
- }else if(_self.pageType === '2'){ // 支付宝支付会员
|
|
|
+ _self.PayOrdersecondAliPay();
|
|
|
+ }else if(_self.pageType === '2'){ // 会员
|
|
|
_self.payVipAliPay();
|
|
|
- }else{
|
|
|
- var params = {//正常订单
|
|
|
- payAmount:Math.round(_self.payAmount*100),
|
|
|
- returnUrl:'https://www.caimei365.com/',
|
|
|
- orderId:_self.payInfo.payOrderId
|
|
|
- };
|
|
|
- _self.PayOrderPcMallAlipay(params);
|
|
|
- }
|
|
|
- }else{// 网银支付
|
|
|
- if(_self.pageType === '1'){
|
|
|
- var params = {//二手
|
|
|
- payWay:_self.payInfo.payBankNum,
|
|
|
- returnUrl:'https://www.caimei365.com/',
|
|
|
- productId:_self.productID,
|
|
|
- };
|
|
|
- _self.PayOrdersecondUnion(params,_self.payInfo.payBankNum);
|
|
|
- }else if(_self.pageType === '2'){ // 网银支付会员
|
|
|
- console.log('网银支付会员');
|
|
|
- }else{
|
|
|
- var params = {//正常订单
|
|
|
- payWay:_self.payInfo.payBankNum,
|
|
|
- payAmount:Math.round(_self.payAmount*100),
|
|
|
- returnUrl:'https://www.caimei365.com/',
|
|
|
- orderId:_self.payInfo.payOrderId
|
|
|
- };
|
|
|
- _self.PayOrderPcMallPay(params,_self.payInfo.payBankNum);
|
|
|
+ }else{// 正常订单
|
|
|
+ _self.PayOrderPcMallAlipay();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -259,55 +205,56 @@ var payContainer = new Vue({
|
|
|
return;
|
|
|
}
|
|
|
if(_self.payAmount <= 10){
|
|
|
- CAIMEI.dialog('企业网银支付的金额必须大于¥10.00');
|
|
|
+ CAIMEI.dialog('本次支付金额小于网银手续费,不能进行网银支付。请使用微信/支付宝支付,或者线下转账。');
|
|
|
return;
|
|
|
}
|
|
|
- if(_self.pageType === '1'){
|
|
|
- var params = {//二手
|
|
|
- bankCode:_self.payInfo.payBankNum,
|
|
|
- returnUrl:'https://www.caimei365.com/pay/success.html?pageType=www&type=success&payAmount='+_self.payAmount,
|
|
|
- productId:_self.productID,
|
|
|
- userType:_self.payInfo.payUserType,
|
|
|
- };
|
|
|
- _self.PayOrdersecondUnion(params);
|
|
|
- } else if (_self.pageType === '2') { // 网银付会员
|
|
|
+ if(_self.pageType === '1'){// 二手
|
|
|
+ _self.PayOrdersecondUnion();
|
|
|
+ } else if (_self.pageType === '2') { // 会员
|
|
|
_self.payVipPcMallPay();
|
|
|
- } else {
|
|
|
- var params = {//正常订单
|
|
|
- payAmount:Math.round(_self.payAmount*100),
|
|
|
- bankCode:_self.payInfo.payBankNum,
|
|
|
- returnUrl:'https://www.caimei365.com/pay/success.html?pageType=www&type=success&payAmount='+_self.payAmount,
|
|
|
- orderId:_self.payInfo.payOrderId,
|
|
|
- userType:_self.payInfo.payUserType
|
|
|
- };
|
|
|
- _self.PayOrderPcMallPay(params,_self.payInfo.payBankNum);
|
|
|
+ } else {// 正常订单
|
|
|
+ _self.PayOrderPcMallPay();
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- PayOrderPcMallPay:function(params){// 正常订单网银支付
|
|
|
+ PayOrderMiniWxPay:function (){// 正常订单微信支付通道
|
|
|
var _self = this;
|
|
|
- _self.isSubMitStatus=true;
|
|
|
- PayApi.PayOrderPcMallPay(params,function(response){
|
|
|
- if(response.code == 0){
|
|
|
- _self.isPayAlert = true;
|
|
|
- _self.isSubMitStatus=false;
|
|
|
- _self.mbOrderId = response.data.data.mbOrderId;
|
|
|
- window.open(response.data.data.payUrl);
|
|
|
- }else{
|
|
|
- _self.isSubMitStatus=false;
|
|
|
- CAIMEI.Alert(response.msg,'确定',false);
|
|
|
- }
|
|
|
- })
|
|
|
+ if(!isPC){
|
|
|
+ var orderInfo = {//正常订单微信二维码参数
|
|
|
+ pageType:0,
|
|
|
+ orderID:_self.payInfo.payOrderId,
|
|
|
+ payAmount:_self.payAmount
|
|
|
+ };
|
|
|
+ _self.payInfo.payMobileUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxea43a0f9ebce9e66&redirect_uri=https://www.caimei365.com/pay/wechatpay.html&response_type=code&scope=snsapi_base&state="+JSON.stringify(orderInfo)+"#wechat_redirect";
|
|
|
+ location.href = _self.payInfo.payMobileUrl;
|
|
|
+ }else{
|
|
|
+ _self.payInfo.payData = {//正常订单
|
|
|
+ type:_self.payInfo.payBankNum,
|
|
|
+ orderid:_self.payInfo.payOrderId,
|
|
|
+ amount:_self.payAmount,
|
|
|
+ url:_self.payInfo.payMobileUrl
|
|
|
+ };
|
|
|
+ CAIMEI.Storage.setItem('payData',JSON.stringify(_self.payInfo.payData));
|
|
|
+ window.open("/pay/caimei-paymobile.html?pageType=0");
|
|
|
+ _self.isPayAlert = true;
|
|
|
+ }
|
|
|
},
|
|
|
- PayOrderPcMallAlipay:function (params){// 正常订单支付宝支付
|
|
|
+ PayOrderPcMallAlipay:function (){// 正常订单支付宝通道
|
|
|
var _self = this;
|
|
|
+ var params = {//正常订单
|
|
|
+ payType:'ZFBEWM',
|
|
|
+ payAmount:_self.payAmount,
|
|
|
+ returnUrl:'https://www.caimei365.com/',
|
|
|
+ orderId:_self.payInfo.payOrderId
|
|
|
+ };
|
|
|
_self.isSubMitStatus=true;
|
|
|
PayApi.PayOrderPcMallAlipay(params,function(response){
|
|
|
if(response.code == 0){
|
|
|
+ console.log('data',response.data)
|
|
|
_self.isPayAlert = true;
|
|
|
_self.isSubMitStatus=false;
|
|
|
- _self.mbOrderId = response.data.data.mbOrderId;
|
|
|
- _self.payInfo.payMobileUrl = response.data.data.payUrl;
|
|
|
+ _self.mbOrderId = response.data.rt5_orderId;
|
|
|
+ _self.payInfo.payMobileUrl = response.data.rt8_qrcode;
|
|
|
_self.payInfo.payData = {
|
|
|
mbOrderId:_self.mbOrderId,
|
|
|
type:_self.payInfo.payBankNum,
|
|
@@ -327,15 +274,68 @@ var payContainer = new Vue({
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- PayOrdersecondAliPay:function (params){// 二手支付宝支付
|
|
|
+ PayOrderPcMallPay:function(){// 正常订单网银支付通道
|
|
|
+ var _self = this;
|
|
|
+ var params = {//正常订单
|
|
|
+ payType:'YL',
|
|
|
+ payAmount:_self.payAmount,
|
|
|
+ bankCode:_self.payInfo.payBankNum,
|
|
|
+ returnUrl:'https://www.caimei365.com/pay/success.html?pageType=www&type=success&payAmount='+_self.payAmount,
|
|
|
+ orderId:_self.payInfo.payOrderId,
|
|
|
+ userType:_self.payInfo.payUserType
|
|
|
+ };
|
|
|
+ _self.isSubMitStatus=true;
|
|
|
+ PayApi.PayOrderPcMallPay(params,function(response){
|
|
|
+ if(response.code == 0){
|
|
|
+ // _self.isPayAlert = true;
|
|
|
+ _self.iframe = response.data
|
|
|
+ setTimeout(function () {
|
|
|
+ var onlineForm = document.getElementById('onlineForm');
|
|
|
+ _self.isSubMitStatus=false;
|
|
|
+ onlineForm.submit();
|
|
|
+ },2000)
|
|
|
+ }else{
|
|
|
+ _self.isSubMitStatus=false;
|
|
|
+ CAIMEI.Alert(response.msg,'确定',false);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ PaySecondMiniWxPay:function (){//二手发布微信支付通道
|
|
|
+ var _self = this;
|
|
|
+ if(!isPC){// h5跳 H5支付页
|
|
|
+ var orderInfo = {//二手微信二维码参数
|
|
|
+ pageType:1,
|
|
|
+ productId:_self.productID,
|
|
|
+ payAmount:_self.payAmount
|
|
|
+ };
|
|
|
+ _self.payInfo.payMobileUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxea43a0f9ebce9e66&redirect_uri=https://www.caimei365.com/pay/wechatpay.html&response_type=code&scope=snsapi_base&state="+JSON.stringify(orderInfo)+"#wechat_redirect";
|
|
|
+ location.href = _self.payInfo.payMobileUrl;
|
|
|
+ }else{// PC 跳扫码支付页
|
|
|
+ _self.payInfo.payData = {//二手
|
|
|
+ type:_self.payInfo.payBankNum,
|
|
|
+ productId:_self.productID,
|
|
|
+ amount:_self.payAmount,
|
|
|
+ url:_self.payInfo.payMobileUrl
|
|
|
+ };
|
|
|
+ CAIMEI.Storage.setItem('payData',JSON.stringify(_self.payInfo.payData));
|
|
|
+ window.open("/pay/caimei-paymobile.html?pageType=1");
|
|
|
+ _self.isPayAlert = true;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ PayOrdersecondAliPay:function (){// 二手发布支付宝通道
|
|
|
var _self = this;
|
|
|
+ var params = {//二手
|
|
|
+ payType:'ZFBEWM',
|
|
|
+ returnUrl:'https://www.caimei365.com/',
|
|
|
+ productId:_self.productID,
|
|
|
+ };
|
|
|
_self.isSubMitStatus=true;
|
|
|
PayApi.PayOrdersecondAliPay(params,function(response){
|
|
|
if(response.code == 0){
|
|
|
_self.isPayAlert = true;
|
|
|
_self.isSubMitStatus=false;
|
|
|
- _self.mbOrderId = response.data.data.mbOrderId;
|
|
|
- _self.payInfo.payMobileUrl = response.data.data.payUrl;
|
|
|
+ _self.mbOrderId = response.data.rt5_orderId;
|
|
|
+ _self.payInfo.payMobileUrl = response.data.rt8_qrcode;
|
|
|
_self.payInfo.payData = {
|
|
|
mbOrderId:_self.mbOrderId,
|
|
|
type:_self.payInfo.payBankNum,
|
|
@@ -351,21 +351,113 @@ var payContainer = new Vue({
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- PayOrdersecondUnion:function (params){// 二手网银支付
|
|
|
+ PayOrdersecondUnion:function (){// 二手发布网银支付通道
|
|
|
var _self = this;
|
|
|
+ var params = {//二手
|
|
|
+ payType:'YL',
|
|
|
+ bankCode:_self.payInfo.payBankNum,
|
|
|
+ returnUrl:'https://www.caimei365.com/pay/success.html?pageType=www&type=success&payAmount='+_self.payAmount,
|
|
|
+ productId:_self.productID,
|
|
|
+ userType:_self.payInfo.payUserType,
|
|
|
+ };
|
|
|
_self.isSubMitStatus=true;
|
|
|
PayApi.PayOrdersecondUnion(params,function(response){
|
|
|
if(response.code == 0){
|
|
|
- _self.isPayAlert = true;
|
|
|
- _self.isSubMitStatus=false;
|
|
|
- _self.mbOrderId = response.data.data.mbOrderId;
|
|
|
- window.open(response.data.data.payUrl);
|
|
|
+ _self.iframe = response.data
|
|
|
+ setTimeout(function () {
|
|
|
+ var onlineForm = document.getElementById('onlineForm');
|
|
|
+ _self.isSubMitStatus=false;
|
|
|
+ onlineForm.submit();
|
|
|
+ },2000)
|
|
|
}else{
|
|
|
CAIMEI.Alert(response.msg,'确定',false);
|
|
|
_self.isSubMitStatus=false;
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ payVipMiniWxPay: function(){ // 超级会员微信支付通道
|
|
|
+ var _self = this;
|
|
|
+ if (!isPC) {
|
|
|
+ var orderInfo = {//普通订单微信二维码参数
|
|
|
+ pageType: 2,
|
|
|
+ vipId: _self.comboInfo.id,
|
|
|
+ vipRecordId: _self.vipRecordId,
|
|
|
+ payAmount: _self.payAmount
|
|
|
+ };
|
|
|
+ _self.payInfo.payMobileUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxea43a0f9ebce9e66&redirect_uri=https://www.caimei365.com/pay/wechatpay.html&response_type=code&scope=snsapi_base&state=" + JSON.stringify(orderInfo) + "#wechat_redirect";
|
|
|
+ location.href = _self.payInfo.payMobileUrl;
|
|
|
+ } else {
|
|
|
+ _self.payInfo.payData = {
|
|
|
+ type: _self.payInfo.payBankNum,
|
|
|
+ vipId: _self.comboInfo.id,
|
|
|
+ vipRecordId: _self.vipRecordId,
|
|
|
+ amount: _self.payAmount,
|
|
|
+ duration: _self.comboInfo.duration,
|
|
|
+ };
|
|
|
+ CAIMEI.Storage.setItem('payData', JSON.stringify(_self.payInfo.payData));
|
|
|
+ window.open("/pay/caimei-paymobile.html?pageType=2");
|
|
|
+ _self.isPayAlert = true;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ payVipAliPay: function(){ // 超级会员支付宝通道
|
|
|
+ var _self = this;
|
|
|
+ var params = {
|
|
|
+ bankCode: _self.payInfo.payBankNum,
|
|
|
+ returnUrl: 'https://www.caimei365.com/',
|
|
|
+ userType: _self.payInfo.payUserType,
|
|
|
+ vipRecordId: _self.vipRecordId
|
|
|
+ };
|
|
|
+ _self.isSubMitStatus = true;
|
|
|
+ PayApi.PayVipAliPay(params, function(response){
|
|
|
+ console.log(response);
|
|
|
+ if (response.code === 0) {
|
|
|
+ _self.isPayAlert = true;
|
|
|
+ _self.isSubMitStatus = false;
|
|
|
+ _self.mbOrderId = response.data.data.mbOrderId;
|
|
|
+ _self.payInfo.payMobileUrl = response.data.data.payUrl;
|
|
|
+ _self.payInfo.payData = {
|
|
|
+ mbOrderId: _self.mbOrderId,
|
|
|
+ type: _self.payInfo.payBankNum,
|
|
|
+ amount: _self.payAmount,
|
|
|
+ url: _self.payInfo.payMobileUrl,
|
|
|
+ };
|
|
|
+ CAIMEI.Storage.setItem('payData', JSON.stringify(_self.payInfo.payData));
|
|
|
+ if (!isPC) {
|
|
|
+ location.href = _self.payInfo.payMobileUrl;
|
|
|
+ } else {
|
|
|
+ window.open("/pay/caimei-paymobile.html?pageType=2&duration=" + _self.comboInfo.duration);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ CAIMEI.Alert(response.msg, '确定', false);
|
|
|
+ _self.isSubMitStatus = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ payVipPcMallPay: function(){// 超级会员网银支付通道
|
|
|
+ console.log('网银支付会员');
|
|
|
+ var _self = this;
|
|
|
+ var params = {
|
|
|
+ payType:'YL',
|
|
|
+ bankCode: this.payInfo.payBankNum,
|
|
|
+ returnUrl: 'https://www.caimei365.com/pay/success.html?pageType=www&type=success&payAmount='+_self.payAmount,
|
|
|
+ userType: _self.payInfo.payUserType,
|
|
|
+ vipRecordId: _self.vipRecordId
|
|
|
+ };
|
|
|
+ _self.isSubMitStatus=true;
|
|
|
+ PayApi.PayVipPcMallPay(params, function (response) {
|
|
|
+ if (response.code == 0) {
|
|
|
+ _self.iframe = response.data
|
|
|
+ setTimeout(function () {
|
|
|
+ var onlineForm = document.getElementById('onlineForm');
|
|
|
+ _self.isSubMitStatus=false;
|
|
|
+ onlineForm.submit();
|
|
|
+ },2000)
|
|
|
+ } else {
|
|
|
+ _self.isSubMitStatus = false;
|
|
|
+ CAIMEI.Alert(response.msg, '确定', false);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
changePayAmount:function(event){//输入支付金额控制
|
|
|
var _self = this;
|
|
|
var value = event.target.value;
|
|
@@ -407,20 +499,20 @@ var payContainer = new Vue({
|
|
|
if( _self.mobileTabIndex==2){
|
|
|
_self.bankTabIndex = 0
|
|
|
_self.payInfo.payType = '1';
|
|
|
- _self.payInfo.payUserType = 'ENTERPRISE';
|
|
|
+ _self.payInfo.payUserType = 'B2B';
|
|
|
}else if(_self.mobileTabIndex == 3){
|
|
|
_self.bankTabIndex = 0
|
|
|
_self.payInfo.payType = '2';
|
|
|
- _self.payInfo.payUserType = 'USER';
|
|
|
+ _self.payInfo.payUserType = 'B2C';
|
|
|
}
|
|
|
},
|
|
|
checkBankPay:function(index,item){//选择网银支付方式-选择银行
|
|
|
var _self = this;
|
|
|
_self.bankTabIndex = index;
|
|
|
if( _self.mobileTabIndex == 2 ){
|
|
|
- _self.payInfo.payBankNum = item.B2bNum;
|
|
|
+ _self.payInfo.payBankNum = item.b2B;
|
|
|
}else if( _self.mobileTabIndex ==3 ){
|
|
|
- _self.payInfo.payBankNum = item.B2cNum;
|
|
|
+ _self.payInfo.payBankNum = item.b2C;
|
|
|
}
|
|
|
},
|
|
|
copyLinkPaySubmitFn:function(){//复制网银支付链接
|
|
@@ -559,87 +651,6 @@ var payContainer = new Vue({
|
|
|
_self.isReceiptStatus = true;
|
|
|
});
|
|
|
},
|
|
|
- // 网银支付会员
|
|
|
- payVipPcMallPay: function(){
|
|
|
- console.log('网银支付会员');
|
|
|
- var _self = this;
|
|
|
- var params = {
|
|
|
- bankCode: this.payInfo.payBankNum,
|
|
|
- returnUrl: 'https://www.caimei365.com/pay/success.html?pageType=www&type=success&payAmount='+_self.payAmount,
|
|
|
- userType: _self.payInfo.payUserType,
|
|
|
- vipRecordId: _self.vipRecordId
|
|
|
- };
|
|
|
- PayApi.PayVipPcMallPay(params, function (response) {
|
|
|
- if (response.code == 0) {
|
|
|
- _self.isPayAlert = true;
|
|
|
- _self.isSubMitStatus = false;
|
|
|
- _self.mbOrderId = response.data.data.mbOrderId;
|
|
|
- window.open(response.data.data.payUrl);
|
|
|
- } else {
|
|
|
- _self.isSubMitStatus = false;
|
|
|
- CAIMEI.Alert(response.msg, '确定', false);
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- // 支付宝支付会员
|
|
|
- payVipAliPay: function(){
|
|
|
- console.log('支付宝支付会员');
|
|
|
- var _self = this;
|
|
|
- var params = {
|
|
|
- bankCode: _self.payInfo.payBankNum,
|
|
|
- returnUrl: 'https://www.caimei365.com/',
|
|
|
- userType: _self.payInfo.payUserType,
|
|
|
- vipRecordId: _self.vipRecordId
|
|
|
- };
|
|
|
- console.log(params);
|
|
|
- PayApi.PayVipAliPay(params, function(response){
|
|
|
- console.log(response);
|
|
|
- if (response.code === 0) {
|
|
|
- _self.isPayAlert = true;
|
|
|
- _self.mbOrderId = response.data.data.mbOrderId;
|
|
|
- _self.payInfo.payMobileUrl = response.data.data.payUrl;
|
|
|
- _self.payInfo.payData = {
|
|
|
- mbOrderId: _self.mbOrderId,
|
|
|
- type: _self.payInfo.payBankNum,
|
|
|
- amount: _self.payAmount,
|
|
|
- url: _self.payInfo.payMobileUrl,
|
|
|
- };
|
|
|
- CAIMEI.Storage.setItem('payData', JSON.stringify(_self.payInfo.payData));
|
|
|
- if (!isPC) {
|
|
|
- location.href = _self.payInfo.payMobileUrl;
|
|
|
- } else {
|
|
|
- window.open("/pay/caimei-paymobile.html?pageType=2&duration=" + _self.comboInfo.duration);
|
|
|
- }
|
|
|
- } else {
|
|
|
- CAIMEI.Alert(response.msg, '确定', false);
|
|
|
- _self.isSubMitStatus = false;
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- // 微信支付会员
|
|
|
- payVipMiniWxPay: function(){
|
|
|
- if (!isPC) {
|
|
|
- var orderInfo = {//普通订单微信二维码参数
|
|
|
- pageType: 2,
|
|
|
- vipId: this.comboInfo.id,
|
|
|
- vipRecordId: this.vipRecordId,
|
|
|
- payAmount: this.payAmount
|
|
|
- };
|
|
|
- this.payInfo.payMobileUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxea43a0f9ebce9e66&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;
|
|
|
- } else {
|
|
|
- this.payInfo.payData = {
|
|
|
- type: this.payInfo.payBankNum,
|
|
|
- vipId: this.comboInfo.id,
|
|
|
- vipRecordId: this.vipRecordId,
|
|
|
- amount: this.payAmount,
|
|
|
- duration: this.comboInfo.duration,
|
|
|
- };
|
|
|
- CAIMEI.Storage.setItem('payData', JSON.stringify(this.payInfo.payData));
|
|
|
- window.open("/pay/caimei-paymobile.html?pageType=2");
|
|
|
- this.isPayAlert = true;
|
|
|
- }
|
|
|
- },
|
|
|
},
|
|
|
mounted: function () {
|
|
|
var _self = this;
|
|
@@ -658,6 +669,8 @@ var payContainer = new Vue({
|
|
|
// CAIMEI.Storage.removeItem('comboInfo');
|
|
|
// 设置支付金额
|
|
|
this.payAmount = _self.toFixedFn(this.comboInfo.price);
|
|
|
+ this.getBankList(); // 获取银行列表
|
|
|
+
|
|
|
} else {
|
|
|
var HrefType = CAIMEI.getUrlParam('type');
|
|
|
if (HrefType == 'payfirm') {
|
|
@@ -668,7 +681,8 @@ var payContainer = new Vue({
|
|
|
_self.payInfo.payOrderId = data.data.orderId;
|
|
|
_self.orderIdentificationId = '#' + _self.payInfo.payOrderId + '#';
|
|
|
}
|
|
|
- _self.infoPayOrderCheckoutCounter();//正常订单初始化
|
|
|
+ this.getBankList(); // 获取银行列表
|
|
|
+ this.infoPayOrderCheckoutCounter();//正常订单初始化
|
|
|
}
|
|
|
var viewer = window.navigator.userAgent.toLowerCase();
|
|
|
if(viewer.match(/MicroMessenger/i) == 'micromessenger'){
|