lyhzzz 2 năm trước cách đây
mục cha
commit
fb1e798fc5

+ 6 - 2
src/main/java/com/fdkankan/ucenter/controller/app/SceneApiController.java

@@ -185,7 +185,7 @@ public class SceneApiController extends BaseController {
         //登录成功
         String mainUrl = NacosProperty.getMainUrl();
         if(StringUtils.isBlank(mainUrl)){
-            mainUrl = request.getRemoteHost();
+            mainUrl = request.getRemoteHost() +"/";
         }
 
         try {
@@ -233,7 +233,11 @@ public class SceneApiController extends BaseController {
         param.setPassword(password);
         LoginVo loginVo = loginService.loginClear(param);
         //登录成功
-        response.sendRedirect(NacosProperty.getMainUrl() + "mobile.html?token="+ loginVo.getToken() + "&app" + (lang == null ? "" : "&lang=" + lang)+"#/consumption/0" );
+        String mainUrl = NacosProperty.getMainUrl();
+        if(StringUtils.isBlank(mainUrl)){
+            mainUrl = request.getRemoteHost() +"/";
+        }
+        response.sendRedirect(mainUrl+ "mobile.html?token="+ loginVo.getToken() + "&app" + (lang == null ? "" : "&lang=" + lang)+"#/consumption/0" );
     }
 
     /**