Commit bea0c4a0 authored by “yiyousong”'s avatar “yiyousong”

perf: 优化证书校验

parent c2260dbc
...@@ -23,14 +23,14 @@ const router = new VueRouter({ ...@@ -23,14 +23,14 @@ const router = new VueRouter({
}); });
router.beforeEach(async (to, from, next) => { router.beforeEach(async (to, from, next) => {
let islogin = store.getters["user/token"]; let islogin = store.getters["user/token"];
let date = moment().format("YYYY-MM-DD");
if (date != store.getters["user/licenseInfo"].date) {
await store.dispatch("user/checkCipher");
}
// let routerPath = store.getters["user/routerList"]; // let routerPath = store.getters["user/routerList"];
// let toRootPathArr = to.matched.map((v) => v.path); // let toRootPathArr = to.matched.map((v) => v.path);
// let bol = hasIntersection(toRootPathArr, routerPath); // let bol = hasIntersection(toRootPathArr, routerPath);
let date = moment().format("YYYY-MM-DD");
let getDate = store.getters["user/licenseInfo"].date;
if (!getDate || date != getDate) {
await store.dispatch("user/checkCipher");
}
let licenseInfo = store.getters["user/licenseInfo"]; let licenseInfo = store.getters["user/licenseInfo"];
if (licenseInfo.isExpire) { if (licenseInfo.isExpire) {
Vue.prototype.$licenseHintModal(); Vue.prototype.$licenseHintModal();
......
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