Skip to content

Commit

Permalink
地区地址更换
Browse files Browse the repository at this point in the history
  • Loading branch information
borgxiao committed Nov 28, 2017
1 parent ee41687 commit af9ca50
Show file tree
Hide file tree
Showing 3 changed files with 71,240 additions and 63,357 deletions.
6 changes: 3 additions & 3 deletions src/Area.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,12 @@ private static function setAreas() {
if (!empty(self::$areas)) {
return [];
}
$data = json_decode(file_get_contents("./area.json"), true);
$data = json_decode(file_get_contents("./areas.json"), true);
if (empty($data)) {
return [];
}
foreach ($data as $val) {
self::$areas[$val['f_id']] = $val;
self::$areas[$val['id']] = $val;
}
return self::$areas;
}
Expand All @@ -368,7 +368,7 @@ public static function getAreas() {
public static function getAreaNameByID($id) {
self::setAreas();
if ($id && isset(self::$areas[$id])) {
return self::$areas[$id]['f_name'];
return self::$areas[$id]['name'];
}
return '';
}
Expand Down
Loading

0 comments on commit af9ca50

Please sign in to comment.