import fly from "./main";
import store from "@/store/index"

export function vipPowerLevel($params = {}) {
  $params['access_token'] = wx.getStorageSync('token')
  return fly.post('power/power-level', $params)
}

// 扫会员卡二维码
export function vipCode($vip_code) {
  let $params = {}
  $params['invite_id'] = $vip_code
  $params['access_token'] = wx.getStorageSync('token')
  return fly.post('invite/scan', $params)
}

// 是否可以购买
export function check_vip($type) {
  let $params = {}
  $params['access_token'] = wx.getStorageSync('token')
  $params['type'] = $type
  return fly.post('user/check-user', $params)
}