var app = getApp();
var that;
Page({
  data: {},
  onLoad() {
    that = this;
    dd.setNavigationBar({ title: "考勤积分" });
  },
  onShow(){
    this.getData();
  },
  getData(){
    app.$get("api/ad/info").then((res) => {
      var obj=res.data.data;
      for (var i in obj) {
          var str=String(obj[i]);
          // console.log(str.indexOf("-"))
          if(str.indexOf("-")>=0){
              console.log(obj[i]);
              obj[i]=str.slice(1,10);
          }
      }
      this.setData({
        data:obj
      })
    })
  }
});
