serverinfo.js 516 Bytes
Newer Older
Kim Peace committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
NativeBridgeDataSource.getServerInfo = function () {
  if (typeof android != "undefined") {
    return JSON.parse(android.getServerInfo());
  } else {
    return JSON.parse(callNativeApp(NATIVE_KEY_IOS.getServerInfo, {}));
  }
};

var ServerInfo = class {
  chatURL;
  cmsURL;
  isOnline;

  constructor(serverInfo) {
    this.chatURL = serverInfo.chatURL;
    this.cmsURL = serverInfo.cmsURL;
    this.isOnline = serverInfo.isOnline;
  }
};

21
var serverInfo = new ServerInfo(NativeBridgeDataSource.getServerInfo());