AI团宝页面对纯学生隐藏「进入后台」入口
This commit is contained in:
@@ -79,7 +79,11 @@
|
||||
<div class="sidebar-footer">
|
||||
<p class="user-name">{{ userName }}</p>
|
||||
<div class="footer-actions">
|
||||
<button class="admin-btn" type="button" @click="goAdmin"
|
||||
<button
|
||||
v-if="showAdminEntry"
|
||||
class="admin-btn"
|
||||
type="button"
|
||||
@click="goAdmin"
|
||||
>进入后台
|
||||
</button
|
||||
>
|
||||
@@ -319,6 +323,7 @@ import { useUserStore } from "@/store/modules/user";
|
||||
import { logout } from "@/utils/page-tab-util";
|
||||
import { copyText } from "@/utils/common";
|
||||
import { getToken } from "@/utils/token-util";
|
||||
import { isOnlyStudent } from "@/utils/permission";
|
||||
|
||||
type ChatRole = "user" | "assistant";
|
||||
type ChatMode = "chat" | "writing" | "image";
|
||||
@@ -377,6 +382,11 @@ const userName = computed(
|
||||
(loginUser.value.userId ? `用户${loginUser.value.userId}` : "未登录")
|
||||
);
|
||||
|
||||
/**
|
||||
* 是否展示「进入后台」入口:纯学生身份隐藏
|
||||
*/
|
||||
const showAdminEntry = computed(() => !isOnlyStudent());
|
||||
|
||||
const canSend = computed(
|
||||
() => content.value.trim().length > 0 && !loading.value
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user