Browse Source

修改问题

潘超林 3 weeks ago
parent
commit
8750a6a37f

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

@@ -275,8 +275,10 @@ function onCurrentConversationUpdated(conversation: IConversationModel) {
 }
 
 function onConversationListUpdated(list: IConversationModel[]) {
+  console.log("222222", list);
+
   conversationList.value = list;
-  console.log(conversationList.value);
+  console.log("1111", conversationList.value);
 }
 
 function onCurrentConversationIDUpdated(id: string) {

+ 2 - 3
TUIKit/components/TUIConversation/index.vue

@@ -42,7 +42,7 @@
       <TUISearch searchType="global" />
       <ConversationHeader v-if="isShowConversationHeader" ref="headerRef" />
       <ConversationNetwork /> -->
-      <div
+      <!-- <div
         v-if="!userId"
         style="
           display: flex;
@@ -54,10 +54,9 @@
       >
         <img src="@/static/empaty.jpg" style="width: 200px; height: 150px" />
         <span style="margin-top: 20px"> 暂无会话~</span>
-      </div>
+      </div> -->
 
       <ConversationList
-        v-else
         ref="conversationListDomRef"
         class="tui-conversation-list"
         @handleSwitchConversation="handleSwitchConversation"

+ 2 - 1
pages/group/chat.vue

@@ -1,6 +1,6 @@
 <template>
   <view>
-    <template v-if="contactListMap.groupList.list.length>0">
+    <template v-if="contactListMap.groupList.list.length > 0">
       <view
         class="item"
         v-for="(item, index) in contactListMap.groupList.list"
@@ -61,6 +61,7 @@ const contactListMap = ref();
 const isShowContactInfo = ref(false);
 onLoad((options) => {
   contactListMap.value = JSON.parse(options.list);
+  console.log("contactListMap.value", contactListMap.value);
 });
 const emits = defineEmits(["switchConversation"]);
 function selectItem(item: any) {

+ 30 - 5
pages/group/index.vue

@@ -98,7 +98,7 @@
                   <view class="cgs"> 采购商:{{ item.purchaserCount }} 人 </view>
                 </view>
               </view>
-              <view @click.stop="join(item)">
+              <view @click.stop="join(item)" v-if="item.isAddGroupStatus == 0">
                 <u-button
                   type="primary"
                   text="加入"
@@ -179,6 +179,19 @@
 <script>
 import gjsSelectCity from "@/components/gjs-selectCity.vue";
 import classification from "@/components/classification.vue";
+import { isPC, isUniFrameWork } from "../../TUIKit/utils/env";
+import { TUIGlobal } from "@tencentcloud/universal-api";
+import {
+  TUITranslateService,
+  TUIStore,
+  StoreName,
+  IGroupModel,
+  TUIFriendService,
+  Friend,
+  FriendApplication,
+  TUIUserService,
+  TUIConversationService,
+} from "@tencentcloud/chat-uikit-engine";
 export default {
   components: {
     gjsSelectCity,
@@ -250,7 +263,7 @@ export default {
       } else {
         let params = {
           body: this.itemData.introduction,
-          attach: 1,
+          attach: 0,
           oriMon: this.itemData.price,
           payKinds: 0,
           payMeth: 2,
@@ -260,6 +273,7 @@ export default {
         this.api.addImGroupOrder(params).then((res) => {
           if (res.code === 200) {
             this.show = false;
+
             webUni.webView.navigateTo({
               url:
                 `/subpages/message/pay/index?info=` + encodeURIComponent(res.data.result),
@@ -278,8 +292,10 @@ export default {
       }
     },
     queryList(pageNumber, pageSize) {
+      let userid = uni.getStorageSync("userId");
       this.queryParams.pageNumber = pageNumber;
       this.queryParams.pageSize = pageSize;
+      this.queryParams.userId = userid;
       let dataList = [];
       this.$refs.paging.complete(dataList);
       this.api
@@ -296,9 +312,18 @@ export default {
         });
     },
     grouoDetail(record) {
-      uni.navigateTo({
-        url: "/pages/group/data?info=" + JSON.stringify(record),
-      });
+      console.log(record);
+      if (record.isAddGroupStatus == 1) {
+        isUniFrameWork &&
+          TUIGlobal?.navigateTo({
+            url: "/TUIKit/components/TUIChat/index",
+          });
+        TUIConversationService.switchConversation(`GROUP${record.groupId}`);
+      } else {
+        uni.navigateTo({
+          url: "/pages/group/data?info=" + JSON.stringify(record),
+        });
+      }
     },
     // 筛选点击事件
     screenClick(i) {