|
@@ -1,6 +1,9 @@
|
|
|
/**
|
|
|
*Created by ZHJY on 2020/7/14.
|
|
|
*/
|
|
|
+// var _WS_SERVICE = 'http://192.168.2.67:8010'; //维沙网银支付本地联调
|
|
|
+var _WS_SERVICE = 'https://mall2b-b.caimei365.com';//维沙网银支付测试联调
|
|
|
+// var _WS_SERVICE = 'https://mall2b.caimei365.com';//维沙网银支付正式联调
|
|
|
var payContainer = new Vue({
|
|
|
el:"#payContainer",
|
|
|
data: {
|
|
@@ -114,8 +117,7 @@ var payContainer = new Vue({
|
|
|
methods: {
|
|
|
LinkInfoOrderBank:function(linkLogo){//初始化支付订单加密数据
|
|
|
var _self = this;
|
|
|
- PayApi.PayOrderLinkData({linkLogo:linkLogo},function(response){
|
|
|
- console.log(response);
|
|
|
+ $.getJSON(_WS_SERVICE+"/PayOrder/linkData",{ linkLogo: linkLogo }).done(function (response) {
|
|
|
if(response.code === 0){
|
|
|
var _data = response.data;
|
|
|
_self.payInfo.PAY_ORDERID = _data.orderPayLink.orderId;
|
|
@@ -160,10 +162,13 @@ var payContainer = new Vue({
|
|
|
CAIMEI.Alert(response.msg,'确定',false);
|
|
|
}
|
|
|
});
|
|
|
+ // PayApi.PayOrderLinkData({linkLogo:linkLogo},function(response){
|
|
|
+
|
|
|
+ // });
|
|
|
},
|
|
|
infoPayOrderCheckoutCounter:function(){//初始化订单数据
|
|
|
var _self = this;
|
|
|
- PayApi.PayOrderCheckoutCounter({orderId:_self.payInfo.PAY_ORDERID},function(response){
|
|
|
+ $.getJSON(_WS_SERVICE+"/PayOrder/checkoutCounter",{ orderId:_self.payInfo.PAY_ORDERID }).done(function (response) {
|
|
|
if(response.code === 0){
|
|
|
var data = response.data;
|
|
|
_self.discernReceiptList = data.discernReceipt;
|
|
@@ -185,7 +190,10 @@ var payContainer = new Vue({
|
|
|
}else{
|
|
|
CAIMEI.Alert(response.msg,'确定',false);
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
+ // PayApi.PayOrderCheckoutCounter({orderId:_self.payInfo.PAY_ORDERID},function(response){
|
|
|
+
|
|
|
+ // })
|
|
|
},
|
|
|
PaySubmitFn:function(){//立即支付
|
|
|
var _self = this;
|
|
@@ -206,22 +214,39 @@ var payContainer = new Vue({
|
|
|
PayOrderPcMallPay:function(params){//网银支付请求
|
|
|
var _self = this;
|
|
|
_self.isSubMitStatus=true;
|
|
|
- PayApi.PayOrderPcMallPay(params,function(response){
|
|
|
- if(response.code == 0){
|
|
|
- _self.isPayAlert = true;
|
|
|
- _self.mbOrderId = response.data.data.mbOrderId;
|
|
|
- window.open(response.data.data.payUrl);
|
|
|
- _self.isSubMitStatus=false;
|
|
|
- }else{
|
|
|
- CAIMEI.Alert(response.msg,'确定',false);
|
|
|
- _self.isSubMitStatus=false;
|
|
|
+ $.ajax({
|
|
|
+ type: 'post',
|
|
|
+ url: _WS_SERVICE+'/PayOrder/pcMallPay',
|
|
|
+ xhrFields: {
|
|
|
+ withCredentials: true
|
|
|
+ },
|
|
|
+ data: JSON.stringify(params),
|
|
|
+ headers:{
|
|
|
+ 'Content-Type':'application/json;charset=UTF-8',
|
|
|
+ },
|
|
|
+ success : function (response) {
|
|
|
+ if(response.code == 0){
|
|
|
+ _self.isPayAlert = true;
|
|
|
+ _self.mbOrderId = response.data.data.mbOrderId;
|
|
|
+ window.open(response.data.data.payUrl);
|
|
|
+ _self.isSubMitStatus=false;
|
|
|
+ }else{
|
|
|
+ CAIMEI.Alert(response.msg,'确定',false);
|
|
|
+ _self.isSubMitStatus=false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error : function (res) {
|
|
|
+
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
+ // PayApi.PayOrderPcMallPay(params,function(response){
|
|
|
+
|
|
|
+ // })
|
|
|
},
|
|
|
RefreshBody:function(){//刷新弹窗
|
|
|
var _self = this;
|
|
|
_self.isPayAlert = false;
|
|
|
- PayApi.PayOrderFindOrderStatus({mbOrderId:_self.mbOrderId},function(response){
|
|
|
+ $.getJSON(_WS_SERVICE+"/PayOrder/findOrderStatus",{ mbOrderId:_self.mbOrderId }).done(function (response) {
|
|
|
_self.isPayAlert = false;
|
|
|
var data = response.data.data;
|
|
|
if(data.status === '1'){
|