|
|
@@ -47,14 +47,6 @@ public class AuthCtrl
|
|
47
|
47
|
String accessToken="";
|
|
48
|
48
|
String wxCode = para.get("code");
|
|
49
|
49
|
|
|
50
|
|
-// String f = para.get("f");
|
|
51
|
|
-// if (!Tools.isEmpty(f)) {
|
|
52
|
|
-// openid=para.get("openid");
|
|
53
|
|
-// if (!Tools.isEmpty(openid)) {
|
|
54
|
|
-// session.setAttribute("openid", openid);
|
|
55
|
|
-// }
|
|
56
|
|
-// }
|
|
57
|
|
-
|
|
58
|
50
|
if(Tools.isEmpty(openid) && !GzhUtil.isEmpty(wxCode))
|
|
59
|
51
|
{
|
|
60
|
52
|
Map<String,String> m=GzhUtil.getOpenId(wxCode,Constants.appId,Constants.appSecret);
|
|
|
@@ -65,6 +57,14 @@ public class AuthCtrl
|
|
65
|
57
|
}
|
|
66
|
58
|
log.info("wxCode="+wxCode+",openid="+openid);
|
|
67
|
59
|
|
|
|
60
|
+ if ("o2P0j59YcTmvpZurZWK2fQHAPXJk".equals(openid)){
|
|
|
61
|
+ String url="http://xcwx.jimi.link/user/indexForOld.do?&openid=" + openid;
|
|
|
62
|
+ url = URLEncoder.encode(url);
|
|
|
63
|
+ log.info("url="+url);
|
|
|
64
|
+ String path = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxb06cf14f96dd7149&redirect_uri=" + url + "&response_type=code&scope=snsapi_base&state=123#wechat_redirect";
|
|
|
65
|
+ return new TextView(path);
|
|
|
66
|
+ }
|
|
|
67
|
+
|
|
68
|
68
|
para.put("openid", openid);
|
|
69
|
69
|
GzhUtil.toM3Sign(para);
|
|
70
|
70
|
String u=Constants.m3IntAddr + "/user/wxIndex.do";
|
|
|
@@ -92,13 +92,6 @@ public class AuthCtrl
|
|
92
|
92
|
if(Tools.isEmpty(defaultdev)) {
|
|
93
|
93
|
return new TextView("/device/getDevInfo.do");
|
|
94
|
94
|
} else {
|
|
95
|
|
-// if ("866162073362932".equals(defaultdev)) {
|
|
96
|
|
-// String url="http://xcwx.jimi.link/user/index.do?f=1&&sn=" + defaultdev + "&openid=" + openid;
|
|
97
|
|
-// url = URLEncoder.encode(url);
|
|
98
|
|
-// log.info("url="+url);
|
|
99
|
|
-// String path = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxb06cf14f96dd7149&redirect_uri=" + url + "&response_type=code&scope=snsapi_base&state=123#wechat_redirect";
|
|
100
|
|
-// return new TextView(path);
|
|
101
|
|
-// }
|
|
102
|
95
|
return new TextView("/consumer/getPkgsByDevId.do");
|
|
103
|
96
|
}
|
|
104
|
97
|
}
|