Commit 43bb188f authored by chenqikuai's avatar chenqikuai

fix: 管理员也有聊天页面

parent 460bc50f
......@@ -13,6 +13,12 @@
"
></AddressBookItem>
</List>
<div
v-if="!loading && list.length === 0"
class="text-center text-sm mt-20 text-app-txt"
>
无联系人
</div>
</template>
<script setup lang="ts">
import { staffGetUsers } from "@/service/StaffService";
......@@ -32,10 +38,6 @@ const page = ref(1);
const pageSize = ref(10);
const total = ref(0);
const userMsg = getUserMsg();
const isStaff = userMsg?.role === eRole.staff;
const isUser = userMsg?.role === eRole.user;
async function staffLoadCustoms() {
const ret = await staffGetUsers({
is_desc: true,
......@@ -73,9 +75,11 @@ async function userLoadAccountManager() {
}
async function onLoad() {
if (isStaff) {
const userMsg = getUserMsg();
if (userMsg?.role2 === eRole.manager || userMsg?.role2 === eRole.staff) {
staffLoadCustoms();
} else if (isUser) {
} else {
userLoadAccountManager();
}
loading.value = false;
......
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