diff --git a/public/index.html b/public/index.html index 23fd728..d2a11b8 100644 --- a/public/index.html +++ b/public/index.html @@ -20,7 +20,12 @@ + + <% if (process.env.NODE_ENV === 'production' ) { %> + <% } else {%> + + <% } %> diff --git a/src/api/login.js b/src/api/login.js index 5090744..fb9a20a 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -3,6 +3,7 @@ import { encrypt } from "@/utils/jsencrypt"; // 登录方法 export function login(username, password, code, uuid) { + username = encrypt(username); //加密 password = encrypt(password); //密码加密 const data = { username, @@ -21,12 +22,12 @@ export function login(username, password, code, uuid) { }); } export function login2(username, password, code, uuid) { - password = encrypt(password); //密码加密 const data = { username, password, code, uuid, + app: "1", }; return request({ url: "/loginnocaptcha", diff --git a/src/permission.js b/src/permission.js index 0013355..f1a244d 100644 --- a/src/permission.js +++ b/src/permission.js @@ -5,6 +5,7 @@ import NProgress from "nprogress"; import "nprogress/nprogress.css"; import { getToken } from "@/utils/auth"; import { isRelogin } from "@/utils/request"; +import { getLeaddata } from "@/utils/myFuntion"; NProgress.configure({ showSpinner: false }); @@ -14,7 +15,7 @@ router.beforeEach((to, from, next) => { NProgress.start(); if (to.path == "/xiaoqu" && to.query.isLeader && !getToken()) { store - .dispatch("login2", { username: "领导", password: "Loudong@2022***" }) + .dispatch("login2", getLeaddata()) .then((res) => { handelRouter(to, from, next); }) @@ -24,7 +25,6 @@ router.beforeEach((to, from, next) => { next(`/login?redirect=${to.fullPath}`); // 否则全部重定向到登录页 }); }); - return; } handelRouter(to, from, next); diff --git a/src/utils/myFuntion.js b/src/utils/myFuntion.js index 66f0676..5949c1a 100644 --- a/src/utils/myFuntion.js +++ b/src/utils/myFuntion.js @@ -1,6 +1,7 @@ import postcss from "../../postcss.config"; import store from "@/store"; import axios from "axios"; +import { encrypt } from "@/utils/jsencrypt"; export function pxToVw(size) { return ( @@ -118,4 +119,10 @@ export async function getSb(data) { ); console.log(res, "社保"); } -// 查询社保 + +export function getLeaddata() { + return { + username: encrypt("领导"), + password: encrypt("Loudong@2022***"), + }; +} diff --git a/src/views/components/xiaoqu/rightData/exportTable.vue b/src/views/components/xiaoqu/rightData/exportTable.vue index e2983dc..66e2ee5 100644 --- a/src/views/components/xiaoqu/rightData/exportTable.vue +++ b/src/views/components/xiaoqu/rightData/exportTable.vue @@ -38,7 +38,7 @@ :key="'rows' + index" >