Api接口调用
//轮播图
console.log('开始请求轮播图',new Date());
wx.request({
url: app.baseURL+'/wx/product/all_banner',
method:"POST",
success:function(res){
console.log(res);
console.log('请求轮播图完成',new Date());
_this.setData({
banner:res.data.data,
})
}
})
//附近热门
wx.request({
url: app.baseURL+'/wx/product/all_home',
method:"POST",
success:function(res){
console.log(res);
console.log('请求附近热门成功',new Date());
_this.setData({
subjects:res.data.data,
})
}
})
}
},