fix(config): 更新服务器 URL 和添加微信扫码页面地址配置
- 将多个配置环境中的服务器 URL 更新为 https://server.websoft.top/api - 在公共配置中添加微信扫码 H5 页面访问地址 wechat-scan-url - 修改二维码登录服务优先使用微信扫码专用地址,确保扫码登录跳转 - 更新请求工具类和租户服务中服务器相关 URL - 修正微信公众号授权回调 URL 使用新的服务器地址
This commit is contained in:
@@ -99,9 +99,13 @@ public class QrLoginServiceImpl implements QrLoginService {
|
|||||||
// 生成微信扫码登录 H5 页面 URL
|
// 生成微信扫码登录 H5 页面 URL
|
||||||
try {
|
try {
|
||||||
String appId = wxService.getOfficialAppId(tenantId);
|
String appId = wxService.getOfficialAppId(tenantId);
|
||||||
String baseUrl = configProperties.getFileServer();
|
// 优先使用专门的微信扫码配置,否则使用文件服务器地址
|
||||||
|
String baseUrl = configProperties.getWechatScanUrl();
|
||||||
if (StrUtil.isBlank(baseUrl)) {
|
if (StrUtil.isBlank(baseUrl)) {
|
||||||
baseUrl = "https://server.gxwebsoft.com";
|
baseUrl = configProperties.getFileServer();
|
||||||
|
}
|
||||||
|
if (StrUtil.isBlank(baseUrl)) {
|
||||||
|
baseUrl = "https://server.websoft.top";
|
||||||
}
|
}
|
||||||
// 微信扫码后跳转的 H5 确认页面
|
// 微信扫码后跳转的 H5 确认页面
|
||||||
String wechatScanUrl = baseUrl + "/wx-scan?token=" + token;
|
String wechatScanUrl = baseUrl + "/wx-scan?token=" + token;
|
||||||
|
|||||||
@@ -97,6 +97,11 @@ public class ConfigProperties {
|
|||||||
*/
|
*/
|
||||||
private String websopyUrl;
|
private String websopyUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 微信扫码H5页面访问地址(用于微信扫码登录跳转)
|
||||||
|
*/
|
||||||
|
private String wechatScanUrl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 阿里云存储 OSS
|
* 阿里云存储 OSS
|
||||||
* Endpoint
|
* Endpoint
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import java.util.HashMap;
|
|||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class RequestUtil {
|
public class RequestUtil {
|
||||||
private static final String SERVER_HOST = "https://server.gxwebsoft.com/api";
|
private static final String SERVER_HOST = "https://server.websoft.top/api";
|
||||||
private static final String MODULES_HOST = "https://modules.gxwebsoft.com/api";
|
private static final String MODULES_HOST = "https://modules.gxwebsoft.com/api";
|
||||||
private static String ACCESS_TOKEN;
|
private static String ACCESS_TOKEN;
|
||||||
private static String TENANT_ID;
|
private static String TENANT_ID;
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ public class WxOfficialUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getCodeUrl() throws UnsupportedEncodingException {
|
public String getCodeUrl() throws UnsupportedEncodingException {
|
||||||
String encodedReturnUrl = URLEncoder.encode("https://server.gxwebsoft.com/api/open/wx-official/accessToken","UTF-8");
|
String encodedReturnUrl = URLEncoder.encode("https://server.websoft.top/api/open/wx-official/accessToken","UTF-8");
|
||||||
return "https://open.weixin.qq.com/connect/oauth2/authorize?appid="+ this.appId +"&redirect_uri=" + encodedReturnUrl + "&response_type=code&scope=snsapi_userinfo&state="+ this.tenantId +"#wechat_redirect";
|
return "https://open.weixin.qq.com/connect/oauth2/authorize?appid="+ this.appId +"&redirect_uri=" + encodedReturnUrl + "&response_type=code&scope=snsapi_userinfo&state="+ this.tenantId +"#wechat_redirect";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ public class TenantServiceImpl extends ServiceImpl<TenantMapper, Tenant> impleme
|
|||||||
company.setShortName(company.getShortName());
|
company.setShortName(company.getShortName());
|
||||||
company.setPhone(company.getPhone());
|
company.setPhone(company.getPhone());
|
||||||
company.setMembers(20);
|
company.setMembers(20);
|
||||||
company.setServerUrl("https://server.gxwebsoft.com");
|
company.setServerUrl("https://server.websoft.top");
|
||||||
company.setModulesUrl("https://cms-api.websoft.top");
|
company.setModulesUrl("https://cms-api.websoft.top");
|
||||||
company.setSocketUrl("wss://server.gxwebsoft.com");
|
company.setSocketUrl("wss://server.gxwebsoft.com");
|
||||||
company.setAdminUrl(DomainUtil.getAdminUrl(company.getTid().toString()));
|
company.setAdminUrl(DomainUtil.getAdminUrl(company.getTid().toString()));
|
||||||
|
|||||||
@@ -32,4 +32,4 @@ config:
|
|||||||
upload-path: /Users/gxwebsoft/Documents/uploads
|
upload-path: /Users/gxwebsoft/Documents/uploads
|
||||||
|
|
||||||
#swagger:
|
#swagger:
|
||||||
#host: https://server.gxwebsoft.com/swagger-ui/index.html
|
#host: https://server.websoft.top/swagger-ui/index.html
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ knife4j:
|
|||||||
# 框架配置
|
# 框架配置
|
||||||
config:
|
config:
|
||||||
# 生产环境接口
|
# 生产环境接口
|
||||||
server-url: https://server.gxwebsoft.com/api
|
server-url: https://server.websoft.top/api
|
||||||
upload-path: /www/wwwroot/file.ws
|
upload-path: /www/wwwroot/file.ws
|
||||||
|
|
||||||
# 阿里云OSS云存储
|
# 阿里云OSS云存储
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ knife4j:
|
|||||||
# 框架配置
|
# 框架配置
|
||||||
config:
|
config:
|
||||||
# 生产环境接口
|
# 生产环境接口
|
||||||
server-url: https://server.gxwebsoft.com/api
|
server-url: https://server.websoft.top/api
|
||||||
upload-path: /www/wwwroot/file.ws
|
upload-path: /www/wwwroot/file.ws
|
||||||
|
|
||||||
# 阿里云OSS云存储
|
# 阿里云OSS云存储
|
||||||
|
|||||||
@@ -95,6 +95,8 @@ config:
|
|||||||
token-key: WLgNsWJ8rPjRtnjzX/Gx2RGS80Kwnm/ZeLbvIL+NrBs=
|
token-key: WLgNsWJ8rPjRtnjzX/Gx2RGS80Kwnm/ZeLbvIL+NrBs=
|
||||||
server-url: https://server.websoft.top/api
|
server-url: https://server.websoft.top/api
|
||||||
file-server: https://file.websoft.top
|
file-server: https://file.websoft.top
|
||||||
|
# 微信扫码H5页面访问地址(用于微信扫码登录跳转)
|
||||||
|
wechat-scan-url: https://websopy.websoft.top
|
||||||
upload-path: /Users/gxwebsoft/Documents/uploads
|
upload-path: /Users/gxwebsoft/Documents/uploads
|
||||||
local-upload-path: /Users/gxwebsoft/Documents/uploads
|
local-upload-path: /Users/gxwebsoft/Documents/uploads
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user