Selaa lähdekoodia

修改验证码3

hjc 1 vuosi sitten
vanhempi
commit
c660a9290e

+ 2 - 1
unis-plugin/unis-plugin-biz/src/main/java/com/unis/interactiveCommunication/modular/icLeaderMailbox/controller/IcLeaderMailboxController.java

@@ -167,7 +167,7 @@ public class IcLeaderMailboxController {
167 167
 
168 168
         // 获取验证码数字字符串
169 169
         String yzm_code = SecurityCode.getSecurityCode(4, SecurityCode.SecurityCodeLevel.Hard, false).toLowerCase();
170
-        request.getSession().setAttribute("Service_Code", yzm_code);
170
+        //request.getSession().setAttribute("Service_Code", yzm_code);
171 171
         // 生成验证码图片
172 172
         image = SecurityImage.createImage(yzm_code, fontSize, width, heigth);
173 173
 
@@ -182,6 +182,7 @@ public class IcLeaderMailboxController {
182 182
         String imgBase64 = new Base64().encodeToString(baos.toByteArray());
183 183
         Map<String, Object> map = new HashMap<String, Object>();
184 184
         map.put("file", imgBase64);
185
+        map.put("code",yzm_code);
185 186
         return map;
186 187
     }
187 188