记录日志测试
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user