|
|
@@ -127,6 +127,15 @@ public class AuthCtrl
|
|
127
|
127
|
String cursn=para.get("sn");
|
|
128
|
128
|
session.setAttribute("cursn", cursn);//当前设备编号
|
|
129
|
129
|
|
|
|
130
|
+ if(!Tools.isEmpty(cursn)&&getDevtype(cursn)==16)
|
|
|
131
|
+ {
|
|
|
132
|
+ String url="http://dy.yunjia99.cn/user/index.do?&sn="+cursn;
|
|
|
133
|
+ url = URLEncoder.encode(url);
|
|
|
134
|
+ log.info("url="+url);
|
|
|
135
|
+ 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";
|
|
|
136
|
+ return new TextView(path);
|
|
|
137
|
+ }
|
|
|
138
|
+
|
|
130
|
139
|
String openid=para.get("openid"); // 获取用户微信openid
|
|
131
|
140
|
String accessToken="";
|
|
132
|
141
|
String wxCode = para.get("code");
|
|
|
@@ -172,8 +181,15 @@ public class AuthCtrl
|
|
172
|
181
|
session.setAttribute("appuid", dataJson.getString("appuid")); // 用户ID
|
|
173
|
182
|
session.setAttribute("phonenum", phonenum); // 用户账户
|
|
174
|
183
|
String defaultdev =dataJson.getString("defaultdev");
|
|
175
|
|
- if(Tools.isEmpty(defaultdev))
|
|
176
|
|
- defaultdev=cursn;
|
|
|
184
|
+ if(Tools.isEmpty(defaultdev)) {
|
|
|
185
|
+ defaultdev = cursn;
|
|
|
186
|
+ } else if(!Tools.isEmpty(defaultdev)&&getDevtype(defaultdev)==16) {
|
|
|
187
|
+ String url="http://dy.yunjia99.cn/user/index.do";
|
|
|
188
|
+ url = URLEncoder.encode(url);
|
|
|
189
|
+ log.info("url="+url);
|
|
|
190
|
+ 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";
|
|
|
191
|
+ return new TextView(path);
|
|
|
192
|
+ }
|
|
177
|
193
|
session.setAttribute("defaultdev", defaultdev); // 默认设备
|
|
178
|
194
|
/*if(Tools.isEmpty(defaultdev)) {
|
|
179
|
195
|
return new TextView("/device/getDevInfo.do");
|