Browse Source

fix(test): 处理测试环境前端访问内网地址报错的问题

yuj 7 years ago
parent
commit
99381d3f67

+ 3 - 0
src/main/webapp/resources/js/sso/app.js

@@ -494,6 +494,9 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
 		$scope.homeUrl = BaseService.getRootPath();
         InternalMessage.getUrl({}, function(data) {
             var url = data.url;
+            if (url == "http://192.168.100.2:8080") {
+                url = 'https://test-message.uuzcc.cn';
+            }
             var param = {
                 'receiverUu': data.userUU,
                 'receiverEnuu': data.enUU,

+ 3 - 0
src/main/webapp/resources/js/usercenter/app.js

@@ -963,6 +963,9 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
 		$scope.homeUrl = BaseService.getRootPath();
         InternalMessage.getUrl({}, function(data) {
             var url = data.url;
+            if (url == "http://192.168.100.2:8080") {
+                url = 'https://test-message.uuzcc.cn';
+            }
             var param = {
                 'receiverUu': data.userUU,
                 'receiverEnuu': data.enUU,

+ 3 - 0
src/main/webapp/resources/js/vendor/app.js

@@ -1236,6 +1236,9 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
         /*console.info($rootScope.userInfo);*/
         InternalMessage.getUrl({}, function(data) {
             var url = data.url;
+            if (url == "http://192.168.100.2:8080") {
+                url = 'https://test-message.uuzcc.cn';
+            }
             var param = {
                 'receiverUu': data.userUU,
                 'receiverEnuu': data.enUU,

+ 6 - 0
src/main/webapp/resources/js/vendor/controllers/forstore/messagePersonalCtrl.js

@@ -287,6 +287,9 @@ define(['app/app'], function(app) {
             //获取所有消息数量
             InternalMessage.getUrl({}, function(data) {
                 var url = data.url;
+                if (url == "http://192.168.100.2:8080") {
+                    url = 'https://test-message.uuzcc.cn';
+                }
                 var param = {
                     'receiverUu': data.userUU,
                     'receiverEnuu': data.enUU,
@@ -308,6 +311,9 @@ define(['app/app'], function(app) {
             InternalMessage.getUrl({}, function(info) {
                 if (info) {
                     var url = info.url;
+                    if (url == "http://192.168.100.2:8080") {
+                        url = 'https://test-message.uuzcc.cn';
+                    }
                     var param = {
                         'receiverUu': info.userUU,
                         'receiverEnuu': info.enUU,