Commit a4f005aeacfb103acaf8397bdf415f3717c25ce5
1 parent
84f6554f31
Exists in
master
提交代码
Showing 4 changed files with 22 additions and 11 deletions
mainData/src/main/java/com/lymsh/yimiao/main/data/util/LoginUtil.java
View file @
a4f005a
| ... | ... | @@ -102,7 +102,17 @@ | 
| 102 | 102 | return false; | 
| 103 | 103 | } | 
| 104 | 104 | |
| 105 | - public static boolean sendCode(String phone, String typeId, String token) { | |
| 105 | + /** | |
| 106 | + * 阿里大鱼 | |
| 107 | + * @param phone | |
| 108 | + * @param typeId | |
| 109 | + * @param token | |
| 110 | + * @return | |
| 111 | + */ | |
| 112 | + public static LoginContext sendCode(String phone, String typeId, String token) { | |
| 113 | + | |
| 114 | + LoginContext loginState = new LoginContext(); | |
| 115 | + | |
| 106 | 116 | HttpClient client = new HttpClient(); | 
| 107 | 117 | GetMethod get = new MessageUtil.UTF8GetMethod("http://passport.healthbaby.com.cn/v1/authCode.action"); | 
| 108 | 118 | NameValuePair[] data = { | 
| 109 | 119 | |
| ... | ... | @@ -119,12 +129,13 @@ | 
| 119 | 129 | System.out.println("result:" + result); | 
| 120 | 130 | get.releaseConnection(); | 
| 121 | 131 | if (result != null && result.indexOf("成功") > 0) { | 
| 122 | - return true; | |
| 132 | + loginState = JsonUtil.str2Obj(result, LoginContext.class); | |
| 133 | + return loginState; | |
| 123 | 134 | } | 
| 124 | 135 | } catch (Exception e) { | 
| 125 | 136 | e.printStackTrace(); | 
| 126 | 137 | } | 
| 127 | - return false; | |
| 138 | + return loginState; | |
| 128 | 139 | } | 
| 129 | 140 | |
| 130 | 141 | 
webApi/src/main/java/com/lyms/yimiao/web/controller/v1/UserController.java
View file @
a4f005a
| ... | ... | @@ -61,14 +61,15 @@ | 
| 61 | 61 | @RequestMapping(value = "/authCode", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE + ";charset=utf-8") | 
| 62 | 62 | public void sendVercode(HttpServletResponse response,@RequestParam("phone") String phone) { | 
| 63 | 63 | |
| 64 | - Boolean result = LoginUtil.sendVerCode(phone, typeId, token); | |
| 65 | -// Boolean result = LoginUtil.sendCode(phone, typeId, token); | |
| 66 | - if (result){ | |
| 64 | +// Boolean result = LoginUtil.sendVerCode(phone, typeId, token); | |
| 65 | + LoginContext result = LoginUtil.sendCode(phone, typeId, token); | |
| 66 | + if (result.getErrorcode()==0){ | |
| 67 | 67 | ResultUtils.buildSuccessResultAndWrite(response); | 
| 68 | 68 | }else { | 
| 69 | - ResultUtils.buildParameterErrorResultAndWrite(response,"发送失败"); | |
| 69 | + ResultUtils.buildParameterErrorResultAndWrite(response,result.getErrormsg()); | |
| 70 | 70 | } | 
| 71 | 71 | } | 
| 72 | + | |
| 72 | 73 | |
| 73 | 74 | /** | 
| 74 | 75 | * 登陆 | 
webApi/src/main/resources/config.properties
View file @
a4f005a
| ... | ... | @@ -35,8 +35,8 @@ | 
| 35 | 35 | mailServerUsername=411441657@qq.com | 
| 36 | 36 | mailServerPassword=yt12304 | 
| 37 | 37 | |
| 38 | -#redis.servers=192.168.5.250:6379:mommybaby123 | |
| 39 | -redis.servers=192.168.1.43:6379:Lyms@2016 | |
| 38 | +redis.servers=192.168.5.250:6379:mommybaby123 | |
| 39 | +#redis.servers=192.168.1.43:6379:Lyms@2016 | |
| 40 | 40 | ams.login.msg=验证码{0},您正在登录AMS,若非本人操作,请勿泄露。 | 
| 41 | 41 | token.prefix=ams | 
| 42 | 42 | 
webApi/src/main/webapp/WEB-INF/html/inoculateRecord.vm
View file @
a4f005a
| ... | ... | @@ -20,7 +20,6 @@ | 
| 20 | 20 | margin-top: 10px; | 
| 21 | 21 | } | 
| 22 | 22 | .container .title { | 
| 23 | - height: 25px; | |
| 24 | 23 | background-color: #A3D1EA; | 
| 25 | 24 | padding-left: 15px; | 
| 26 | 25 | padding-bottom: 15px; | 
| ... | ... | @@ -160,7 +159,7 @@ | 
| 160 | 159 | <span>接种剂次</span> | 
| 161 | 160 | </li> | 
| 162 | 161 | <li class="content"> | 
| 163 | - <span class="half">$!recordObj.icPosition</span> | |
| 162 | + <span class="half">$!recordObj.vnPosition</span> | |
| 164 | 163 | <span>$!recordObj.icJiCi</span> | 
| 165 | 164 | </li> | 
| 166 | 165 | <li class="header"> |