From ca4ec4b2edaa3e6daf4a0c623b1171d290978f4d Mon Sep 17 00:00:00 2001 From: Anyon Date: Fri, 4 May 2018 17:08:38 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=E4=BF=AE=E6=94=B9=E9=98=BF?= =?UTF-8?q?=E9=87=8C=E4=BA=91=E7=9F=AD=E4=BF=A1=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extend/service/AlismsService.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/extend/service/AlismsService.php b/extend/service/AlismsService.php index 2fade2e8d..f2f465466 100644 --- a/extend/service/AlismsService.php +++ b/extend/service/AlismsService.php @@ -68,16 +68,11 @@ class AlismsService public static function batchSend(array $PhoneNumbers, $TemplateCode, array $SignNames, array $TemplateParams, $SmsUpExtendCodes = []) { $params = []; - $params["SignNameJson"] = $SignNames; $params["TemplateCode"] = $TemplateCode; - $params["PhoneNumberJson"] = $PhoneNumbers; - $params["TemplateParamJson"] = $TemplateParams; - if (!empty($SmsUpExtendCodes)) { - $params["SmsUpExtendCodeJson"] = json_encode($SmsUpExtendCodes); - } - $params["TemplateParamJson"] = json_encode($params["TemplateParamJson"], JSON_UNESCAPED_UNICODE); - $params["SignNameJson"] = json_encode($params["SignNameJson"], JSON_UNESCAPED_UNICODE); - $params["PhoneNumberJson"] = json_encode($params["PhoneNumberJson"], JSON_UNESCAPED_UNICODE); + !empty($SmsUpExtendCodes) && $params["SmsUpExtendCodeJson"] = json_encode($SmsUpExtendCodes); + $params["TemplateParamJson"] = json_encode($TemplateParams, JSON_UNESCAPED_UNICODE); + $params["SignNameJson"] = json_encode($SignNames, JSON_UNESCAPED_UNICODE); + $params["PhoneNumberJson"] = json_encode($PhoneNumbers, JSON_UNESCAPED_UNICODE); if (!empty($params["SmsUpExtendCodeJson"]) && is_array($params["SmsUpExtendCodeJson"])) { $params["SmsUpExtendCodeJson"] = json_encode($params["SmsUpExtendCodeJson"], JSON_UNESCAPED_UNICODE); }