加解密优化
This commit is contained in:
@@ -14,25 +14,6 @@ use yii\helpers\Json;
|
||||
|
||||
class JsonResponseFormatter extends \yii\web\JsonResponseFormatter
|
||||
{
|
||||
private static $arr = [
|
||||
'name',
|
||||
'contact',
|
||||
'mobile',
|
||||
'express_address',
|
||||
'clinical_diagnose',
|
||||
'drug_name',
|
||||
'drug_alias',
|
||||
'function',
|
||||
'usage',
|
||||
'express_mobile',
|
||||
'express_name',
|
||||
'express_region',
|
||||
'doctor',
|
||||
'accept_tel',
|
||||
'patient',
|
||||
'accept_name',
|
||||
'patient_mobile'
|
||||
];
|
||||
private static $param = [
|
||||
'param' => [],
|
||||
'result' => [],
|
||||
@@ -64,7 +45,7 @@ class JsonResponseFormatter extends \yii\web\JsonResponseFormatter
|
||||
if (is_array($value)) {
|
||||
$value = self::aseEncode($value); // 递归处理子数组
|
||||
} else {
|
||||
if (in_array($key, self::$arr)) {
|
||||
if (in_array($key, \Yii::$app->params['aseList'])) {
|
||||
$value = ase_encode($value); // 加密指定键值
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user