import { HttpConfig } from './modules/http';
import { getStaticVersion } from '@/api/system/config.js'

export { http,HEADER_FORM,HEADER_UPLOAD,HEADER_JSON,HEADER_TEXT,http as request } from './modules/http';

export { doCopy } from './modules/functions';

export * as util from './modules/util';

export * as fileUtil from './modules/file';


export const useUtil = {
	install(Vue){
		HttpConfig();
		
		//设置全局的静态资源版本
		let $v = "?v=1";
		uni.$v=$v;
		Vue.config.globalProperties.$v=$v;
		getStaticVersion().then(r=>{
			$v = "?v="+r.msg;
			console.debug("静态资源版本",$v);
			uni.$v=$v;
			Vue.config.globalProperties.$v=$v;
		})
	}
}