Browse Source

单点登录跳转指定页面

dev_kxc
xzt 1 year ago
parent
commit
a6b85a7489
  1. 1
      jwtech-admin-page/package.json
  2. 18
      jwtech-admin-page/src/router/index.js
  3. 8
      jwtech-admin-page/vue.config.js

1
jwtech-admin-page/package.json

@ -40,6 +40,7 @@
"url": "https://gitee.com/y_project/RuoYi-Vue.git" "url": "https://gitee.com/y_project/RuoYi-Vue.git"
}, },
"dependencies": { "dependencies": {
"@amap/amap-jsapi-loader": "^1.0.1",
"@antv/x6": "^1.28.1", "@antv/x6": "^1.28.1",
"@riophae/vue-treeselect": "0.4.0", "@riophae/vue-treeselect": "0.4.0",
"@wangeditor/editor": "^5.1.23", "@wangeditor/editor": "^5.1.23",

18
jwtech-admin-page/src/router/index.js

@ -79,14 +79,14 @@ export const constantRoutes = [
component: Layout, component: Layout,
// redirect: 'marketSupervision/enterpriseInformation', // redirect: 'marketSupervision/enterpriseInformation',
redirect: 'project/special', redirect: 'project/special',
children: [ // children: [
{ // {
path: 'marketSupervision/enterpriseInformation', // path: 'marketSupervision/enterpriseInformation',
component: (resolve) => require(['@/views/marketSupervision/enterpriseInformation/index'], resolve), // component: (resolve) => require(['@/views/marketSupervision/enterpriseInformation/index'], resolve),
// name: '首页', // // name: '首页',
// meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } // // meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true }
} // }
] // ]
}, },
{ {
path: '/user', path: '/user',
@ -159,7 +159,7 @@ router.beforeEach((to, from, next) => {
console.log("单点登录设置token", to.query.token); //判断当前路由是否需要进行权限控制 console.log("单点登录设置token", to.query.token); //判断当前路由是否需要进行权限控制
if (to.query.token) { if (to.query.token) {
setToken(to.query.token); setToken(to.query.token);
next() next(to.query.page)
} }
} else if(from.path === '/login'&&to.path !== '/legalLinkProject') { } else if(from.path === '/login'&&to.path !== '/legalLinkProject') {
// console.log(54546486,isLegal()); // console.log(54546486,isLegal());

8
jwtech-admin-page/vue.config.js

@ -31,8 +31,8 @@ module.exports = {
devServer: { devServer: {
// host: '0.0.0.0', // host: '0.0.0.0',
// host: '192.168.1.104', // host: '192.168.1.104',
// host: '127.0.0.1', host: '127.0.0.1',
host: '192.168.2.107', // host: '192.168.2.107',
port: 80, port: 80,
open: true, open: true,
proxy: { proxy: {
@ -40,8 +40,8 @@ module.exports = {
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
// target: "http://127.0.0.1:18082", // target: "http://127.0.0.1:18082",
// target: "http://192.168.2.108:18080", // target: "http://192.168.2.108:18080",
target: "http://192.168.2.103:18082", // target: "http://192.168.2.103:18082",
// target: "http://127.0.0.1:18082", target: "http://127.0.0.1:18082",
// target: "http://192.168.2.108:18080", // target: "http://192.168.2.108:18080",
// target: "http://192.168.1.20:8084", // target: "http://192.168.1.20:8084",
changeOrigin: true, changeOrigin: true,

Loading…
Cancel
Save