import request from '@/utils/request'


// 获取计算资源菜单
export function categoryMenuNew (query) {
  return request({
    url: '/compute/resource-category/list',
    method: 'get',
    params: query
  })
}


// 根据应用类别返回对应计算机资源列表
export function getRListByCategory (query) {
  return request({
    url: '/compute/resource-sku/page',
    method: 'get',
    params: query
  })
}


// 计算资源详情
export function getRDetail (query) {
  return request({
    url: '/compute/resource-sku/get-detail',
    method: 'get',
    params: query
  })
}


export function createOrderSubmit(query){
  return request({
    url: '/compute/order/create',
    method: 'post',
    data: query
  })
}

// 创建算力资源订单(旺铺聚合支付)
export function createOrderSubmitWpgj(query){
  return request({
    url: '/compute/order/create-wpgj',
    method: 'post',
    data: query
  })
}


export function createPay(query){
  return request({
    url: '/pay/order/submit',
    method: 'post',
    data: query
  })
}

// export async function getOrder(id, sync){
//   return await request({
//     url: '/pay/order/get',
//     method: 'get',
//     params: {
//       id,
//       sync
//     }
//   })
// }




