mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-08 01:17:23 +08:00
chore: update
This commit is contained in:
parent
7282b0d345
commit
34ed020328
@ -209,6 +209,7 @@ login:
|
|||||||
pureTip: After scanning the code, click "Confirm" to complete the login
|
pureTip: After scanning the code, click "Confirm" to complete the login
|
||||||
pureDefinite: Definite
|
pureDefinite: Definite
|
||||||
pureLoginSuccess: Login Success
|
pureLoginSuccess: Login Success
|
||||||
|
pureLoginFail: Login Fail
|
||||||
pureRegisterSuccess: Regist Success
|
pureRegisterSuccess: Regist Success
|
||||||
pureTickPrivacy: Please tick Privacy Policy
|
pureTickPrivacy: Please tick Privacy Policy
|
||||||
pureReadAccept: I have read it carefully and accept
|
pureReadAccept: I have read it carefully and accept
|
||||||
|
@ -209,6 +209,7 @@ login:
|
|||||||
pureTip: 扫码后点击"确认",即可完成登录
|
pureTip: 扫码后点击"确认",即可完成登录
|
||||||
pureDefinite: 确定
|
pureDefinite: 确定
|
||||||
pureLoginSuccess: 登录成功
|
pureLoginSuccess: 登录成功
|
||||||
|
pureLoginFail: 登录失败
|
||||||
pureRegisterSuccess: 注册成功
|
pureRegisterSuccess: 注册成功
|
||||||
pureTickPrivacy: 请勾选隐私政策
|
pureTickPrivacy: 请勾选隐私政策
|
||||||
pureReadAccept: 我已仔细阅读并接受
|
pureReadAccept: 我已仔细阅读并接受
|
||||||
|
@ -5,7 +5,7 @@ export type UserResult = {
|
|||||||
data: {
|
data: {
|
||||||
/** 用户名 */
|
/** 用户名 */
|
||||||
username: string;
|
username: string;
|
||||||
/** 当前登陆用户的角色 */
|
/** 当前登录用户的角色 */
|
||||||
roles: Array<string>;
|
roles: Array<string>;
|
||||||
/** `token` */
|
/** `token` */
|
||||||
accessToken: string;
|
accessToken: string;
|
||||||
|
@ -17,7 +17,8 @@ import { usePermissionStoreHook } from "@/store/modules/permission";
|
|||||||
import ExitFullscreen from "@iconify-icons/ri/fullscreen-exit-fill";
|
import ExitFullscreen from "@iconify-icons/ri/fullscreen-exit-fill";
|
||||||
import Fullscreen from "@iconify-icons/ri/fullscreen-fill";
|
import Fullscreen from "@iconify-icons/ri/fullscreen-fill";
|
||||||
|
|
||||||
const errorInfo = "当前路由配置不正确,请检查配置";
|
const errorInfo =
|
||||||
|
"The current routing configuration is incorrect, please check the configuration";
|
||||||
|
|
||||||
export function useNav() {
|
export function useNav() {
|
||||||
const pureApp = useAppStoreHook();
|
const pureApp = useAppStoreHook();
|
||||||
|
@ -81,7 +81,7 @@ function isOneOfArray(a: Array<string>, b: Array<string>) {
|
|||||||
: true;
|
: true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 从localStorage里取出当前登陆用户的角色roles,过滤无权限的菜单 */
|
/** 从localStorage里取出当前登录用户的角色roles,过滤无权限的菜单 */
|
||||||
function filterNoPermissionTree(data: RouteComponent[]) {
|
function filterNoPermissionTree(data: RouteComponent[]) {
|
||||||
const currentRoles =
|
const currentRoles =
|
||||||
storageLocal().getItem<DataInfo<number>>(userKey)?.roles ?? [];
|
storageLocal().getItem<DataInfo<number>>(userKey)?.roles ?? [];
|
||||||
|
@ -15,7 +15,7 @@ export interface DataInfo<T> {
|
|||||||
username?: string;
|
username?: string;
|
||||||
/** 昵称 */
|
/** 昵称 */
|
||||||
nickname?: string;
|
nickname?: string;
|
||||||
/** 当前登陆用户的角色 */
|
/** 当前登录用户的角色 */
|
||||||
roles?: Array<string>;
|
roles?: Array<string>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,12 +77,12 @@ const onLogin = async (formEl: FormInstance | undefined) => {
|
|||||||
router
|
router
|
||||||
.push(getTopMenu(true).path)
|
.push(getTopMenu(true).path)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
message("登录成功", { type: "success" });
|
message(t("login.pureLoginSuccess"), { type: "success" });
|
||||||
})
|
})
|
||||||
.finally(() => (disabled.value = false));
|
.finally(() => (disabled.value = false));
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
message("登录失败", { type: "error" });
|
message(t("login.pureLoginFail"), { type: "error" });
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.finally(() => (loading.value = false));
|
.finally(() => (loading.value = false));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user