Explorar o código

贷款-注册城市选择过滤

panyong %!s(int64=4) %!d(string=hai) anos
pai
achega
9d0dffae46
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  1. 6 1
      htmldev/loan/src/views/loan/register/index.vue

+ 6 - 1
htmldev/loan/src/views/loan/register/index.vue

@@ -246,7 +246,12 @@
       funGetChinaArea () {
         getChinaArea().then(res => {
           if (res.status) {
-            this.columnsOfCity = res.data.filter(item => item.text === '浙江')
+            this.columnsOfCity = res.data.filter(province => province.text === '浙江').map(province => {
+              return {
+                ...province,
+                children: province.children.filter(city => city.text === '杭州')
+              }
+            })
           }
         })
       },