@@ -678,7 +707,7 @@
:loading="isLoading"
loadingText="支付中"
:disabled="payBtnDisabled"
- @tap="quickPay(ifcz)"
+ @tap="quickPay(isRecharge)"
color="linear-gradient(to right, #005BAC, #005BAC )"
>
{{ '立即支付' }}
@@ -713,7 +742,12 @@
-
+
{{ '支付宝支付' }}
@@ -746,7 +780,12 @@ import * as api from '@/config/pay.js'
import QRCode from 'qrcodejs2'
import successDialog from '@/components/successDialog.vue'
import * as act from '@/config/activity.js'
-import { PAY_REDIRECT_URL, PAY_TYPE, PAY_CHANEL } from '@/util/constant.js'
+import {
+ PAY_REDIRECT_URL,
+ PAY_TYPE,
+ PAY_CHANEL,
+ PAY_AUTH,
+} from '@/util/constant.js'
var payStatus
export default {
components: {
@@ -755,6 +794,7 @@ export default {
data() {
return {
PAY_TYPE,
+ PAY_AUTH,
payList: {},
isNoBind: false,
isLoading: false,
@@ -785,10 +825,10 @@ export default {
sucPay: 0,
content: '支付成功',
wxPopup: false,
- wxPopup1: false,
+ aliQrCodeVisible: false,
luckydrawData: {},
- ifcz: false,
- czJe: '',
+ isRecharge: false,
+ rechargeAmount: '',
qrcodeimg: '',
onlinePay: true,
unBindCode: '',
@@ -796,22 +836,20 @@ export default {
},
computed: {
payBtnDisabled() {
- if (this.ifcz) {
+ if (this.isRecharge) {
return !Object.values(this.payList).some(val => val)
}
return false
},
},
onLoad(options) {
- this.paramsPost = JSON.parse(options.paramsPost)
- console.log(
- '%c [ this.paramsPost ]-734',
- 'font-size:13px; background:#777244; color:#bbb688;',
- this.paramsPost
- )
+ this.paramsPost = JSON.parse(options.paramsPost || '{}')
+ this.getPayConfig()
+ clearInterval(this.clockTime)
+
this.pkCountry = uni.getStorageSync('pkCountry')
- if (this.paramsPost.ifcz) {
- this.ifcz = this.paramsPost.ifcz
+ if (this.paramsPost.isRecharge) {
+ this.isRecharge = this.paramsPost.isRecharge
this.businessType = 3
uni.setNavigationBarTitle({
title: '充值',
@@ -820,39 +858,28 @@ export default {
uni.setNavigationBarTitle({
title: '订单支付',
})
- this.ifcz = false
- if (JSON.parse(options.paramsPost).orderType == 4) {
- this.orderCode = this.paramsPost.orderCode
- this.luckydrawData = this.paramsPost.luckydrawData
- // 抽奖支付处理(查询订单支付信息以及显示等)
- this.businessType = 4 //抽奖
- this.specialArea = this.paramsPost.specialArea
- this.getLuckdrawDetail()
- } else {
- this.userInfo = uni.getStorageSync('User')
- if (this.userInfo.registerFans == 0) {
- this.isShare = true
- }
+ this.isRecharge = false
+ this.userInfo = uni.getStorageSync('User')
+ if (this.userInfo.registerFans == 0) {
+ this.isShare = true
+ }
- this.specialArea =
- this.paramsPost.specialArea || this.paramsPost.orderType
- this.orderCode = this.paramsPost.orderCode
- this.businessType = options.businessType
- this.onlinePay = this.stringToBoolean(options.onlinePay || 'true')
- // this.getInfo()
+ this.specialArea =
+ this.paramsPost.specialArea || this.paramsPost.orderType
+ this.orderCode = this.paramsPost.orderCode
+ this.businessType = options.businessType
+ this.onlinePay = this.stringToBoolean(options.onlinePay || 'true')
+ // this.getInfo()
- // 获取订单信息
- this.getOrderInfo()
- if (!this.isShare) {
- // 获取消费信息
- this.getSpendInfo()
- }
+ // 获取订单信息
+ this.getOrderInfo()
+ if (!this.isShare) {
+ // 获取消费信息
+ this.getSpendInfo()
}
}
// 获取支付配置
- this.getPayConfig()
- clearInterval(this.clockTime)
},
onShow() {
@@ -903,7 +930,7 @@ export default {
},
closewxPopup() {
this.wxPopup = false
- this.wxPopup1 = false
+ this.aliQrCodeVisible = false
this.$refs.qrCodeUrlWx.innerHTML = ''
clearInterval(payStatus)
},
@@ -1007,7 +1034,7 @@ export default {
// this.$refs.successDialog.showSuccess(res.data)
// })
} else {
- if (this.ifcz) {
+ if (this.isRecharge) {
uni.showToast({
title: '充值成功',
icon: 'none',
@@ -1031,9 +1058,9 @@ export default {
})
}
},
- quickPay(cz) {
- if (cz) {
- if (!this.czJe || this.czJe <= 0) {
+ async quickPay(isRecharge) {
+ if (isRecharge) {
+ if (!this.rechargeAmount || this.rechargeAmount <= 0) {
uni.showToast({
title: '请输入正确的充值金额',
})
@@ -1047,168 +1074,83 @@ export default {
PAY_TYPE.HUI_FU_BANK_CARD,
PAY_TYPE.JING_DONG_BANK_CARD,
PAY_TYPE.TONG_LIAN_BANK_CARD,
- ].includes(this.whatPay)
+ ].includes(this.whatPay.slice(0, 2))
) {
- if (cz) {
+ if (isRecharge) {
//充值
api
.preCharge({
- rechargeAmount: this.czJe,
+ rechargeAmount: this.rechargeAmount,
})
.then(res => {
this.paramsPost = res.data
this.orderCode = res.orderCode
- if (this.whatPay == 11) {
- this.weChatPay(5)
- } else if (this.whatPay == 12) {
- this.scanPayBfWx(5)
- } else if (this.whatPay == 13) {
- this.scanPayBfWx(6)
- } else if (this.whatPay == 32) {
- this.weChatPay(3)
- } else if (this.whatPay == 73) {
- this.scanPayWx(7)
- } else if (this.whatPay == 74) {
- this.scanPayAl(7)
+ if (this.whatPay == PAY_TYPE.JING_DONG_H5) {
+ this.redirectPay(PAY_CHANEL[this.whatPay])
+ } else if (
+ [PAY_TYPE.BAO_FU_WECHAT, PAY_TYPE.HUI_FU_WECHAT].includes(
+ this.whatPay
+ )
+ ) {
+ this.scanPayBfWx(PAY_CHANEL[this.whatPay])
+ } else if (this.whatPay == PAY_TYPE.TONG_LIAN_WECHAT) {
+ this.weChatPay(PAY_CHANEL[this.whatPay])
}
})
} else {
- if (
- [
- PAY_TYPE.BAO_FU_WECHAT,
- PAY_TYPE.TONG_LIAN_WECHAT,
- PAY_TYPE.JING_DONG_WECHAT,
- ].includes(this.whatPay)
+ if ([PAY_TYPE.JING_DONG_H5].includes(this.whatPay)) {
+ this.redirectPay(PAY_CHANEL[this.whatPay])
+ } else if (
+ [PAY_TYPE.BAO_FU_WECHAT_SCAN, PAY_TYPE.HUI_FU_WECHAT].includes(
+ this.whatPay
+ )
) {
- console.log(PAY_CHANEL[this.whatPay], this.whatPay, PAY_CHANEL)
- this.weChatPay(PAY_CHANEL[this.whatPay])
- } else if (this.whatPay == PAY_TYPE.BAO_FU_WECHAT_SCAN) {
- this.scanPayBfWx(5)
- } else if (this.whatPay == PAY_TYPE.HUI_FU_WECHAT) {
- this.scanPayBfWx(6)
+ this.scanPayBfWx(PAY_CHANEL[this.whatPay])
} else if (this.whatPay == PAY_TYPE.WECHAT_PAY) {
- this.scanPayWx(7)
+ this.scanPayWx(PAY_CHANEL[this.whatPay])
} else if (this.whatPay == PAY_TYPE.ALI_PAY) {
- this.scanPayAl(7)
+ this.scanPayAl(PAY_CHANEL[this.whatPay])
}
}
} else {
- if (this.whatPay.slice(0, 2) == PAY_TYPE.HUI_FU_BANK_CARD) {
- let indexed = this.whatPay.slice(2, 4)
- if (!cz) {
- let params = {
- businessType: this.businessType, //订单类型
- businessCode: this.orderCode,
- payChannel: 6, //汇付
- payType: 3, //银行卡
- bindCode: this.hfList[indexed].bindCode,
- }
- api.unifiedorder(params).then(response => {
- this.isBank = PAY_TYPE.HUI_FU_BANK_CARD
- this.bindCode = this.hfList[indexed].bindCode
- this.isPw = true
+ const indexed = this.whatPay.slice(2, 4)
+ const payTypeEnum = this.whatPay.slice(0, 2)
+ const bankListMap = {
+ [PAY_TYPE.HUI_FU_BANK_CARD]: this.hfList[indexed].bindCode,
+ [PAY_TYPE.JING_DONG_BANK_CARD]: this.jdList[indexed].bindCode,
+ [PAY_TYPE.TONG_LIAN_BANK_CARD]: this.tlList[indexed].bindCode,
+ }
+ this.bindCode = bankListMap[payTypeEnum]
+ const params = {
+ businessType: isRecharge ? 3 : this.businessType, //订单类型
+ payChannel: PAY_CHANEL[payTypeEnum],
+ payType: 3, //银行卡
+ bindCode: bankListMap[payTypeEnum],
+ }
+ if (!isRecharge) {
+ Object.assign(params, {
+ businessCode: this.orderCode,
+ })
+ } else {
+ try {
+ const orderCode = await this.preCharge()
+ Object.assign(params, {
+ businessCode: orderCode,
})
- this.checkPayStatus(params)
- } else {
- api
- .preCharge({
- rechargeAmount: this.czJe,
- })
- .then(res => {
- let params = {
- businessType: 3, //订单类型充值
- businessCode: res.orderCode,
- payChannel: 6, //汇付
- payType: 3, //银行卡
- bindCode: this.hfList[indexed].bindCode,
- }
- api.unifiedorder(params).then(response => {
- this.isBank = PAY_TYPE.HUI_FU_BANK_CARD
- this.bindCode = this.hfList[indexed].bindCode
- this.orderCode = res.orderCode
-
- this.isPw = true
- })
- })
- this.checkPayStatus(params)
- }
- } else if (this.whatPay.slice(0, 2) == PAY_TYPE.JING_DONG_BANK_CARD) {
- let indexed = this.whatPay.slice(2, 4)
- if (!cz) {
- let params = {
- businessType: this.businessType, //订单类型
- businessCode: this.orderCode,
- payChannel: 4, //京东
- payType: 3, //银行卡
- bindCode: this.jdList[indexed].bindCode,
- }
- api.unifiedorder(params).then(response => {
- this.isBank = PAY_TYPE.JING_DONG_BANK_CARD
- this.bindCode = this.jdList[indexed].bindCode
- this.isPw = true
+ this.orderCode = orderCode
+ } catch (error) {
+ uni.showToast({
+ title: error,
+ icon: 'none',
})
- this.checkPayStatus(params)
- } else {
- api
- .preCharge({
- rechargeAmount: this.czJe,
- })
- .then(res => {
- let params = {
- businessType: 3, //订单类型充值
- businessCode: res.orderCode,
- payChannel: 4, //京东
- payType: 3, //银行卡
- bindCode: this.jdList[indexed].bindCode,
- }
- api.unifiedorder(params).then(response => {
- this.isBank = PAY_TYPE.JING_DONG_BANK_CARD
- this.bindCode = this.jdList[indexed].bindCode
- this.orderCode = res.orderCode
- this.isPw = true
- })
- })
- this.checkPayStatus(params)
- }
- } else if (this.whatPay.slice(0, 2) == PAY_TYPE.TONG_LIAN_BANK_CARD) {
- let indexed = this.whatPay.slice(2, 4)
- if (!cz) {
- let params = {
- businessType: this.businessType, //订单类型
- businessCode: this.orderCode,
- payChannel: 3, //通联
- payType: 3, //银行卡
- bindCode: this.tlList[indexed].bindCode,
- }
- api.unifiedorder(params).then(response => {
- this.isBank = PAY_TYPE.TONG_LIAN_BANK_CARD
- this.bindCode = this.tlList[indexed].bindCode
- this.isPw = true
- })
- this.checkPayStatus(params)
- } else {
- api
- .preCharge({
- rechargeAmount: this.czJe,
- })
- .then(res => {
- let params = {
- businessType: 3, //订单类型充值
- businessCode: res.orderCode,
- payChannel: 3, //通联
- payType: 3, //银行卡
- bindCode: this.tlList[indexed].bindCode,
- }
- api.unifiedorder(params).then(response => {
- this.isBank = PAY_TYPE.TONG_LIAN_BANK_CARD
- this.bindCode = this.tlList[indexed].bindCode
- this.orderCode = res.orderCode
- this.isPw = true
- })
- })
- this.checkPayStatus(params)
+ return
}
}
+ api.unifiedorder(params).then(response => {
+ this.isBank = this.whatPay.slice(0, 2)
+ this.isPw = true
+ this.checkPayStatus(params)
+ })
}
} else {
api.generate().then(res => {
@@ -1220,143 +1162,62 @@ export default {
},
scanPayBfWx(val) {
let params
- if (this.ifcz) {
- params = {
- businessType: 3, //订单类型充值
- businessCode: this.orderCode,
- payChannel: val,
- payType: 2,
- }
- } else {
- params = {
- businessType: this.businessType, //订单类型充值
- businessCode: this.orderCode,
- payChannel: val,
- payType: 2,
- }
+ params = {
+ businessType: this.isRecharge ? 3 : this.businessType, //订单类型充值
+ businessCode: this.orderCode,
+ payChannel: val,
+ payType: 2,
}
api.unifiedorder(params).then(res => {
this.wxPopup = true
- let that = this
- this.$nextTick(() => {
- new QRCode(
- this.$refs.qrCodeUrlWx,
- {
- width: 280,
- height: 280,
- text: res.data,
- colorDark: '#000000',
- colorLight: '#ffffff',
- correctLevel: QRCode.CorrectLevel.Q,
- textAlign: 'center',
- },
- 1000
- )
- setTimeout(() => {
- let qrcodeEle = document.getElementById('qrCodeUrlWx')
- let cvs = qrcodeEle.querySelector('canvas')
- that.qrcodeimg = cvs.toDataURL('image/png')
- }, 1000)
- })
+ this.drawQrcode(res.data)
+ this.checkPayStatus(params)
})
- this.checkPayStatus(params)
},
// 微信支付
scanPayWx(val) {
- let params
- if (this.ifcz) {
- params = {
- businessType: 3, //订单类型充值
- businessCode: this.orderCode,
- payChannel: val,
- payType: 2,
- }
- } else {
- params = {
- businessType: this.businessType, //订单类型充值
- businessCode: this.orderCode,
- payChannel: val,
- payType: 2,
- }
+ const params = {
+ businessType: this.isRecharge ? 3 : this.businessType, //订单类型充值
+ businessCode: this.orderCode,
+ payChannel: val,
+ payType: 2,
}
api.unifiedorder(params).then(res => {
this.wxPopup = true
- let that = this
- this.$nextTick(() => {
- new QRCode(
- this.$refs.qrCodeUrlWx,
- {
- width: 280,
- height: 280,
- text: res.data,
- colorDark: '#000000',
- colorLight: '#ffffff',
- correctLevel: QRCode.CorrectLevel.Q,
- textAlign: 'center',
- },
- 1000
- )
- setTimeout(() => {
- let qrcodeEle = document.getElementById('qrCodeUrlWx')
- let cvs = qrcodeEle.querySelector('canvas')
- that.qrcodeimg = cvs.toDataURL('image/png')
- }, 1000)
- })
+ this.drawQrcode(res.data)
+ this.checkPayStatus(params)
})
- this.checkPayStatus(params)
},
// 支付宝支付
scanPayAl(val) {
- let params
- if (this.ifcz) {
- params = {
- businessType: 3, //订单类型充值
- businessCode: this.orderCode,
- payChannel: val,
- payType: 1,
- }
- } else {
- params = {
- businessType: this.businessType, //订单类型充值
- businessCode: this.orderCode,
- payChannel: val,
- payType: 1,
- }
+ const params = {
+ businessType: this.isRecharge ? 3 : this.businessType, //订单类型充值
+ businessCode: this.orderCode,
+ payChannel: val,
+ payType: 1,
}
api.unifiedorder(params).then(res => {
- this.wxPopup1 = true
- let that = this
- this.$nextTick(() => {
- new QRCode(
- this.$refs.qrCodeUrlWx,
- {
- width: 280,
- height: 280,
- text: res.data,
- colorDark: '#000000',
- colorLight: '#ffffff',
- correctLevel: QRCode.CorrectLevel.Q,
- textAlign: 'center',
- },
- 1000
- )
- setTimeout(() => {
- let qrcodeEle = document.getElementById('qrCodeUrlWx')
- let cvs = qrcodeEle.querySelector('canvas')
- that.qrcodeimg = cvs.toDataURL('image/png')
- }, 1000)
- })
+ this.aliQrCodeVisible = true
+ this.drawQrcode(res.data)
+ this.checkPayStatus(params)
})
- this.checkPayStatus(params)
},
getPayAuthToken(payChannel) {
return new Promise((resolve, reject) => {
+ const extParam = {
+ source: !!this.isRecharge,
+ orderCode: this.orderCode,
+ specialArea: this.specialArea,
+ }
+ // 将extParam对象转换为JSON字符串,再转换为base64编码
+ const extParamBase64 = btoa(JSON.stringify(extParam))
const params = {
payChannel: payChannel,
payType: 2,
appletFlag: 0,
- businessType: this.ifcz ? 3 : this.businessType,
+ businessType: this.isRecharge ? 3 : this.businessType,
businessCode: this.orderCode,
+ extParam: extParamBase64,
}
api.unifiedorder(params).then(res => {
if (res.code === 200) {
@@ -1372,6 +1233,38 @@ export default {
})
})
},
+ drawQrcode(text) {
+ let that = this
+ this.$nextTick(() => {
+ new QRCode(
+ this.$refs.qrCodeUrlWx,
+ {
+ width: 280,
+ height: 280,
+ text,
+ colorDark: '#000000',
+ colorLight: '#ffffff',
+ correctLevel: QRCode.CorrectLevel.Q,
+ textAlign: 'center',
+ },
+ 1000
+ )
+ setTimeout(() => {
+ let qrcodeEle = document.getElementById('qrCodeUrlWx')
+ let cvs = qrcodeEle.querySelector('canvas')
+ that.qrcodeimg = cvs.toDataURL('image/png')
+ }, 1000)
+ })
+ },
+ redirectPay(payChannel) {
+ this.getPayAuthToken(payChannel).then(url => {
+ if (navigator.userAgent.includes('MicroMessenger')) {
+ window.location.href = url
+ } else {
+ window.open(url)
+ }
+ })
+ },
weChatPay(payChannel) {
this.getPayAuthToken(payChannel)
.then(res => {
@@ -1391,7 +1284,7 @@ export default {
// 宝付微信支付
// scanPayBfWxJump(val) {
// let params
- // if (this.ifcz) {
+ // if (this.isRecharge) {
// params = {
// businessType: 3, //订单类型充值
// businessCode: this.orderCode,
@@ -1418,7 +1311,7 @@ export default {
// // 通联微信支付
// scanPayTlWxJump(val) {
// let params
- // if (this.ifcz) {
+ // if (this.isRecharge) {
// params = {
// businessType: 3, //订单类型充值
// businessCode: this.orderCode,
@@ -1472,16 +1365,22 @@ export default {
this.$forceUpdate()
},
getOrderInfo() {
- api
- .orderInfo({
- specialArea: this.specialArea,
- orderCode: this.orderCode,
- pkSettleCountry: this.pkCountry,
- })
- .then(res => {
- this.orderData = res.data
- this.downTime()
- })
+ return new Promise((resolve, reject) => {
+ api
+ .orderInfo({
+ specialArea: this.specialArea,
+ orderCode: this.orderCode,
+ pkSettleCountry: this.pkCountry,
+ })
+ .then(res => {
+ this.orderData = res.data
+ resolve(res.data)
+ this.downTime()
+ })
+ .catch(err => {
+ reject(err)
+ })
+ })
},
downTime() {
let that = this
@@ -1534,7 +1433,7 @@ export default {
})
} else {
this.wxPopup = false
- this.wxPopup1 = false
+ this.aliQrCodeVisible = false
this.showSucce = true
}
} else {
@@ -1555,6 +1454,21 @@ export default {
// 作为返回值返回
return h + ':' + m + ':' + s
},
+ preCharge() {
+ return new Promise((resolve, reject) => {
+ api
+ .preCharge({
+ rechargeAmount: this.rechargeAmount,
+ })
+ .then(res => {
+ if (res.code == 200) {
+ resolve(res.orderCode)
+ } else {
+ reject(res.msg)
+ }
+ })
+ })
+ },
},
}
diff --git a/pages/pay/success.vue b/pages/pay/success.vue
new file mode 100644
index 0000000..535a6cc
--- /dev/null
+++ b/pages/pay/success.vue
@@ -0,0 +1,348 @@
+
+
+
+
+
+
+
+
+
+ ✓
+
+
+
+
+
+
+
+
+ {{ paySuccessText }}
+ 您的订单已支付完成
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/pay/treePay.vue b/pages/pay/treePay.vue
index fc85061..ced9593 100644
--- a/pages/pay/treePay.vue
+++ b/pages/pay/treePay.vue
@@ -1,174 +1,223 @@
-
-
-
-
- {{'待支付金额'}}
-
- {{ userInfo.currencyIcon }}{{ objTree.amount | numberToCurrency }}
+
+
+
+ {{ '待支付金额' }}
+
+ {{ userInfo.currencyIcon }}{{ objTree.amount | numberToCurrency }}
+
+
+
+
+
+
+ {{ '钱包支付' }}
-
-
-
-
- {{'钱包支付'}}
-
-
- {{'消费账户'}}
-
-
- {{ account.consumeBalance | numberToCurrency | isLocal }}
-
-
- -{{ account.consumeDeduct | numberToCurrency | isLocal }}
-
-
-
-
- {{'奖金账户'}}
-
-
- {{ account.bonusBalance | numberToCurrency | isLocal}}
-
-
- -{{ account.bonusDeduct | numberToCurrency | isLocal}}
-
-
-
-
- {{'政策账户'}}
-
-
- {{ payDetail.account3 | numberToCurrency | isLocal}}
-
-
- -{{ payDetail.payAccount3 | numberToCurrency | isLocal}}
-
-
-
-
- {{'现金账户'}}
-
-
- {{ account.cashBalance | numberToCurrency | isLocal}}
-
-
- -{{ account.cashDeduct | numberToCurrency | isLocal}}
-
-
-
-
-
-
- {{'重消账户'}}
-
-
- {{ payDetail.account5 | numberToCurrency | isLocal}}
-
-
- -{{ payDetail.payAccount5 | numberToCurrency | isLocal}}
-
-
-
-
- {{'积分账户'}}
-
-
- {{ payDetail.account6 | numberToCurrency | isLocal }}
-
-
- -{{ payDetail.payAccount6 | numberToCurrency | isLocal}}
-
-
-
-
- {{'鼓励账户'}}
-
-
- {{ payDetail.account7 | numberToCurrency | isLocal}}
-
-
- -{{ payDetail.payAccount7 | numberToCurrency | isLocal}}
-
-
-
-
- {{'复购券账户'}}
-
-
- {{ payDetail.account8 | numberToCurrency | isLocal}}
-
-
- -{{ payDetail.payAccount8 | numberToCurrency | isLocal}}
-
-
-
-
- {{'全球积分'}}
-
-
- {{ payDetail.account9 | numberToCurrency | isLocal}}
-
-
- -{{ payDetail.payAccount9 | numberToCurrency | isLocal}}
-
-
-
-
- {{'车奖积分'}}
-
-
- {{ payDetail.account10 | numberToCurrency | isLocal}}
-
-
- -{{ payDetail.payAccount10 | numberToCurrency | isLocal}}
-
-
-
-
-
-
-
-
-
-
- {{'支付验证'}}
-
-
- {{'请输入短信验证码'}}
- {{'请输入密码'}}
-
-
- {{'立即支付'}}
-
-
-
-
+
+
+ {{ '支付验证' }}
+
+ {{ '请输入短信验证码' }}
+ {{ '请输入密码' }}
+
+
+ {{ '立即支付' }}
+
+
+
+
+
+
+
+
+
+ {{ '微信支付' }}
+
+
+
+
+
+
\ No newline at end of file
+
diff --git a/util/constant.js b/util/constant.js
index 5b22082..c978f9d 100644
--- a/util/constant.js
+++ b/util/constant.js
@@ -11,15 +11,31 @@ export const PAY_TYPE = {
TONG_LIAN_WECHAT: 'TONG_LIAN_WECHAT',
TONG_LIAN_BANK_CARD: 'tl',
JING_DONG_BANK_CARD: 'jd',
- JING_DONG_WECHAT: 'JING_DONG_WECHAT',
+ JING_DONG_H5: 'JING_DONG_H5',
+}
+
+export const PAY_AUTH = {
+ [PAY_TYPE.BAO_FU_WECHAT]: 'pay11',
+ [PAY_TYPE.JING_DONG_H5]: 'pay5',
+ [PAY_TYPE.BAO_FU_WECHAT_SCAN]: 'pay12',
+ [PAY_TYPE.HUI_FU_WECHAT]: 'pay13',
+ [PAY_TYPE.WECHAT_PAY]: 'pay73',
+ [PAY_TYPE.ALI_PAY]: 'pay74',
+ [PAY_TYPE.TONG_LIAN_WECHAT]: 'pay32',
+ [PAY_TYPE.HUI_FU_BANK_CARD]: 'pay15',
+ [PAY_TYPE.TONG_LIAN_BANK_CARD]: 'pay33',
+ [PAY_TYPE.JING_DONG_BANK_CARD]: 'pay4',
}
export const PAY_CHANEL = {
- BAO_FU_WECHAT: 5,
- JING_DONG_WECHAT: 4,
- BAO_FU_WECHAT_SCAN: 5,
- HUI_FU_WECHAT: 6,
- WECHAT_PAY: 7,
- ALI_PAY: 7,
- TONG_LIAN_WECHAT: 3,
+ [PAY_TYPE.BAO_FU_WECHAT]: 5,
+ [PAY_TYPE.JING_DONG_H5]: 4,
+ [PAY_TYPE.BAO_FU_WECHAT_SCAN]: 5,
+ [PAY_TYPE.HUI_FU_WECHAT]: 6,
+ [PAY_TYPE.WECHAT_PAY]: 7,
+ [PAY_TYPE.ALI_PAY]: 7,
+ [PAY_TYPE.TONG_LIAN_WECHAT]: 3,
+ [PAY_TYPE.HUI_FU_BANK_CARD]: 6,
+ [PAY_TYPE.TONG_LIAN_BANK_CARD]: 3,
+ [PAY_TYPE.JING_DONG_BANK_CARD]: 4,
}