Authored by 郝肖肖

判断shopId是否为空

@@ -355,7 +355,7 @@ class IndexController extends WebAction @@ -355,7 +355,7 @@ class IndexController extends WebAction
355 $this->go(SITE_MAIN); 355 $this->go(SITE_MAIN);
356 } 356 }
357 357
358 - $shopId = isset($result['shopId']) ? $result['shopId'] : $this->get('shopId', 0); 358 + $shopId = empty($result['shopId']) ? $this->get('shopId', 0) : $result['shopId'];
359 //获取uid 359 //获取uid
360 $uid = $this->getUid(); 360 $uid = $this->getUid();
361 361
@@ -372,7 +372,7 @@ class IndexController extends WebAction @@ -372,7 +372,7 @@ class IndexController extends WebAction
372 ), 372 ),
373 'uid' => $uid, 373 'uid' => $uid,
374 'navBar' => $this->get('navBar', 1), 374 'navBar' => $this->get('navBar', 1),
375 - 'shopId' => $shopId, 375 + 'shopId' => $this->get('shopId', 0),
376 'brand' => $this->get('brand', 0) 376 'brand' => $this->get('brand', 0)
377 ); 377 );
378 378