diff --git a/jeepay-ui-manager/src/views/isv/IsvPayIfConfigList.vue b/jeepay-ui-manager/src/views/isv/IsvPayIfConfigList.vue index 0552d2f..aa4ce42 100644 --- a/jeepay-ui-manager/src/views/isv/IsvPayIfConfigList.vue +++ b/jeepay-ui-manager/src/views/isv/IsvPayIfConfigList.vue @@ -116,6 +116,8 @@ + + @@ -123,13 +125,15 @@ import JeepayCard from '@/components/JeepayCard/JeepayCard' import JeepayUpload from '@/components/JeepayUpload/JeepayUpload' import WxpayPayConfig from './custom/WxpayPayConfig' +import AlipayPayConfig from './custom/AlipayPayConfig' import { API_URL_ISV_PAYCONFIGS_LIST, getIsvPayConfigUnique, req, upload } from '@/api/manage' export default { components: { JeepayCard, JeepayUpload, - WxpayPayConfig + WxpayPayConfig, + AlipayPayConfig }, data () { return { @@ -225,9 +229,14 @@ export default { if (item.type === 'radio') { const valueItems = item.values.split(',') const titleItems = item.titles.split(',') + for (const i in valueItems) { + // 检查参数是否为数字类型 然后赋值给radio值 + let radioVal = valueItems[i] + if (!isNaN((radioVal))) { radioVal = Number(radioVal) } + radioItems.push({ - value: valueItems[i], + value: radioVal, title: titleItems[i] }) } diff --git a/jeepay-ui-manager/src/views/isv/custom/AlipayPayConfig.vue b/jeepay-ui-manager/src/views/isv/custom/AlipayPayConfig.vue new file mode 100644 index 0000000..5a208a8 --- /dev/null +++ b/jeepay-ui-manager/src/views/isv/custom/AlipayPayConfig.vue @@ -0,0 +1,312 @@ + + + + diff --git a/jeepay-ui-manager/src/views/isv/custom/WxpayPayConfig.vue b/jeepay-ui-manager/src/views/isv/custom/WxpayPayConfig.vue index 452e817..ec99759 100644 --- a/jeepay-ui-manager/src/views/isv/custom/WxpayPayConfig.vue +++ b/jeepay-ui-manager/src/views/isv/custom/WxpayPayConfig.vue @@ -36,7 +36,7 @@ - {{ saveObject.ifCode }} 商户参数配置 + {{ saveObject.ifCode }} 服务商参数配置 @@ -158,21 +158,21 @@ export default { } }], key: [{ trigger: 'blur', validator: (rule, value, callback) => { - if (this.ifParams.apiVersion === 'V2' && this.isAdd && !this.ifParams.key) { + if (this.ifParams.apiVersion === 'V2' && this.isAdd && !value) { callback(new Error('请输入API密钥')) } callback() } }], apiV3Key: [{ trigger: 'blur', validator: (rule, value, callback) => { - if (this.ifParams.apiVersion === 'V3' && this.isAdd && !this.ifParams.apiV3Key) { + if (this.ifParams.apiVersion === 'V3' && this.isAdd && !value) { callback(new Error('请输入API V3秘钥')) } callback() } }], serialNo: [{ trigger: 'blur', validator: (rule, value, callback) => { - if (this.ifParams.apiVersion === 'V3' && this.isAdd && !this.ifParams.serialNo) { + if (this.ifParams.apiVersion === 'V3' && this.isAdd && !value) { callback(new Error('请输入序列号')) } callback() @@ -207,10 +207,14 @@ export default { // 参数配置对象,数据初始化 this.ifParams = { apiVersion: 'V2', - 'appSecret_ph': '请输入', - 'key_ph': '请输入', - 'apiV3Key_ph': '请输入', - 'serialNo_ph': '请输入' + appSecret: '', + appSecret_ph: '请输入', + key: '', + key_ph: '请输入', + apiV3Key: '', + apiV3Key_ph: '请输入', + serialNo: '', + serialNo_ph: '请输入' } this.visible = true this.getIsvPayConfig() diff --git a/jeepay-ui-manager/src/views/mchApp/MchPayIfConfigList.vue b/jeepay-ui-manager/src/views/mchApp/MchPayIfConfigList.vue index fb1a738..be1c464 100644 --- a/jeepay-ui-manager/src/views/mchApp/MchPayIfConfigList.vue +++ b/jeepay-ui-manager/src/views/mchApp/MchPayIfConfigList.vue @@ -98,6 +98,8 @@ + + @@ -114,6 +116,7 @@ import { API_URL_MCH_PAYCONFIGS_LIST, API_URL_MCH_PAYPASSAGE_LIST, req, getAvail import MchPayConfigAddOrEdit from './MchPayConfigAddOrEdit' import MchPayPassageAddOrEdit from './MchPayPassageAddOrEdit' import WxpayPayConfig from './custom/WxpayPayConfig' +import AlipayPayConfig from './custom/AlipayPayConfig' import AlipayAuth from './AlipayAuth' // eslint-disable-next-line no-unused-vars @@ -132,6 +135,7 @@ export default { MchPayConfigAddOrEdit, MchPayPassageAddOrEdit, WxpayPayConfig, + AlipayPayConfig, AlipayAuth }, data () { diff --git a/jeepay-ui-manager/src/views/mchApp/custom/AlipayPayConfig.vue b/jeepay-ui-manager/src/views/mchApp/custom/AlipayPayConfig.vue new file mode 100644 index 0000000..3ee439f --- /dev/null +++ b/jeepay-ui-manager/src/views/mchApp/custom/AlipayPayConfig.vue @@ -0,0 +1,333 @@ + + + + diff --git a/jeepay-ui-manager/src/views/mchApp/custom/WxpayPayConfig.vue b/jeepay-ui-manager/src/views/mchApp/custom/WxpayPayConfig.vue index 034d58e..f966c12 100644 --- a/jeepay-ui-manager/src/views/mchApp/custom/WxpayPayConfig.vue +++ b/jeepay-ui-manager/src/views/mchApp/custom/WxpayPayConfig.vue @@ -183,28 +183,27 @@ export default { } }], key: [{ trigger: 'blur', validator: (rule, value, callback) => { - if (this.ifParams.apiVersion === 'V2' && this.isAdd && this.mchType === 1 && !this.ifParams.key) { + if (this.ifParams.apiVersion === 'V2' && this.isAdd && this.mchType === 1 && !value) { callback(new Error('请输入API密钥')) } callback() } }], apiV3Key: [{ trigger: 'blur', validator: (rule, value, callback) => { - if (this.ifParams.apiVersion === 'V3' && this.isAdd && this.mchType === 1 && !this.ifParams.apiV3Key) { + if (this.ifParams.apiVersion === 'V3' && this.isAdd && this.mchType === 1 && !value) { callback(new Error('请输入API V3秘钥')) } callback() } }], serialNo: [{ trigger: 'blur', validator: (rule, value, callback) => { - if (this.ifParams.apiVersion === 'V3' && this.isAdd && this.mchType === 1 && !this.ifParams.serialNo) { + if (this.ifParams.apiVersion === 'V3' && this.isAdd && this.mchType === 1 && !value) { callback(new Error('请输入序列号')) } callback() } }], apiClientKey: [{ trigger: 'blur', validator: (rule, value, callback) => { - console.log(this.ifParams.apiVersion === 'V3' && this.mchType === 1 && !this.ifParams.apiClientKey) if (this.ifParams.apiVersion === 'V3' && this.mchType === 1 && !this.ifParams.apiClientKey) { callback(new Error('请上传私钥文件')) } @@ -242,10 +241,14 @@ export default { // 参数配置对象,数据初始化 this.ifParams = { apiVersion: 'V2', - 'appSecret_ph': '请输入', - 'key_ph': '请输入', - 'apiV3Key_ph': '请输入', - 'serialNo_ph': '请输入' + appSecret: '', + appSecret_ph: '请输入', + key: '', + key_ph: '请输入', + apiV3Key: '', + apiV3Key_ph: '请输入', + serialNo: '', + serialNo_ph: '请输入' } this.visible = true this.getMchPayConfig() diff --git a/jeepay-ui-merchant/src/views/mchApp/MchPayIfConfigList.vue b/jeepay-ui-merchant/src/views/mchApp/MchPayIfConfigList.vue index 3947d70..e6b609a 100644 --- a/jeepay-ui-merchant/src/views/mchApp/MchPayIfConfigList.vue +++ b/jeepay-ui-merchant/src/views/mchApp/MchPayIfConfigList.vue @@ -97,6 +97,8 @@ + + @@ -112,6 +114,7 @@ import { API_URL_MCH_PAYCONFIGS_LIST, API_URL_MCH_PAYPASSAGE_LIST, req, getAvail import MchPayConfigAddOrEdit from './MchPayConfigAddOrEdit' import MchPayPassageAddOrEdit from './MchPayPassageAddOrEdit' import WxpayPayConfig from './custom/WxpayPayConfig' +import AlipayPayConfig from './custom/AlipayPayConfig' import AlipayAuth from './AlipayAuth' // eslint-disable-next-line no-unused-vars @@ -130,6 +133,7 @@ export default { MchPayConfigAddOrEdit, MchPayPassageAddOrEdit, WxpayPayConfig, + AlipayPayConfig, AlipayAuth }, data () { diff --git a/jeepay-ui-merchant/src/views/mchApp/custom/AlipayPayConfig.vue b/jeepay-ui-merchant/src/views/mchApp/custom/AlipayPayConfig.vue new file mode 100644 index 0000000..3ee439f --- /dev/null +++ b/jeepay-ui-merchant/src/views/mchApp/custom/AlipayPayConfig.vue @@ -0,0 +1,333 @@ + + + + diff --git a/jeepay-ui-merchant/src/views/mchApp/custom/WxpayPayConfig.vue b/jeepay-ui-merchant/src/views/mchApp/custom/WxpayPayConfig.vue index 034d58e..f966c12 100644 --- a/jeepay-ui-merchant/src/views/mchApp/custom/WxpayPayConfig.vue +++ b/jeepay-ui-merchant/src/views/mchApp/custom/WxpayPayConfig.vue @@ -183,28 +183,27 @@ export default { } }], key: [{ trigger: 'blur', validator: (rule, value, callback) => { - if (this.ifParams.apiVersion === 'V2' && this.isAdd && this.mchType === 1 && !this.ifParams.key) { + if (this.ifParams.apiVersion === 'V2' && this.isAdd && this.mchType === 1 && !value) { callback(new Error('请输入API密钥')) } callback() } }], apiV3Key: [{ trigger: 'blur', validator: (rule, value, callback) => { - if (this.ifParams.apiVersion === 'V3' && this.isAdd && this.mchType === 1 && !this.ifParams.apiV3Key) { + if (this.ifParams.apiVersion === 'V3' && this.isAdd && this.mchType === 1 && !value) { callback(new Error('请输入API V3秘钥')) } callback() } }], serialNo: [{ trigger: 'blur', validator: (rule, value, callback) => { - if (this.ifParams.apiVersion === 'V3' && this.isAdd && this.mchType === 1 && !this.ifParams.serialNo) { + if (this.ifParams.apiVersion === 'V3' && this.isAdd && this.mchType === 1 && !value) { callback(new Error('请输入序列号')) } callback() } }], apiClientKey: [{ trigger: 'blur', validator: (rule, value, callback) => { - console.log(this.ifParams.apiVersion === 'V3' && this.mchType === 1 && !this.ifParams.apiClientKey) if (this.ifParams.apiVersion === 'V3' && this.mchType === 1 && !this.ifParams.apiClientKey) { callback(new Error('请上传私钥文件')) } @@ -242,10 +241,14 @@ export default { // 参数配置对象,数据初始化 this.ifParams = { apiVersion: 'V2', - 'appSecret_ph': '请输入', - 'key_ph': '请输入', - 'apiV3Key_ph': '请输入', - 'serialNo_ph': '请输入' + appSecret: '', + appSecret_ph: '请输入', + key: '', + key_ph: '请输入', + apiV3Key: '', + apiV3Key_ph: '请输入', + serialNo: '', + serialNo_ph: '请输入' } this.visible = true this.getMchPayConfig()