import * as AjaxApi from '../lib/AjaxApi'
import {base_url} from './config'
/**
* 获取通用配置
* @param {object} params
* @param {func} callback
*/
let commonConfig = null
export function getCommonConfig() {
if (commonConfig) return Promise.resolve(commonConfig)
return new Promise((resolve, reject) => {
let params = {}
AjaxApi.ajaxGet(base_url + "/common/config/getConfig", params, response => {
if(response.data.retcode == "0"){
commonConfig = response.data.data;
resolve(commonConfig)
} else {
reject()
}
});
})
}
I can see a bigger world.