作者 wangzhi

跨域请求

@@ -81,6 +81,7 @@ class Index extends Api @@ -81,6 +81,7 @@ class Index extends Api
81 $arr = Db::name('dangaddress')->where($map)->find(); 81 $arr = Db::name('dangaddress')->where($map)->find();
82 if (empty($arr)) { 82 if (empty($arr)) {
83 $data = [ 83 $data = [
  84 + 'id' => '',
84 'title' => '', 85 'title' => '',
85 'address' => '', 86 'address' => '',
86 'lat' => '', 87 'lat' => '',
@@ -90,6 +91,7 @@ class Index extends Api @@ -90,6 +91,7 @@ class Index extends Api
90 ]; 91 ];
91 } else { 92 } else {
92 $data = [ 93 $data = [
  94 + 'id' => $arr['id'],
93 'title' => $arr['title'], 95 'title' => $arr['title'],
94 'address' => $arr['address'], 96 'address' => $arr['address'],
95 'lat' => $arr['lat'], 97 'lat' => $arr['lat'],