Browse Source

修改网银支付跳转信息

zhengjinyi 1 month ago
parent
commit
5fa7413987

+ 80 - 0
src/main/resources/static/css/pay/caimei-paycash.css

@@ -197,6 +197,86 @@ input::-webkit-outer-spin-button {
     .model-content .content .content-form .form-btn a{display: block;width: 130px;height: 32px;box-sizing: border-box;background: #FF5B00;line-height: 32px;text-align: center;font-size: 14px;color: #FFFFFF;border-radius: 2px;}
     .model-content .content .content-form .form-btn a.disabled{background: #B8BFCA;color: #FFFFFF;}
     .model-content .content .content-form .form-text{ line-height: 32px; font-size: 14px;color: #333333; }
+    .iframe-fiexd{
+        width: 100%;
+        height: 100%;
+        position: fixed;
+        top: 0;
+        left: 0;
+        right: 0;
+        bottom: 0;
+        margin: auto;
+        background: rgba(0,0,0,0.5);
+        border-radius: 8px;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        z-index: 999;
+    }
+    #iframe{
+        width: 340px;
+        height: 270px;
+        position: absolute;
+        top: 0;
+        left: 0;
+        right: 0;
+        bottom: 0;
+        margin: auto;
+        background: #FFFFFF;
+        border-radius: 8px;
+        display: flex;
+        flex-direction: column;
+        justify-content: center;
+        align-items: center;
+        z-index: 9999;
+        box-sizing: border-box;
+        padding: 0 20px 20px 20px;
+    }
+    #iframe h1{
+        width: 100%;
+        line-height: 60px;
+        text-align: center;
+        font-weight: 600;
+        color: #333333;
+        font-size: 20px;
+    }
+    #iframe p{
+        width: 100%;
+        line-height: 20px;
+        text-align: left;
+        font-weight: 600;
+        color: #666666;
+    }
+    #iframe .p2,.p4{
+        width: 100%;
+        height: 40px;
+        border-radius: 4px;
+        background: #FFFFFF;
+        BOX-SIZING: border-box;
+        padding: 0 10px;
+        line-height: 40px;
+        border: 1px solid #e1e1e1;
+        margin: 5px 0;
+        color: #666666;
+    }
+    #onlineForm{
+        display: flex;
+        flex-direction: column;
+        width: 100%;
+        justify-content: center;
+        align-items: center;
+    }
+    #iframe input[type="submit"]{
+        font-style: normal;
+        width: 180px;
+        height: 40px;
+        border-radius: 20px;
+        border: none;
+        background: linear-gradient(90deg, #FF9300 0%, #FF5B00 100%);
+        color: #FFFFFF;
+        cursor: pointer;
+        margin-top: 10px;
+    }
 }
 
 

+ 1 - 0
src/main/resources/static/js/pay/caimei-hlbpay.js

