Commit 52c53bdc by 高淑倩

招募&&门店榜单

parent 69129ba6
...@@ -30,7 +30,46 @@ wxService.page({ ...@@ -30,7 +30,46 @@ wxService.page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
this.getRecruitRanking() // 招募榜
},
getRecruitRanking() {
wx.showLoading({
title: '加载中'
})
wxService.post('/marketing/shoppingguide/recruitRanking').then(res => {
if (res) {
const { result, data } = res.data
if (result == 0) {
wx.hideLoading()
// data && data.skuVOList.forEach(item=>{
// item.checked = false
// })
// this.setData({
// cartList: data && data.skuVOList || []
// })
}
}
})
},
// 门店榜
getStoreRanking() {
wx.showLoading({
title: '加载中'
})
wxService.post('/marketing/shoppingguide/storeRanking').then(res => {
if (res) {
const { result, data } = res.data
if (result == 0) {
wx.hideLoading()
// data && data.skuVOList.forEach(item=>{
// item.checked = false
// })
// this.setData({
// cartList: data && data.skuVOList || []
// })
}
}
})
}, },
// 点击事件 // 点击事件
onTopBarTap(e){ onTopBarTap(e){
...@@ -46,6 +85,9 @@ wxService.page({ ...@@ -46,6 +85,9 @@ wxService.page({
this.setData({ this.setData({
navBar: this.data.navBar, navBar: this.data.navBar,
current: this.data.current current: this.data.current
},()=>{
const { current } = this.data
current == 1? this.getRecruitRanking() : this.getStoreRanking()
}); });
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment