diff --git a/src/pages/store/room-detail.vue b/src/pages/store/room-detail.vue index 2fb1056..e1359bf 100644 --- a/src/pages/store/room-detail.vue +++ b/src/pages/store/room-detail.vue @@ -133,7 +133,6 @@ image-mode="scaleToFill" :action="action" @success="RoomDetail.handleUploadSuccess"> - @@ -380,7 +379,7 @@ - @@ -416,7 +415,8 @@ // 标签相关 const showTagSelectPopup = ref(false) const showCreateTagPopup = ref(false) - const newTagName = ref('') + const newTagName = ref('') + console.log("🚀 ~ newTagName:", newTagName.value) const isTagManageMode = ref(false) // 是否处于管理模式 const selectedTags = ref([]) // 临时选中的标签,点击确认后才回填到表单 // Mock 已有标签列表 @@ -522,9 +522,7 @@ const response = JSON.parse(e.file.response) if (response.code) { const avatarUrl = response.data.url - await updateUserInfo({ avatar: avatarUrl }) form.image = avatarUrl - toast.info('图片上传成功') } else { throw new Error('上传失败') } @@ -642,6 +640,9 @@ */ handleCompleteCreateTag: async () => { const tagName = newTagName.value.trim() + console.log("🚀 ~ tagName:", newTagName.value) + console.log("🚀 ~ tagName:", tagName) + if (!tagName) { toast.info('请输入标签名称') return @@ -650,6 +651,7 @@ toast.info('标签不能超过5个字') return } + console.log("🚀 ~ tagName:", tagName) uni.showLoading({ title: '操作者中...' @@ -727,7 +729,7 @@ let params = { id: roomId.value, - img: form.image, + img: form.image.replace(import.meta.env.VITE_UPLOAD_IMAGE_URL, ''), title: form.title, label_id: tags.value.map(tag => tag.id).join(','), price: Number(form.price),