vue-pro/yudao-ui-admin-uniapp/components/verifition/utils/request.js

18 lines
349 B
JavaScript
Raw Normal View History

2022-08-06 00:57:46 +08:00
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)
}
})
})
}