var app = getApp() var that; Page({ data: { // dataList:[], isShowGs:true, disabled:false, }, onLoad() { that = this; dd.getStorage({ key: 'isShowGs', success: function(res) { if(res.data){ that.setData({ isShowGs: false }) } }, }); dd.setNavigationBar({ title: "自定义分组B分排名" }); }, onShow(){ this.getData(); }, activeGs(){ this.setData({ isShowGs: false }) dd.setStorage({ key: 'isShowGs', data: true, success: function() {} }); }, getData(){ app.$get('api/integral/statistics/groups').then((res) => { var data = res.data.data.list; this.setData({ dataList: data }) }) }, //打开编辑 openCompile(e){ var item=e.target.dataset.item; dd.navigateTo({ url: '../addCustom/addCustom?id='+item.id }) }, //打开排名 openDetail(e){ var item=e.target.dataset.item; dd.navigateTo({ url: '../C_ranking/C_ranking?id='+item.id+'&name='+item.name }) }, //打开添加 openAdd(){ dd.navigateTo({ url: '../addCustom/addCustom' }) }, });