1.打包扫码支付

2.解决银联重定向问题
huipay-h5
杨杰 1 year ago
parent 2481e22a17
commit 7669d96f0e
  1. 16
      App.vue
  2. 4
      Utils/Api.js
  3. 14
      pages/welcome/welcome.vue

@ -15,15 +15,15 @@
snNo: '', // sn snNo: '', // sn
platformType: '', // platformType: '', //
// //
// url: 'https://hsg.dctpay.com/user', url: 'https://hsg.dctpay.com/user',
// graurl: 'https://pay.dctpay.com/crest', graurl: 'https://pay.dctpay.com/crest',
// imgUrl: 'https://pay.dctpay.com/filesystem/', imgUrl: 'https://pay.dctpay.com/filesystem/',
// imageWxImg: 'https://hsgcs.dctpay.com/filesystem/wxApplets/',
//
url: 'https://hsgcs.dctpay.com/user',
graurl:'https://gratia-pay.dctpay.com/crest',
imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
imageWxImg: 'https://hsgcs.dctpay.com/filesystem/wxApplets/', imageWxImg: 'https://hsgcs.dctpay.com/filesystem/wxApplets/',
//
// url: 'https://hsgcs.dctpay.com/user',
// graurl:'https://gratia-pay.dctpay.com/crest',
// imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
// imageWxImg: 'https://hsgcs.dctpay.com/filesystem/wxApplets/',
}, },
onLaunch: function() { onLaunch: function() {

@ -65,6 +65,6 @@ export const queryUserDiscountList = params => {
} }
// 获取拉卡拉银联用户id // 获取拉卡拉银联用户id
export const getLkLUnionUserId = params => { export const getUnionUserId = params => {
return POST('POST', `${grabase}/tradeOrder/getLkLUnionUserId`, params).then(res => res.data); return POST('POST', `${grabase}/tradeOrder/getUnionUserId`, params).then(res => res.data);
} }

@ -7,7 +7,7 @@
import { import {
getH5AccessToken, getH5AccessToken,
getAlipayUserId, getAlipayUserId,
getLkLUnionUserId getUnionUserId
} from '../../Utils/Api.js'; } from '../../Utils/Api.js';
let app = getApp(); let app = getApp();
export default { export default {
@ -69,7 +69,7 @@ import {
this.getAlipayUserId(); this.getAlipayUserId();
} }
if (app.globalData.code && app.globalData.platformType == 'UQRCODEPAY') { if (app.globalData.code && app.globalData.platformType == 'UQRCODEPAY') {
this.getLkLUnionUserId(); this.getUnionUserId();
} }
} else { } else {
var arr1 = window.location.href; var arr1 = window.location.href;
@ -129,13 +129,13 @@ import {
}); });
}, },
//openid //openid
getLkLUnionUserId() { getUnionUserId() {
let params = { let params = {
"serialNumber": app.globalData.snNo, "serialNumber": app.globalData.snNo,
"userAuthCode": app.globalData.code, "userAuthCode": app.globalData.code,
"appUpIdentifier": this.appUpIdentifier "appUpIdentifier": this.appUpIdentifier
} }
getLkLUnionUserId(params).then(res => { getUnionUserId(params).then(res => {
if (res.return_code == '000000' && res.return_data.respData.userId) { if (res.return_code == '000000' && res.return_data.respData.userId) {
app.globalData.openId = res.return_data.respData.userId; app.globalData.openId = res.return_data.respData.userId;
uni.setStorage({ uni.setStorage({
@ -154,15 +154,15 @@ import {
jumpWeb() { jumpWeb() {
if (app.globalData.platformType == 'WECHAT') { if (app.globalData.platformType == 'WECHAT') {
location.href = location.href =
'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa075e8509802f826&redirect_uri=https://hsg.dctpay.com/wechat_authorize/?redirect_uri=https://gratia-pay.dctpay.com/scanPay&response_type=code&scope=snsapi_base#wechat_redirect'; 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa075e8509802f826&redirect_uri=https://hsg.dctpay.com/wechat_authorize/?redirect_uri=https://pay.dctpay.com/scanPay&response_type=code&scope=snsapi_base#wechat_redirect';
} }
if (app.globalData.platformType == 'ALIPAY') { if (app.globalData.platformType == 'ALIPAY') {
location.href = location.href =
'https://openauth.alipay.com/oauth2/publicAppAuthorize.htm?app_id=2021003176605875&scope=auth_base&redirect_uri=https://pay.dctpay.com/redirect?redirect_uri=https%3A%2F%2Fgratia-pay.dctpay.com%2FscanPay%3Fsn%3D1000017476'; 'https://openauth.alipay.com/oauth2/publicAppAuthorize.htm?app_id=2021003176605875&scope=auth_base&redirect_uri=https://pay.dctpay.com/redirect?redirect_uri=https%3A%2F%2Fpay.dctpay.com%2FscanPay%3Fsn%3D1000017476';
} }
if (app.globalData.platformType == 'UQRCODEPAY') { if (app.globalData.platformType == 'UQRCODEPAY') {
location.href = location.href =
'https://qr.95516.com/qrcGtwWeb-web/api/userAuth?version=1.0.0&redirectUrl=https://pgratia-pay.dctpay.com'; 'https://qr.95516.com/qrcGtwWeb-web/api/userAuth?version=1.0.0&redirectUrl=https://pay.dctpay.com/scanPay';
} }
}, },
} }

Loading…
Cancel
Save