You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
402 B

2 years ago
var util = require('./utils/util.js')
var request = new Object();
request.wxRequest = function (obj) {
wx.request({
url: util.getUri() + obj.url,
data: obj.data,
method: obj.method,
header: { "Content-Type": "application/x-www-form-urlencoded" },
success: function (res) {
typeof (obj.success) == 'function' && obj.success(res.data);
}
})
}
module.exports = request