|
@@ -42,6 +42,14 @@ class SearchController extends AbstractAction |
|
@@ -42,6 +42,14 @@ class SearchController extends AbstractAction |
42
|
*/
|
42
|
*/
|
43
|
public function listAction()
|
43
|
public function listAction()
|
44
|
{
|
44
|
{
|
|
|
45
|
+ if ($this->get('query')) {
|
|
|
46
|
+ $activity = SearchData::searchKeyActivity($this->get('query'));
|
|
|
47
|
+ if ($activity['code'] === 200 && isset($activity['data']) && isset($activity['data']['urlobj']) && isset($activity['data']['urlobj']['appUrl'])) {
|
|
|
48
|
+ $this->go($activity['data']['urlobj']['appUrl']);
|
|
|
49
|
+ exit;
|
|
|
50
|
+ }
|
|
|
51
|
+ }
|
|
|
52
|
+
|
45
|
$uid = $this->getUid() ? $this->getUid() : $this->get('uid');
|
53
|
$uid = $this->getUid() ? $this->getUid() : $this->get('uid');
|
46
|
$isApp = $this->isApp();
|
54
|
$isApp = $this->isApp();
|
47
|
|
55
|
|
|
@@ -237,14 +245,6 @@ class SearchController extends AbstractAction |
|
@@ -237,14 +245,6 @@ class SearchController extends AbstractAction |
237
|
{
|
245
|
{
|
238
|
header('Access-Control-Allow-Origin:*');
|
246
|
header('Access-Control-Allow-Origin:*');
|
239
|
|
247
|
|
240
|
- if ($this->get('query')) {
|
|
|
241
|
- $activity = SearchData::searchKeyActivity($this->get('query'));
|
|
|
242
|
- if ($activity['code'] === 200 && isset($activity['data']) && isset($activity['data']['urlobj']) && isset($activity['data']['urlobj']['appUrl'])) {
|
|
|
243
|
- $this->echoJson(array('jumpActUrl' => $activity['data']['urlobj']['appUrl']));
|
|
|
244
|
- exit;
|
|
|
245
|
- }
|
|
|
246
|
- }
|
|
|
247
|
-
|
|
|
248
|
$data = \Product\SearchModel::search();
|
248
|
$data = \Product\SearchModel::search();
|
249
|
|
249
|
|
250
|
if (empty($data['new'])) {
|
250
|
if (empty($data['new'])) {
|