import { get, post } from '../utils/http.js'

// 获取用户消费等级
export const apiGetUserWealthLevel = async (userId) => {
  try {
    const response = await get(`/user-level/client/getByUserId?sysOrigin=LIKEI&userId=${userId}`)
    return response
  } catch (error) {
    console.error('Failed to fetch get user wealth level:', error)
    console.error('error:' + error.response.errorMsg)
    throw error
  }
}

// 申请靓号
export const applyGoodID = async (data) => {
  try {
    const response = await post(`/user/beautiful-number/apply`, data)
    return response
  } catch (error) {
    console.error('Failed to fetch apply goodID:', error)
    console.error('error:' + error.response.errorMsg)
    throw error
  }
}
