import params from '@/api/common/params.js';
var baseurl = params.param_baseurl_appsysapi;// "http://appsysapi.xinelu.com";

var request = function(config) {
	return new Promise((resolve, rejected) => {
		uni.showLoading({
			title: ''
		});
		uni.request({
			url: baseurl + config.url,
			data: config.data,
			method: config.method,
			timeout: 20000,
			header: {
				// 'Access-Control-Allow-Origin':'*',
				// "Content-Type": "application/x-www-form-urlencoded"
				// "Content-Type": "multipart/form-data"
			},
			success(res) {
				uni.hideLoading();
				resolve(res.data)
			},
			fail(err) {
				uni.hideLoading();
				rejected(err)
			}
		})
	})
}

export function getLastAppFileInfo() {
	return request({
		url: params.param_LastAppFileInfo_url,//`/system/appFileInfo/getLastAppFileInfo?appcode=zyjk_zhifa`,
		method: 'get',
	})
}
