Commit 8b1e2156 authored by hujun's avatar hujun

跨域

parent ea01297f
...@@ -368,6 +368,7 @@ class Shop extends Basic ...@@ -368,6 +368,7 @@ class Shop extends Basic
* @throws \think\exception\DbException * @throws \think\exception\DbException
*/ */
public function getAddress() { public function getAddress() {
header('Access-Control-Allow-Origin:*');
$regions = new Regions(); $regions = new Regions();
$data = $regions->getRegionsCity(); $data = $regions->getRegionsCity();
return $this->response(200, '', $data); return $this->response(200, '', $data);
...@@ -382,6 +383,7 @@ class Shop extends Basic ...@@ -382,6 +383,7 @@ class Shop extends Basic
* @throws \think\exception\DbException * @throws \think\exception\DbException
*/ */
public function getRegions() { public function getRegions() {
header('Access-Control-Allow-Origin:*');
$regions = new Regions(); $regions = new Regions();
$data = $regions->getRegions($this->params['code'], $this->params['parent_code']); $data = $regions->getRegions($this->params['code'], $this->params['parent_code']);
return $this->response(200, '', $data); return $this->response(200, '', $data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment