diff --git a/.env.production b/.env.production index f08ed82..201f756 100644 --- a/.env.production +++ b/.env.production @@ -7,10 +7,10 @@ ENV = 'production' # 苏州工业园区工业上楼管理系统/生产环境 -# VUE_APP_BASE_API = '' +VUE_APP_BASE_API = '' -# 测试环境 +# 公司测试环境 # VUE_APP_BASE_API = 'http://39.101.188.84:7071' # 正式环境 -VUE_APP_BASE_API = '/api' +# VUE_APP_BASE_API = '/api' diff --git a/src/api/login/index.js b/src/api/login/index.js index 2949bda..27117e2 100644 --- a/src/api/login/index.js +++ b/src/api/login/index.js @@ -8,3 +8,11 @@ export function governmentGetInfo(params) { params }) } + +export function getSingleLoginHtml() { + return request({ + url: '/system/singlelogin/login', + method: 'get', + responseType: 'text' // 确保以文本形式接收响应 + }).then(res => res) +} \ No newline at end of file diff --git a/src/components/ImageUpload2/index.vue b/src/components/ImageUpload2/index.vue index 7fa2c0b..b75685f 100644 --- a/src/components/ImageUpload2/index.vue +++ b/src/components/ImageUpload2/index.vue @@ -52,7 +52,7 @@ // 图片数量限制 limit: { type: Number, - default: 1, + default: 3, }, // 大小限制(MB) fileSize: { diff --git a/src/permission.js b/src/permission.js index 032f2ef..9ef8339 100644 --- a/src/permission.js +++ b/src/permission.js @@ -13,7 +13,7 @@ import { governmentGetInfo } from "@/api/login/index"; NProgress.configure({ showSpinner: false }); -const whiteList = ["/login", "/register"]; +const whiteList = ["/login", "/register","/system/singlelogin/login"]; const isWhiteList = (path) => { return whiteList.some((pattern) => isPathMatch(pattern, path)); @@ -25,7 +25,7 @@ router.beforeEach((to, from, next) => { } NProgress.start(); - // 提取所有 URL 参数(包括 hash 后面的部分) + const search = window.location.search || window.location.hash.split("?")[1] || ""; const params = new URLSearchParams(search); @@ -33,7 +33,6 @@ router.beforeEach((to, from, next) => { const signature = params.get("signature"); const timespan = params.get("timespan"); - console.log(userToken, signature, timespan, "参数"); // 如果已经处理过一次登录逻辑,不再重复执行 if (from.path === to.path && store.getters.token) { @@ -73,7 +72,7 @@ router.beforeEach((to, from, next) => { // 如果已有角色信息,直接跳转 if (store.getters.roles.length > 0) { - next("/"); // 或者 next(to.query.redirect || "/") + next("/"); return; } diff --git a/src/router/index.js b/src/router/index.js index d1452f2..0777c10 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -17,7 +17,7 @@ import Layout from "@/layout"; * redirect: noRedirect // 当设置 noRedirect 的时候该路由在面包屑导航中不可被点击 * name:'router-name' // 设定路由的名字,一定要填写不然使用时会出现各种问题 * query: '{"id": 1, "name": "ry"}' // 访问路由的默认传递参数 - * roles: ['admin', 'common','gov'] // 访问路由的角色权限 + * roles: ['admin', 'common','gov'] // 访问路由的角色权限 * permissions: ['a:a:a', 'b:b:b'] // 访问路由的菜单权限 * meta : { noCache: true // 如果设置为true,则不会被 缓存(默认 false) @@ -44,9 +44,9 @@ export const constantRoutes = [ { path: "/login", // 正式环境登录页 - component: () => import("@/views/login"), + // component: () => import("@/views/login"), // 测试 - // component: () => import("@/views/login_v1"), + component: () => import("@/views/login_v1"), hidden: true, }, { diff --git a/src/views/compilation/handbook/index.vue b/src/views/compilation/handbook/index.vue index 5cf5443..3234361 100644 --- a/src/views/compilation/handbook/index.vue +++ b/src/views/compilation/handbook/index.vue @@ -1,31 +1,43 @@ - +