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
|
||||
try {
|
||||
String appId = wxService.getOfficialAppId(tenantId);
|
||||
String baseUrl = configProperties.getFileServer();
|
||||
// 优先使用专门的微信扫码配置,否则使用文件服务器地址
|
||||
String baseUrl = configProperties.getWechatScanUrl();
|
||||
if (StrUtil.isBlank(baseUrl)) {
|
||||
baseUrl = "https://server.gxwebsoft.com";
|
||||
baseUrl = configProperties.getFileServer();
|
||||
}
|
||||
if (StrUtil.isBlank(baseUrl)) {
|
||||
baseUrl = "https://server.websoft.top";
|
||||
}
|
||||
// 微信扫码后跳转的 H5 确认页面
|
||||
String wechatScanUrl = baseUrl + "/wx-scan?token=" + token;
|
||||
@@ -388,12 +392,12 @@ public class QrLoginServiceImpl implements QrLoginService {
|
||||
wrapper.eq(UserOauth::getOauthId, openId);
|
||||
}
|
||||
wrapper.eq(UserOauth::getDeleted, 0);
|
||||
|
||||
|
||||
UserOauth userOauth = null;
|
||||
if (userOauthService != null) {
|
||||
userOauth = userOauthService.getOne(wrapper);
|
||||
}
|
||||
|
||||
|
||||
if (userOauth != null && userOauth.getUserId() != null) {
|
||||
user = userService.getAllByUserId(String.valueOf(userOauth.getUserId()));
|
||||
log.info("通过 UserOauth 查找到用户: {}", user != null ? user.getUsername() : "未找到");
|
||||
|
||||
@@ -97,6 +97,11 @@ public class ConfigProperties {
|
||||
*/
|
||||
private String websopyUrl;
|
||||
|
||||
/**
|
||||
* 微信扫码H5页面访问地址(用于微信扫码登录跳转)
|
||||
*/
|
||||
private String wechatScanUrl;
|
||||
|
||||
/**
|
||||
* 阿里云存储 OSS
|
||||
* Endpoint
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.util.HashMap;
|
||||
|
||||
@Component
|
||||
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 String ACCESS_TOKEN;
|
||||
private static String TENANT_ID;
|
||||
|
||||
@@ -72,7 +72,7 @@ public class WxOfficialUtil {
|
||||
}
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ public class TenantServiceImpl extends ServiceImpl<TenantMapper, Tenant> impleme
|
||||
company.setShortName(company.getShortName());
|
||||
company.setPhone(company.getPhone());
|
||||
company.setMembers(20);
|
||||
company.setServerUrl("https://server.gxwebsoft.com");
|
||||
company.setServerUrl("https://server.websoft.top");
|
||||
company.setModulesUrl("https://cms-api.websoft.top");
|
||||
company.setSocketUrl("wss://server.gxwebsoft.com");
|
||||
company.setAdminUrl(DomainUtil.getAdminUrl(company.getTid().toString()));
|
||||
|
||||
Reference in New Issue
Block a user