Browse Source

修改接口域名

tang biao 5 years ago
parent
commit
b8461135f6
2 changed files with 6 additions and 0 deletions
  1. 4 0
      assets/scripts/game/Game.js
  2. 2 0
      assets/scripts/net/Api.js

+ 4 - 0
assets/scripts/game/Game.js

@@ -204,9 +204,13 @@ cc.Class({
         let qqUrl = 'wss://qq-message-taptap.duowan.com';
         var socketUrl = GameGlobal.debug ? testUrl : pUrl;
 
+        let ttUrl = 'wss://headlines-message-taptap.duowan.com';
+
         // let socketUrl = 'ws://172.16.15.196:9099/connect';
         if (CC_QQPLAY) {
             socketUrl = GameGlobal.debug ? testUrl : qqUrl;
+        } else if (window.tt != undefined) {
+            socketUrl = GameGlobal.debug ? testUrl : ttUrl;
         }
 
         let ws = new WsManager(socketUrl, {

+ 2 - 0
assets/scripts/net/Api.js

@@ -605,6 +605,8 @@ class Api {
         var host = GameGlobal.debug ? 'https://test-api-taptap.duowan.com' : 'https://api-taptap.duowan.com';
         if (CC_QQPLAY) {
             host = GameGlobal.debug ? 'https://test-api-taptap.duowan.com' : 'https://qq-api-taptap.duowan.com';
+        } else if (window.tt != undefined) {
+            host = GameGlobal.debug ? 'https://test-api-taptap.duowan.com' : 'https://headlines-api-taptap.duowan.com';
         }
         // let host = GameGlobal.debug ? 'http://172.16.15.196:8888' : 'https://api-allstar.duowan.com';
         // let host = 'https://new-api-taptap.duowan.com';