Showing
1 changed file
with
7 additions
and
7 deletions
@@ -237,10 +237,10 @@ class SearchController extends AbstractAction | @@ -237,10 +237,10 @@ class SearchController extends AbstractAction | ||
237 | $data = array(); | 237 | $data = array(); |
238 | 238 | ||
239 | do { | 239 | do { |
240 | - /* 判断是不是AJAX请求 */ | ||
241 | - if (!$this->isAjax()) { | ||
242 | - break; | ||
243 | - } | 240 | + /* 跨域导致 Ajax 丢失数据 */ |
241 | +// if (!$this->isAjax()) { | ||
242 | +// break; | ||
243 | +// } | ||
244 | 244 | ||
245 | /* 过滤请求参数 */ | 245 | /* 过滤请求参数 */ |
246 | $condition = filter_input_array(INPUT_GET, array( | 246 | $condition = filter_input_array(INPUT_GET, array( |
@@ -400,8 +400,8 @@ class SearchController extends AbstractAction | @@ -400,8 +400,8 @@ class SearchController extends AbstractAction | ||
400 | { | 400 | { |
401 | header('Access-Control-Allow-Origin:*'); | 401 | header('Access-Control-Allow-Origin:*'); |
402 | $data = array(); | 402 | $data = array(); |
403 | - | ||
404 | - if ($this->isAjax()) { | 403 | +// 跨域导致 Ajax 丢失数据 |
404 | +// if ($this->isAjax()) { | ||
405 | // 过滤请求参数 | 405 | // 过滤请求参数 |
406 | $condition = filter_input_array(INPUT_GET, array( | 406 | $condition = filter_input_array(INPUT_GET, array( |
407 | 'query' => FILTER_DEFAULT, | 407 | 'query' => FILTER_DEFAULT, |
@@ -466,7 +466,7 @@ class SearchController extends AbstractAction | @@ -466,7 +466,7 @@ class SearchController extends AbstractAction | ||
466 | 466 | ||
467 | // 区别各种列表页面的筛选数据 | 467 | // 区别各种列表页面的筛选数据 |
468 | $data = Product\SearchModel::getFilterData($condition); | 468 | $data = Product\SearchModel::getFilterData($condition); |
469 | - } | 469 | +// } |
470 | 470 | ||
471 | if (empty($data)) { | 471 | if (empty($data)) { |
472 | echo ' '; | 472 | echo ' '; |
-
Please register or login to post a comment