记录日志测试

This commit is contained in:
2024-12-04 10:06:16 +08:00
parent 2d9af1fa73
commit 25362a9102
2 changed files with 10 additions and 10 deletions

View File

@@ -117,8 +117,6 @@ class JsonResponseFormatter extends \yii\web\JsonResponseFormatter
self::$param['result'] = $data;
self::$param['url'] = Yii::$app->request->getUrl();
self::$param['type'] = $response->statusCode == 200? 0: 1;
self::$param['platform_type'] = Yii::$app->store == 0? 0: 1;
self::$param['platform_id'] = Yii::$app->store?? 0;
$op = get_device_type();
self::$param['ip'] = $op['ip'];
self::$param['equipment'] = $op['platform'];
@@ -128,9 +126,8 @@ class JsonResponseFormatter extends \yii\web\JsonResponseFormatter
} else {
self::$param['user_id'] = Yii::$app->user->id;
}
\Yii::$app->queue->push(new LogJob([
'params' => self::$param
]));
// 日志队列
\Yii::$app->queue->push(new LogJob(['params' => self::$param]));
$response->data = self::formatData($data, $errcode, $msg);
$response->content = Json::encode($response->data, $options);