
var app = getApp()
var that;
Page({
  data: {
    // dataList:[],
  },
  onLoad() {
    that = this;
    dd.setNavigationBar({ title: "自定义分组B分排名" });
  },
  onShow(){
    this.getData();
  },
  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'
    })
  },
});
