|
|
|
|
15
|
return new Promise((resolve, reject) => { axios.get(url, { params }).then(response => { resolve(response.data) }).catch(err => { reject(err) }) })
|
15
|
return new Promise((resolve, reject) => { axios.get(url, { params }).then(response => { resolve(response.data) }).catch(err => { reject(err) }) })
|
16
|
},
|
16
|
},
|
17
|
post(url, params = {}) {
|
17
|
post(url, params = {}) {
|
18
|
const urlObj = getRequest(url)
|
|
|
|
|
18
|
let urlObj = getRequest(url)
|
19
|
const host = url.indexOf("?") !== -1 ? url.substring(0, url.indexOf("?")) : url
|
19
|
const host = url.indexOf("?") !== -1 ? url.substring(0, url.indexOf("?")) : url
|
20
|
urlObj = Object.assign(urlObj, { uasLoginer: local.get("uasLoginer") });
|
20
|
urlObj = Object.assign(urlObj, { uasLoginer: local.get("uasLoginer") });
|
21
|
url = `${host}?${jsonToString(urlObj)}`
|
21
|
url = `${host}?${jsonToString(urlObj)}`
|