feat: 完成banner展示模块

This commit is contained in:
陈淳
2023-03-20 19:46:47 +08:00
parent 5a4ac549f6
commit b3b3ca3fe4
16 changed files with 74 additions and 40 deletions

View File

@@ -120,11 +120,11 @@ return `${import.meta.env.VITE_APP_BASEAPI}/file/${str}`
//关闭文件上传弹窗
const fileHandleClose=()=>{
fileDialogVisible=false;
fileDialogVisible.value=false;
}
//文件上传成功后
const onSuccess=(response)=>{
fileUrlList.value.push(response[0].id)
fileUrlList.value.push(response.data[0].id)
}
//图片上传
const imgAdd = async (pos, $file) => {
@@ -132,7 +132,7 @@ const imgAdd = async (pos, $file) => {
var formdata = new FormData();
formdata.append('file', $file);
const response = await upload(formdata)
const url = `${import.meta.env.VITE_APP_BASEAPI}/file/${response[0].id}`;
const url = `${import.meta.env.VITE_APP_BASEAPI}/file/${response.data[0].id}`;
console.log(url)
md.value.$img2Url(pos, url);