Commit a7d7cfe5 authored by chenqikuai's avatar chenqikuai

fix:

parent 5169e7db
<template> <template>
<div class="navbar w-full" style="z-index: 300"> <div class="navbar w-full" style="z-index: 300">
<div <div
class=" class="h-full theBar flex items-center px-5 justify-center relative bg-white"
h-full
theBar
flex
items-center
px-5
justify-center
relative
bg-white
"
v-bind="$attrs" v-bind="$attrs"
> >
<div class="relative w-full flex items-center justify-center"> <div class="relative w-full flex items-center justify-center">
...@@ -37,7 +28,7 @@ ...@@ -37,7 +28,7 @@
@click="$router.push('Search')" @click="$router.push('Search')"
:color="iconColor" :color="iconColor"
/> />
<div>{{ title }}</div> <div class="title">{{ title }}</div>
</div> </div>
</div> </div>
<div class="some-block" v-if="occupyPosition"></div> <div class="some-block" v-if="occupyPosition"></div>
...@@ -69,7 +60,7 @@ export default defineComponent({ ...@@ -69,7 +60,7 @@ export default defineComponent({
type: Boolean, type: Boolean,
default: false, default: false,
}, },
showSearchIcon:{ showSearchIcon: {
type: Boolean, type: Boolean,
default: false, default: false,
} }
...@@ -89,5 +80,10 @@ export default defineComponent({ ...@@ -89,5 +80,10 @@ export default defineComponent({
.some-block { .some-block {
height: 46px; height: 46px;
} }
.title {
font-size: 16px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
}
} }
</style> </style>
\ No newline at end of file
<template> <template>
<div class="flex flex-col flex-nowrap text-base bg-gray-50 h-screen"> <div class="flex flex-col flex-nowrap bg-gray-50 h-screen">
<NavBar title="我的客服" /> <NavBar title="我的客服" />
<div <div
v-if="!connectionState.connection" v-if="!connectionState.connection"
......
<template> <template>
<Navbar title="我的客户" :showBackIcon="false" style="background-color: #F7F7FA !important;" /> <Navbar
:title="navBarTitle"
:showBackIcon="false"
style="background-color: #F7F7FA !important;"
/>
<div class="mx-5"> <div class="mx-5">
<ChatListItem <ChatListItem
v-for="item in cardList" v-for="item in cardList"
...@@ -13,13 +17,13 @@ ...@@ -13,13 +17,13 @@
<script lang="ts" setup> <script lang="ts" setup>
import Navbar from "@/components/NavBar/index.vue" import Navbar from "@/components/NavBar/index.vue"
import ChatListItem from "@/components/ChatList/ChatListItem.vue" import ChatListItem from "@/components/ChatList/ChatListItem.vue"
import { onMounted, ref, watch } from "@vue/runtime-core"; import { computed, onMounted, ref, watch } from "@vue/runtime-core";
import { from } from "@/store/appCallerStore"; import { from } from "@/store/appCallerStore";
import ChatListCardDB from "@/db/ChatListCardDB"; import ChatListCardDB from "@/db/ChatListCardDB";
import { iChatListCard } from "@/db"; import { iChatListCard } from "@/db";
import { chatCardTimeStamp } from "@/store/chatCardStore"; import { chatCardTimeStamp } from "@/store/chatCardStore";
import { getUserMsg } from "@/utils/userMsg";
interface iChatListItem { idOfthePersonWhoChat: string, content: string, unreadNum: number, latestTime: number } import { eRole } from "@/types/roleType";
const cardList = ref<iChatListCard[]>([]); const cardList = ref<iChatListCard[]>([]);
...@@ -34,4 +38,13 @@ watch(chatCardTimeStamp, async () => { ...@@ -34,4 +38,13 @@ watch(chatCardTimeStamp, async () => {
cardList.value = list; cardList.value = list;
}) })
const navBarTitle = computed(() => {
if (getUserMsg()?.role === eRole.user) {
return "我的客户经理"
} else if (getUserMsg()?.role === eRole.serviceManager) {
return "我的客户"
}
})
</script> </script>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment