diff --git a/components/message/chat/chat-layout.vue b/components/message/chat/chat-layout.vue index 2c910bd..6189aef 100644 --- a/components/message/chat/chat-layout.vue +++ b/components/message/chat/chat-layout.vue @@ -4,18 +4,19 @@ - + - + {{ number }} - {{ chatInfo.title }} + {{ displayTitle }} {{ chatInfo.area }} @@ -37,7 +38,7 @@ - {{ chatInfo.title }} + {{ displayTitle }} @@ -56,7 +57,8 @@ + :src="`/static/image/phone-message/${phone}/chat-left.png`" + @click="phone === 'oppo' ? chooseImage() : null"> @@ -66,10 +68,11 @@ src="/static/image/phone-message/huawei/down.png"> - - + @focus="onFocus" @blur="onBlur"> --> + - + diff --git a/pages/message/list-index.vue b/pages/message/list-index.vue index d074fb4..c5e6710 100644 --- a/pages/message/list-index.vue +++ b/pages/message/list-index.vue @@ -30,13 +30,18 @@ 头像URL: - - - - - + + + + + + + + + × + @@ -210,7 +215,7 @@ onShow(() => { if (cachedNotice !== '') { data.noticeCount = Number(cachedNotice) } - } catch (e) { } + } catch (e) { console.error(e) } }) @@ -228,7 +233,7 @@ onPageScroll((e) => { * @returns {Promise} 持久化后的文件路径 */ const saveImageToLocal = (tempFilePath) => { - return new Promise((resolve, reject) => { + return new Promise((resolve) => { // 如果是已经持久化的路径或是静态资源,直接返回 if (!tempFilePath || tempFilePath.startsWith('_doc') || tempFilePath.startsWith('/static')) { return resolve(tempFilePath) @@ -277,10 +282,18 @@ const deleteItem = (item) => { if (res.confirm) { const idx = defaultList.value.findIndex(i => i.id === item.id) if (idx > -1) { - // 删除关联的本地图片文件 + // 删除关联的本地图片文件(头像) if (item.img) { removeLocalFile(item.img) } + // 删除该对话中所有的图片文件 + if (item.chatList && item.chatList.length > 0) { + item.chatList.forEach(msg => { + if (msg.type === 'image' && msg.imgUrl && msg.imgUrl.includes('_doc/')) { + removeLocalFile(msg.imgUrl) + } + }) + } defaultList.value.splice(idx, 1) uni.setStorageSync(STORAGE_KEY, JSON.stringify(defaultList.value)) } @@ -303,6 +316,10 @@ const selectImage = () => { }) } +const deleteImage = () => { + addForm.img = '' +} + const itemClick = (item) => { util.goPage(`/pages/message/chat-page/chat-page?phone=${data.phone}&id=${item.id}`) } @@ -439,7 +456,7 @@ const confirmAdd = async () => { }) try { uni.setStorageSync(STORAGE_KEY, JSON.stringify(defaultList.value)) - } catch (e) { } + } catch (e) { console.error(e) } closeAddPopup() } @@ -474,7 +491,7 @@ const confirmSim = () => { sim2: simForm.sim2.trim() || '移动' })) uni.showToast({ title: '保存成功', icon: 'success' }) - } catch (e) { } + } catch (e) { console.error(e) } closeSimPopup() } @@ -498,7 +515,7 @@ const confirmNotice = () => { try { uni.setStorageSync(NOTICE_COUNT_KEY, data.noticeCount) uni.showToast({ title: '保存成功', icon: 'success' }) - } catch (e) { } + } catch (e) { console.error(e) } closeNoticePopup() } @@ -738,4 +755,22 @@ page { flex-shrink: 0; } } + +.delete-img-icon { + position: absolute; + top: -12rpx; + right: -12rpx; + width: 32rpx; + height: 32rpx; + background-color: red; + color: #fff; + border-radius: 50%; + display: flex; + justify-content: center; + align-items: center; + font-size: 30rpx; + line-height: 28rpx; + padding-bottom: 2rpx; + z-index: 2; +} diff --git a/pages/shopping/index.vue b/pages/shopping/index.vue index f875d63..1d7d4a2 100644 --- a/pages/shopping/index.vue +++ b/pages/shopping/index.vue @@ -16,10 +16,18 @@ + + diff --git a/pages/shopping/pdd/list-index.vue b/pages/shopping/pdd/list-index.vue new file mode 100644 index 0000000..7c96b3f --- /dev/null +++ b/pages/shopping/pdd/list-index.vue @@ -0,0 +1,218 @@ + + + + + + + + \ No newline at end of file diff --git a/pages/shopping/pdd/order-detail/order-detail.vue b/pages/shopping/pdd/order-detail/order-detail.vue new file mode 100644 index 0000000..5849667 --- /dev/null +++ b/pages/shopping/pdd/order-detail/order-detail.vue @@ -0,0 +1,376 @@ + + + + + + diff --git a/pages/shopping/taobao/components/list-card/list-card.vue b/pages/shopping/taobao/components/list-card/list-card.vue index 4c93d67..b470c18 100644 --- a/pages/shopping/taobao/components/list-card/list-card.vue +++ b/pages/shopping/taobao/components/list-card/list-card.vue @@ -35,7 +35,7 @@ {{ getTruncatedTitle(item, index, item.goodsList[0], 0) - }} + }} 默认 @@ -118,7 +118,7 @@ 好评 - +