From 188b4033bacda313eeec3ff4fb38e42ee562476a Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 25 Jul 2024 23:46:07 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E3=80=91PAY=EF=BC=9A=E5=BE=AE=E4=BF=A1=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=20certSerialNo=20=E6=9B=BF=E4=BB=A3=20privat?= =?UTF-8?q?eCertContent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/channel/WeixinChannelForm.vue | 57 +++---------------- 1 file changed, 9 insertions(+), 48 deletions(-) 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 字段 */