mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 03:46:45 +08:00
feat:合并
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
* @Author: lixg lixg@dongwu-inc.com
|
* @Author: lixg lixg@dongwu-inc.com
|
||||||
* @Date: 2022-11-21 14:32:52
|
* @Date: 2022-11-21 14:32:52
|
||||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||||
* @LastEditTime: 2022-11-25 17:33:03
|
* @LastEditTime: 2022-11-26 13:44:54
|
||||||
* @FilePath: /fe-manage/src/api/config.js
|
* @FilePath: /fe-manage/src/api/config.js
|
||||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
*/
|
*/
|
||||||
@@ -14,7 +14,6 @@ import axios from "axios";
|
|||||||
// "application/x-www-form-urlencoded";
|
// "application/x-www-form-urlencoded";
|
||||||
|
|
||||||
axios.defaults.withCredentials = true;
|
axios.defaults.withCredentials = true;
|
||||||
|
|
||||||
const http = axios.create({
|
const http = axios.create({
|
||||||
baseURL: "/manageApi",
|
baseURL: "/manageApi",
|
||||||
timeout: 1000 * 5,
|
timeout: 1000 * 5,
|
||||||
@@ -24,18 +23,18 @@ const http = axios.create({
|
|||||||
|
|
||||||
http.interceptors.request.use(
|
http.interceptors.request.use(
|
||||||
(config) => {
|
(config) => {
|
||||||
const token = localStorage.getItem("token");
|
// const token = localStorage.getItem("token");
|
||||||
// const token = getCookie('token')
|
// // const token = getCookie('token')
|
||||||
// console.log('token', token)
|
// // console.log('token', token)
|
||||||
if (token) {
|
// if (token) {
|
||||||
config.headers.token = token; //测试1111
|
// config.headers.token = token; //测试1111
|
||||||
} else {
|
// } else {
|
||||||
console.log("当前请求页面无token,请执行操作!!!");
|
// console.log("当前请求页面无token,请执行操作!!!");
|
||||||
|
|
||||||
// 此处测试默认配置token
|
// // 此处测试默认配置token
|
||||||
config.headers.token = "123456";
|
// config.headers.token = "eyJ0eXBlIjoidG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC91LmJvZS5jb20iLCJpYXQiOjE2Njk0Mjk1ODYsImV4cCI6MTY2OTQzNjc4NiwiR2l2ZW5OYW1lIjoiYm9ldSIsInVzZXJJZCI6IjZCMDQ5RkFGLUMzMTQtN0NDRi0wRDI4LTBEMjNGNEM0MjUzMSIsInVJZCI6Ijk2NTM0MjAyNzQ5NzYwNzE2OCIsInBlcm1pc3Npb24iOiIifQ==.e33e1ab87a82079279e3907428dd81076336d53fcb9022891386fed2fa90e0cc";
|
||||||
// config.headers.token = "eyJ0eXBlIjoidG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC91LmJvZS5jb20iLCJpYXQiOjE2NjkzODQ5MTgsImV4cCI6MTY2OTM5MjExOCwiR2l2ZW5OYW1lIjoiYm9ldSIsInVzZXJJZCI6IjZCMDQ5RkFGLUMzMTQtN0NDRi0wRDI4LTBEMjNGNEM0MjUzMSIsInVJZCI6Ijk2NTM0MjAyNzQ5NzYwNzE2OCIsInBlcm1pc3Npb24iOiIifQ==.7c3af587cbacf68180e86681442e06ffd33c65a78fc835aaac34d0c773752d99";
|
// // config.headers.token = "eyJ0eXBlIjoidG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC91LmJvZS5jb20iLCJpYXQiOjE2NjkzODQ5MTgsImV4cCI6MTY2OTM5MjExOCwiR2l2ZW5OYW1lIjoiYm9ldSIsInVzZXJJZCI6IjZCMDQ5RkFGLUMzMTQtN0NDRi0wRDI4LTBEMjNGNEM0MjUzMSIsInVJZCI6Ijk2NTM0MjAyNzQ5NzYwNzE2OCIsInBlcm1pc3Npb24iOiIifQ==.7c3af587cbacf68180e86681442e06ffd33c65a78fc835aaac34d0c773752d99";
|
||||||
}
|
// }
|
||||||
return config;
|
return config;
|
||||||
},
|
},
|
||||||
(err) => {
|
(err) => {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: lixg lixg@dongwu-inc.com
|
* @Author: lixg lixg@dongwu-inc.com
|
||||||
* @Date: 2022-11-04 22:45:31
|
* @Date: 2022-11-04 22:45:31
|
||||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||||
* @LastEditTime: 2022-11-25 14:56:59
|
* @LastEditTime: 2022-11-26 14:57:17
|
||||||
* @FilePath: /fe-manage/src/api/index1.js
|
* @FilePath: /fe-manage/src/api/index1.js
|
||||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
*/
|
*/
|
||||||
@@ -105,7 +105,7 @@ export const getAudienceInfo = (obj) => http.post('/admin/orgStruct/getAudienceI
|
|||||||
//获取授权(修改版)
|
//获取授权(修改版)
|
||||||
export const optionAuthPerm = (obj) => http.post('/admin/AuthPerm/optionAuthPerm', obj)
|
export const optionAuthPerm = (obj) => http.post('/admin/AuthPerm/optionAuthPerm', obj)
|
||||||
//获取用户登录
|
//获取用户登录
|
||||||
export const getUser = () => http.post('/admin/CheckUser/login')
|
export const getUser = () => http.post('/admin/CheckUser/login', { withCredentials: true })
|
||||||
|
|
||||||
|
|
||||||
// 获取组织结构树
|
// 获取组织结构树
|
||||||
|
|||||||
@@ -96,7 +96,6 @@ export default {
|
|||||||
state.visible = true;
|
state.visible = true;
|
||||||
console.log("点击下载", state.visible);
|
console.log("点击下载", state.visible);
|
||||||
};
|
};
|
||||||
|
|
||||||
const getUser = () => {
|
const getUser = () => {
|
||||||
api
|
api
|
||||||
.getUser()
|
.getUser()
|
||||||
@@ -111,6 +110,7 @@ export default {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
getUser();
|
getUser();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
changeRole,
|
changeRole,
|
||||||
|
|||||||
13
src/main.js
13
src/main.js
@@ -1,3 +1,11 @@
|
|||||||
|
/*
|
||||||
|
* @Author: lixg lixg@dongwu-inc.com
|
||||||
|
* @Date: 2022-11-09 09:26:26
|
||||||
|
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||||
|
* @LastEditTime: 2022-11-26 14:54:37
|
||||||
|
* @FilePath: /fe-manage/src/main.js
|
||||||
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
|
*/
|
||||||
import { createApp } from 'vue'
|
import { createApp } from 'vue'
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
import router from './router'
|
import router from './router'
|
||||||
@@ -8,6 +16,8 @@ import 'element-plus/dist/index.css'
|
|||||||
import "@/assets/scss/common.scss"
|
import "@/assets/scss/common.scss"
|
||||||
import Antd from 'ant-design-vue';
|
import Antd from 'ant-design-vue';
|
||||||
import 'ant-design-vue/dist/antd.css';
|
import 'ant-design-vue/dist/antd.css';
|
||||||
|
// import axios from 'axios'
|
||||||
|
// axios.defaults.withCredentials = true;
|
||||||
// import zhCN from 'ant-design-vue/es/locale/zh_CN';
|
// import zhCN from 'ant-design-vue/es/locale/zh_CN';
|
||||||
const app = createApp(App)
|
const app = createApp(App)
|
||||||
// 清理控制台warn信息
|
// 清理控制台warn信息
|
||||||
@@ -18,7 +28,4 @@ app.config.warnHandler = () => null;
|
|||||||
app.use(Antd);
|
app.use(Antd);
|
||||||
app.use(router);
|
app.use(router);
|
||||||
app.use(store);
|
app.use(store);
|
||||||
|
|
||||||
app.mount('#app');
|
app.mount('#app');
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1649,9 +1649,6 @@ export default {
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// console.log("执行");
|
// console.log("执行");
|
||||||
getLearnPath();
|
getLearnPath();
|
||||||
// let cookie =
|
|
||||||
// "eyJ0eXBlIjoidG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC91LmJvZS5jb20iLCJpYXQiOjE2NjkzNjI4OTAsImV4cCI6MTY2OTM3MDA5MCwiR2l2ZW5OYW1lIjoiYm9ldSIsInVzZXJJZCI6IjZCMDQ5RkFGLUMzMTQtN0NDRi0wRDI4LTBEMjNGNEM0MjUzMSIsInVJZCI6Ijk2NTM0MjAyNzQ5NzYwNzE2OCIsInBlcm1pc3Npb24iOiIifQ==.2e68ae110cf0e8f157d8312301c0ca8104d6ec2a2a294052d5497c06019ed3d8";
|
|
||||||
// setCookie("token", cookie, 10);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user