// list: extInfo: {type: "actionPoint"}
const getPointList = (list = []) => {
  if (!list.length) {
    return [];
  }
  const resList = list.filter(v => {
    const {
      extInfo: { type = '' } = {},
    } = v || {};
    if (type === 'actionPoint') {
      return true;
    }
    return false;
  });
  return resList.slice(0, 3) || [];
};

const getLevelText = (level) => {
  const tempObj = {
    PRIMARY: '初级会员',
    INTERMEDIATE: '中级会员',
    SENIOR: '高级会员',
  };
  return tempObj[level] || '';
};

export default {
  getPointList,
  getLevelText,
};
