feat: 完善app首页应用

This commit is contained in:
橙子
2023-10-08 23:50:53 +08:00
parent 1b7d6d09a8
commit 0b8848d63f
4 changed files with 27 additions and 5 deletions

View File

@@ -1,11 +1,11 @@
import myaxios from '@/utils/myaxios'
export default{
upload(type:string,data:any){
upload(data:any){
return myaxios({
url: `/file/upload/${type}`,
url: `/file`,
headers:{"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"},
method: 'POST',
method: 'post',
data:data
});
}

View File

@@ -97,8 +97,8 @@ const afterRead = (file: any) => {
});
}
fileApi.upload("image", formData).then((response: any) => {
images.value.push(...response.data);
fileApi.upload(formData).then((response: any) => {
images.value.push(...response.data.map((x:any)=>x.id));
if (file.length == undefined) {
file.status = "done";