小程序请求封装
const GET = 'GET';
const POST = 'POST';
const PUT = 'PUT';
const baseURL = 'url';//写上自己的请求基础路径
function request(method, url, data, headerParam) {
return new Promise(function (resolve, reject) {
const cookie = wx.getStorageSync('cookie') || ''
l
原创
2021-09-30 12:01:27 ·
128 阅读 ·
0 评论