util.ts 624 Bytes
import Cookie from "js-cookie";
import {get} from "@/utils/request";

// 1.行业大脑集成页/行业大脑明细页
// 1.判断缓存token
// 无 直接404 --empty
// 有
// 1.调用getUserInfo接口
// 失败 404 --empty
// 成功
// 1.管理员角色才能看行业大脑
// 2.其他 404 --empty

// 处理权限相关 --- 前端
export const judgePermission = async (navigate: any) => {
    let _hasPermission = true;
    return {
        _hasPermission
    }
}

const toEmpty = (navigate: any) => {
    // 去往没有权限的页面 -- 前端处理
    const _url = '/empty';
    navigate(_url, { replace: true });
}