Browse Source

添加我的群聊

潘超林 15 hours ago
parent
commit
c088b91efd
1 changed files with 11 additions and 10 deletions
  1. 11 10
      TUIKit-House/components/TUIConversation/merChantSideIndex.vue

+ 11 - 10
TUIKit-House/components/TUIConversation/merChantSideIndex.vue

@@ -7,8 +7,12 @@
       @touchend="handleTouchEnd"
     >
       <TUISearch searchType="global" />
-      <!-- <div class="header" @click="myGourp">我的群聊</div> -->
-      <div class="header" @click="createGroup">创建粉丝群</div>
+      <div style="background: #fff">
+        <div style="display: flex; flex-direction: row; align-items: center">
+          <div class="header" @click="myGourp">我的群聊</div>
+          <div class="header" @click="createGroup">创建粉丝群</div>
+        </div>
+      </div>
 
       <!-- <ConversationHeader
       v-if="isShowConversationHeader"
@@ -92,7 +96,7 @@ const myGourp = () => {
   });
 };
 const createGroup = async () => {
-  const ownerAccount = uni.getStorageSync('id');
+  const ownerAccount = uni.getStorageSync("id");
   // TUIConversationService.switchConversation(
   //   "GROUP17527216214421942041809035223041"
   // );
@@ -100,16 +104,13 @@ const createGroup = async () => {
   if (res.code == 200) {
     shopInfo.value = res.data;
     let create = await MesApi.default.createGroup({
-       shopId: res.data.id ,
-       ownerAccount:ownerAccount,
-       agentType:uni.getStorageSync('agentType')
-
+      shopId: res.data.id,
+      ownerAccount: ownerAccount,
+      agentType: uni.getStorageSync("agentType"),
     });
     console.log(create);
     if (create.code == 200) {
-      TUIConversationService.switchConversation(
-        `GROUP${create.data.groupId}`
-      );
+      TUIConversationService.switchConversation(`GROUP${create.data.groupId}`);
       uni.$u.toast(create.msg);
     } else {
       uni.$u.toast(create.msg);