记录日志测试

This commit is contained in:
2024-12-04 10:09:59 +08:00
parent 25362a9102
commit 3adc13cca8

View File

@@ -108,13 +108,15 @@ class JsonResponseFormatter extends \yii\web\JsonResponseFormatter
$data = $response->data;
}
// 记录日志
if (Yii::$app->request->getMethod() == 'GET') {
self::$param['param'] = Yii::$app->request->get();
} else {
self::$param['param'] = Yii::$app->request->post();
}
self::$param['result'] = $data;
// self::$param['result'] = $data;
self::$param['result'] = [];
self::$param['url'] = Yii::$app->request->getUrl();
self::$param['type'] = $response->statusCode == 200? 0: 1;
$op = get_device_type();