浏览代码

修改 消息样式以及全局替换默认头像

潘超林 5 月之前
父节点
当前提交
edb7b53f69

+ 30 - 44
TUIKit/components/TUIChat/message-input/message-input-at/index.vue

@@ -1,23 +1,12 @@
 <template>
-  <BottomPopup
-    :show="showAtList"
-    @onClose="closeAt"
-  >
+  <BottomPopup :show="showAtList" @onClose="closeAt">
     <div
       ref="MessageInputAt"
       :class="[isPC ? 'message-input-at' : 'message-input-at-h5']"
     >
-      <div
-        ref="dialog"
-        class="member-list"
-      >
-        <header
-          v-if="!isPC"
-          class="member-list-title"
-        >
-          <span class="title">{{
-            TUITranslateService.t("TUIChat.选择提醒的人")
-          }}</span>
+      <div ref="dialog" class="member-list">
+        <header v-if="!isPC" class="member-list-title">
+          <span class="title">{{ TUITranslateService.t("TUIChat.选择提醒的人") }}</span>
         </header>
         <ul class="member-list-box">
           <li
@@ -28,10 +17,7 @@
             :class="[index === selectedIndex && 'selected']"
             @click="selectItem(index)"
           >
-            <img
-              class="member-list-box-body-avatar"
-              :src="handleMemberAvatar(item)"
-            >
+            <img class="member-list-box-body-avatar" :src="handleMemberAvatar(item)" />
             <span class="member-list-box-body-name">
               {{ handleMemberName(item) }}
             </span>
@@ -47,13 +33,13 @@ import TUIChatEngine, {
   StoreName,
   TUIGroupService,
   TUITranslateService,
-} from '@tencentcloud/chat-uikit-engine';
-import { TUIGlobal } from '@tencentcloud/universal-api';
-import { ref, watch } from '../../../../adapter-vue';
-import { isPC, isH5 } from '../../../../utils/env';
-import BottomPopup from '../../../common/BottomPopup/index.vue';
+} from "@tencentcloud/chat-uikit-engine";
+import { TUIGlobal } from "@tencentcloud/universal-api";
+import { ref, watch } from "../../../../adapter-vue";
+import { isPC, isH5 } from "../../../../utils/env";
+import BottomPopup from "../../../common/BottomPopup/index.vue";
 
-const emits = defineEmits(['onAtListOpen', 'insertAt']);
+const emits = defineEmits(["onAtListOpen", "insertAt"]);
 
 const MessageInputAt = ref();
 const memberListItems = ref();
@@ -68,13 +54,13 @@ const position = ref({
   top: 0,
 });
 const selectedIndex = ref(0);
