|
@@ -1,5 +1,6 @@
|
|
|
package com.jeeplus.modules.wexintheorder.web;
|
|
|
|
|
|
+import com.jeeplus.common.config.Global;
|
|
|
import com.jeeplus.modules.wexinpackage.access.entity.AccessToken;
|
|
|
import com.jeeplus.modules.wexinpackage.access.util.access.WeChatParamsUtil;
|
|
|
import org.springframework.stereotype.Controller;
|
|
@@ -21,14 +22,14 @@ public class SimpleOAuth2Controller {
|
|
|
* 此处步骤也可以用页面链接代替
|
|
|
* @return
|
|
|
*/
|
|
|
- @RequestMapping(value = { "/oauth2wx.do" })
|
|
|
+ @RequestMapping(value = { "/oauth2wx.do"})
|
|
|
public String Oauth2API(HttpServletRequest request){
|
|
|
//获取项目域名
|
|
|
String requestUrl = request.getServerName();
|
|
|
String contextPath = request.getContextPath();
|
|
|
logger.info("domain name: " + requestUrl + " project name: " + contextPath);
|
|
|
- //拼接微信回调地址Global.getConfig("")
|
|
|
- String backUrl ="http://total2.viphk.ngrok.org/weXin/theOrder/orderFrom";
|
|
|
+ //拼接微信回调地址
|
|
|
+ String backUrl = Global.getConfig("backUrl");
|
|
|
String redirect_uri = "";
|
|
|
try {
|
|
|
redirect_uri = URLEncoder.encode(backUrl, "utf-8");
|