|
@@ -243,8 +243,9 @@ public class WxPayServiceImpl implements WxPayService {
|
|
|
Wxpay wxpay = wxpayMapper.selectByPrimaryKey(wxpayId);
|
|
|
String appid = wxpay.getAppid();
|
|
|
String secret = wxpay.getSecret();
|
|
|
+ String host = wxpay.getPayHost();
|
|
|
if (StringUtils.isEmpty(code)) {
|
|
|
- String redirectUrl = "http://" + domain + "/api/wxpay/login?userId=" + userId;
|
|
|
+ String redirectUrl = "http://" + host + "/api/wxpay/login?userId=" + userId;
|
|
|
String url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=%s&redirect_uri=%s&response_type=code&scope=snsapi_base&state=%s#wechat_redirect";
|
|
|
try {
|
|
|
url = String.format(url, appid, java.net.URLEncoder.encode(redirectUrl, "UTF-8"), userId);
|