Skip to content

Commit 0275cb6

Browse files
committed
fix: 修复 el-upload 组件提示 http-request 属性报错的问题
1 parent e1d2305 commit 0275cb6

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/views/pay/app/components/channel/WeixinChannelForm.vue

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@
8080
:http-request="keyContentUpload"
8181
>
8282
<el-button type="primary">
83-
<Icon icon="ep:upload" class="mr-5px" /> 点击上传
83+
<Icon icon="ep:upload" class="mr-5px" />
84+
点击上传
8485
</el-button>
8586
</el-upload>
8687
</el-form-item>
@@ -120,7 +121,8 @@
120121
:http-request="privateKeyContentUpload"
121122
>
122123
<el-button type="primary">
123-
<Icon icon="ep:upload" class="mr-5px" /> 点击上传
124+
<Icon icon="ep:upload" class="mr-5px" />
125+
点击上传
124126
</el-button>
125127
</el-upload>
126128
</el-form-item>
@@ -148,7 +150,8 @@
148150
:http-request="privateCertContentUpload"
149151
>
150152
<el-button type="primary">
151-
<Icon icon="ep:upload" class="mr-5px" /> 点击上传
153+
<Icon icon="ep:upload" class="mr-5px" />
154+
点击上传
152155
</el-button>
153156
</el-upload>
154157
</el-form-item>
@@ -310,7 +313,7 @@ const pemFileBeforeUpload = (file) => {
310313
/**
311314
* 读取 apiclient_key.pem 到 privateKeyContent 字段
312315
*/
313-
const privateKeyContentUpload = (event) => {
316+
const privateKeyContentUpload = async (event) => {
314317
const readFile = new FileReader()
315318
readFile.onload = (e: any) => {
316319
formData.value.config.privateKeyContent = e.target.result
@@ -321,7 +324,7 @@ const privateKeyContentUpload = (event) => {
321324
/**
322325
* 读取 apiclient_cert.pem 到 privateCertContent 字段
323326
*/
324-
const privateCertContentUpload = (event) => {
327+
const privateCertContentUpload = async (event) => {
325328
const readFile = new FileReader()
326329
readFile.onload = (e: any) => {
327330
formData.value.config.privateCertContent = e.target.result
@@ -332,7 +335,7 @@ const privateCertContentUpload = (event) => {
332335
/**
333336
* 读取 apiclient_cert.p12 到 keyContent 字段
334337
*/
335-
const keyContentUpload = (event) => {
338+
const keyContentUpload = async (event) => {
336339
const readFile = new FileReader()
337340
readFile.onload = (e: any) => {
338341
formData.value.config.keyContent = e.target.result.split(',')[1]

0 commit comments

Comments
 (0)