onLoad: function (options) {
const that = this
var rs = [];
wx.request({
url: ',
header: {
'content-type': 'application/json'
},
success: function (res) {
console.log(res.data.showapi_res_body.pagebean.songlist);
rs = res.data.showapi_res_body.pagebean.songlist;
that.setsj(rs);
}
});
},
setsj: function (shuju) {
console.log(shuju);
this.setData({
recommends: shuju
});
你可以帮我打一下吗。小熊猫。,,,非常感谢
onLoad: function (options) {
var rs = [];
wx.request({
url: ',
header: {
‘content-type’: ‘application/json’
},
success: function (res) {
console.log(res.data.showapi_res_body.pagebean.songlist);
rs = res.data.showapi_res_body.pagebean.songlist;
this.setsj(rs);
}
});
},
setsj: function (shuju) {
console.log(shuju);
this.setData({
recommends: shuju
});