
const getReq = require('../config.js').getReq

function bonusUp(callback) {
  let params = {
    act: 'member_bonus',
    op: 'topup'
  }
  getReq(null,params, res => {
    if (res.code == 200) {
      let { datas } = res
      let { count, total_amount } = datas 
      if (count > 0) {
        callback(true, datas)
      }     
      else {
        callback(false, null)
      } 
    }
    else {
      callback(false, null)
    }
  })
}

export default bonusUp