export default ((url, method, data = {}, num) => {
	var BaseUrl = ''
	if (num == 1) {
		BaseUrl = "http://192.168.0.155:8000"
	} else {
		BaseUrl = "http://192.168.0.155:7301"
	}
	return new Promise((resolve, reject) => {
		let header = {
			"Content-Type": "application/json",
		}
		let api = BaseUrl + url
		uni.request({
			url: api,
			method,
			data,
			header,
			success: (res) => {
				resolve(res.data)
			},
			fail: (erro) => {
				reject(erro)
			}
		})
	})
})