@Test public void test() { BaseApi api = URLConst.API.INIT; assertEquals("https: URLConst.init("wx2.qq.com"); assertTrue(api == URLConst.API.INIT); assertEquals("https: }
public static void init(String e) { String t = "login.weixin.qq.com"; String o = "file.wx.qq.com"; String n = "webpush.weixin.qq.com"; if (e.indexOf("wx2.qq.com") > -1) { t = "login.wx2.qq.com"; o = "file.wx2.qq.com"; n = "webpush.wx2.qq.com"; } else if (e.indexOf("wx8.qq.com") > -1) { t = "login.wx8.qq.com"; o = "file.wx8.qq.com"; n = "webpush.wx8.qq.com"; } else if (e.indexOf("qq.com") > -1) { t = "login.wx.qq.com"; o = "file.wx.qq.com"; n = "webpush.wx.qq.com"; } else if (e.indexOf("web2.wechat.com") > -1) { t = "login.web2.wechat.com"; o = "file.web2.wechat.com"; n = "webpush.web2.wechat.com"; } else if (e.indexOf("wechat.com") > -1) { t = "login.web.wechat.com"; o = "file.web.wechat.com"; n = "webpush.web.wechat.com"; } HOST = SCHEMA + e; BASE = SCHEMA + e + PATH; SYNC_CHECK = SCHEMA + n + PATH + "synccheck"; MEDIA_GET = SCHEMA + o + PATH + "webwxgetmedia"; MEDIA_UPLOAD = SCHEMA + o + PATH + "webwxuploadmedia"; }
URLConst { public static void init(String e) { String t = "login.weixin.qq.com"; String o = "file.wx.qq.com"; String n = "webpush.weixin.qq.com"; if (e.indexOf("wx2.qq.com") > -1) { t = "login.wx2.qq.com"; o = "file.wx2.qq.com"; n = "webpush.wx2.qq.com"; } else if (e.indexOf("wx8.qq.com") > -1) { t = "login.wx8.qq.com"; o = "file.wx8.qq.com"; n = "webpush.wx8.qq.com"; } else if (e.indexOf("qq.com") > -1) { t = "login.wx.qq.com"; o = "file.wx.qq.com"; n = "webpush.wx.qq.com"; } else if (e.indexOf("web2.wechat.com") > -1) { t = "login.web2.wechat.com"; o = "file.web2.wechat.com"; n = "webpush.web2.wechat.com"; } else if (e.indexOf("wechat.com") > -1) { t = "login.web.wechat.com"; o = "file.web.wechat.com"; n = "webpush.web.wechat.com"; } HOST = SCHEMA + e; BASE = SCHEMA + e + PATH; SYNC_CHECK = SCHEMA + n + PATH + "synccheck"; MEDIA_GET = SCHEMA + o + PATH + "webwxgetmedia"; MEDIA_UPLOAD = SCHEMA + o + PATH + "webwxuploadmedia"; } }
URLConst { public static void init(String e) { String t = "login.weixin.qq.com"; String o = "file.wx.qq.com"; String n = "webpush.weixin.qq.com"; if (e.indexOf("wx2.qq.com") > -1) { t = "login.wx2.qq.com"; o = "file.wx2.qq.com"; n = "webpush.wx2.qq.com"; } else if (e.indexOf("wx8.qq.com") > -1) { t = "login.wx8.qq.com"; o = "file.wx8.qq.com"; n = "webpush.wx8.qq.com"; } else if (e.indexOf("qq.com") > -1) { t = "login.wx.qq.com"; o = "file.wx.qq.com"; n = "webpush.wx.qq.com"; } else if (e.indexOf("web2.wechat.com") > -1) { t = "login.web2.wechat.com"; o = "file.web2.wechat.com"; n = "webpush.web2.wechat.com"; } else if (e.indexOf("wechat.com") > -1) { t = "login.web.wechat.com"; o = "file.web.wechat.com"; n = "webpush.web.wechat.com"; } HOST = SCHEMA + e; BASE = SCHEMA + e + PATH; SYNC_CHECK = SCHEMA + n + PATH + "synccheck"; MEDIA_GET = SCHEMA + o + PATH + "webwxgetmedia"; MEDIA_UPLOAD = SCHEMA + o + PATH + "webwxuploadmedia"; }  }
URLConst { public static void init(String e) { String t = "login.weixin.qq.com"; String o = "file.wx.qq.com"; String n = "webpush.weixin.qq.com"; if (e.indexOf("wx2.qq.com") > -1) { t = "login.wx2.qq.com"; o = "file.wx2.qq.com"; n = "webpush.wx2.qq.com"; } else if (e.indexOf("wx8.qq.com") > -1) { t = "login.wx8.qq.com"; o = "file.wx8.qq.com"; n = "webpush.wx8.qq.com"; } else if (e.indexOf("qq.com") > -1) { t = "login.wx.qq.com"; o = "file.wx.qq.com"; n = "webpush.wx.qq.com"; } else if (e.indexOf("web2.wechat.com") > -1) { t = "login.web2.wechat.com"; o = "file.web2.wechat.com"; n = "webpush.web2.wechat.com"; } else if (e.indexOf("wechat.com") > -1) { t = "login.web.wechat.com"; o = "file.web.wechat.com"; n = "webpush.web.wechat.com"; } HOST = SCHEMA + e; BASE = SCHEMA + e + PATH; SYNC_CHECK = SCHEMA + n + PATH + "synccheck"; MEDIA_GET = SCHEMA + o + PATH + "webwxgetmedia"; MEDIA_UPLOAD = SCHEMA + o + PATH + "webwxuploadmedia"; }  static void init(String e); }
URLConst { public static void init(String e) { String t = "login.weixin.qq.com"; String o = "file.wx.qq.com"; String n = "webpush.weixin.qq.com"; if (e.indexOf("wx2.qq.com") > -1) { t = "login.wx2.qq.com"; o = "file.wx2.qq.com"; n = "webpush.wx2.qq.com"; } else if (e.indexOf("wx8.qq.com") > -1) { t = "login.wx8.qq.com"; o = "file.wx8.qq.com"; n = "webpush.wx8.qq.com"; } else if (e.indexOf("qq.com") > -1) { t = "login.wx.qq.com"; o = "file.wx.qq.com"; n = "webpush.wx.qq.com"; } else if (e.indexOf("web2.wechat.com") > -1) { t = "login.web2.wechat.com"; o = "file.web2.wechat.com"; n = "webpush.web2.wechat.com"; } else if (e.indexOf("wechat.com") > -1) { t = "login.web.wechat.com"; o = "file.web.wechat.com"; n = "webpush.web.wechat.com"; } HOST = SCHEMA + e; BASE = SCHEMA + e + PATH; SYNC_CHECK = SCHEMA + n + PATH + "synccheck"; MEDIA_GET = SCHEMA + o + PATH + "webwxgetmedia"; MEDIA_UPLOAD = SCHEMA + o + PATH + "webwxuploadmedia"; }  static void init(String e); static String SCHEMA; static String PATH; static String BASE; static String BASE_O; static String BASE_N; static String HOST; static String SYNC_CHECK; static String MEDIA_UPLOAD; static String MEDIA_GET; }