Raod 3 years ago
parent 4a9636e5a3
commit 18f01aa006

@ -7,6 +7,8 @@ import com.anji.plus.gaea.cache.CacheHelper;
import com.anji.plus.gaea.utils.JwtBean; import com.anji.plus.gaea.utils.JwtBean;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.servlet.*; import javax.servlet.*;
@ -19,6 +21,7 @@ import java.io.IOException;
* Created by raodeming on 2021/6/24. * Created by raodeming on 2021/6/24.
*/ */
@Component @Component
@Order(Integer.MIN_VALUE + 99)
public class TokenFilter implements Filter { public class TokenFilter implements Filter {
@Autowired @Autowired
private CacheHelper cacheHelper; private CacheHelper cacheHelper;

@ -54,44 +54,16 @@ mybatis-plus:
- classpath*:/mapper/**/*.xml - classpath*:/mapper/**/*.xml
- classpath*:/modeler-mybatis-mappings/**/*.xml - classpath*:/modeler-mybatis-mappings/**/*.xml
gaea:
subscribes:
security:
enabled: true
push:
enabled: true
sms:
aliyun:
access-key-id:
secret:
audit-log:
enabled: true
callback-url: http://127.0.0.1:9091/log/callback
export:
enabled: true
# 邮箱发送配置
mail:
# host不配置会注入失败
host: smtp.163.com
default-encoding: utf-8
protocol: smtp
properties:
mail:
smtp:
connectiontimeout: 5000
timeout: 3000
management: management:
endpoints: endpoints:
web: web:
base-path: / base-path: /
logging: logging:
level: config: classpath:logback.xml
com.alibaba.cloud.nacos.client.NacosPropertySourceBuilder: debug
file: file:
dist-path: /app/disk/upload/ dist-path: /app/disk/upload/
white-list: .png|.jpg|.gif|.icon|.pdf|.xlsx|.xls|.csv|.mp4|.avi white-list: .png|.jpg|.gif|.icon|.pdf|.xlsx|.xls|.csv|.mp4|.avi
excelSuffix: .xlsx|.xls|.csv excelSuffix: .xlsx|.xls|.csv
downloadPath: http://10.108.26.197:9095/file/download downloadPath: http://10.108.26.197:9095/file/download

@ -4,6 +4,6 @@ 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:9095"' BASE_API: '"http://127.0.0.1:9095"'
BASE_API: '"http://10.108.26.197:9095"' // BASE_API: '"http://10.108.26.197:9095"'
}) })

@ -1,5 +1,5 @@
'use strict' 'use strict'
module.exports = { module.exports = {
NODE_ENV: '"production"', NODE_ENV: '"production"',
BASE_API: '"https://report.anji-plus.com/"' BASE_API: '"./"'
} }

@ -4,5 +4,5 @@ const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, { module.exports = merge(prodEnv, {
NODE_ENV: '"testing"', NODE_ENV: '"testing"',
BASE_API: '"http://127.0.0.1:9095"' BASE_API: '"./"'
}) })

@ -1,8 +1,8 @@
<!-- <!--
* @Author: zyk * @Author: zyk
* @Date: 2020-07-13 11:04:24 * @Date: 2020-07-13 11:04:24
* @Last Modified by: zyk * @Last Modified by: zyk
* @Last Modified time: 2020-07-13 11:04:24 * @Last Modified time: 2020-07-13 11:04:24
!--> !-->
<template> <template>
<div class="login_container"> <div class="login_container">
@ -127,8 +127,8 @@ export default {
activeTop: "-50%", // activeTop: "-50%", //
rememberPsw: false, // rememberPsw: false, //
loginForm: { loginForm: {
username: "guest", username: "admin",
password: "guest", password: "123456",
verifyCode: "" verifyCode: ""
}, // }, //
loginRules: { loginRules: {
@ -231,10 +231,10 @@ export default {
}; };
const { code, data } = await login(obj); const { code, data } = await login(obj);
console.log(data); console.log(data);
this.loading = false;
if (code != "200") return; if (code != "200") return;
setItem("token", data.token); setItem("token", data.token);
setItem("username", data.username); setItem("username", data.username);
this.loading = false;
// cookie,15 // cookie,15
this.rememberPsw && this.rememberPsw &&
cookies.set( cookies.set(

Loading…
Cancel
Save