diff --git a/src/components/CreateServiceOrder/index.vue b/src/components/CreateServiceOrder/index.vue index f2ae5b2..57f55e6 100644 --- a/src/components/CreateServiceOrder/index.vue +++ b/src/components/CreateServiceOrder/index.vue @@ -47,13 +47,38 @@ class="bg-F5F7FA border-box p-12 rounded-10 font-size-14 font-500 color-171717 mb-12" > 照片上传 + - - {{ zniconsMap["zn-camera"] }} - + + + + + + + + + {{ zniconsMap["zn-camera"] }} + + @@ -72,8 +97,9 @@ @@ -123,12 +149,16 @@ const handleChooseImage = () => { }); }; +const handleDeleteImage = () => { + contentImgUrl.value = ""; +}; + const updateImagehandle = (file) => { if (!file) { return; } updateImageFile(file).then((res) => { - contentImgUrl.value = res.data?.url || ""; + contentImgUrl.value = res.data; }); }; @@ -220,4 +250,9 @@ onMounted(() => { diff --git a/src/request/api/UpdateFile.js b/src/request/api/UpdateFile.js index c8fa4d5..db9912c 100644 --- a/src/request/api/UpdateFile.js +++ b/src/request/api/UpdateFile.js @@ -2,7 +2,7 @@ import { BASE_URL } from "@/request/base/baseUrl"; import { getCurrentConfig } from "@/constant/base"; export const updateImageFile = (file) => { - const url = BASE_URL + "/common/upload"; + const url = BASE_URL + "/hotelBiz/hotBizCommon/upload"; const token = uni.getStorageSync("token"); const clientId = getCurrentConfig().clientId; @@ -20,8 +20,8 @@ export const updateImageFile = (file) => { file: "file", }, success: (uploadFileRes) => { - console.log(uploadFileRes.data); - resolve(uploadFileRes.data); + console.log("uploadFileRes: ", uploadFileRes); + resolve(JSON.parse(uploadFileRes.data)); }, fail: (err) => { console.error("上传图片失败:", err); diff --git a/src/static/scss/height.scss b/src/static/scss/height.scss index da01276..b041705 100644 --- a/src/static/scss/height.scss +++ b/src/static/scss/height.scss @@ -2,6 +2,10 @@ height: 100vh; } +.h-full { + height: 100%; +} + .h-80 { height: 80px; } diff --git a/src/static/scss/width.scss b/src/static/scss/width.scss index 3fb544a..97edd43 100644 --- a/src/static/scss/width.scss +++ b/src/static/scss/width.scss @@ -9,3 +9,6 @@ .w-50 { width: 50%; } +.w-80 { + width: 80px; +}