Browse Source

feat:版本

super-yimizi 2 months ago
parent
commit
6f71fe3346
1 changed files with 4 additions and 0 deletions
  1. 4 0
      application/api/controller/Address.php

+ 4 - 0
application/api/controller/Address.php

@@ -30,6 +30,10 @@ class Address extends Base
         if (!$row) {
             $this->error('未找到记录');
         }
+        $areainfo = $row->areainfo;
+        $row['province'] = $areainfo['province'] ? $areainfo['province']['name'] : '';
+        $row['city'] = $areainfo['city'] ? $areainfo['city']['name'] : '';
+        $row['area'] = $areainfo['area'] ? $areainfo['area']['name'] : '';
         $this->success('获取成功', $row);
     }