Compare commits
6 Commits
c5fdbd6a27
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2eba5f0140 | ||
|
|
1dacb5a705 | ||
| 99b2cc369d | |||
|
|
0e48245381 | ||
|
|
83a8974dc5 | ||
|
|
76443e343c |
@@ -4,6 +4,8 @@ const prodEnv = require('./prod.env')
|
|||||||
|
|
||||||
module.exports = merge(prodEnv, {
|
module.exports = merge(prodEnv, {
|
||||||
NODE_ENV: '"development"',
|
NODE_ENV: '"development"',
|
||||||
// BASE_API: '"http://127.0.0.1:48090"'
|
BASE_API: '"http://127.0.0.1:48090"'
|
||||||
BASE_API: '"http://192.168.1.241:8080/prod-api"'
|
|
||||||
|
// BASE_API: '"http://192.168.1.241:8080/prod-api"'
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -23,6 +23,18 @@ export function logout () {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function outlogcas (data) {
|
||||||
|
console.log(data)
|
||||||
|
return request({
|
||||||
|
url: 'accessUser/outlogcas',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 登录之后 根据旧修改密码
|
// 登录之后 根据旧修改密码
|
||||||
export function reqUpdatePassword (data) {
|
export function reqUpdatePassword (data) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ const user = {
|
|||||||
const repCode = response.repCode
|
const repCode = response.repCode
|
||||||
const repData = response.repData
|
const repData = response.repData
|
||||||
if (repCode === '0000') {
|
if (repCode === '0000') {
|
||||||
|
|
||||||
commit('SET_TOKEN', repData.token)
|
commit('SET_TOKEN', repData.token)
|
||||||
commit('SET_ACCESSUSER', repData.accessUser)
|
commit('SET_ACCESSUSER', repData.accessUser)
|
||||||
resolve(response)
|
resolve(response)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { getToken } from '@/utils/auth'
|
|||||||
// 创建axios实例
|
// 创建axios实例
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
baseURL: process.env.BASE_API, // api 的 base_url
|
baseURL: process.env.BASE_API, // api 的 base_url
|
||||||
timeout: 200000 // 请求超时时间
|
timeout: 20000 // 请求超时时间
|
||||||
})
|
})
|
||||||
|
|
||||||
// request拦截器
|
// request拦截器
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<div class="title">
|
<div class="title">
|
||||||
<div
|
<div
|
||||||
v-if="isIndex"
|
v-if="isIndex"
|
||||||
:style="[headerTableStyle, tableRowHeight()]">
|
:style="[headerTableStyle,{width:'50px',flexShrink: 0}, tableRowHeight()]">
|
||||||
序号
|
序号
|
||||||
</div>
|
</div>
|
||||||
<div v-for="(item, index) in header" :key="index"
|
<div v-for="(item, index) in header" :key="index"
|
||||||
@@ -18,9 +18,11 @@
|
|||||||
<ul class="infoList">
|
<ul class="infoList">
|
||||||
<li v-for="(item, index) in list" :key="index" :style="tableRowHeight()">
|
<li v-for="(item, index) in list" :key="index" :style="tableRowHeight()">
|
||||||
<div
|
<div
|
||||||
|
@mouseenter="handleMouseSeen(index, -1)" @mouseleave="handleMouseLeave"
|
||||||
v-if="isIndex"
|
v-if="isIndex"
|
||||||
:style="[
|
:style="[
|
||||||
bodyTableStyle,
|
bodyTableStyle,
|
||||||
|
tableReadColor(index, -1),{width:'50px',flexShrink: 0},
|
||||||
bodyTable(index),
|
bodyTable(index),
|
||||||
tableRowHeight()
|
tableRowHeight()
|
||||||
]"
|
]"
|
||||||
@@ -376,8 +378,9 @@ export default {
|
|||||||
tableReadColor(index, idx){
|
tableReadColor(index, idx){
|
||||||
let styleJson = {};
|
let styleJson = {};
|
||||||
if (this.optionsSetUp.is_read_mode && (this.hoverIndex.index === index || this.hoverIndex.idx === idx)) {
|
if (this.optionsSetUp.is_read_mode && (this.hoverIndex.index === index || this.hoverIndex.idx === idx)) {
|
||||||
styleJson["background-color"] = this.optionsSetUp.read_color;
|
styleJson["background-color"] = this.optionsSetUp.read_color;console.log(styleJson["background-color"],this.hoverIndex,1231231)
|
||||||
}
|
}
|
||||||
|
|
||||||
return styleJson;
|
return styleJson;
|
||||||
},
|
},
|
||||||
// 添加的方法 - 设备类型检测
|
// 添加的方法 - 设备类型检测
|
||||||
|
|||||||
@@ -82,6 +82,8 @@ import Hamburger from "@/components/Hamburger";
|
|||||||
import { getStorageItem } from "@/utils/storage";
|
import { getStorageItem } from "@/utils/storage";
|
||||||
import { reqUpdatePassword } from "@/api/login";
|
import { reqUpdatePassword } from "@/api/login";
|
||||||
import { transPsw } from "@/utils/encrypted";
|
import { transPsw } from "@/utils/encrypted";
|
||||||
|
import {getAccessUser} from "@/utils/auth";
|
||||||
|
import {outlogcas} from "@/api/login";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@@ -156,11 +158,34 @@ export default {
|
|||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
sessionStorage.clear();
|
debugger
|
||||||
localStorage.clear();
|
//获取登录人
|
||||||
this.$router.push("/login");
|
let user = getAccessUser()
|
||||||
|
console.log(user.loginName)
|
||||||
|
debugger
|
||||||
|
|
||||||
|
|
||||||
|
this.outlogincasapi();
|
||||||
|
debugger
|
||||||
|
console.log(user.loginName)
|
||||||
|
// sessionStorage.clear();
|
||||||
|
// localStorage.clear();
|
||||||
|
// this.$router.push("/login");
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
async outlogincasapi() {
|
||||||
|
debugger
|
||||||
|
const obj = {
|
||||||
|
loginName: "admin",
|
||||||
|
password: "demo",
|
||||||
|
verifyCode: "",
|
||||||
|
};
|
||||||
|
const { code, data } = await outlogcas(obj);
|
||||||
|
sessionStorage.clear();
|
||||||
|
localStorage.clear();
|
||||||
|
this.$router.push("/login");
|
||||||
|
|
||||||
|
},
|
||||||
// 修改密码
|
// 修改密码
|
||||||
updatePassword() {
|
updatePassword() {
|
||||||
this.wordVisible = true;
|
this.wordVisible = true;
|
||||||
|
|||||||
@@ -144,21 +144,23 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.handleLoginFocus();
|
this.handleLoginFocus();
|
||||||
//获取url传参 ticket url
|
//获取url传参 ticket url
|
||||||
const ticket = this.$route.query.ticket;
|
const ticket = this.$route.query.ticket;
|
||||||
let token = getToken();
|
let token = getToken();
|
||||||
if (ticket == undefined && token == null) {
|
console.log(ticket);
|
||||||
//跳转统一身份认证
|
console.log(token);
|
||||||
var isTs = true;
|
if (ticket == undefined && token == null) {
|
||||||
if (isTs) {
|
//跳转统一身份认证
|
||||||
console.log(this.redirect);
|
var isTs = true;
|
||||||
window.location.href =
|
if (isTs) {
|
||||||
"http://192.168.1.241/login?redirect=/lig/oauth2/oauth2/application&appid=330b4ecb60c9a6802b957fe1e5a5ecd3&url=http%3A%2F%2F192.168.1.241%3A8080%2F%23" + this.redirect;
|
window.location.href = 'http://192.168.1.241/login?redirect=/lig/oauth2/oauth2/application&appid=330b4ecb60c9a6802b957fe1e5a5ecd3&url=http%3A%2F%2F192.168.1.241%3A8080%2F%23%2Flogin'+(this.redirect?'&ssUrl='+this.redirect:'');
|
||||||
// window.location.href = 'http://localhost:8099/login?redirect=/lig/oauth2/oauth2/application&appid=330b4ecb60c9a6802b957fe1e5a5ecd3&url=http%3A%2F%2Flocalhost%3A9528%2F%23'+this.redirect;
|
// window.location.href = 'http://localhost/login?redirect=/lig/oauth2/oauth2/application&appid=330b4ecb60c9a6802b957fe1e5a5ecd3&url=http%3A%2F%2Flocalhost%3A9528%2F%23%2Flogin'+(this.redirect?'&ssUrl='+this.redirect:'');
|
||||||
}
|
|
||||||
} else if (ticket != undefined && token == null) {
|
}
|
||||||
//请求登录
|
} else if (ticket != undefined && token == null) {
|
||||||
this.logincasapi();
|
//请求登录
|
||||||
} else {
|
this.logincasapi();
|
||||||
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {},
|
created() {},
|
||||||
@@ -240,6 +242,7 @@ export default {
|
|||||||
if (code != "200") return;
|
if (code != "200") return;
|
||||||
setToken(data.token);
|
setToken(data.token);
|
||||||
setAccessUser(data);
|
setAccessUser(data);
|
||||||
|
debugger
|
||||||
// 选中记住密码时 把密码存到cookie里,时效15天
|
// 选中记住密码时 把密码存到cookie里,时效15天
|
||||||
this.rememberPsw &&
|
this.rememberPsw &&
|
||||||
cookies.set(
|
cookies.set(
|
||||||
|
|||||||
Reference in New Issue
Block a user