//请求接口 let request = function (obj){ let { url, method, header, dataType, responseType, complete } = obj return new Promise((res,rej)=>{ Wx.request({ url, method, header, dataType, responseType, success(data){ res(data) }, fail(data){ rej(data) }, complete }) }) } module.exports = { request }