Compare commits

..

3 Commits

Author SHA1 Message Date
fanluyan 758e93decb userold 1 year ago
fanluyan 18480590c9 退出登录 1 year ago
fanluyan f44cee9ec8 prod-api改成cac-api 1 year ago

@ -2,4 +2,4 @@
ENV = 'production' ENV = 'production'
# 管理系统/生产环境 # 管理系统/生产环境
VUE_APP_BASE_API = '/prod-api' VUE_APP_BASE_API = '/cac-api'

@ -1,55 +1,51 @@
import request from '@/utils/request' import request from "@/utils/request";
import { import { UPMS_SREVICE, AUTH_SREVICE, SJZD_SREVICE } from "@/api/module/urls";
UPMS_SREVICE,
AUTH_SREVICE,
SJZD_SREVICE
} from '@/api/module/urls'
const client_id = 'web' const client_id = "web";
const client_secret = '123456' const client_secret = "123456";
const scope = 'server' const scope = "server";
// 登录方法 // 登录方法
export function login(username, password, clienttype) { export function login(username, password, clienttype) {
return request({ return request({
url: '/login', url: "/user/loginold",
method: 'post', method: "post",
params: { params: {
username, username,
password, password,
clienttype clienttype,
} },
}) });
} }
// 刷新方法 // 刷新方法
export function refreshToken() { export function refreshToken() {
return request({ return request({
url: AUTH_SREVICE + '/auth/refresh', url: AUTH_SREVICE + "/auth/refresh",
method: 'post' method: "post",
}) });
} }
// 获取用户详细信息 // 获取用户详细信息
export function getInfo() { export function getInfo() {
return request({ return request({
url: UPMS_SREVICE + '/system/getInfo', url: UPMS_SREVICE + "/system/getInfo",
method: 'get' method: "get",
}) });
} }
// 退出方法 // 退出方法
export function logout() { export function logout() {
return request({ return request({
url: '/logout', url: "/user/logout",
method: 'delete' method: "post",
}) });
} }
// 获取验证码 // 获取验证码
export function getCodeImg() { export function getCodeImg() {
return request({ return request({
url: '/code', url: "/code",
method: 'get' method: "get",
}) });
} }

@ -1,8 +1,13 @@
const UPMS_SREVICE='/api-upms'; const UPMS_SREVICE = "/api-upms";
const AUTH_SREVICE='/prod-api'; const AUTH_SREVICE = "/cac-api";
const LOGS_SREVICE='/api-logs'; const LOGS_SREVICE = "/api-logs";
const GEN_CODE_SREVICE='/api-gen'; const GEN_CODE_SREVICE = "/api-gen";
const SJZD_SREVICE='http://127.0.0.1:8081'; const SJZD_SREVICE = "http://127.0.0.1:8081";
export {
export { UPMS_SREVICE, AUTH_SREVICE, LOGS_SREVICE, GEN_CODE_SREVICE,SJZD_SREVICE} UPMS_SREVICE,
AUTH_SREVICE,
LOGS_SREVICE,
GEN_CODE_SREVICE,
SJZD_SREVICE,
};

@ -237,50 +237,50 @@ export default {
loginCAC(page) { loginCAC(page) {
console.log(page); console.log(page);
console.log(this.hostName); console.log(this.hostName);
// if (page == 1) { if (page == 1) {
// window.location.href = this.hostName + "newcac/index.html#/dataReport"; window.location.href = this.hostName + "newcac/index.html#/dataReport";
// //window.open(this.hostName + "/newcac/#/dataReport"); //window.open(this.hostName + "/newcac/#/dataReport");
// } else if (page == 2) { } else if (page == 2) {
// window.location.href = this.hostName + "newcac/index.html#/equipment"; window.location.href = this.hostName + "newcac/index.html#/equipment";
// // window.open(this.hostName + "/newcac/#/equipment"); // window.open(this.hostName + "/newcac/#/equipment");
// } else if (page == 3) { } else if (page == 3) {
// window.location.href = this.hostName + "newcac/index.html#/icdConfig"; window.location.href = this.hostName + "newcac/index.html#/icdConfig";
// //window.open(this.hostName + "/newcac/#/icdConfig"); //window.open(this.hostName + "/newcac/#/icdConfig");
// }
const userName = sessionStorage.getItem("userName");
const password = decrypt(sessionStorage.getItem("password"));
const passwordSJZD = "123456";
if (page != 4) {
window.open(
// "http://192.168.145.147/index.php/index/login/index.html?name=" +
//"http://192.168.128.32/index.php/index/login/index.html?name=" +
"http://192.168.1.190/index.php/index/login/index.html?name=" +
userName +
"&password=" +
password +
"&page=" +
page,
"_blank"
);
} else {
const params = {
userName: userName,
password: passwordSJZD,
};
//
axios.post("/sysLoginRemoteController/login", params).then((res) => {
if (res && res.data.code === 200) {
//访
window.open(
//"http://192.168.135.81:88/login?token=" + res.data.token,
//"http://192.168.128.32/login?token=" + res.data.token,
"http://192.168.50.200/login?token=" + res.data.token,
"_blank"
);
return;
}
});
} }
// const userName = sessionStorage.getItem("userName");
// const password = decrypt(sessionStorage.getItem("password"));
// const passwordSJZD = "123456";
// if (page != 4) {
// window.open(
// // "http://192.168.145.147/index.php/index/login/index.html?name=" +
// //"http://192.168.128.32/index.php/index/login/index.html?name=" +
// "http://192.168.1.190/index.php/index/login/index.html?name=" +
// userName +
// "&password=" +
// password +
// "&page=" +
// page,
// "_blank"
// );
// } else {
// const params = {
// userName: userName,
// password: passwordSJZD,
// };
// //
// axios.post("/sysLoginRemoteController/login", params).then((res) => {
// if (res && res.data.code === 200) {
// //访
// window.open(
// //"http://192.168.135.81:88/login?token=" + res.data.token,
// //"http://192.168.128.32/login?token=" + res.data.token,
// "http://192.168.50.200/login?token=" + res.data.token,
// "_blank"
// );
// return;
// }
// });
// }
}, },
// 退 // 退
logout() { logout() {

@ -57,7 +57,7 @@ module.exports = {
//target: `http://127.0.0.1:8082/`, //target: `http://127.0.0.1:8082/`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
["^/api"]: "/prod-api", ["^/api"]: "/cac-api",
}, },
// pathRewrite: { // pathRewrite: {
// ["^" + process.env.VUE_APP_BASE_API]: "", // ["^" + process.env.VUE_APP_BASE_API]: "",

Loading…
Cancel
Save