|
|
@@ -4,7 +4,7 @@
|
|
|
<el-button text @click="handleBack" class="back-btn">
|
|
|
<el-icon><ArrowLeft /></el-icon>
|
|
|
</el-button>
|
|
|
- <span class="chat-title">{{ ownerName || "联系业主" }}</span>
|
|
|
+ <span class="chat-title">{{ storeName || "联系业主" }}</span>
|
|
|
</div>
|
|
|
|
|
|
<div ref="chatContainerRef" class="chat-content" @scroll="handleScroll">
|
|
|
@@ -127,7 +127,8 @@ const isWsReady = () => socketStore.isSocketOpen();
|
|
|
// 会话信息
|
|
|
const sendId = ref("");
|
|
|
const receiverId = ref("");
|
|
|
-const ownerName = ref("");
|
|
|
+/** 左上角标题:店铺名称(由列表/详情跳转时 query.storeName 传入) */
|
|
|
+const storeName = ref("");
|
|
|
const ownerAvatar = ref("");
|
|
|
const requirementId = ref("");
|
|
|
|
|
|
@@ -464,7 +465,7 @@ watch(
|
|
|
q => {
|
|
|
if (q?.receiverId) {
|
|
|
receiverId.value = String(q.receiverId);
|
|
|
- ownerName.value = decodeURIComponent(String(q.uName || q.ownerName || "业主"));
|
|
|
+ storeName.value = decodeURIComponent(String(q.storeName || ""));
|
|
|
ownerAvatar.value = q.userImage ? decodeURIComponent(String(q.userImage)) : "";
|
|
|
requirementId.value = String(q.id || q.requirementId || "");
|
|
|
loadChatRecord();
|
|
|
@@ -475,7 +476,7 @@ watch(
|
|
|
|
|
|
onMounted(async () => {
|
|
|
receiverId.value = String(route.query.receiverId || "");
|
|
|
- ownerName.value = decodeURIComponent(String(route.query.uName || route.query.ownerName || "业主"));
|
|
|
+ storeName.value = decodeURIComponent(String(route.query.storeName || ""));
|
|
|
ownerAvatar.value = route.query.userImage ? decodeURIComponent(String(route.query.userImage)) : "";
|
|
|
requirementId.value = String(route.query.id || route.query.requirementId || "");
|
|
|
|