1.0.1 • Published 1 year ago

uni-request-fun v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

uni-request-app

基于Promise封装uni-app的request方法

asycn await

  const uniRequest = async (url,param,method) =>{
    const [err, data] = await awaitWrap(http(url,param,method))
    const obj = {err,data}
    return obj
}

返回的是个promise对象 
用法: 
    
    if (!data.err) return; // 错误判断
    this.info = data.data

致谢 && 参考

License

MIT

1.0.1

1 year ago

1.0.0

3 years ago