diff --git a/src/views/pay/app/components/channel/WeixinChannelForm.vue b/src/views/pay/app/components/channel/WeixinChannelForm.vue index cfd46bc0..3ab53e87 100644 --- a/src/views/pay/app/components/channel/WeixinChannelForm.vue +++ b/src/views/pay/app/components/channel/WeixinChannelForm.vue @@ -52,9 +52,6 @@ v-model="formData.config.mchKey" placeholder="请输入商户密钥" clearable - :style="{ width: '100%' }" - type="textarea" - :autosize="{ minRows: 8, maxRows: 8 }" /> - + - - - - - 点击上传 - - - @@ -193,7 +165,7 @@ const formData = ref({ mchKey: '', keyContent: '', privateKeyContent: '', - privateCertContent: '', + certSerialNo: '', apiV3Key: '' } }) @@ -210,8 +182,8 @@ const formRules = { 'config.privateKeyContent': [ { required: true, message: '请上传 apiclient_key.pem 证书', trigger: 'blur' } ], - 'config.privateCertContent': [ - { required: true, message: '请上传 apiclient_cert.pem证 书', trigger: 'blur' } + 'config.certSerialNo': [ + { required: true, message: '请输入证书序列号', trigger: 'blur' } ], 'config.apiV3Key': [{ required: true, message: '请上传 api V3 密钥值', trigger: 'blur' }] } @@ -278,7 +250,7 @@ const resetForm = (appId, code) => { mchKey: '', keyContent: '', privateKeyContent: '', - privateCertContent: '', + certSerialNo: '', apiV3Key: '' } } @@ -286,7 +258,7 @@ const resetForm = (appId, code) => { } /** - * apiclient_cert.p12、apiclient_cert.pem、apiclient_key.pem 上传前的校验 + * apiclient_cert.p12、apiclient_key.pem 上传前的校验 */ const fileBeforeUpload = (file, fileAccept) => { let format = '.' + file.name.split('.')[1] @@ -321,17 +293,6 @@ const privateKeyContentUpload = async (event) => { readFile.readAsText(event.file) } -/** - * 读取 apiclient_cert.pem 到 privateCertContent 字段 - */ -const privateCertContentUpload = async (event) => { - const readFile = new FileReader() - readFile.onload = (e: any) => { - formData.value.config.privateCertContent = e.target.result - } - readFile.readAsText(event.file) -} - /** * 读取 apiclient_cert.p12 到 keyContent 字段 */