Commit 314a0aef authored by 高宇's avatar 高宇

打印 屏蔽移动端对应的菜单

parent 150e5857
......@@ -17,6 +17,26 @@ export function login(username, password, code, uuid) {
}
})
}
// export function login(username, password, code, uuid) {
// const data = {
// username,
// password,
// code,
// uuid
// }
// console.log('加密前数据', data)
// return request({
// url: '/auth/login',
// method: 'post',
// data: Qs.stringify({
// sign: encrypt(data)
// }),
// headers: {
// 'Content-Type': 'application/x-www-form-urlencoded'
// }
// })
// }
// 刷新token
export function refreshToken(params) {
return request({
......
......@@ -12,6 +12,7 @@ NProgress.configure({ showSpinner: false }) // NProgress Configuration
const whiteList = ['/auth-redirect', '/bind', '/register', '/login', '/forgetPwd']
router.beforeEach((to, from, next) => {
NProgress.start()
if (getToken()) {
......
......@@ -2,7 +2,8 @@ import { constantRoutes } from '@/router'
import { getRouters } from '@/api/menu'
import { getInfo } from '@/api/login'
import Layout from '@/layout/index'
// pathList: 是要隐藏菜单的集合 system元素:一级菜单的路径(path)
const pathList = ['/setUp']
const permission = {
state: {
routes: [],
......@@ -20,14 +21,20 @@ const permission = {
return new Promise(resolve => {
// 向后端请求路由数据
getInfo().then(res => {
const accessedRoutes = filterAsyncRouter(res.data.menus)
var menus = []
res.data.menus.forEach(item => {
if (!pathList.includes(item.path)) {
menus.push(item)
}
})
const accessedRoutes = filterAsyncRouter(menus)
if (accessedRoutes[0]) {
const firstChild = getFirstChild(accessedRoutes[0])
accessedRoutes.push({ path: '*', redirect: '/404', hidden: true })
accessedRoutes.push({ path: '/', redirect: firstChild, hidden: true })
commit('SET_ROUTES', accessedRoutes)
}
const routers = { accessedRoutes: accessedRoutes, getRouters: res.data.menus }
const routers = { accessedRoutes: accessedRoutes, getRouters: menus }
resolve(routers)
})
})
......
......@@ -29,7 +29,12 @@ html {
overflow-x: hidden;
//min-width: 1440px;
}
// 解决浏览器打印网站不全问题
@media print {
html, body{
height: inherit;
}
}
*,
*:before,
*:after {
......
......@@ -115,7 +115,8 @@ module.exports = {
// }
// },
[process.env.VUE_APP_BASE_API]: {
target: `http://localhost:8088/`,
target: `http://49.232.167.247:20014/`,
// target: `http://localhost:8088/`,
// target: `http://10.5.87.231:10010/internal`,
// target: `http://117.122.212.91:32012/`,
// target: `http://192.144.239.97:20070/`,
......
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