nodejs作为微信小程序服务端,如何接收来自微信小程序的wx.request请

发布于 7 年前作者 chaofeng7989 次浏览最后编辑 7 年前来自 ask
  • 当前 Bug 的表现(可附上截图)

  • 预期表现

  • 复现路径

  • 提供一个最简复现 Demo

testCgi: function () {

util.showBusy(‘请求中…’)

var that = this

qcloud.request({

url: `${config.service.host}/weapp/demo`,

//login: false,

data:{

id:“23113465456132165498131”

},

success (result) {

util.showSuccess(‘请求成功完成’)

that.setData({

requestResult: JSON.stringify(result.data)

})

console.log(result)

},

fail (error) {

util.showModel(‘请求失败’, error);

console.log(‘request fail’, error);

}

})

},

1 回复
xiejun
xiejun1 楼5 年前

这个问题应该去看node.js教程。