fix(competition): 修复附件上传按钮失灵问题
- 添加 getToken 导入 - 为 avue-form 上传组件添加 Blade-Auth headers 认证 Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
@@ -959,6 +959,7 @@ import {
|
|||||||
ATTACHMENT_TYPES,
|
ATTACHMENT_TYPES,
|
||||||
ATTACHMENT_TYPE_LABELS
|
ATTACHMENT_TYPE_LABELS
|
||||||
} from '@/api/martial/attachment'
|
} from '@/api/martial/attachment'
|
||||||
|
import { getToken } from '@/utils/auth'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CompetitionManagement',
|
name: 'CompetitionManagement',
|
||||||
@@ -1002,6 +1003,7 @@ export default {
|
|||||||
propsHttp: {
|
propsHttp: {
|
||||||
res: 'data',
|
res: 'data',
|
||||||
},
|
},
|
||||||
|
headers: { 'Blade-Auth': 'bearer ' + getToken() },
|
||||||
action: '/blade-resource/oss/endpoint/put-file'
|
action: '/blade-resource/oss/endpoint/put-file'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user