wx.request({ url: 'http://192.168.60.226/prosecount', //僅為示例,並非真實的接口地址 header: { 'content-type': 'application/json' // 默認值 }, data: { id: options.id }, success: res => { if (res.statusCode === 200) { console.log(res.data) this.setData({ array: res.data.user, comment: res.data.comment }) } } })
注意如果請求的數據的域名不是htts,請web微信開發者工具中關閉(不校驗安全域名、web-view 域名、TLS 版本以及 HTTPS 證書)
位置在詳情里面
