先关闭加密,然后修复提现逻辑
This commit is contained in:
@@ -336,7 +336,7 @@ class DivideAccountController extends BaseAdminController
|
||||
throw new \yii\db\Exception('银行卡相关配置不能为空');
|
||||
}
|
||||
|
||||
$sendPrice = $CashApply->user_id == 0? bcadd($CashApply->true_cash, 1, 2): bcadd($CashApply->true_cash, 0, 2);
|
||||
$sendPrice = $CashApply->user_id == 0? bcadd($CashApply->true_cash, 0, 2): bcadd($CashApply->true_cash, 1, 2);
|
||||
|
||||
// 准备打款参数
|
||||
$param = [
|
||||
|
||||
@@ -27,6 +27,9 @@ class JsonResponseFormatter extends \yii\web\JsonResponseFormatter
|
||||
'express_name',
|
||||
'express_region',
|
||||
'doctor',
|
||||
'accept_tel',
|
||||
'patient',
|
||||
'patient_mobile'
|
||||
];
|
||||
private $defaultErrorCode = -1;
|
||||
|
||||
@@ -46,19 +49,21 @@ class JsonResponseFormatter extends \yii\web\JsonResponseFormatter
|
||||
return $result;
|
||||
}
|
||||
|
||||
private static function aseEncode($data) {
|
||||
if (is_array($data)) {
|
||||
foreach ($data as $key => &$value) {
|
||||
if (is_array($value)) {
|
||||
$value = self::aseEncode($value); // 递归处理子数组
|
||||
} else {
|
||||
if (in_array($key, self::$arr)) {
|
||||
$value = ase_encode($value); // 加密指定键值
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
private static function aseEncode($data)
|
||||
{
|
||||
return $data;
|
||||
// if (is_array($data)) {
|
||||
// foreach ($data as $key => &$value) {
|
||||
// if (is_array($value)) {
|
||||
// $value = self::aseEncode($value); // 递归处理子数组
|
||||
// } else {
|
||||
// if (in_array($key, self::$arr)) {
|
||||
// $value = ase_encode($value); // 加密指定键值
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return $data;
|
||||
}
|
||||
|
||||
public $encrypt = true; //是不加密
|
||||
@@ -69,8 +74,6 @@ class JsonResponseFormatter extends \yii\web\JsonResponseFormatter
|
||||
*/
|
||||
protected function formatJson($response)
|
||||
{
|
||||
//$response->getHeaders()->set('Content-Type', 'text/plain; charset=UTF-8');
|
||||
//$response->getHeaders()->set("Access-Control-Allow-Origin","*");
|
||||
if ($response->data !== null) {
|
||||
$options = $this->encodeOptions;
|
||||
if ($this->prettyPrint) {
|
||||
@@ -98,22 +101,7 @@ class JsonResponseFormatter extends \yii\web\JsonResponseFormatter
|
||||
}
|
||||
|
||||
$response->data = self::formatData($data, $errcode, $msg);
|
||||
// var_dump($response->data);exit;
|
||||
// if(!$response->isSuccessful){
|
||||
// $response->statusCode = 200;
|
||||
// if($response->data['code']>20000)
|
||||
// $code = $response->data['code'];
|
||||
// else
|
||||
// $code = ErrorCode::APP_EXCEPTION;
|
||||
// $redirect = '';
|
||||
// $response->data = BController::ApiResponse([],$response->data['message'],$code,$redirect);
|
||||
// }
|
||||
// if(isset(Yii::$app->params['response_encrpyt']) && Yii::$app->params['response_encrpyt']){
|
||||
// $encryption = new MCrypt();
|
||||
// $response->content = $encryption->encrypt(Json::encode($response->data, $options));
|
||||
// }else{
|
||||
$response->content = Json::encode($response->data, $options);
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -132,19 +120,7 @@ class JsonResponseFormatter extends \yii\web\JsonResponseFormatter
|
||||
}
|
||||
if (!$response->isSuccessful) {
|
||||
$response->statusCode = 200;
|
||||
if ($response->data['code'] > 20000)
|
||||
$code = $response->data['code'];
|
||||
else
|
||||
$code = $this->defaultErrorCode;
|
||||
$redirect = '';
|
||||
// $response->data = BController::ApiResponse([],$response->data['message'],$code,$redirect);
|
||||
}
|
||||
// if(isset(Yii::$app->params['response_encrpyt']) && Yii::$app->params['response_encrpyt']){
|
||||
// $encryption = new MCrypt();
|
||||
// $response->content = $encryption->encrypt(Json::encode($response->data, $options));
|
||||
// }else{
|
||||
// $response->content = Json::encode($response->data, $options);
|
||||
// }
|
||||
|
||||
}
|
||||
$response->data = ['data' => $response->data, 'callback' => Yii::$app->getRequest()->get('callback')];
|
||||
|
||||
Reference in New Issue
Block a user