diff --git a/app.js b/app.js index 666f9e3..5b1572c 100644 --- a/app.js +++ b/app.js @@ -21,7 +21,7 @@ App({ unique_key: "wechatxcx" }).then(res => { let data = JSON.parse(res.data); - data.isTest = data.isTest63? true : false; + data.isTest = data.isTest64? true : false; this.globalData.configJson = data }).then(() => { // 获取ui配置文件 diff --git a/pages/pbService/activity/index.js b/pages/pbService/activity/index.js index 1bfa95e..f5ef5fb 100644 --- a/pages/pbService/activity/index.js +++ b/pages/pbService/activity/index.js @@ -10,8 +10,10 @@ Page({ list:[], page:1, total:1, - // navList: [{title: '精彩2022', year: 2022}, {title: '回顾2021', year: 2021}], - navIndex: 0 + navList: [{title: '精彩2023', year: 2023}, {title: '往期回顾', year: 2022}], + navIndex: 0, + sNavIndex:0, + sNavList:[{title: '回顾2022', year: 2022}, {title: '回顾2021', year: 2021}] }, /** @@ -28,12 +30,20 @@ Page({ }) this.getList() }, + changeSNav(e){ + this.setData({ + page:0, + list:[], + sNavIndex:e.currentTarget.dataset.index + }) + this.getList() + }, getList:function(){ if(this.data.list.length>=this.data.total) return; https._post("review/getList",{ limit:10, page:this.data.page, - year:'' + year:this.data.sNavIndex===0?this.data.navList[this.data.navIndex].year:this.data.sNavList[this.data.sNavIndex].year }).then(res=>{ this.setData({ total:res.data.total, diff --git a/pages/pbService/activity/index.wxml b/pages/pbService/activity/index.wxml index d63a517..13cb93c 100644 --- a/pages/pbService/activity/index.wxml +++ b/pages/pbService/activity/index.wxml @@ -1,9 +1,14 @@