完善文档
This commit is contained in:
parent
b107928a0f
commit
39e828cc3f
12
doc/bin.md
12
doc/bin.md
@ -2,16 +2,24 @@
|
||||
## 引入方式
|
||||
模块导入
|
||||
## request 方法
|
||||
对于wx.request()的简单封装
|
||||
request(object)
|
||||
返回值类型 promise
|
||||
除url必须 其余都为可选 详细参数查阅 [微信开发者文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/request/wx.request.html)
|
||||
```
|
||||
request({
|
||||
url,访问地址
|
||||
object
|
||||
{
|
||||
url,访问地址 必须
|
||||
method,请求方式
|
||||
header,附加header头
|
||||
dataType,返回类型
|
||||
responseType,类型
|
||||
complete 成功失败都执行的回调函数
|
||||
}
|
||||
````
|
||||
```
|
||||
request({
|
||||
|
||||
}).then((res)=>{
|
||||
请求成功执行方法
|
||||
},(rej)=>{
|
||||
|
Loading…
Reference in New Issue
Block a user