@@ -18,6 +18,7 @@ var payContainer = new Vue({
             payType:'1',
         },
         iframe:'',
+        isIframe: false,
         orderFlag:1,// 是否是订单  0非订单 1订单
         couponInfo:{},
         bankListB2BData:[],// 企业网银银行列表

+ 377 - 373
src/main/resources/static/js/pay/mixin/hlb_payMixin.js

@@ -1,373 +1,377 @@
-'use strict';
-
-var hlbPayMixin = function () {// 合利宝支付渠道
-	return {
-		methods: {
-			hlb_PayOrderPcMallPay(){// 正常订单网银支付通道
-				var _this = this;
-				var params = {//正常订单
-					payType:'YL',
-					payAmount:_this.payAmount,
-					bankCode:_this.payInfo.payBankNum,
-					returnUrl:'https://www.caimei365.com/pay/success.html?pageType=www&type=success&payAmount='+_this.payAmount,
-					shopOrderId:_this.payInfo.shopOrderId,
-					userType:_this.payInfo.payUserType
-				};
-				_this.isSubMitStatus=true;
-				console.log('正常订单合利宝网银支付通道',params)
-				PayApi.PayOrderPcMallPay(params,function(response){
-					if(response.code == 0){
-						_this.isPayAlert = true;
-						_this.iframe = response.data;
-						_this.$nextTick(() => {
-							var onlineForm = document.getElementById('onlineForm');
-							onlineForm.setAttribute('target', '_blank')
-							_this.mbOrderId = onlineForm.P2_orderId.value
-							console.log('mbOrderId',_this.mbOrderId)
-							_this.isSubMitStatus=false;
-							onlineForm.submit();
-							document.getElementById('onlineForm').remove();
-						})
-					}else{
-						_this.isSubMitStatus=false;
-						CAIMEI.Alert(response.msg,'确定',false);
-					}
-				})
-			},
-			hlb_PayOrderPcScanAliPay (){// 正常订单支付宝通道
-				var _this = this;
-				var params = {//正常订单
-					payType:'ZFBEWM',
-					payAmount:_this.payAmount,
-					returnUrl:'https://www.caimei365.com/',
-					shopOrderId:_this.payInfo.shopOrderId
-				};
-				_this.isSubMitStatus=true;
-				console.log('正常订单支付宝通道',params)
-				PayApi.PayOrderPcScanAliPay(params,function(response){
-					if(response.code == 0){
-						console.log('data',response.data)
-						_this.isPayAlert = true;
-						_this.isSubMitStatus=false;
-						_this.mbOrderId = response.data.rt5_orderId;
-						_this.payInfo.payMobileUrl = response.data.rt8_qrcode;
-						_this.payInfo.payData = {
-							mbOrderId:_this.mbOrderId,
-							type:_this.payInfo.payBankNum,
-							shopOrderId:_this.payInfo.shopOrderId,
-							amount:_this.payAmount,
-							url:_this.payInfo.payMobileUrl
-						};
-						CAIMEI.Storage.setItem('payData',JSON.stringify(_this.payInfo.payData));
-						if(!isPC){
-							location.href = _this.payInfo.payMobileUrl;
-						}else{
-							window.open("/pay/caimei-paymobile.html?pageType=0");
-						}
-					}else{
-						CAIMEI.Alert(response.msg,'确定',false);
-						_this.isSubMitStatus=false;
-					}
-				})
-			},
-			hlb_PayOrderMiniWxPay (){// 正常订单微信支付通道
-				console.log('正常订单微信支付通道')
-				var _this = this;
-				if(!isPC){
-					var orderInfo = {//正常订单微信二维码参数
-						pageType:0,
-						shopOrderId:_this.payInfo.shopOrderId,
-						payAmount:_this.payAmount
-					};
-					_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;
-				}else{
-					_this.payInfo.payData = {//正常订单
-						type:_this.payInfo.payBankNum,
-						shopOrderId:_this.payInfo.shopOrderId,
-						amount:_this.payAmount,
-						url:_this.payInfo.payMobileUrl
-					};
-					CAIMEI.Storage.setItem('payData',JSON.stringify(_this.payInfo.payData));
-					window.open("/pay/caimei-paymobile.html?pageType=0");
-					_this.isPayAlert = true;
-				}
-			},
-			hlb_PayCouponUnionPayFn () { // 网银支付购买优惠券
-				console.log('网银支付购买优惠券');
-				var _this = this;
-				var params = {
-					source:2, //支付来源 1 小程序 2 WWW
-					payType:'YL',
-					userId:_this.userId,
-					couponId: _this.couponId,
-					couponRecordId:_this.couponRecordId,
-					bankCode: this.payInfo.payBankNum,
-					returnUrl: 'https://www.caimei365.com/pay/success.html?pageType=www&type=success&payAmount='+_this.couponInfo.moneyCouponPrice,
-					userType: _this.payInfo.payUserType,
-				};
-				PayApi.PayCouponUnionPay(params, function (response) {
-					if (response.code == 0) {
-						_this.isPayAlert = true;
-						_this.iframe = response.data
-						_this.$nextTick(() => {
-							var onlineForm = document.getElementById('onlineForm');
-							onlineForm.setAttribute('target', '_blank')
-							_this.mbOrderId = onlineForm.P2_orderId.value
-							console.log('mbOrderId',_this.mbOrderId)
-							_this.isSubMitStatus=false;
-							onlineForm.submit();
-						})
-					} else {
-						_this.isSubMitStatus = false;
-						CAIMEI.Alert(response.msg, '确定', false);
-					}
-				});
-			},
-			hlb_PayCouponMiniWxPay(){ // 微信支付优惠券
-				console.log('微信支付优惠券');
-				if (!isPC) {
-					var orderInfo = {//普通订单微信二维码参数
-						pageType: 3,
-						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";
-					location.href = this.payInfo.payMobileUrl;
-				} else {
-					this.payInfo.payData = {
-						type: this.payInfo.payBankNum,
-						amount: this.couponInfo.moneyCouponPrice,
-						url: this.payInfo.payMobileUrl,
-						couponId:this.couponId,
-						couponRecordId:this.couponRecordId,
-						userId:this.userId
-					};
-					CAIMEI.Storage.setItem('payData', JSON.stringify(this.payInfo.payData));
-					window.open("/pay/caimei-paymobile.html?pageType=3");
-					this.isPayAlert = true;
-				}
-			},
-			hlb_PayCouponAliPay(){ // 支付宝支付优惠券
-				var _this = this;
-				console.log('支付宝支付优惠券');
-				var params = {
-					source:2, //支付来源 1 小程序 2 WWW
-					payType:'ZFBEWM',
-					userId:_this.userId,
-					couponId: _this.couponInfo.couponId,
-					couponRecordId:_this.couponRecordId,
-					returnUrl: 'https://www.caimei365.com/',
-				};
-				PayApi.PayCouponMiniScanAliPay(params, function(response){
-					console.log(response);
-					if (response.code === 0) {
-						_this.isPayAlert = true;
-						_this.mbOrderId = response.data.rt5_orderId;
-						_this.payInfo.payMobileUrl = response.data.rt8_qrcode;
-						_this.payInfo.payData = {
-							type: _this.payInfo.payBankNum,
-							mbOrderId: _this.mbOrderId,
-							amount: _this.couponInfo.moneyCouponPrice,
-							url: _this.payInfo.payMobileUrl,
-							couponId:_this.couponId,
-							userId:_this.userId
-						};
-						CAIMEI.Storage.setItem('payData', JSON.stringify(_this.payInfo.payData));
-						if (!isPC) {
-							location.href = _this.payInfo.payMobileUrl;
-						} else {
-							window.open("/pay/caimei-paymobile.html?pageType=3");
-						}
-					} else {
-						CAIMEI.Alert(response.msg, '确定', false);
-						_this.isSubMitStatus = false;
-					}
-				});
-			},
-			hlb_PayVipPcMallPay(){// 超级会员网银支付通道
-				var _this = this;
-				var params = {
-					payType:'YL',
-					bankCode: this.payInfo.payBankNum,
-					returnUrl: 'https://www.caimei365.com/pay/success.html?pageType=vip&type=success&payAmount='+_this.payAmount,
-					userType: _this.payInfo.payUserType,
-					vipRecordId: _this.vipRecordId
-				};
-				_this.isSubMitStatus=true;
-				PayApi.PayVipPcMallPay(params, function (response) {
-					if (response.code == 0) {
-						_this.isPayAlert = true;
-						_this.iframe = response.data;
-						_this.$nextTick(() => {
-							var onlineForm = document.getElementById('onlineForm');
-							onlineForm.setAttribute('target', '_blank')
-							_this.mbOrderId = onlineForm.P2_orderId.value
-							console.log('mbOrderId',_this.mbOrderId)
-							_this.isSubMitStatus=false;
-							onlineForm.submit();
-						})
-					} else {
-						_this.isSubMitStatus = false;
-						CAIMEI.Alert(response.msg, '确定', false);
-					}
-				});
-			},
-			hlb_PayVipScanAliPay(){ // 超级会员支付宝通道
-				var _this = this;
-				var params = {
-					payType:'ZFBEWM',
-					vipRecordId: _this.vipRecordId,
-					bankCode: _this.payInfo.payBankNum,
-					userType: _this.payInfo.payUserType,
-					returnUrl: 'https://www.caimei365.com/',
-				};
-				_this.isSubMitStatus = true;
-				PayApi.PayVipScanAliPay(params, function(response){
-					console.log(response);
-					if (response.code === 0) {
-						_this.isPayAlert = true;
-						_this.isSubMitStatus = false;
-						_this.mbOrderId = response.data.rt5_orderId;
-						_this.payInfo.payMobileUrl = response.data.rt8_qrcode;
-						_this.payInfo.payData = {
-							mbOrderId: _this.mbOrderId,
-							type: _this.payInfo.payBankNum,
-							amount: _this.payAmount,
-							url: _this.payInfo.payMobileUrl,
-						};
-						CAIMEI.Storage.setItem('payData', JSON.stringify(_this.payInfo.payData));
-						if (!isPC) {
-							location.href = _this.payInfo.payMobileUrl;
-						} else {
-							window.open("/pay/caimei-paymobile.html?pageType=2&duration=" + _this.comboInfo.duration);
-						}
-					} else {
-						CAIMEI.Alert(response.msg, '确定', false);
-						_this.isSubMitStatus = false;
-					}
-				});
-			},
-			hlb_PayVipMiniWxPay(){ // 超级会员微信支付通道
-				var _this = this;
-				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=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;
-				} 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;
-				}
-			},
-			hlb_PayOrdersecondUnion (){// 二手发布网银支付通道
-				var _this = this;
-				var params = {//二手
-					payType:'YL',
-					bankCode:_this.payInfo.payBankNum,
-					returnUrl:'https://www.caimei365.com/pay/success.html?pageType=second&type=success&payAmount='+_this.payAmount,
-					productId:_this.productID,
-					userType:_this.payInfo.payUserType,
-				};
-				_this.isSubMitStatus=true;
-				PayApi.PayOrdersecondUnion(params,function(response){
-					if(response.code == 0){
-						_this.isPayAlert = true;
-						_this.iframe = response.data
-						_this.$nextTick(() => {
-							var onlineForm = document.getElementById('onlineForm');
-							onlineForm.setAttribute('target', '_blank')
-							_this.mbOrderId = onlineForm.P2_orderId.value
-							console.log('mbOrderId',_this.mbOrderId)
-							_this.isSubMitStatus=false;
-							onlineForm.submit();
-						})
-					}else{
-						CAIMEI.Alert(response.msg,'确定',false);
-						_this.isSubMitStatus=false;
-					}
-				})
-			},
-			hlb_PayOrdersecondScanAliPay (){// 二手发布支付宝通道
-				var _this = this;
-				var params = {//二手
-					payType:'ZFBEWM',
-					returnUrl:'https://www.caimei365.com/',
-					productId:_this.productID,
-				};
-				_this.isSubMitStatus=true;
-				PayApi.PayOrdersecondScanAliPay(params,function(response){
-					if(response.code == 0){
-						_this.isPayAlert = true;
-						_this.isSubMitStatus=false;
-						_this.mbOrderId = response.data.rt5_orderId;
-						_this.payInfo.payMobileUrl = response.data.rt8_qrcode;
-						_this.payInfo.payData = {
-							mbOrderId:_this.mbOrderId,
-							type:_this.payInfo.payBankNum,
-							productId:_this.productID,
-							amount:_this.payAmount,
-							url:_this.payInfo.payMobileUrl
-						};
-						CAIMEI.Storage.setItem('payData',JSON.stringify(_this.payInfo.payData));
-						window.open("/pay/caimei-paymobile.html?pageType=1");
-					}else{
-						CAIMEI.Alert(response.msg,'确定',false);
-						_this.isSubMitStatus=false;
-					}
-				})
-			},
-			hlb_PaySecondMiniWxPay (){// 二手发布微信支付通道
-				var _this = this;
-				if(!isPC){// h5跳 H5支付页
-					var orderInfo = {//二手微信二维码参数
-						pageType:1,
-						productId:_this.productID,
-						payAmount:_this.payAmount
-					};
-					_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;
-				}else{// PC 跳扫码支付页
-					_this.payInfo.payData = {//二手
-						type:_this.payInfo.payBankNum,
-						productId:_this.productID,
-						amount:_this.payAmount,
-						url:_this.payInfo.payMobileUrl
-					};
-					CAIMEI.Storage.setItem('payData',JSON.stringify(_this.payInfo.payData));
-					window.open("/pay/caimei-paymobile.html?pageType=1");
-					_this.isPayAlert = true;
-				}
-			},
-			hlb_CopyLinkPaySubmitFn (params) {
-				var _this = this;
-				console.log('合利宝支付链接');
-				PayApi.PayOrderPayLink(params,function(response){
-						_this.bankPayLink_url = response.data;
-						var oInput = document.createElement("textarea");
-						oInput.value = _this.bankPayLink_url;
-						document.body.appendChild(oInput);
-						oInput.select(); // 选择对象
-						document.execCommand("Copy"); // 执行浏览器复制命令
-						document.body.removeChild(oInput);
-						CAIMEI.dialog('复制成功');
-					}
-				)
-			},
-		}
-	};
-}();
+'use strict';
+
+var hlbPayMixin = function () {// 合利宝支付渠道
+	return {
+		methods: {
+			hlb_PayOrderPcMallPay(){// 正常订单网银支付通道
+				const _this = this;
+				const params = {//正常订单
+					payType: 'YL',
+					payAmount: _this.payAmount,
+					bankCode: _this.payInfo.payBankNum,
+					returnUrl: 'https://www.caimei365.com/pay/success.html?pageType=www&type=success&payAmount=' + _this.payAmount,
+					shopOrderId: _this.payInfo.shopOrderId,
+					userType: _this.payInfo.payUserType
+				};
+				_this.isSubMitStatus=true;
+				console.log('正常订单合利宝网银支付通道',params)
+				PayApi.PayOrderPcMallPay(params,function(response){
+					if(response.code === 0){
+						_this.iframe = response.data
+						_this.isIframe = true
+						_this.$nextTick(() => {
+							const onlineForm = document.getElementById('onlineForm');
+							onlineForm.setAttribute('target', '_blank')
+							_this.mbOrderId = onlineForm.P2_orderId.value
+							console.log('mbOrderId',_this.mbOrderId)
+							_this.isSubMitStatus=false;
+							$('input[type="submit"]').on('click', function(e) {
+								_this.isPayAlert = true;
+								_this.isIframe = false
+								onlineForm.submit();
+								document.getElementById('onlineForm').remove();
+							})
+						})
+					}else{
+						_this.isSubMitStatus=false;
+						CAIMEI.Alert(response.msg,'确定',false);
+					}
+				})
+			},
+			hlb_PayOrderPcScanAliPay (){// 正常订单支付宝通道
+				var _this = this;
+				var params = {//正常订单
+					payType:'ZFBEWM',
+					payAmount:_this.payAmount,
+					returnUrl:'https://www.caimei365.com/',
+					shopOrderId:_this.payInfo.shopOrderId
+				};
+				_this.isSubMitStatus=true;
+				console.log('正常订单支付宝通道',params)
+				PayApi.PayOrderPcScanAliPay(params,function(response){
+					if(response.code == 0){
+						console.log('data',response.data)
+						_this.isPayAlert = true;
+						_this.isSubMitStatus=false;
+						_this.mbOrderId = response.data.rt5_orderId;
+						_this.payInfo.payMobileUrl = response.data.rt8_qrcode;
+						_this.payInfo.payData = {
+							mbOrderId:_this.mbOrderId,
+							type:_this.payInfo.payBankNum,
+							shopOrderId:_this.payInfo.shopOrderId,
+							amount:_this.payAmount,
+							url:_this.payInfo.payMobileUrl
+						};
+						CAIMEI.Storage.setItem('payData',JSON.stringify(_this.payInfo.payData));
+						if(!isPC){
+							location.href = _this.payInfo.payMobileUrl;
+						}else{
+							window.open("/pay/caimei-paymobile.html?pageType=0");
+						}
+					}else{
+						CAIMEI.Alert(response.msg,'确定',false);
+						_this.isSubMitStatus=false;
+					}
+				})
+			},
+			hlb_PayOrderMiniWxPay (){// 正常订单微信支付通道
+				console.log('正常订单微信支付通道')
+				var _this = this;
+				if(!isPC){
+					var orderInfo = {//正常订单微信二维码参数
+						pageType:0,
+						shopOrderId:_this.payInfo.shopOrderId,
+						payAmount:_this.payAmount
+					};
+					_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;
+				}else{
+					_this.payInfo.payData = {//正常订单
+						type:_this.payInfo.payBankNum,
+						shopOrderId:_this.payInfo.shopOrderId,
+						amount:_this.payAmount,
+						url:_this.payInfo.payMobileUrl
+					};
+					CAIMEI.Storage.setItem('payData',JSON.stringify(_this.payInfo.payData));
+					window.open("/pay/caimei-paymobile.html?pageType=0");
+					_this.isPayAlert = true;
+				}
+			},
+			hlb_PayCouponUnionPayFn () { // 网银支付购买优惠券
+				console.log('网银支付购买优惠券');
+				var _this = this;
+				var params = {
+					source:2, //支付来源 1 小程序 2 WWW
+					payType:'YL',
+					userId:_this.userId,
+					couponId: _this.couponId,
+					couponRecordId:_this.couponRecordId,
+					bankCode: this.payInfo.payBankNum,
+					returnUrl: 'https://www.caimei365.com/pay/success.html?pageType=www&type=success&payAmount='+_this.couponInfo.moneyCouponPrice,
+					userType: _this.payInfo.payUserType,
+				};
+				PayApi.PayCouponUnionPay(params, function (response) {
+					if (response.code == 0) {
+						_this.isPayAlert = true;
+						_this.iframe = response.data
+						_this.$nextTick(() => {
+							var onlineForm = document.getElementById('onlineForm');
+							onlineForm.setAttribute('target', '_blank')
+							_this.mbOrderId = onlineForm.P2_orderId.value
+							console.log('mbOrderId',_this.mbOrderId)
+							_this.isSubMitStatus=false;
+							onlineForm.submit();
+						})
+					} else {
+						_this.isSubMitStatus = false;
+						CAIMEI.Alert(response.msg, '确定', false);
+					}
+				});
+			},
+			hlb_PayCouponMiniWxPay(){ // 微信支付优惠券
+				console.log('微信支付优惠券');
+				if (!isPC) {
+					var orderInfo = {//普通订单微信二维码参数
+						pageType: 3,
+						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";
+					location.href = this.payInfo.payMobileUrl;
+				} else {
+					this.payInfo.payData = {
+						type: this.payInfo.payBankNum,
+						amount: this.couponInfo.moneyCouponPrice,
+						url: this.payInfo.payMobileUrl,
+						couponId:this.couponId,
+						couponRecordId:this.couponRecordId,
+						userId:this.userId
+					};
+					CAIMEI.Storage.setItem('payData', JSON.stringify(this.payInfo.payData));
+					window.open("/pay/caimei-paymobile.html?pageType=3");
+					this.isPayAlert = true;
+				}
+			},
+			hlb_PayCouponAliPay(){ // 支付宝支付优惠券
+				var _this = this;
+				console.log('支付宝支付优惠券');
+				var params = {
+					source:2, //支付来源 1 小程序 2 WWW
+					payType:'ZFBEWM',
+					userId:_this.userId,
+					couponId: _this.couponInfo.couponId,
+					couponRecordId:_this.couponRecordId,
+					returnUrl: 'https://www.caimei365.com/',
+				};
+				PayApi.PayCouponMiniScanAliPay(params, function(response){
+					console.log(response);
+					if (response.code === 0) {
+						_this.isPayAlert = true;
+						_this.mbOrderId = response.data.rt5_orderId;
+						_this.payInfo.payMobileUrl = response.data.rt8_qrcode;
+						_this.payInfo.payData = {
+							type: _this.payInfo.payBankNum,
+							mbOrderId: _this.mbOrderId,
+							amount: _this.couponInfo.moneyCouponPrice,
+							url: _this.payInfo.payMobileUrl,
+							couponId:_this.couponId,
+							userId:_this.userId
+						};
+						CAIMEI.Storage.setItem('payData', JSON.stringify(_this.payInfo.payData));
+						if (!isPC) {
+							location.href = _this.payInfo.payMobileUrl;
+						} else {
+							window.open("/pay/caimei-paymobile.html?pageType=3");
+						}
+					} else {
+						CAIMEI.Alert(response.msg, '确定', false);
+						_this.isSubMitStatus = false;
+					}
+				});
+			},
+			hlb_PayVipPcMallPay(){// 超级会员网银支付通道
+				var _this = this;
+				var params = {
+					payType:'YL',
+					bankCode: this.payInfo.payBankNum,
+					returnUrl: 'https://www.caimei365.com/pay/success.html?pageType=vip&type=success&payAmount='+_this.payAmount,
+					userType: _this.payInfo.payUserType,
+					vipRecordId: _this.vipRecordId
+				};
+				_this.isSubMitStatus=true;
+				PayApi.PayVipPcMallPay(params, function (response) {
+					if (response.code == 0) {
+						_this.isPayAlert = true;
+						_this.iframe = response.data;
+						_this.$nextTick(() => {
+							var onlineForm = document.getElementById('onlineForm');
+							onlineForm.setAttribute('target', '_blank')
+							_this.mbOrderId = onlineForm.P2_orderId.value
+							console.log('mbOrderId',_this.mbOrderId)
+							_this.isSubMitStatus=false;
+							onlineForm.submit();
+						})
+					} else {
+						_this.isSubMitStatus = false;
+						CAIMEI.Alert(response.msg, '确定', false);
+					}
+				});
+			},
+			hlb_PayVipScanAliPay(){ // 超级会员支付宝通道
+				var _this = this;
+				var params = {
+					payType:'ZFBEWM',
+					vipRecordId: _this.vipRecordId,
+					bankCode: _this.payInfo.payBankNum,
+					userType: _this.payInfo.payUserType,
+					returnUrl: 'https://www.caimei365.com/',
+				};
+				_this.isSubMitStatus = true;
+				PayApi.PayVipScanAliPay(params, function(response){
+					console.log(response);
+					if (response.code === 0) {
+						_this.isPayAlert = true;
+						_this.isSubMitStatus = false;
+						_this.mbOrderId = response.data.rt5_orderId;
+						_this.payInfo.payMobileUrl = response.data.rt8_qrcode;
+						_this.payInfo.payData = {
+							mbOrderId: _this.mbOrderId,
+							type: _this.payInfo.payBankNum,
+							amount: _this.payAmount,
+							url: _this.payInfo.payMobileUrl,
+						};
+						CAIMEI.Storage.setItem('payData', JSON.stringify(_this.payInfo.payData));
+						if (!isPC) {
+							location.href = _this.payInfo.payMobileUrl;
+						} else {
+							window.open("/pay/caimei-paymobile.html?pageType=2&duration=" + _this.comboInfo.duration);
+						}
+					} else {
+						CAIMEI.Alert(response.msg, '确定', false);
+						_this.isSubMitStatus = false;
+					}
+				});
+			},
+			hlb_PayVipMiniWxPay(){ // 超级会员微信支付通道
+				var _this = this;
+				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=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;
+				} 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;
+				}
+			},
+			hlb_PayOrdersecondUnion (){// 二手发布网银支付通道
+				var _this = this;
+				var params = {//二手
+					payType:'YL',
+					bankCode:_this.payInfo.payBankNum,
+					returnUrl:'https://www.caimei365.com/pay/success.html?pageType=second&type=success&payAmount='+_this.payAmount,
+					productId:_this.productID,
+					userType:_this.payInfo.payUserType,
+				};
+				_this.isSubMitStatus=true;
+				PayApi.PayOrdersecondUnion(params,function(response){
+					if(response.code == 0){
+						_this.isPayAlert = true;
+						_this.iframe = response.data
+						_this.$nextTick(() => {
+							var onlineForm = document.getElementById('onlineForm');
+							onlineForm.setAttribute('target', '_blank')
+							_this.mbOrderId = onlineForm.P2_orderId.value
+							console.log('mbOrderId',_this.mbOrderId)
+							_this.isSubMitStatus=false;
+							onlineForm.submit();
+						})
+					}else{
+						CAIMEI.Alert(response.msg,'确定',false);
+						_this.isSubMitStatus=false;
+					}
+				})
+			},
+			hlb_PayOrdersecondScanAliPay (){// 二手发布支付宝通道
+				var _this = this;
+				var params = {//二手
+					payType:'ZFBEWM',
+					returnUrl:'https://www.caimei365.com/',
+					productId:_this.productID,
+				};
+				_this.isSubMitStatus=true;
+				PayApi.PayOrdersecondScanAliPay(params,function(response){
+					if(response.code == 0){
+						_this.isPayAlert = true;
+						_this.isSubMitStatus=false;
+						_this.mbOrderId = response.data.rt5_orderId;
+						_this.payInfo.payMobileUrl = response.data.rt8_qrcode;
+						_this.payInfo.payData = {
+							mbOrderId:_this.mbOrderId,
+							type:_this.payInfo.payBankNum,
+							productId:_this.productID,
+							amount:_this.payAmount,
+							url:_this.payInfo.payMobileUrl
+						};
+						CAIMEI.Storage.setItem('payData',JSON.stringify(_this.payInfo.payData));
+						window.open("/pay/caimei-paymobile.html?pageType=1");
+					}else{
+						CAIMEI.Alert(response.msg,'确定',false);
+						_this.isSubMitStatus=false;
+					}
+				})
+			},
+			hlb_PaySecondMiniWxPay (){// 二手发布微信支付通道
+				var _this = this;
+				if(!isPC){// h5跳 H5支付页
+					var orderInfo = {//二手微信二维码参数
+						pageType:1,
+						productId:_this.productID,
+						payAmount:_this.payAmount
+					};
+					_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;
+				}else{// PC 跳扫码支付页
+					_this.payInfo.payData = {//二手
+						type:_this.payInfo.payBankNum,
+						productId:_this.productID,
+						amount:_this.payAmount,
+						url:_this.payInfo.payMobileUrl
+					};
+					CAIMEI.Storage.setItem('payData',JSON.stringify(_this.payInfo.payData));
+					window.open("/pay/caimei-paymobile.html?pageType=1");
+					_this.isPayAlert = true;
+				}
+			},
+			hlb_CopyLinkPaySubmitFn (params) {
+				var _this = this;
+				console.log('合利宝支付链接');
+				PayApi.PayOrderPayLink(params,function(response){
+						_this.bankPayLink_url = response.data;
+						var oInput = document.createElement("textarea");
+						oInput.value = _this.bankPayLink_url;
+						document.body.appendChild(oInput);
+						oInput.select(); // 选择对象
+						document.execCommand("Copy"); // 执行浏览器复制命令
+						document.body.removeChild(oInput);
+						CAIMEI.dialog('复制成功');
+					}
+				)
+			},
+		}
+	};
+}();

+ 6 - 2
src/main/resources/templates/pay/caimei-hlbpay.html

@@ -164,10 +164,14 @@
                                     <p v-if="!isPC">复制支付链接成功后,将链接发送到电脑端进行付款</p>
                                 </div>
                             </template>
-                            <template>
+                            <template v-if="orderFlag === 1">
+                                <div class="iframe-fiexd" v-if="isIframe">
+                                    <div class="iframe" id="iframe" v-html="iframe"></div>
+                                </div>
+                            </template>
+                            <template >
                                 <div class="iframe" v-html="iframe" style="display: none;"></div>
                             </template>
-
                         </div>
                     </div>
                 </div>