public function actionView($id) { $model = Order::findOne(['id' => $id, 'store_id' => Yii::$app->user->identity->store_id]); if (!$model) { throw new NotFoundHttpException('未找到该订单'); } return $this->render('view', ['model' => $model]); }