panhui 2 rokov pred
rodič
commit
d5f4967e9a

+ 1 - 1
.env.development

@@ -31,4 +31,4 @@ VITE_GLOB_OPEN_LONG_REPLY=false
 # When you want to use PWA
 VITE_GLOB_APP_PWA=false
 
-VITE_GLOB_APP_PUBLIC_PATH=/ui/
+VITE_GLOB_APP_PUBLIC_PATH=/game/

+ 1 - 1
.env.production

@@ -9,4 +9,4 @@ VITE_GLOB_OPEN_LONG_REPLY=false
 # When you want to use PWA
 VITE_GLOB_APP_PWA=false
 
-VITE_GLOB_APP_PUBLIC_PATH=/ui/
+VITE_GLOB_APP_PUBLIC_PATH=/game/

+ 8 - 2
src/components/common/MomentInfo.vue

@@ -1,9 +1,9 @@
 <template>
     <n-thing @click="goDetail">
         <template #avatar>
-            <n-avatar v-if="chatRole.pic" class="!block" round :size="size === 'mini' ? 40 : 88" :src="chatRole.pic">
+            <n-avatar @click.prevent="goAgent" v-if="chatRole.pic" class="!block" round :size="size === 'mini' ? 40 : 88" :src="chatRole.pic">
             </n-avatar>
-            <n-avatar v-else class="!block" round :size="size === 'mini' ? 40 : 88">
+            <n-avatar @click.prevent="goAgent" v-else class="!block" round :size="size === 'mini' ? 40 : 88">
                 {{ chatRole.name?.[0] }}
             </n-avatar>
         </template>
@@ -58,6 +58,7 @@ import zhCN from 'date-fns/locale/zh-CN'
 
 interface Emit {
     (ev: 'goDetail', id: number | null): void
+    (ev: 'goAgent', id: number | null): void
 }
 
 const props = defineProps({
@@ -96,6 +97,11 @@ const timeStr = computed(() => {
 function goDetail() {
     emit('goDetail', props.info.id)
 }
+
+function goAgent(){
+    emit('goAgent', props.info.userId)
+    
+}
 </script>
 <style lang="less" scoped>
 :deep(.n-thing-header-wrapper) {

+ 1 - 2
src/components/common/MomentsPannel.vue

@@ -24,7 +24,7 @@
             class="moment-box bg-white mt-[12px] p-4 rounded-lg"
             :class="{ 'moment-center': showList[index] }"
         >
-            <moment-info @goDetail="goDetail" :info="item"></moment-info>
+            <moment-info @goDetail="goDetail" @goAgent="goAgent" :info="item"></moment-info>
         </div>
         <div class="loading flex items-center justify-center opacity-0" ref="loadingRef">加载中</div>
     </div>
@@ -47,7 +47,6 @@ function goDetail(id: any) {
         }
     })
 }
-
 const list = ref(<any>[])
 const page = ref(1)
 const finish = ref(false)

+ 5 - 3
src/views/page/AgentView.vue

@@ -70,10 +70,10 @@
                     <img class="absolute bottom-2 left-[38px] w-[28px]" src="@/assets/png-xian.png" alt="" />
                 </div>
 
-                <div class="px-5 moment-list ">
+                <div class="px-5 moment-list">
                     <div class="empty py-6" v-if="!loading && !totals">
                         <img class="w-3/5 block mx-[auto]" :src="isDark ? emptyDarkImg : emptyImg" alt="" />
-                        <div class="text-sm text-[#939599] text-center py-3">暂无评论</div>
+                        <div class="text-sm text-[#939599] text-center py-3">暂无动态</div>
                     </div>
                     <div
                         ref="target"
@@ -166,6 +166,9 @@ function getMoments() {
         search: {
             order: {
                 createdAt: 'DESC'
+            },
+            where: {
+                userId: route.query.id
             }
         }
     }
@@ -275,5 +278,4 @@ watch(list, () => {
         z-index: 0;
     }
 }
-
 </style>