response->format = Response::FORMAT_JSON; Yii::$app->response->data = [ 'code' => 1, 'msg' => '云仓账户异常,请联系管理员' ]; return false; } // 重置token $token = get_supplier_token(); if (!$token) { \Yii::$app->response->format = Response::FORMAT_JSON; Yii::$app->response->data = [ 'code' => 1, 'msg' => '账户异常,请联系管理员处理' ]; return false; } return parent::beforeAction($action); } }