改变URl重新获取数据如何实现?
wx.request({
url: '',
data: {},
method: 'GET',
header: {
'content-type': 'application/json'
}, // 设置请求的 header
success: function(res){
that.setData({
servicePrice:res.data.result
})
},
fail: function() {
},
complete: function() {
}
})
是否通过this.setdata?

varthat =this;wx.request({url:'',data: {},method:'GET',header: {'content-type':'application/json'},// 设置请求的 headersuccess:function(res){that.setData({servicePrice:res.data.result})},fail:function() {},complete:function() {}})你的
servicePrice应该在Page里面的data中对应,这样就可以在WXML中实现动态绑定