import Mock from 'mockjs'
import { doCustomTimes } from '@/libs/util'
const Random = Mock.Random

export const getgivescorelist = () => {
  let userList = []
  doCustomTimes(5, () => {
    var sum = Mock.mock({
      'sum|6-9': 9
    }).sum
    var givescore = sum - 5
    userList.push(Mock.mock({
      id: '@increment',
      wname: Random.cname(),
      telno: /\d{5,10}/,
      sum: sum,
      givescore: givescore
    }))
  })
  var data = {
    code: 200,
    msg: 'success',
    data: {
      list: userList,
      count: 5
    }
  }
  return data
}
