|
|
@@ -1,6 +1,7 @@
|
|
|
package com.uas.sso.weixin.controller;
|
|
|
|
|
|
import com.uas.sso.controller.BaseController;
|
|
|
+import com.uas.sso.core.WXParam;
|
|
|
import com.uas.sso.entity.App;
|
|
|
import com.uas.sso.entity.User;
|
|
|
import com.uas.sso.service.AppService;
|
|
|
@@ -36,12 +37,6 @@ public class WeChatController extends BaseController {
|
|
|
@Autowired
|
|
|
private AppService appService;
|
|
|
|
|
|
- private static final String DEFAULT_WX_APPID = "wxa14aec4edce8a2d2";
|
|
|
-
|
|
|
- private static final String WX_APPSECRET = "9749d2df03eb161f4d4075df69c2e2c9";
|
|
|
-
|
|
|
- private static final String WX_REDIRECT_URI = "http://sso.ubtob.com/";
|
|
|
-
|
|
|
private static final String WX_LOGIN_SCOPE = "snsapi_login";
|
|
|
|
|
|
@RequestMapping("/getQrUrl")
|
|
|
@@ -53,7 +48,7 @@ public class WeChatController extends BaseController {
|
|
|
}
|
|
|
String qrUrl = "https://open.weixin.qq.com/connect/qrconnect?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=SCOPE&state=STATE#wechat_redirect";
|
|
|
App app = appService.findOne(appId);
|
|
|
- String wx_appid = DEFAULT_WX_APPID;
|
|
|
+ String wx_appid = WXParam.DEFAULT_APPID;
|
|
|
if (app != null && !StringUtils.isEmpty(app.getWxAppid())) {
|
|
|
wx_appid = app.getWxAppid();
|
|
|
}
|
|
|
@@ -65,7 +60,7 @@ public class WeChatController extends BaseController {
|
|
|
public ModelMap getQrParams(String appId) {
|
|
|
ModelMap params = new ModelMap();
|
|
|
App app = appService.findOne(appId);
|
|
|
- String wx_appid = DEFAULT_WX_APPID;
|
|
|
+ String wx_appid = WXParam.DEFAULT_APPID;
|
|
|
if (app != null && !StringUtils.isEmpty(app.getWxAppid())) {
|
|
|
wx_appid = app.getWxAppid();
|
|
|
}
|