This commit is contained in:
Leo_Ding 2025-07-03 17:14:57 +08:00
parent 3da46ccfee
commit 43013b712b
2 changed files with 8 additions and 4 deletions

View File

@ -5,3 +5,10 @@ export const getRegion = (params) => request.basic.get('/region', params)
// 获取 验证码ID
export const getCaptcha = (params) => request.basic.get('/api/v1/captcha/id', params)
//上传图片
export const uploadFile=(params)=>request.basic.post('/api/v1/upload',params,{
headers: {
'Content-Type': 'multipart/form-data'
},
})

View File

@ -106,9 +106,6 @@ const handlePreview = async (file) => {
// handleChange
const handleChange = ({ file, fileList: updatedList }) => {
console.log(111)
console.log(file.status)
console.log(updatedList)
//
if (file.status === 'done') {
const response = file.response;
@ -145,7 +142,7 @@ const handleCustomRequest = async (options) => {
const formData = new FormData();
formData.append('file', file);
const { data } = await apis.common.uploadImg(formData);
const { data } = await apis.common.uploadFile(formData);
const fullUrl = config('http.apiBasic') + data;
//