public function actionIndex($id, $category = 'all', $q = '')
{
/* @var $model Store */
$model = Store::findOne($id);
if (!$model) {
throw new NotFoundHttpException('未找到该营业点!');
}
if ($model->status === Store::STATUS_DISABLED) {
throw new BadRequestHttpException('该店铺已被禁用,请重新选择!');
}
$modelCate = $category === 'all' ? null : Category::findOne(['slug' => $category]);
$this->_remember($model);
return $this->render('index', ['model' => $model, 'modelCate' => $modelCate, 'q' => $q]);
}