使用wx.reques获取网站内容使用setData不能对数据赋值?
jlchassis: function() {
var _this = this;
wx.request({
url: 'https://localhost:44360/home/index',
header: {
'Content-Type': 'application/json'
},
success: function(e1) {
console.log(e1.data)
_this.setData({
start_address: e1.data
})
}
})
}
用console.log(start_address)显示未定义