lrj
1 天以前 7ad9c3c93f0cc103347ae2e2429e0122fb512e24
web/src/api/region.js
@@ -17,8 +17,8 @@
  `
  
  try {
    const data = await graphqlRequest(query)
    return data.regions || []
    const result = await graphqlRequest(query)
    return result.data.regions || []
  } catch (error) {
    throw new Error(error.message || '获取地区列表失败')
  }
@@ -39,8 +39,8 @@
  `
  
  try {
    const data = await graphqlRequest(query, { id })
    return data.region
    const result = await graphqlRequest(query, { id })
    return result.data.region
  } catch (error) {
    throw new Error(error.message || '获取地区详情失败')
  }
@@ -98,8 +98,8 @@
  `
  
  try {
    const data = await graphqlRequest(query)
    return data.provinces || []
    const result = await graphqlRequest(query)
    return result.data.provinces || []
  } catch (error) {
    throw new Error(error.message || '获取省份列表失败')
  }
@@ -119,8 +119,8 @@
  `
  
  try {
    const data = await graphqlRequest(query, { provinceId })
    return data.cities || []
    const result = await graphqlRequest(query, { provinceId })
    return result.data.cities || []
  } catch (error) {
    throw new Error(error.message || '获取城市列表失败')
  }
@@ -140,8 +140,8 @@
  `
  
  try {
    const data = await graphqlRequest(query, { cityId })
    return data.districts || []
    const result = await graphqlRequest(query, { cityId })
    return result.data.districts || []
  } catch (error) {
    throw new Error(error.message || '获取区县列表失败')
  }