diff --git a/src/main/java/io/v/nutz/zhgh/mobile/mobileLoginController.java b/src/main/java/io/v/nutz/zhgh/mobile/mobileLoginController.java index c97b835..cf29d46 100644 --- a/src/main/java/io/v/nutz/zhgh/mobile/mobileLoginController.java +++ b/src/main/java/io/v/nutz/zhgh/mobile/mobileLoginController.java @@ -138,6 +138,10 @@ public class mobileLoginController { } } + if (user.getLoginname().equals(newPwd)) { + return Result.error("请勿以工号作为密码"); + } + String pwd = PwdUtil.doSm4CbcEncrypt(newPwd); dao.update(Sys_user.class, Chain.make("password", pwd).add("weAppLoginCount", user.getWeAppLoginCount() + 1), Cnd.where("id", "=", ShiroUtil.getUserId())); @@ -154,7 +158,7 @@ public class mobileLoginController { @RequiresAuthentication public Object checkIsFirstLogin(){ Sys_user user = dao.fetch(Sys_user.class, Cnd.where("id", "=", ShiroUtil.getUserId())); - if (user.getWeAppLoginCount() == 1 && StrUtil.isNotBlank(user.getOpenId())) { + if ((user.getWeAppLoginCount() == null || user.getWeAppLoginCount() == 1) && StrUtil.isNotBlank(user.getOpenId())) { return Result.error(); } else { return Result.success(); diff --git a/src/main/resources/views/mobile/activity/Sports/activityEventList.html b/src/main/resources/views/mobile/activity/Sports/activityEventList.html index 78a71ea..5ca7a30 100644 --- a/src/main/resources/views/mobile/activity/Sports/activityEventList.html +++ b/src/main/resources/views/mobile/activity/Sports/activityEventList.html @@ -228,7 +228,7 @@ layout("/mobile/platform.html"){
+