import request from "~/request/request"

export const discussList = ref([])

let isCalled = false;
export function requestDiscussList(d: any = {}) {
  if (isCalled) {
    return;
  }
  isCalled = true;

  return request({
    url: '/ybk/hdd/index',
    data: {
      limit: 1000,
      hdd_type: 3,
      ...d,
    }
  }).then((res) => {
    if (res.code === '1') {
      discussList.value = res.data.page_data
      return res.data.page_data
    }
    return []
  }).catch((error) => {
    console.error(error)
    return []
  })
}


