var rootDocment = ‘https://123.com‘;//你的域名
function postData(url, data, cb) {
wx.request({
url: rootDocment + url,
data: data,
method: ‘post‘,
success: function (res) {
return typeof cb == "function" && cb(res)
},
fail: function () {
return typeof cb == "function" && cb(false)
}
})
}