|
@@ -17,7 +17,7 @@ export class HttpHelp {
|
|
|
static HttpsUrlRelpse: string = "http://testapi.mstardance.com/api/"; //屏蔽掉,正式的也是测试//"http://star.mstardance.com/api/";
|
|
|
|
|
|
static httpGet(url: string, callback: Function, token: string = null!, bind: any = null) {
|
|
|
- url = gameManager.Instance.golabMemory.isReplse?HttpHelp.HttpsUrlRelpse:HttpHelp.HttpsUrlTest + url;
|
|
|
+ url = (gameManager.Instance.golabMemory.isReplse?HttpHelp.HttpsUrlRelpse:HttpHelp.HttpsUrlTest) + url;
|
|
|
console.log('请求地址是:', url);
|
|
|
let xhr = new XMLHttpRequest();
|
|
|
xhr.onreadystatechange = function () {
|
|
@@ -52,7 +52,7 @@ export class HttpHelp {
|
|
|
* @param {function} callback
|
|
|
*/
|
|
|
static httpPost(url: string, params: any, callback: Function, token: string = null!, bind: any = null) {
|
|
|
- url = gameManager.Instance.golabMemory.isReplse?HttpHelp.HttpsUrlRelpse:HttpHelp.HttpsUrlTest + url;
|
|
|
+ url = (gameManager.Instance.golabMemory.isReplse?HttpHelp.HttpsUrlRelpse:HttpHelp.HttpsUrlTest) + url;
|
|
|
let xhr = new XMLHttpRequest();
|
|
|
xhr.onreadystatechange = function () {
|
|
|
// console.log('xhr.readyState=' + xhr.readyState + ' xhr.status=' + xhr.status);
|