| | |
| | | if(one==null){ |
| | | return ResultUtil.error(openid);//首次登陆需绑定零售许可证 |
| | | }else { |
| | | one.setLoginNum(one.getLoginNum()+1); |
| | | iCustomerService.saveOrUpdate(one); |
| | | return ResultUtil.data(one,"登录成功"); |
| | | } |
| | | } |
| | |
| | | public static JSONObject getSessionKeyOrOpenId(String code){ |
| | | //微信端登录code |
| | | String wxCode = code; |
| | | String requestUrl = "https://api.weixin.qq.com/sns/jscode2session?appid=wx0f10f6d253f3ee6b&secret=4d4cbc8da31a96559114ad693de70631&grant_type=authorization_code&js_code="+code; |
| | | String requestUrl = "https://api.weixin.qq.com/sns/jscode2session?appid=wx77c0d2c54010b7e4&secret=2282710e890670e916c189347d70a7c5&grant_type=authorization_code&js_code="+code; |
| | | JSONObject jsonObject = JSONUtil.parseObj( HttpUtil.get(requestUrl)); |
| | | return jsonObject; |
| | | } |