Commit 10396fe3 authored by rockyl's avatar rockyl

去除startsWith方法

parent b87e0cf5
...@@ -16,7 +16,7 @@ import {utils, engine} from "scilla"; ...@@ -16,7 +16,7 @@ import {utils, engine} from "scilla";
export function callApi(uri: string, params: any = null, method: string = 'post', responseType = 'json', ignoreSuccessField = false): Promise<any> { export function callApi(uri: string, params: any = null, method: string = 'post', responseType = 'json', ignoreSuccessField = false): Promise<any> {
let ts = Date.now() + Math.floor(Math.random() * 9999999); let ts = Date.now() + Math.floor(Math.random() * 9999999);
let url = uri.startsWith('//') ? uri : `${engine.customConfig.webServiceUrl}${uri}?_=${ts}`; let url = uri.indexOf('//') === 0 ? uri : `${engine.customConfig.webServiceUrl}${uri}?_=${ts}`;
params = params || {}; params = params || {};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment