<commit_before>import base from './base';
import Page from '../utils/Page';

export default class Member extends base {
  /**
   * 获取会员信息
   */
  static async Info (number) {
    const url = `${this.baseUrl}/members/number?number=${number}`;
    return await this.get(url);
  }

  /**
   * 增加积分信息
   */
  static async memberAdd (bonusDetail) {
    const url = `${this.baseUrl}/members/bonus_detail`;
    return this.post(url, bonusDetail);
  }

  /**
   * 获取买家会员数据
   */
  static async customerInfo (customerId) {
    const url = `${this.baseUrl}/members?customer_id=${customerId}`;
    return await this.get(url);
  }

  /**
   * 获取买家会员数据
   */
  static async cardInfo () {
    const url = `${this.baseUrl}/memberCards`;
    return await this.get(url);
  }

  /**
   * 历史积分信息
   */
  static async bonusPage(customerId) {
    const url = `${this.baseUrl}/members/bonus_detail?customer_id=${customerId}`;
    return new Page(url, this.processBonusTransformation.bind(this));
  }
  static processBonusTransformation (bonusInfo) {
    const comment = {};<commit_msg>FIX：会员卡<commit_after>import base from './base';
import Page from '../utils/Page';

export default class Member extends base {
  /**
   * 获取会员信息
   */
  static async Info (number) {
    const url = `${this.baseUrl}/members/number?number=${number}`;
    return await this.get(url);
  }

  /**
   * 增加积分信息
   */
  static async memberAdd (bonusDetail) {
    const url = `${this.baseUrl}/members/bonus_detail`;
    return this.post(url, bonusDetail);
  }

  /**
   * 获取买家会员数据
   */
  static async customerInfo (customerId) {
    const url = `${this.baseUrl}/members?customer_id=${customerId}`;
    return await this.get(url);
  }

  /**
   * 获取买家会员数据
   */
  static async cardInfo () {
    const url = `${this.baseUrl}/memberCards`;
    return await this.get(url);
  }

  /**
   * 历史积分信息
   */
  static async bonusPage(customerId) {
    const url = `${this.baseUrl}/members/bonus_detail?by=create_time&sort=desc&customer_id=${customerId}`;
    return new Page(url, this.processBonusTransformation.bind(this));
  }
  static processBonusTransformation (bonusInfo) {
    const comment = {};
{'fraction_non_alphanumeric': 0.15244755244755245, 'fraction_numerical': 0.0, 'mean_word_length': 3.232741617357002, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4965266', 'n_tokens_mistral': 745, 'n_tokens_neox': 786, 'n_words': 146}