Commit ccb9cd2a authored by rockyl's avatar rockyl

引擎启动参数改为engineConfig和customConfig

parent 524b14e4
......@@ -3,10 +3,7 @@
* 网络组件
*/
import {utils} from "scilla";
// 请求路径 root
let baseUrl: string;
import {utils, customConfig} from "scilla";
/**
* 调用接口
......@@ -27,6 +24,8 @@ export function callApi(uri: string, params: any = null, method: string = 'post'
method,
};
let baseUrl = customConfig.webServiceUrl;
if (!baseUrl) {
options.credentials = 'include';
}
......@@ -181,11 +180,3 @@ export async function getToken(uri: string, params: any, method: string = 'POST'
export function createSgin(ticketId: number, score: number, gameData: any, submitToken: string): string {
return window['duiba_md5'](ticketId + '' + score + '' + gameData + '' + submitToken);
}
/**
* @desc 请求root补全
* @param {string} u
*/
export function enjectBaseUrl(u) {
baseUrl = u;
}
\ No newline at end of file
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