var HOST = 'http://localhost/lendoo/public/index.php/';
// 网站请求接口,统一为post
function post(req) {
//发起网络请求
wx.request({
url: HOST + req.uri,
data: req.param,
header: {
"content-type": "application/x-www-form-urlencoded"
},
method: 'POST',
success: function (res) {
req.success(res.data)
},
fail: function (res) {
console.log(res);
}
})
}
// 导出模块
module.exports = { post: post
}