You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
359 B
18 lines
359 B
11 months ago
|
import config from '@/config'
|
||
|
const baseUrl = config.baseUrl
|
||
|
export const myRequest = (option = {}) => {
|
||
|
return new Promise((reslove, reject) => {
|
||
|
uni.request({
|
||
|
url: baseUrl + option.url,
|
||
|
data: option.data,
|
||
|
method: option.method || "GET",
|
||
|
success: (result) => {
|
||
|
reslove(result)
|
||
|
},
|
||
|
fail: (error) => {
|
||
|
reject(error)
|
||
|
}
|
||
|
})
|
||
|
})
|
||
|
}
|