From aa3e4e0a6ea36ce897c97f8ccb0e54475a9435c8 Mon Sep 17 00:00:00 2001
From: zrj <646384940@qq.com>
Date: Mon, 23 Sep 2024 10:11:30 +0800
Subject: [PATCH] 任务页面修改默认为表格样式
---
src/main.js | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/src/main.js b/src/main.js
index 09c2e9f..1e6aa65 100644
--- a/src/main.js
+++ b/src/main.js
@@ -12,6 +12,9 @@
import '@smallwei/avue/lib/index.css';
import crudCommon from '@/mixins/crud.js';
import { getScreen } from './utils/util';
+import { getUrlParams } from './utils/validate'
+import { setToken, setRefreshToken } from './utils/auth';
+import { setStore } from './utils/store';
import './permission';
import error from './error';
import avueUeditor from 'avue-plugin-ueditor';
@@ -27,6 +30,16 @@
// 业务组件
import tenantPackage from './views/system/tenantpackage.vue';
+// 获取url中是否存在token
+const urlParams = getUrlParams(window.location.href)
+if (urlParams?.token) {
+ // 设置cookie和localStorage
+ setStore('saber-token', urlParams.token)
+ setToken(urlParams.token)
+ setRefreshToken(urlParams.token)
+}
+
+
window.$crudCommon = crudCommon;
window.axios = axios;
const app = createApp(App);
--
Gitblit v1.9.3