-const currentConversationID = ref('');
+const currentConversationID = ref("");
 
 const all = {
   userID: TUIChatEngine.TYPES.MSG_AT_ALL,
-  nick: '所有人',
+  nick: "所有人",
   isAll: true,
-  avatar: 'https://web.sdk.qcloud.com/im/assets/images/at.svg',
+  avatar: "https://web.sdk.qcloud.com/im/assets/images/at.svg",
 };
 
 TUIStore.watch(StoreName.CONV, {
@@ -85,13 +71,13 @@ TUIStore.watch(StoreName.CONV, {
       allMemberList.value = [];
       showMemberList.value = [];
       isGroup.value = false;
-      TUIStore.update(StoreName.CUSTOM, 'memberList', memberList.value);
-      if (currentConversationID?.value?.startsWith('GROUP')) {
+      TUIStore.update(StoreName.CUSTOM, "memberList", memberList.value);
+      if (currentConversationID?.value?.startsWith("GROUP")) {
         isGroup.value = true;
         const groupID = currentConversationID?.value?.substring(5);
         TUIGroupService.switchGroup(groupID);
       } else {
-        TUIGroupService.switchGroup('');
+        TUIGroupService.switchGroup("");
       }
     }
   },
@@ -102,7 +88,7 @@ TUIStore.watch(StoreName.GRP, {
     memberList.value = list;
     allMemberList.value = [all, ...memberList.value];
     showMemberList.value = allMemberList.value;
-    TUIStore.update(StoreName.CUSTOM, 'memberList', memberList.value);
+    TUIStore.update(StoreName.CUSTOM, "memberList", memberList.value);
   },
 });
 
@@ -112,7 +98,7 @@ const toggleAtList = (show: boolean) => {
   }
   showAtList.value = show;
   if (showAtList.value) {
-    emits('onAtListOpen');
+    emits("onAtListOpen");
   }
 };
 const handleAtListPosition = (positionData: { top: number; left: number }) => {
@@ -141,10 +127,10 @@ watch(
     if (isH5 || !MessageInputAt?.value || !MessageInputAt?.value?.style) {
       return;
     }
-    MessageInputAt.value.style.left = position.value.left + 'px';
-    MessageInputAt.value.style.top
-      = position.value.top - MessageInputAt.value.clientHeight + 'px';
-  },
+    MessageInputAt.value.style.left = position.value.left + "px";
+    MessageInputAt.value.style.top =
+      position.value.top - MessageInputAt.value.clientHeight + "px";
+  }
 );
 
 const closeAt = () => {
@@ -162,7 +148,7 @@ const selectItem = (index: number) => {
   } else {
     if (showMemberList?.value?.length) {
       const item = showMemberList?.value[index];
-      emits('insertAt', {
+      emits("insertAt", {
         id: (item as any)?.userID,
         label: (item as any)?.nick || (item as any)?.userID,
       });
@@ -173,8 +159,8 @@ const selectItem = (index: number) => {
 
 const handleMemberAvatar = (item: any) => {
   return (
-    (item as any)?.avatar
-    || 'https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'
+    (item as any)?.avatar ||
+    "https://bucket.sxdirectpurchase.com/wx/static/img/ImAvatar.png"
   );
 };
 
@@ -191,7 +177,7 @@ const handleMemberName = (item: any) => {
   max-height: 10rem;
   overflow: hidden auto;
   background: #fff;
-  box-shadow: 0 0.06rem 0.63rem 0 rgba(2,16,43,0.15);
+  box-shadow: 0 0.06rem 0.63rem 0 rgba(2, 16, 43, 0.15);
   border-radius: 0.13rem;
 }
 
@@ -202,7 +188,7 @@ const handleMemberName = (item: any) => {
     cursor: pointer;
 
     &:hover {
-      background: rgba(0,110,255,0.1);
+      background: rgba(0, 110, 255, 0.1);
     }
   }
 
@@ -223,7 +209,7 @@ const handleMemberName = (item: any) => {
 
     .selected,
     &:hover {
-      background: rgba(0,110,255,0.1);
+      background: rgba(0, 110, 255, 0.1);
     }
 
     &-name {
@@ -242,7 +228,7 @@ const handleMemberName = (item: any) => {
   }
 
   .selected {
-    background: rgba(0,110,255,0.1);
+    background: rgba(0, 110, 255, 0.1);
   }
 }
 

+ 1 - 1
TUIKit/components/TUIContact/utils/index.ts

@@ -15,7 +15,7 @@ export const generateAvatar = (item: any): string => {
     item?.avatar
     || item?.profile?.avatar
     || (item?.groupID && 'https://web.sdk.qcloud.com/im/assets/images/Public.svg')
-    || 'https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'
+    || 'https://bucket.sxdirectpurchase.com/wx/static/img/ImAvatar.png'
   );
 };
 

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

@@ -29,7 +29,7 @@
         @contextmenu="showConversationActionMenu($event, conversation, index, true)"
       >
         <aside class="left">
-          <Avatar useSkeletonAnimation :url="conversation.getAvatar()" size="60px" />
+          <Avatar useSkeletonAnimation :url="conversation.getAvatar()" size="91rpx" />
           <div
             v-if="userOnlineStatusMap && isShowUserOnlineStatus(conversation)"
             :class="[

+ 2 - 2
TUIKit/components/TUIConversation/conversation-list/style/web.scss

@@ -17,8 +17,8 @@
 
     .left {
       position: relative;
-      width: 60px;
-      height: 60px;
+      width: 91rpx;
+        height: 91rpx;
 
       .num {
         position: absolute;

+ 2 - 2
TUIKit/components/TUIGroup/manage-group/index.vue

@@ -56,9 +56,9 @@
                 class="avatar"
                 :src="
                   item.avatar ||
-                    'https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'
+                    'https://bucket.sxdirectpurchase.com/wx/static/img/ImAvatar.png'
                 "
-                onerror="this.onerror=null;this.src='https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'"
+                onerror="this.onerror=null;this.src='https://bucket.sxdirectpurchase.com/wx/static/img/ImAvatar.png'"
               >
             </dt>
             <dd class="user-info-list-item-info">

+ 35 - 77
TUIKit/components/TUIGroup/manage-group/manage-admin.vue

@@ -15,67 +15,39 @@
               class="item-main-avatar"
               :src="
                 item.avatar ||
-                  'https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'
+                'https://bucket.sxdirectpurchase.com/wx/static/img/ImAvatar.png'
               "
-              onerror="this.onerror=null;this.src='https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'"
-            >
+              onerror="this.onerror=null;this.src='https://bucket.sxdirectpurchase.com/wx/static/img/ImAvatar.png'"
+            />
           </div>
           <div class="item-name">
             {{ item.nick || item.userID }}
           </div>
         </li>
         <li class="admin-manage-list-item">
-          <div
-            class="item-main"
-            @click="addAdmin"
-          >
-            <Icon
-              :file="plusSVG"
-              width="16px"
-              height="16px"
-            />
+          <div class="item-main" @click="addAdmin">
+            <Icon :file="plusSVG" width="16px" height="16px" />
           </div>
         </li>
         <li class="admin-manage-list-item">
-          <div
-            v-if="memberAdmin.admin.length > 0"
-            class="item-main"
-            @click="removeAdmin"
-          >
-            <Icon
-              :file="minusSVG"
-              width="16px"
-              height="16px"
-            />
+          <div v-if="memberAdmin.admin.length > 0" class="item-main" @click="removeAdmin">
+            <Icon :file="minusSVG" width="16px" height="16px" />
           </div>
         </li>
       </ul>
     </div>
-    <div
-      v-if="isAdminSetMuteTime"
-      class="admin-mute-all"
-    >
+    <div v-if="isAdminSetMuteTime" class="admin-mute-all">
       <div>
         <div class="admin-mute-all-title">
           {{ TUITranslateService.t(`TUIGroup.全员禁言`) }}
         </div>
         <div class="admin-mute-all-content">
-          {{
-            TUITranslateService.t(
-              `TUIGroup.全员禁言开启后,只允许群主和管理员发言。`
-            )
-          }}
+          {{ TUITranslateService.t(`TUIGroup.全员禁言开启后,只允许群主和管理员发言。`) }}
         </div>
       </div>
-      <Slider
-        :open="currentGroupAdmin.muteAllMembers"
-        @change="setAllMuteTime"
-      />
+      <Slider :open="currentGroupAdmin.muteAllMembers" @change="setAllMuteTime" />
     </div>
-    <div
-      v-if="isAdminSetMuteTime"
-      class="admin-mute"
-    >
+    <div v-if="isAdminSetMuteTime" class="admin-mute">
       <div class="admin-mute-header">
         {{ TUITranslateService.t(`TUIGroup.单独禁言人员`) }}
       </div>
@@ -90,25 +62,18 @@
               class="item-main-avatar"
               :src="
                 item.avatar ||
-                  'https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'
+                'https://bucket.sxdirectpurchase.com/wx/static/img/ImAvatar.png'
               "
-              onerror="this.onerror=null;this.src='https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'"
-            >
+              onerror="this.onerror=null;this.src='https://bucket.sxdirectpurchase.com/wx/static/img/ImAvatar.png'"
+            />
           </div>
           <div class="item-name">
             {{ item.nick || item.userID }}
           </div>
         </li>
         <li class="admin-mute-list-item">
-          <div
-            class="item-main"
-            @click="addMute"
-          >
-            <Icon
-              :file="plusSVG"
-              width="16px"
-              height="16px"
-            />
+          <div class="item-main" @click="addMute">
+            <Icon :file="plusSVG" width="16px" height="16px" />
           </div>
         </li>
         <li class="admin-mute-list-item">
@@ -117,11 +82,7 @@
             class="item-main"
             @click="removeMute"
           >
-            <Icon
-              :file="minusSVG"
-              width="16px"
-              height="16px"
-            />
+            <Icon :file="minusSVG" width="16px" height="16px" />
           </div>
         </li>
       </ul>
@@ -130,16 +91,13 @@
 </template>
 
 <script lang="ts" setup>
-import {
-  TUITranslateService,
-  IGroupModel,
-} from '@tencentcloud/chat-uikit-engine';
-import { watchEffect, ref } from '../../../adapter-vue';
-import Slider from '../../common/Slider/index.vue';
-import Icon from '../../common/Icon.vue';
-import plusSVG from '../../../assets/icon/plus.svg';
-import minusSVG from '../../../assets/icon/minus.svg';
-import { IGroupMember } from '../../../interface';
+import { TUITranslateService, IGroupModel } from "@tencentcloud/chat-uikit-engine";
+import { watchEffect, ref } from "../../../adapter-vue";
+import Slider from "../../common/Slider/index.vue";
+import Icon from "../../common/Icon.vue";
+import plusSVG from "../../../assets/icon/plus.svg";
+import minusSVG from "../../../assets/icon/minus.svg";
+import { IGroupMember } from "../../../interface";
 
 const props = defineProps({
   member: {
@@ -175,32 +133,32 @@ watchEffect(() => {
 });
 
 const emits = defineEmits([
-  'addAdmin',
-  'removeAdmin',
-  'setAllMuteTime',
-  'addMute',
-  'removeMute',
-  'close',
+  "addAdmin",
+  "removeAdmin",
+  "setAllMuteTime",
+  "addMute",
+  "removeMute",
+  "close",
 ]);
 
 const addAdmin = () => {
-  emits('addAdmin');
+  emits("addAdmin");
 };
 
 const removeAdmin = () => {
-  emits('removeAdmin');
+  emits("removeAdmin");
 };
 
 const setAllMuteTime = (value: boolean) => {
-  emits('setAllMuteTime', value);
+  emits("setAllMuteTime", value);
 };
 
 const addMute = () => {
-  emits('addMute');
+  emits("addMute");
 };
 
 const removeMute = () => {
-  emits('removeMute');
+  emits("removeMute");
 };
 </script>
 

+ 30 - 63
TUIKit/components/TUIGroup/manage-group/manage-member.vue

@@ -1,26 +1,16 @@
 <template>
-  <main
-    v-if="!isUniFrameWork"
-    class="member"
-  >
+  <main v-if="!isUniFrameWork" class="member">
     <ul class="list">
-      <li
-        v-for="(item, index) in memberList"
-        :key="index"
-        class="list-item"
-      >
-        <aside
-          class="aside"
-          @click="handleMemberProfileShow(item)"
-        >
+      <li v-for="(item, index) in memberList" :key="index" class="list-item">
+        <aside class="aside" @click="handleMemberProfileShow(item)">
           <img
             class="avatar"
             :src="
               item.avatar ||
-                'https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'
+              'https://bucket.sxdirectpurchase.com/wx/static/img/ImAvatar.png'
             "
-            onerror="this.onerror=null;this.src='https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'"
-          >
+            onerror="this.onerror=null;this.src='https://bucket.sxdirectpurchase.com/wx/static/img/ImAvatar.png'"
+          />
           <span class="name">{{ item.nick || item.userID }}</span>
           <span>{{ handleRoleName(item) }}</span>
         </aside>
@@ -33,50 +23,33 @@
           />
         </div>
       </li>
-      <li
-        v-if="memberList.length < totalMember"
-        class="list-item"
-        @click="getMore"
-      >
+      <li v-if="memberList.length < totalMember" class="list-item" @click="getMore">
         {{ TUITranslateService.t(`TUIGroup.查看更多`) }}
       </li>
     </ul>
   </main>
-  <div
-    v-else
-    class="edit-h5"
-  >
+  <div v-else class="edit-h5">
     <main class="main">
       <header class="edit-h5-header">
         <aside class="left">
           <h1>{{ TUITranslateService.t(`TUIGroup.群成员`) }}</h1>
         </aside>
-        <span
-          class="close"
-          @click="close('member')"
-        >{{
+        <span class="close" @click="close('member')">{{
           TUITranslateService.t(`关闭`)
         }}</span>
       </header>
       <div class="member">
         <ul class="list list-uniapp">
-          <li
-            v-for="(item, index) in memberList"
-            :key="index"
-            class="list-item"
-          >
-            <aside
-              class="aside"
-              @click="handleMemberProfileShow(item)"
-            >
+          <li v-for="(item, index) in memberList" :key="index" class="list-item">
+            <aside class="aside" @click="handleMemberProfileShow(item)">
               <img
                 class="avatar"
                 :src="
                   item.avatar ||
-                    'https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'
+                  'https://bucket.sxdirectpurchase.com/wx/static/img/ImAvatar.png'
                 "
-                onerror="this.onerror=null;this.src='https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'"
-              >
+                onerror="this.onerror=null;this.src='https://bucket.sxdirectpurchase.com/wx/static/img/ImAvatar.png'"
+              />
               <span class="name">{{ item.nick || item.userID }}</span>
               <span>{{ handleRoleName(item) }}</span>
             </aside>
@@ -89,11 +62,7 @@
               />
             </div>
           </li>
-          <li
-            v-if="memberList.length < totalMember"
-            class="list-item"
-            @click="getMore"
-          >
+          <li v-if="memberList.length < totalMember" class="list-item" @click="getMore">
             {{ TUITranslateService.t(`TUIGroup.查看更多`) }}
           </li>
         </ul>
@@ -103,14 +72,12 @@
 </template>
 
 <script lang="ts" setup>
-import TUIChatEngine, {
-  TUITranslateService,
-} from '@tencentcloud/chat-uikit-engine';
-import { watchEffect, ref } from '../../../adapter-vue';
-import Icon from '../../common/Icon.vue';
-import delIcon from '../../../assets/icon/del-icon.svg';
-import { IGroupSelfInfo, IGroupMember } from '../../../interface';
-import { isUniFrameWork } from '../../../utils/env';
+import TUIChatEngine, { TUITranslateService } from "@tencentcloud/chat-uikit-engine";
+import { watchEffect, ref } from "../../../adapter-vue";
+import Icon from "../../common/Icon.vue";
+import delIcon from "../../../assets/icon/del-icon.svg";
+import { IGroupSelfInfo, IGroupMember } from "../../../interface";
+import { isUniFrameWork } from "../../../utils/env";
 
 const props = defineProps({
   list: {
@@ -143,41 +110,41 @@ watchEffect(() => {
   selfValue.value = props.self;
 });
 
-const emits = defineEmits(['more', 'del', 'handleMemberProfileShow', 'close']);
+const emits = defineEmits(["more", "del", "handleMemberProfileShow", "close"]);
 
 const handleRoleName = (item: any) => {
-  let name = '';
+  let name = "";
   switch (item?.role) {
     case TUIChatEngine.TYPES.GRP_MBR_ROLE_ADMIN:
-      name = TUITranslateService.t('TUIGroup.管理员');
+      name = TUITranslateService.t("TUIGroup.管理员");
       break;
     case TUIChatEngine.TYPES.GRP_MBR_ROLE_OWNER:
-      name = TUITranslateService.t('TUIGroup.群主');
+      name = TUITranslateService.t("TUIGroup.群主");
       break;
   }
   if (name) {
     name = `(${name})`;
   }
   if (item.userID === selfValue.value.userID) {
-    name += ` (${TUITranslateService.t('TUIGroup.我')})`;
+    name += ` (${TUITranslateService.t("TUIGroup.我")})`;
   }
   return name;
 };
 
 const getMore = () => {
-  emits('more');
+  emits("more");
 };
 
 const submit = (item: any) => {
-  emits('del', [item]);
+  emits("del", [item]);
 };
 
 const handleMemberProfileShow = (user: any) => {
-  emits('handleMemberProfileShow', user);
+  emits("handleMemberProfileShow", user);
 };
 
 const close = (tabName: string) => {
-  emits('close', tabName);
+  emits("close", tabName);
 };
 </script>
 

+ 23 - 39
TUIKit/components/TUIGroup/manage-group/manage-profile.vue

@@ -1,17 +1,14 @@
 <template>
-  <div
-    v-if="!isUniFrameWork"
-    class="memeber-profile"
-  >
+  <div v-if="!isUniFrameWork" class="memeber-profile">
     <div class="memeber-profile-main">
       <img
         class="avatar"
         :src="
           userInfoManager.avatar ||
-            'https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'
+          'https://bucket.sxdirectpurchase.com/wx/static/img/ImAvatar.png'
         "
-        onerror="this.onerror=null;this.src='https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'"
-      >
+        onerror="this.onerror=null;this.src='https://bucket.sxdirectpurchase.com/wx/static/img/ImAvatar.png'"
+      />
       <ul class="list">
         <h2>{{ userInfoManager.nick || userInfoManager.userID }}</h2>
         <li>
@@ -34,29 +31,19 @@
       </div>
     </div>
   </div>
-  <div
-    v-else
-    class="edit-h5"
-  >
+  <div v-else class="edit-h5">
     <main class="main">
       <header class="edit-h5-header">
         <aside class="left">
           <h1>{{ TUITranslateService.t(`TUIGroup.群成员`) }}</h1>
         </aside>
-        <span
-          class="close"
-          @click="close('profile')"
-        >{{
+        <span class="close" @click="close('profile')">{{
           TUITranslateService.t(`关闭`)
         }}</span>
       </header>
       <div class="edit-h5-profile">
         <div class="memeber-profile-main">
-          <Avatar
-            class="avatar"
-            :url="userInfoManager.avatar"
-            size="60px"
-          />
+          <Avatar class="avatar" :url="userInfoManager.avatar" size="60px" />
           <ul class="list">
             <h1>{{ userInfoManager.nick || userInfoManager.userID }}</h1>
             <li>
@@ -83,7 +70,7 @@
   </div>
 </template>
 <script lang="ts" setup>
-import { ref, watch, watchEffect } from '../../../adapter-vue';
+import { ref, watch, watchEffect } from "../../../adapter-vue";
 import TUIChatEngine, {
   TUITranslateService,
   TUIUserService,
@@ -91,11 +78,11 @@ import TUIChatEngine, {
   TUIFriendService,
   TUIStore,
   StoreName,
-} from '@tencentcloud/chat-uikit-engine';
-import { TUIGlobal } from '@tencentcloud/universal-api';
-import Avatar from '../../common/Avatar/index.vue';
-import { IUserProfile } from '../../../interface';
-import { isUniFrameWork } from '../../../utils/env';
+} from "@tencentcloud/chat-uikit-engine";
+import { TUIGlobal } from "@tencentcloud/universal-api";
+import Avatar from "../../common/Avatar/index.vue";
+import { IUserProfile } from "../../../interface";
+import { isUniFrameWork } from "../../../utils/env";
 
 const props = defineProps({
   userInfo: {
@@ -110,11 +97,7 @@ const userInfoManager = ref<IUserProfile>({});
 watchEffect(() => {
   userInfoManager.value = props.userInfo;
 });
-const emits = defineEmits([
-  'handleSwitchConversation',
-  'close',
-  'openConversation',
-]);
+const emits = defineEmits(["handleSwitchConversation", "close", "openConversation"]);
 
 watch(
   () => props.userInfo,
@@ -129,22 +112,24 @@ watch(
   {
     deep: true,
     immediate: true,
-  },
+  }
 );
 
 const enter = async (ID: any, type: string) => {
   const name = `${type}${ID}`;
   TUIConversationService.getConversationProfile(name)
     .then((res: any) => {
-      TUIConversationService.switchConversation(res.data.conversation.conversationID).then(() => {
-        TUIStore.update(StoreName.GRP, 'isShowManageComponent', false);
+      TUIConversationService.switchConversation(
+        res.data.conversation.conversationID
+      ).then(() => {
+        TUIStore.update(StoreName.GRP, "isShowManageComponent", false);
         if (isUniFrameWork) {
           TUIGlobal?.navigateBack();
         }
       });
     })
     .catch((err: any) => {
-      console.warn('获取会话资料失败', err.code, err.msg);
+      console.warn("获取会话资料失败", err.code, err.msg);
     });
 };
 const checkFriend = async () => {
@@ -154,16 +139,16 @@ const checkFriend = async () => {
     type: TUIChatEngine.TYPES.SNS_CHECK_TYPE_BOTH,
   }).then((res: any) => {
     const relation = res?.data?.successUserIDList?.[0]?.relation;
-    isFriendShip.value = (relation === TUIChatEngine.TYPES.SNS_TYPE_BOTH_WAY);
+    isFriendShip.value = relation === TUIChatEngine.TYPES.SNS_TYPE_BOTH_WAY;
   });
 };
 
 const showEnter = () => {
-  return isFriendShip.value || !TUIStore.getData(StoreName.APP, 'isOfficial');
+  return isFriendShip.value || !TUIStore.getData(StoreName.APP, "isOfficial");
 };
 
 const close = (tabName: string) => {
-  emits('close', tabName);
+  emits("close", tabName);
 };
 </script>
 <style lang="scss" scoped>
@@ -267,7 +252,6 @@ const close = (tabName: string) => {
         .avatar {
           margin: 20px;
         }
-
       }
     }
   }

+ 47 - 51
TUIKit/components/TUISearch/search-result/search-result-item/index.vue

@@ -11,16 +11,13 @@
     @mouseenter="setHoverStatus(true)"
     @mouseleave="setHoverStatus(false)"
   >
-    <div
-      v-if="displayType === 'info' || displayType === 'bubble'"
-      :class="[displayType]"
-    >
+    <div v-if="displayType === 'info' || displayType === 'bubble'" :class="[displayType]">
       <div :class="displayType + '-left'">
         <img
           :class="displayType + '-left-avatar'"
           :src="avatarForShow || ''"
-          onerror="this.onerror=null;this.src='https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'"
-        >
+          onerror="this.onerror=null;this.src='https://bucket.sxdirectpurchase.com/wx/static/img/ImAvatar.png'"
+        />
       </div>
       <div :class="[displayType + '-main']">
         <div :class="[displayType + '-main-name']">
@@ -65,16 +62,13 @@
         </div>
       </div>
     </div>
-    <div
-      v-else-if="displayType === 'file'"
-      :class="[displayType]"
-    >
+    <div v-else-if="displayType === 'file'" :class="[displayType]">
       <div :class="[displayType + '-header']">
         <img
           :class="displayType + '-header-avatar'"
           :src="avatarForShow"
-          onerror="this.onerror=null;this.src='https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'"
-        >
+          onerror="this.onerror=null;this.src='https://bucket.sxdirectpurchase.com/wx/static/img/ImAvatar.png'"
+        />
         <div :class="[displayType + '-header-name']">
           {{ nameForShow }}
         </div>
@@ -97,14 +91,8 @@
         />
       </div>
     </div>
-    <div
-      v-else-if="displayType === 'image'"
-      :class="[displayType]"
-    >
-      <div
-        class="image-container"
-        @click.stop="navigateToChatPosition"
-      >
+    <div v-else-if="displayType === 'image'" :class="[displayType]">
+      <div class="image-container" @click.stop="navigateToChatPosition">
         <MessageAbstractImage
           v-if="listItem.type === TYPES.MSG_IMAGE"
           :messageContent="listItemContent"
@@ -113,10 +101,7 @@
           v-else-if="listItem.type === TYPES.MSG_VIDEO"
           :messageContent="listItemContent"
         />
-        <div
-          v-if="isHovering"
-          class="image-container-hover"
-        >
+        <div v-if="isHovering" class="image-container-hover">
           <div class="image-container-hover-text">
             {{ TUITranslateService.t("TUISearch.定位到聊天位置") }}
           </div>
@@ -126,23 +111,31 @@
   </div>
 </template>
 <script setup lang="ts">
-import TUIChatEngine, { TUITranslateService, IMessageModel } from '@tencentcloud/chat-uikit-engine';
-import { ref, watchEffect, withDefaults } from '../../../../adapter-vue';
-import MessageAbstractText from './message-abstract/message-abstract-text.vue';
-import MessageAbstractFile from './message-abstract/message-abstract-file.vue';
-import MessageAbstractCustom from './message-abstract/message-abstract-custom.vue';
-import MessageAbstractImage from './message-abstract/message-abstract-image.vue';
-import MessageAbstractVideo from './message-abstract/message-abstract-video.vue';
+import TUIChatEngine, {
+  TUITranslateService,
+  IMessageModel,
+} from "@tencentcloud/chat-uikit-engine";
+import { ref, watchEffect, withDefaults } from "../../../../adapter-vue";
+import MessageAbstractText from "./message-abstract/message-abstract-text.vue";
+import MessageAbstractFile from "./message-abstract/message-abstract-file.vue";
+import MessageAbstractCustom from "./message-abstract/message-abstract-custom.vue";
+import MessageAbstractImage from "./message-abstract/message-abstract-image.vue";
+import MessageAbstractVideo from "./message-abstract/message-abstract-video.vue";
 import {
   generateSearchResultShowName,
   generateSearchResultAvatar,
   generateSearchResultShowContent,
   generateSearchResultTime,
   enterConversation,
-} from '../../utils';
-import { messageTypeAbstractMap, searchResultItemDisplayTypeValues, searchMessageTypeValues, IHighlightContent } from '../../type';
-import { ISearchResultListItem } from '../../../../interface';
-import { isPC } from '../../../../utils/env';
+} from "../../utils";
+import {
+  messageTypeAbstractMap,
+  searchResultItemDisplayTypeValues,
+  searchMessageTypeValues,
+  IHighlightContent,
+} from "../../type";
+import { ISearchResultListItem } from "../../../../interface";
+import { isPC } from "../../../../utils/env";
 interface IProps {
   listItem: IMessageModel | ISearchResultListItem;
   listItemContent?: Record<string, unknown>;
@@ -151,43 +144,46 @@ interface IProps {
   keywordList: string[];
 }
 const props = withDefaults(defineProps<IProps>(), {
-  listItem: () => ({}) as IMessageModel | ISearchResultListItem,
-  listItemContent: () => ({}) as Record<string, unknown>,
-  type: 'allMessage',
-  displayType: 'info',
-  keywordList: () => ([]) as string[],
+  listItem: () => ({} as IMessageModel | ISearchResultListItem),
+  listItemContent: () => ({} as Record<string, unknown>),
+  type: "allMessage",
+  displayType: "info",
+  keywordList: () => [] as string[],
 });
 
-const emits = defineEmits(['showResultDetail', 'navigateToChatPosition']);
+const emits = defineEmits(["showResultDetail", "navigateToChatPosition"]);
 const TYPES = ref(TUIChatEngine.TYPES);
 
-const avatarForShow = ref<string>('');
-const nameForShow = ref<string>('');
+const avatarForShow = ref<string>("");
+const nameForShow = ref<string>("");
 const contentForShow = ref<IHighlightContent[]>([]);
-const timeForShow = ref<string>('');
+const timeForShow = ref<string>("");
 
 const isHovering = ref<boolean>(false);
 
 watchEffect(() => {
   avatarForShow.value = generateSearchResultAvatar(props.listItem);
-  nameForShow.value = generateSearchResultShowName(props.listItem, props?.listItemContent);
+  nameForShow.value = generateSearchResultShowName(
+    props.listItem,
+    props?.listItemContent
+  );
   contentForShow.value = generateSearchResultShowContent(
     props.listItem,
     props.type,
     props.keywordList as string[],
-    props?.displayType === 'info',
+    props?.displayType === "info"
   );
   timeForShow.value = (props.listItem as IMessageModel)?.time
     ? generateSearchResultTime((props.listItem as IMessageModel)?.time * 1000)
-    : '';
+    : "";
 });
 
 const onResultItemClicked = () => {
-  if (props.type === 'contact' || props.type === 'group') {
+  if (props.type === "contact" || props.type === "group") {
     enterConversation(props.listItem as IMessageModel);
   } else {
-    if (props.displayType === 'info' && !(props.listItem as IMessageModel)?.ID) {
-      emits('showResultDetail', true, props.type, props.listItem);
+    if (props.displayType === "info" && !(props.listItem as IMessageModel)?.ID) {
+      emits("showResultDetail", true, props.type, props.listItem);
     } else {
       navigateToChatPosition();
     }
@@ -199,7 +195,7 @@ const setHoverStatus = (status: boolean) => {
 };
 
 const navigateToChatPosition = () => {
-  emits('navigateToChatPosition', props.listItem);
+  emits("navigateToChatPosition", props.listItem);
 };
 
 const getMessageAbstractType = (message: IMessageModel | ISearchResultListItem) => {

+ 2 - 2
TUIKit/components/TUISearch/utils.ts

@@ -147,13 +147,13 @@ export const generateSearchResultAvatar = (result: IMessageModel | ISearchResult
     return '';
   }
   if ((result as IMessageModel).ID) {
-    return (result as IMessageModel).avatar || 'https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png';
+    return (result as IMessageModel).avatar || 'https://bucket.sxdirectpurchase.com/wx/static/img/ImAvatar.png';
   }
   if ((result as IGroupModel).groupID) {
     return (result as IGroupModel).avatar || `https://web.sdk.qcloud.com/im/assets/images/${(result as IGroupModel)?.type}.svg`;
   }
   if ((result as IUserProfile).userID) {
-    return (result as IUserProfile).avatar || 'https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png';
+    return (result as IUserProfile).avatar || 'https://bucket.sxdirectpurchase.com/wx/static/img/ImAvatar.png';
   }
   if ((result as ISearchResultListItem)?.conversation?.conversationID) {
     if (typeof (result as ISearchResultListItem).conversation.getAvatar === 'function') {

+ 14 - 4
TUIKit/components/common/Avatar/index.vue

@@ -11,7 +11,12 @@
       <image
         v-if="!loadErrorInUniapp"
         class="avatar-image"
-        :src="avatarImageUrl || defaultAvatarUrl"
+        :src="
+          avatarImageUrl ==
+          'https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'
+            ? 'https://bucket.sxdirectpurchase.com/wx/static/img/ImAvatar.png'
+            : avatarImageUrl || defaultAvatarUrl
+        "
         @load="avatarLoadSuccess"
         @error="avatarLoadFailed"
       />
@@ -26,7 +31,12 @@
     <img
       v-else
       class="avatar-image"
-      :src="avatarImageUrl || defaultAvatarUrl"
+      :src="
+        avatarImageUrl ==
+        'https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'
+          ? 'https://bucket.sxdirectpurchase.com/wx/static/img/ImAvatar.png'
+          : avatarImageUrl || defaultAvatarUrl
+      "
       @load="avatarLoadSuccess"
       @error="avatarLoadFailed"
     />
@@ -58,12 +68,12 @@ interface IEmits {
 }
 
 const defaultAvatarUrl = ref(
-  "https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png"
+  "https://bucket.sxdirectpurchase.com/wx/static/img/ImAvatar.png"
 );
 const emits = defineEmits<IEmits>();
 const props = withDefaults(defineProps<IProps>(), {
   // uniapp vue2 does not support constants in defineProps
-  url: "https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png",
+  url: "https://bucket.sxdirectpurchase.com/wx/static/img/ImAvatar.png",
   size: "36px",
   borderRadius: "50%",
   useSkeletonAnimation: false,

+ 52 - 104
TUIKit/components/common/Transfer/index.vue

@@ -3,20 +3,9 @@
     class="transfer"
     :class="[!isPC ? 'transfer-h5' : '', isMobile ? 'transfer-h5-wechat' : '']"
   >
-    <header
-      v-if="!isPC"
-      class="transfer-header transfer-h5-header"
-    >
-      <div
-        v-if="!props.isHiddenBackIcon"
-        @click="cancel"
-      >
-        <Icon
-          class="icon"
-          :file="backIcon"
-          :width="'18px'"
-          :height="'18px'"
-        />
+    <header v-if="!isPC" class="transfer-header transfer-h5-header">
+      <div v-if="!props.isHiddenBackIcon" @click="cancel">
+        <Icon class="icon" :file="backIcon" :width="'18px'" :height="'18px'" />
       </div>
       <span class="title">{{ transferTitle }}</span>
       <span class="space" />
@@ -33,7 +22,7 @@
             enterkeyhint="search"
             :class="[isUniFrameWork ? 'left-uniapp-input' : '']"
             @keyup.enter="handleInput"
-          >
+          />
           <!-- not PC triggers blur -->
           <input
             v-if="!isPC && isTransferSearch"
@@ -44,7 +33,7 @@
             :class="[isUniFrameWork ? 'left-uniapp-input' : '']"
             @blur="handleInput"
             @confirm="handleInput"
-          >
+          />
         </header>
         <main class="transfer-left-main">
           <ul class="transfer-list">
@@ -59,10 +48,7 @@
                 :width="'18px'"
                 :height="'18px'"
               />
-              <i
-                v-else
-                class="icon-unselected"
-              />
+              <i v-else class="icon-unselected" />
               <span class="select-all">{{
                 TUITranslateService.t("component.全选")
               }}</span>
@@ -80,27 +66,23 @@
                 :width="'18px'"
                 :height="'18px'"
               />
-              <i
-                v-else
-                :class="[item.isDisabled && 'disabled', 'icon-unselected']"
-              />
+              <i v-else :class="[item.isDisabled && 'disabled', 'icon-unselected']" />
               <template v-if="!isTransferCustomItem">
                 <img
                   class="avatar"
                   :src="
                     item.avatar ||
-                      'https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'
+                    'https://bucket.sxdirectpurchase.com/wx/static/img/ImAvatar.png'
                   "
-                  onerror="this.onerror=null;this.src='https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'"
-                >
+                  onerror="this.onerror=null;this.src='https://bucket.sxdirectpurchase.com/wx/static/img/ImAvatar.png'"
+                />
                 <span class="name">{{ item.nick || item.userID }}</span>
-                <span v-if="item.isDisabled">({{ TUITranslateService.t("component.已在群中") }})</span>
+                <span v-if="item.isDisabled"
+                  >({{ TUITranslateService.t("component.已在群中") }})</span
+                >
               </template>
               <template v-else>
-                <slot
-                  name="left"
-                  :data="item"
-                />
+                <slot name="left" :data="item" />
               </template>
             </li>
             <li
@@ -114,22 +96,12 @@
         </main>
       </div>
       <div class="right">
-        <header
-          v-if="isPC"
-          class="transfer-header"
-        >
+        <header v-if="isPC" class="transfer-header">
           {{ transferTitle }}
         </header>
-        <ul
-          v-if="resultShow"
-          class="transfer-list"
-        >
-          <p
-            v-if="transferSelectedList.length > 0 && isPC"
-            class="transfer-text"
-          >
-            {{ TUITranslateService.t("component.已选中")
-            }}{{ transferSelectedList.length
+        <ul v-if="resultShow" class="transfer-list">
+          <p v-if="transferSelectedList.length > 0 && isPC" class="transfer-text">
+            {{ TUITranslateService.t("component.已选中") }}{{ transferSelectedList.length
             }}{{ TUITranslateService.t("component.人") }}
           </p>
           <li
@@ -143,53 +115,29 @@
                   class="avatar"
                   :src="
                     item.avatar ||
-                      'https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'
+                    'https://bucket.sxdirectpurchase.com/wx/static/img/ImAvatar.png'
                   "
-                  onerror="this.onerror=null;this.src='https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'"
-                >
-                <span
-                  v-if="isPC"
-                  class="name"
-                >{{ item.nick || item.userID }}</span>
+                  onerror="this.onerror=null;this.src='https://bucket.sxdirectpurchase.com/wx/static/img/ImAvatar.png'"
+                />
+                <span v-if="isPC" class="name">{{ item.nick || item.userID }}</span>
               </template>
               <template v-else>
-                <slot
-                  name="right"
-                  :data="item"
-                />
+                <slot name="right" :data="item" />
               </template>
             </aside>
-            <span
-              v-if="isPC"
-              @click="selected(item)"
-            >
-              <Icon
-                :file="cancelIcon"
-                :width="'18px'"
-                :height="'18px'"
-              />
+            <span v-if="isPC" @click="selected(item)">
+              <Icon :file="cancelIcon" :width="'18px'" :height="'18px'" />
             </span>
           </li>
         </ul>
         <footer class="transfer-right-footer">
-          <button
-            class="btn btn-cancel"
-            @click="cancel"
-          >
+          <button class="btn btn-cancel" @click="cancel">
             {{ TUITranslateService.t("component.取消") }}
           </button>
-          <button
-            v-if="transferSelectedList.length > 0"
-            class="btn"
-            @click="submit"
-          >
+          <button v-if="transferSelectedList.length > 0" class="btn" @click="submit">
             {{ TUITranslateService.t("component.完成") }}
           </button>
-          <button
-            v-else
-            class="btn btn-no"
-            @click="submit"
-          >
+          <button v-else class="btn btn-no" @click="submit">
             {{ TUITranslateService.t("component.完成") }}
           </button>
         </footer>
@@ -199,14 +147,14 @@
 </template>
 
 <script lang="ts" setup>
-import { ref, watchEffect, computed } from '../../../adapter-vue';
-import { TUITranslateService } from '@tencentcloud/chat-uikit-engine';
-import { ITransferListItem } from '../../../interface';
-import Icon from '../Icon.vue';
-import selectedIcon from '../../../assets/icon/selected.svg';
-import backIcon from '../../../assets/icon/back.svg';
-import cancelIcon from '../../../assets/icon/cancel.svg';
-import { isPC, isUniFrameWork, isMobile } from '../../../utils/env';
+import { ref, watchEffect, computed } from "../../../adapter-vue";
+import { TUITranslateService } from "@tencentcloud/chat-uikit-engine";
+import { ITransferListItem } from "../../../interface";
+import Icon from "../Icon.vue";
+import selectedIcon from "../../../assets/icon/selected.svg";
+import backIcon from "../../../assets/icon/back.svg";
+import cancelIcon from "../../../assets/icon/cancel.svg";
+import { isPC, isUniFrameWork, isMobile } from "../../../utils/env";
 
 const props = defineProps({
   list: {
@@ -231,11 +179,11 @@ const props = defineProps({
   },
   title: {
     type: String,
-    default: '',
+    default: "",
   },
   type: {
     type: String,
-    default: '',
+    default: "",
   },
   resultShow: {
     type: Boolean,
@@ -256,15 +204,13 @@ const transferTotal = ref<number>(0);
 const transferSelectedList = ref<ITransferListItem[]>([]);
 const isTransferSearch = ref(true);
 const isTransferCustomItem = ref(false);
-const transferTitle = ref('');
-const searchValue = ref('');
+const transferTitle = ref("");
+const searchValue = ref("");
 
 watchEffect(() => {
   if (props.isCustomItem) {
     for (let index = 0; index < props.list.length; index++) {
-      if (
-        (props.list[index] as any).conversationID.indexOf('@TIM#SYSTEM') > -1
-      ) {
+      if ((props.list[index] as any).conversationID.indexOf("@TIM#SYSTEM") > -1) {
         // eslint-disable-next-line vue/no-mutating-props
         props.list.splice(index, 1);
       }
@@ -274,21 +220,23 @@ watchEffect(() => {
     transferList.value = props.list as ITransferListItem[];
   }
   transferTotal.value = props.total ? props.total : props.list.length;
-  transferSelectedList.value = (props.selectedList && props.selectedList.length > 0 ? props.selectedList : transferSelectedList.value) as any;
+  transferSelectedList.value = (props.selectedList && props.selectedList.length > 0
+    ? props.selectedList
+    : transferSelectedList.value) as any;
   isTransferSearch.value = props.isSearch;
   isTransferCustomItem.value = props.isCustomItem;
   transferTitle.value = props.title;
 });
 
-const emit = defineEmits(['search', 'submit', 'cancel', 'getMore']);
+const emit = defineEmits(["search", "submit", "cancel", "getMore"]);
 
 const optional = computed(() =>
-  transferList.value.filter((item: any) => !item.isDisabled),
+  transferList.value.filter((item: any) => !item.isDisabled)
 );
 
 const handleInput = (e: any) => {
   searchValue.value = e.target.value || e.detail.value;
-  emit('search', searchValue.value);
+  emit("search", searchValue.value);
 };
 const selected = (item: any) => {
   if (item.isDisabled) {
@@ -315,17 +263,17 @@ const selectedAll = () => {
 };
 
 const submit = () => {
-  emit('submit', transferSelectedList.value);
-  searchValue.value = '';
+  emit("submit", transferSelectedList.value);
+  searchValue.value = "";
 };
 
 const cancel = () => {
-  emit('cancel');
-  searchValue.value = '';
+  emit("cancel");
+  searchValue.value = "";
 };
 
 const getMore = () => {
-  emit('getMore');
+  emit("getMore");
 };
 </script>
 

+ 3 - 3
app.config.js

@@ -10,18 +10,18 @@ export const requestConfig = {
 	/**
 	 * 开发环境请求的根路径
 	 */
-	devBaseUrl: 'https://admin-test.sxdirectpurchase.com/api',
+	devBaseUrl: 'https://app.sxdirectpurchase.com/api',
 	// devBaseUrl: 'https://admin-test.sxdirectpurchase.com/api/',
 	/**
 	 * 测试环境请求的根路径
 	 */
 	// testBaseUrl: 'http://192.168.0.22:9001/api/',//中亿云
-	testBaseUrl: 'https://admin-test.sxdirectpurchase.com/api',//WIFI6
+	testBaseUrl: 'https://app.sxdirectpurchase.com/api',//WIFI6
 
 	/**
 	 * 生产环境请求的根路径
 	 */
-	prodBaseUrl: 'https://admin-test.sxdirectpurchase.com/api',
+	prodBaseUrl: 'https://app.sxdirectpurchase.com/api',
 	// applet.sxdirectpurchase.com
 	staticDir: 'https://bucket.sxdirectpurchase.com/wx',
 	/**

+ 28 - 22
manifest.json

@@ -120,32 +120,38 @@
     "quickapp" : {},
     /* H5 特有相关 :关闭 treeshaking 是为了规避 uni[methond]() is not a function 的问题 */
     "h5" : {
-        "optimization" : {
-            "treeShaking" : {
-                "enable" : true
-            }
-        },
-        "devServer" : {
-            "port" : 8080,
-            "disableHostCheck" : true,
-            "proxy" : {
-                "/api" : {
-                    "target" : "http://192.168.18.122:9001/",
-                    // "target": "https://admin-test.sxdirectpurchase.com",
-                    "changeOrigin" : true,
-                    "secure" : false,
-                    "pathRewrite" : {
-                        "^/api" : "/api"
-                    }
-                }
-            },
-            "https" : false
-        },
         "template" : "index.html",
         "router" : {
-            "base" : "/message"
+            "base" : "./",
+            "mode" : "hash"
         }
     },
+    // "optimization" : {
+    //     "treeShaking" : {
+    //         "enable" : true
+    //     }
+    // },
+    // "devServer" : {
+    //     "port" : 8080,
+    //     "disableHostCheck" : true,
+    //     "proxy" : {
+    //         "/api" : {
+    //             "target" : "http://192.168.18.122:9001/",
+    //             // "target": "https://admin-test.sxdirectpurchase.com",
+    //             "changeOrigin" : true,
+    //             "secure" : false,
+    //             "pathRewrite" : {
+    //                 "^/api" : "/api"
+    //             }
+    //         }
+    //     },
+    //     "https" : true
+    // },
+    // "template" : "index.html",
+    // "router" : {
+    //     "base" : "/message",
+    //     "mode" : "hash"
+    // }
     /* 小程序特有相关 */
     "mp-weixin" : {
         "libVersion" : "latest",

+ 87 - 100
pages/views/profile.vue

@@ -5,21 +5,13 @@
       :class="['TUI-profile-basic', !isPC && 'TUI-profile-h5-basic']"
     >
       <img
-        :class="[
-          'TUI-profile-basic-avatar',
-          !isPC && 'TUI-profile-h5-basic-avatar',
-        ]"
+        :class="['TUI-profile-basic-avatar', !isPC && 'TUI-profile-h5-basic-avatar']"
         :src="
           userProfile.avatar ||
-            'https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'
+          'https://bucket.sxdirectpurchase.com/wx/static/img/ImAvatar.png'
         "
-      >
-      <div
-        :class="[
-          'TUI-profile-basic-info',
-          !isPC && 'TUI-profile-h5-basic-info',
-        ]"
-      >
+      />
+      <div :class="['TUI-profile-basic-info', !isPC && 'TUI-profile-h5-basic-info']">
         <div
           :class="[
             'TUI-profile-basic-info-nick',
@@ -29,17 +21,15 @@
           {{ userProfile.nick || "-" }}
         </div>
         <div
-          :class="[
-            'TUI-profile-basic-info-id',
-            !isPC && 'TUI-profile-h5-basic-info-id',
-          ]"
+          :class="['TUI-profile-basic-info-id', !isPC && 'TUI-profile-h5-basic-info-id']"
         >
           <label
             :class="[
               'TUI-profile-basic-info-id-label',
               !isPC && 'TUI-profile-h5-basic-info-id-label',
             ]"
-          >{{ "用户ID" }}:</label>
+            >{{ "用户ID" }}:</label
+          >
           <div
             :class="[
               'TUI-profile-basic-info-id-value',
@@ -77,9 +67,7 @@
               {{ item.label }}
             </div>
             <div
-              v-if="
-                item.children && !isPC && item.childrenShowType === 'switch'
-              "
+              v-if="item.children && !isPC && item.childrenShowType === 'switch'"
               :class="['label-desc']"
             >
               {{ item.value }}
@@ -89,9 +77,9 @@
             <div
               v-if="
                 !isPC &&
-                  item.children &&
-                  item.selectedChild &&
-                  item.childrenShowType === 'bottomPopup'
+                item.children &&
+                item.selectedChild &&
+                item.childrenShowType === 'bottomPopup'
               "
               :class="[
                 'TUI-profile-setting-item-label-value',
@@ -111,9 +99,7 @@
         </div>
         <!-- 移动端 children显示,分多个类型 -->
         <BottomPopup
-          v-if="
-            item.children && !isPC && item.childrenShowType === 'bottomPopup'
-          "
+          v-if="item.children && !isPC && item.childrenShowType === 'bottomPopup'"
           :show="item.showChildren"
           @onClose="bottomPopupOnClose(item)"
         >
@@ -138,24 +124,24 @@ import TUIChatEngine, {
   TUIStore,
   StoreName,
   TUIChatService,
-} from '@tencentcloud/chat-uikit-engine';
-import { TUILogin } from '@tencentcloud/tui-core';
-import { TUIGlobal } from '@tencentcloud/universal-api';
-import { ref, defineProps, onMounted } from '../../TUIKit/adapter-vue';
-import { isPC } from '../../TUIKit/utils/env';
-import { Toast, TOAST_TYPE } from '../../TUIKit/components/common/Toast/index';
-import BottomPopup from '../../TUIKit/components/common/BottomPopup/index.vue';
-import Icon from '../../TUIKit/components/common/Icon.vue';
-import rightArrowIcon from '../../TUIKit/assets/icon/right-icon.svg';
-import { IUserProfile } from '../../TUIKit/interface';
-import { onHide } from '@dcloudio/uni-app';
-import { translator } from '../../TUIKit/components/TUIChat/utils/translation';
-import { removeTokenStorage } from '../../utils/token';
+} from "@tencentcloud/chat-uikit-engine";
+import { TUILogin } from "@tencentcloud/tui-core";
+import { TUIGlobal } from "@tencentcloud/universal-api";
+import { ref, defineProps, onMounted } from "../../TUIKit/adapter-vue";
+import { isPC } from "../../TUIKit/utils/env";
+import { Toast, TOAST_TYPE } from "../../TUIKit/components/common/Toast/index";
+import BottomPopup from "../../TUIKit/components/common/BottomPopup/index.vue";
+import Icon from "../../TUIKit/components/common/Icon.vue";
+import rightArrowIcon from "../../TUIKit/assets/icon/right-icon.svg";
+import { IUserProfile } from "../../TUIKit/interface";
+import { onHide } from "@dcloudio/uni-app";
+import { translator } from "../../TUIKit/components/TUIChat/utils/translation";
+import { removeTokenStorage } from "../../utils/token";
 
 const props = defineProps({
   displayType: {
     type: String,
-    default: 'all', // "profile"/"setting"/"all"
+    default: "all", // "profile"/"setting"/"all"
   },
   showSetting: {
     type: Boolean,
@@ -184,17 +170,17 @@ const settingList = ref<{
   };
 }>({
   editProfile: {
-    value: 'editProfile',
-    label: '编辑资料(暂未开放)',
+    value: "editProfile",
+    label: "编辑资料(暂未开放)",
     onClick: (item: any) => {
-      console.warn('编辑资料功能努力开发中,敬请期待');
+      console.warn("编辑资料功能努力开发中,敬请期待");
     },
   },
   allowType: {
-    value: 'allowType',
-    label: '加我为好友时',
-    selectedChild: '',
-    childrenShowType: 'bottomPopup',
+    value: "allowType",
+    label: "加我为好友时",
+    selectedChild: "",
+    childrenShowType: "bottomPopup",
     showChildren: false,
     onClick: (item: any) => {
       if (!isPC) {
@@ -204,21 +190,21 @@ const settingList = ref<{
     children: {
       [TUIChatEngine.TYPES.ALLOW_TYPE_ALLOW_ANY]: {
         value: TUIChatEngine.TYPES.ALLOW_TYPE_ALLOW_ANY,
-        label: '同意任何用户加好友',
+        label: "同意任何用户加好友",
         onClick: (item: any) => {
           updateMyProfile({ allowType: item.value });
         },
       },
       [TUIChatEngine.TYPES.ALLOW_TYPE_NEED_CONFIRM]: {
         value: TUIChatEngine.TYPES.ALLOW_TYPE_NEED_CONFIRM,
-        label: '需要验证',
+        label: "需要验证",
         onClick: (item: any) => {
           updateMyProfile({ allowType: item.value });
         },
       },
       [TUIChatEngine.TYPES.ALLOW_TYPE_DENY_ANY]: {
         value: TUIChatEngine.TYPES.ALLOW_TYPE_DENY_ANY,
-        label: '拒绝任何人加好友',
+        label: "拒绝任何人加好友",
         onClick: (item: any) => {
           updateMyProfile({ allowType: item.value });
         },
@@ -226,10 +212,10 @@ const settingList = ref<{
     },
   },
   displayMessageReadReceipt: {
-    value: 'displayMessageReadReceipt',
-    label: '消息阅读状态',
-    selectedChild: 'userLevelReadReceiptOpen',
-    childrenShowType: 'bottomPopup',
+    value: "displayMessageReadReceipt",
+    label: "消息阅读状态",
+    selectedChild: "userLevelReadReceiptOpen",
+    childrenShowType: "bottomPopup",
     showChildren: false,
     onClick(item: any) {
       if (!isPC) {
@@ -238,15 +224,15 @@ const settingList = ref<{
     },
     children: {
       userLevelReadReceiptOpen: {
-        value: 'userLevelReadReceiptOpen',
-        label: '开启',
+        value: "userLevelReadReceiptOpen",
+        label: "开启",
         onClick() {
           switchEnabelUserLevelReadRecript(true);
         },
       },
       userLevelReadReceiptClose: {
-        value: 'userLevelReadReceiptClose',
-        label: '关闭',
+        value: "userLevelReadReceiptClose",
+        label: "关闭",
         onClick() {
           switchEnabelUserLevelReadRecript(false);
         },
@@ -254,10 +240,10 @@ const settingList = ref<{
     },
   },
   displayOnlineStatus: {
-    value: 'displayOnlineStatus',
-    label: '显示在线状态',
-    selectedChild: 'userLevelOnlineStatusOpen',
-    childrenShowType: 'bottomPopup',
+    value: "displayOnlineStatus",
+    label: "显示在线状态",
+    selectedChild: "userLevelOnlineStatusOpen",
+    childrenShowType: "bottomPopup",
     showChildren: false,
     onClick(item: any) {
       if (!isPC) {
@@ -266,15 +252,15 @@ const settingList = ref<{
     },
     children: {
       userLevelOnlineStatusOpen: {
-        value: 'userLevelOnlineStatusOpen',
-        label: '开启',
+        value: "userLevelOnlineStatusOpen",
+        label: "开启",
         onClick() {
           switchUserLevelOnlineStatus(true);
         },
       },
       userLevelOnlineStatusClose: {
-        value: 'userLevelOnlineStatusClose',
-        label: '关闭',
+        value: "userLevelOnlineStatusClose",
+        label: "关闭",
         onClick() {
           switchUserLevelOnlineStatus(false);
         },
@@ -282,10 +268,10 @@ const settingList = ref<{
     },
   },
   translateLanguage: {
-    value: 'translateLanguage',
-    label: '翻译语言',
-    selectedChild: 'zh',
-    childrenShowType: 'bottomPopup',
+    value: "translateLanguage",
+    label: "翻译语言",
+    selectedChild: "zh",
+    childrenShowType: "bottomPopup",
     showChildren: false,
     onClick(item: any) {
       if (!isPC) {
@@ -294,46 +280,46 @@ const settingList = ref<{
     },
     children: {
       zh: {
-        value: 'zh',
-        label: '中文',
+        value: "zh",
+        label: "中文",
         onClick() {
-          switchTranslationTargetLanguage('zh');
+          switchTranslationTargetLanguage("zh");
         },
       },
       en: {
-        value: 'en',
-        label: 'English',
+        value: "en",
+        label: "English",
         onClick() {
-          switchTranslationTargetLanguage('en');
+          switchTranslationTargetLanguage("en");
         },
       },
       jp: {
-        value: 'jp',
-        label: '日本語',
+        value: "jp",
+        label: "日本語",
         onClick() {
-          switchTranslationTargetLanguage('jp');
+          switchTranslationTargetLanguage("jp");
         },
       },
       kr: {
-        value: 'kr',
-        label: '한국인',
+        value: "kr",
+        label: "한국인",
         onClick() {
-          switchTranslationTargetLanguage('kr');
+          switchTranslationTargetLanguage("kr");
         },
       },
     },
   },
   exit: {
-    value: 'exit',
-    label: '退出登录',
+    value: "exit",
+    label: "退出登录",
     onClick: (item: any) => {
       TUILogin.logout().then(() => {
         uni.removeStorage({
-          key: 'userInfo',
+          key: "userInfo",
         });
         removeTokenStorage();
         TUIGlobal?.reLaunch({
-          url: '/pages/views/login',
+          url: "/pages/views/login",
         });
       });
     },
@@ -341,7 +327,7 @@ const settingList = ref<{
 });
 
 const handleSettingListItemOnClick = (item: any) => {
-  if (item?.onClick && typeof item?.onClick === 'function') {
+  if (item?.onClick && typeof item?.onClick === "function") {
     item.onClick(item);
   }
 };
@@ -358,18 +344,18 @@ const updateMyProfile = (props: object) => {
   TUIUserService.updateMyProfile(props)
     .then((res: any) => {
       Toast({
-        message: '更新用户资料成功',
+        message: "更新用户资料成功",
         type: TOAST_TYPE.SUCCESS,
         duration: 0,
       });
-      if ('allowType' in props) {
-        settingList.value['allowType'].showChildren = false;
+      if ("allowType" in props) {
+        settingList.value["allowType"].showChildren = false;
       }
     })
     .catch((err: any) => {
-      console.warn('更新用户资料失败', err);
+      console.warn("更新用户资料失败", err);
       Toast({
-        message: '更新用户资料失败',
+        message: "更新用户资料失败",
         type: TOAST_TYPE.ERROR,
         duration: 0,
       });
@@ -384,13 +370,14 @@ TUIStore.watch(StoreName.USER, {
     }
   },
   displayMessageReadReceipt(isDisplay: boolean) {
-    settingList.value.displayMessageReadReceipt.selectedChild
-      = isDisplay ? 'userLevelReadReceiptOpen' : 'userLevelReadReceiptClose';
+    settingList.value.displayMessageReadReceipt.selectedChild = isDisplay
+      ? "userLevelReadReceiptOpen"
+      : "userLevelReadReceiptClose";
   },
   displayOnlineStatus(isOnlineStatusDisplay: boolean) {
     settingList.value.displayOnlineStatus.selectedChild = isOnlineStatusDisplay
-      ? 'userLevelOnlineStatusOpen'
-      : 'userLevelOnlineStatusClose';
+      ? "userLevelOnlineStatusOpen"
+      : "userLevelOnlineStatusClose";
   },
 });
 
@@ -405,20 +392,20 @@ onMounted(() => {
 // tabbar 切换其他tab,关闭profile已经打开的设置弹窗
 onHide(() => {
   for (const settingItemKey in settingList.value) {
-    if (settingList?.value[settingItemKey]?.hasOwnProperty('showChildren')) {
+    if (settingList?.value[settingItemKey]?.hasOwnProperty("showChildren")) {
       settingList.value[settingItemKey].showChildren = false;
     }
   }
 });
 
 function switchEnabelUserLevelReadRecript(status: boolean) {
-  TUIStore.update(StoreName.USER, 'displayMessageReadReceipt', status);
-  settingList.value['displayMessageReadReceipt'].showChildren = false;
+  TUIStore.update(StoreName.USER, "displayMessageReadReceipt", status);
+  settingList.value["displayMessageReadReceipt"].showChildren = false;
 }
 
 function switchUserLevelOnlineStatus(status: boolean) {
   TUIUserService.switchUserStatus({ displayOnlineStatus: status });
-  settingList.value['displayOnlineStatus'].showChildren = false;
+  settingList.value["displayOnlineStatus"].showChildren = false;
 }
 
 function switchTranslationTargetLanguage(lang: string) {