export default function commonRequest(options) {
return new Promise((resolve, reject) => {
wx.request({
url: options.url,
method: options.method || 'GET',
data: options.data || {},
header: {
"Content-Type": "application/json"
},
success: function(res) {
console.log(res)
resolve(res)
},
fail: function(err) {
console.log(err)
reject(err)
}
})
})
}
题目和描述有啥关系?没看出来....