suyuanyuan 1 napja
szülő
commit
ce7223c7d5

+ 1 - 1
TUIKit-Homemaking/components/TUIConversation/index.vue

@@ -52,7 +52,7 @@ TUIStore.watch(StoreName.CUSTOM, {
 
 const handleSwitchConversation = (conversationID: string) => {
   let companyUserId =
-    conversationID.indexOf("C") > -1
+    conversationID[3] === "E"
       ? conversationID.substring(4)
       : conversationID.substring(3);
 

+ 4 - 6
TUIKit-Homemaking/components/TUIConversation/merChantSideIndex.vue

@@ -57,12 +57,10 @@ const handleSwitchConversation = (conversationID: string) => {
   // TUIGlobal?.navigateTo({
   //   url: "/TUIKit/components/TUIChat/index",
   // });
-  let companyUserId = conversationID.substring(4);
-  if (conversationID.includes("C")) {
-    companyUserId = conversationID.replace("C2C", "");
-  } else {
-    companyUserId = conversationID.replace("C2C", "");
-  }
+  let companyUserId =
+    conversationID[3] === "E"
+      ? conversationID.substring(4)
+      : conversationID.substring(3);
   // let loginType = uni.getStorageSync("loginType");
   // if (loginType == 1) {
   TUIGlobal?.navigateTo({

+ 1 - 0
TUIKit-House/components/TUIConversation/conversation-list/index.vue

@@ -135,6 +135,7 @@ const currentConversationDomRect = ref<DOMRect>();
 const isShowOverlay = ref<boolean>(false);
 const conversationList = ref<IConversationModel[]>([]);
 setTimeout(() => {
+  console.log("会话列表数据")
   console.log(conversationList);
 }, 2000);
 const conversationListDomRef = ref<HTMLElement | undefined>();

+ 5 - 6
TUIKit-House/components/TUIConversation/index.vue

@@ -51,12 +51,11 @@ TUIStore.watch(StoreName.CUSTOM, {
 });
 
 const handleSwitchConversation = (conversationID: string) => {
-  let companyUserId = "";
-  if (conversationID.includes("C")) {
-    companyUserId = conversationID.replace("C2C", "");
-  } else {
-    companyUserId = conversationID.replace("C2C", "");
-  }
+ let companyUserId =
+    conversationID[3] === 'C'
+      ? conversationID.substring(4)
+      : conversationID.substring(3);
+
   TUIGlobal?.navigateTo({
     url:
       "/TUIKit-House/components/TUIChat/index?shopUserId=" +

+ 4 - 6
TUIKit-House/components/TUIConversation/merChantSideIndex.vue

@@ -58,12 +58,10 @@ const handleSwitchConversation = (conversationID: string) => {
   TUIGlobal?.navigateTo({
     url: "/TUIKit-House/components/TUIChat/index",
   });
-  let companyUserId = "";
-  if (conversationID.includes("C")) {
-    companyUserId = conversationID.replace("C2C", "");
-  } else {
-    companyUserId = conversationID.replace("C2C", "");
-  }
+  let companyUserId =
+    conversationID[3] === "C"
+      ? conversationID.substring(4)
+      : conversationID.substring(3);
   TUIGlobal?.navigateTo({
     url:
       "/TUIKit-House/components/TUIChat/index?shopUserId=" +

+ 1 - 1
TUIKit/components/TUIConversation/index.vue

@@ -51,7 +51,7 @@ TUIStore.watch(StoreName.CUSTOM, {
 });
 const handleSwitchConversation = (conversationID: string) => {
   let companyUserId =
-    conversationID.indexOf("A") > -1
+    conversationID[3] === 'A'
       ? conversationID.substring(4)
       : conversationID.substring(3);
   uni.setStorageSync("companyUserId", companyUserId);

+ 4 - 8
TUIKit/components/TUIConversation/merChantSideIndex.vue

@@ -51,14 +51,10 @@ TUIStore.watch(StoreName.CUSTOM, {
 });
 
 const handleSwitchConversation = (conversationID: string) => {
-  let companyUserId = conversationID.substring(4);
-  if (conversationID.includes("A")) {
-    companyUserId = conversationID.replace("AC2C", "");
-  } else {
-    companyUserId = conversationID.replace("C2C", "");
-  }
-
-  console.log(123123123);
+  let companyUserId =
+    conversationID[3] === 'A'
+      ? conversationID.substring(4)
+      : conversationID.substring(3);
 
   uni.setStorageSync(
     "companyUserId",