c568d17b by renchao@pashanhoo.com

style:上报修改

1 parent cbcf2d8b
<!--
* @Description: 引入配置文件
* @Autor: renchao
* @LastEditTime: 2023-06-20 11:24:04
* @LastEditTime: 2023-06-26 10:22:28
-->
<!DOCTYPE html>
<html>
......@@ -22,7 +22,7 @@
// 是否微服务模式,业务系统根据需要读取
cloudEnable: false,
baseUrl: location.origin || location.protocol + '//' + location.host,
// 是否启用单点登录
// 是否启用cas登录页面
casEnable: false,
// cas 基地址
casBaseURL: 'http://192.168.2.38/cas',
......
/*
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-06-20 11:28:11
* @LastEditTime: 2023-06-26 10:18:09
*/
import Vue from 'vue'
import axios from 'axios'
......@@ -13,7 +13,7 @@ import "nprogress/nprogress.css"; // progress bar style
import getPageTitle from "@/utils/get-page-title";
import getTheme from "@/utils/theme";
import Cookies from "js-cookie";
import {getToken, getUrlParam, setToken} from "@/utils/util";
import { getToken, getUrlParam, setToken } from "@/utils/util";
NProgress.configure({ showSpinner: false });
......@@ -27,7 +27,7 @@ router.beforeEach(async (to, from, next) => {
// cas操作
const token = getToken()
let locationUrl = window.location.origin + window.location.pathname;
function casValidate (ticket){
function casValidate (ticket) {
axios.get(window._config.services.management + "/management/cas/validate", {
params: {
ticket: ticket,
......@@ -98,29 +98,29 @@ router.beforeEach(async (to, from, next) => {
return
} else {
//todo: loginUrl 需要业务系统根据登录页面路由地址获取,这里只是简写
localStorage.setItem('sjsb-location',locationUrl)
localStorage.setItem('hash',to.fullPath)
localStorage.setItem('sjsb-location', locationUrl)
localStorage.setItem('hash', to.fullPath)
window.location.href = window._config.services.management + `/management/cas/status?loginUrl=${window._config.baseUrl}/sjsb/&hash=/login&`
return
}
}
localStorage.setItem('sjsb-location',locationUrl)
localStorage.setItem('hash',to.fullPath)
localStorage.setItem('sjsb-location', locationUrl)
localStorage.setItem('hash', to.fullPath)
//todo: loginUrl 需要业务系统根据登录页面路由地址获取,这里只是简写
window.location.href = window._config.services.management + `/management/cas/status?loginUrl=${window._config.baseUrl}/sjsb/&hash=/login`
}
}else{
} else {
if (to.path === '/login') {
const redirectUrl = getUrlParam('redirectUrl');
if (redirectUrl && redirectUrl !== '') {
window.location.href = redirectUrl
return
} else {
permission()
next('/');
return
}
}
permission()
}
}
NProgress.done()
......