gemercheung 5 месяцев назад
Родитель
Сommit
c6395d9756
3 измененных файлов с 4 добавлено и 2 удалено
  1. 1 1
      src/request/organization.ts
  2. 1 0
      src/view/organization-add.vue
  3. 2 1
      src/view/organization-edit.vue

+ 1 - 1
src/request/organization.ts

@@ -98,7 +98,7 @@ export const getCities = (provinceCode: string) => {
 }
 
 export const getAreas = (provinceCode: string, cityCode: string, zx?: boolean) => {
-    const url = zx ? URL.getAreas + `?provinceCode=${provinceCode}&cityCode=${cityCode}` : URL.getAreas + `?provinceCode=${provinceCode}&cityCode=${cityCode}&zx=true`
+    const url = zx ? URL.getAreas + `?provinceCode=${provinceCode}&cityCode=${cityCode}` : URL.getAreas + `?provinceCode=${provinceCode}&cityCode=${cityCode}`
     return sendFetch<ResResult>(url, {
         method: "get",
     });

+ 1 - 0
src/view/organization-add.vue

@@ -164,6 +164,7 @@ const lazyProps = ref<CascaderProps>({
 
 const loadData = async (level, node) => {
   // 根据层级模拟数据
+
   console.log('level', level, node)
 
   switch (level) {

+ 2 - 1
src/view/organization-edit.vue

@@ -112,7 +112,7 @@ const lazyProps = ref<CascaderProps>({
 
 const loadData = async (level, node) => {
   // 根据层级模拟数据
-  console.log('level', level, node)
+  // console.log('level', level, node)
 
   switch (level) {
     case 0: // 加载省份
@@ -124,6 +124,7 @@ const loadData = async (level, node) => {
       return resP;
     case 1:
       let cities
+      console.log('当前城市', node.zx)
       if (node.zx) {
         const areas = await getAreas(node.province, node.city);
         console.log('areas', areas)