code: function(){
      var type = this.getAttribute('type');
      if(type == 0){
        config.no && config.no();
        layer.close(that.index);
      } else {
        config.yes ? config.yes(that.index) : layer.close(that.index);
      }
    }
docs: 确认取消