1.0.11 • Published 2 years ago

wx-api-common v1.0.11

Weekly downloads
4
License
ISC
Repository
github
Last release
2 years ago

封装了 wx.request 的 方法

  • get
  • post

例子

  • 先安装
npm i wx-api-common
  • 使用小程序构建 npm

  • 全局配置文件 index.js 的写法,之后每个文件引用该文件即可

import api from 'wx-api-common';

export default api.setOption({
  baseUrl: '', //  接口的基础地址配置
  params: {
    //  基础参数,即每次调用都要传的参
    access_token: 'access_token',
  },
  request: (a) => { //  请求拦截器
  },
  response: (res) => {  //  回调拦截器
  },
});
1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

5 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago