diff --git a/crmeb/app/Request.php b/crmeb/app/Request.php index 97766195b..1b1a75a87 100644 --- a/crmeb/app/Request.php +++ b/crmeb/app/Request.php @@ -33,7 +33,8 @@ class Request extends \think\Request * 不过滤变量名 * @var array */ - protected $except = ['menu_path', 'api_url', 'unique_auth', 'description', 'custom_form', 'content', 'tableField']; + protected $except = ['menu_path', 'api_url', 'unique_auth', + 'description', 'custom_form', 'content', 'tableField']; /** * 获取请求的数据 diff --git a/crmeb/app/services/message/notice/SmsService.php b/crmeb/app/services/message/notice/SmsService.php index cf83e9ca3..bd5601a32 100644 --- a/crmeb/app/services/message/notice/SmsService.php +++ b/crmeb/app/services/message/notice/SmsService.php @@ -111,7 +111,7 @@ class SmsService extends NoticeService } $smsMake = $services->sms($type); //发送短信 - $res = $smsMake->send($phone, $templateId, $data, sys_config('yihaotong_sms_appid', '')); + $res = $smsMake->send($phone, $templateId, $data); if ($res === false) { throw new ApiException($smsMake->getError()); } diff --git a/crmeb/app/services/order/StoreOrderDeliveryServices.php b/crmeb/app/services/order/StoreOrderDeliveryServices.php index 9c3d348f0..d84c8aa1c 100644 --- a/crmeb/app/services/order/StoreOrderDeliveryServices.php +++ b/crmeb/app/services/order/StoreOrderDeliveryServices.php @@ -527,7 +527,7 @@ class StoreOrderDeliveryServices extends BaseServices if (!sys_config('config_export_open', 0)) { throw new AdminException(400528); } - $dump = $expressService->express()->dump($expData, sys_config('yihaotong_face_appid', '')); + $dump = $expressService->express()->dump($expData); $orderInfo->delivery_id = $dump['kuaidinum']; $data['express_dump'] = json_encode([ 'com' => $expData['com'], @@ -576,7 +576,7 @@ class StoreOrderDeliveryServices extends BaseServices // if (!sys_config('config_shippment_open', 0)) { // throw new AdminException('商家寄件未开启无法寄件'); // } - $dump = $expressService->express()->shippmentCreateOrder($expData, sys_config('yihaotong_send_appid', '')); + $dump = $expressService->express()->shippmentCreateOrder($expData); Log::error('商家寄件返回数据:' . json_encode($dump)); $orderInfo->delivery_id = $dump['kuaidinum'] ?? ''; $data['express_dump'] = json_encode([ diff --git a/crmeb/app/services/product/product/CopyTaobaoServices.php b/crmeb/app/services/product/product/CopyTaobaoServices.php index c1c3ed83e..6a9a4cf07 100644 --- a/crmeb/app/services/product/product/CopyTaobaoServices.php +++ b/crmeb/app/services/product/product/CopyTaobaoServices.php @@ -55,7 +55,7 @@ class CopyTaobaoServices extends BaseServices case 1://平台 /** @var ServeServices $services */ $services = app()->make(ServeServices::class); - $resultData = $services->copy('copy')->goods($url, [], sys_config('yihaotong_copy_appid', '')); + $resultData = $services->copy('copy')->goods($url); if (isset($resultData['description_image']) && is_string($resultData['description_image'])) { $resultData['description_image'] = json_decode($resultData['description_image'], true); } diff --git a/crmeb/app/services/shipping/ExpressServices.php b/crmeb/app/services/shipping/ExpressServices.php index 1522c0ced..1f94584ef 100644 --- a/crmeb/app/services/shipping/ExpressServices.php +++ b/crmeb/app/services/shipping/ExpressServices.php @@ -203,7 +203,7 @@ class ExpressServices extends BaseServices case 1: /** @var ServeServices $services */ $services = app()->make(ServeServices::class); - $result = $services->express()->query($expressNum, $com, $phone, sys_config('yihaotong_express_appid', '')); + $result = $services->express()->query($expressNum, $com, $phone); if (isset($result['ischeck']) && $result['ischeck'] == 1) { $cacheTime = 0; } else { diff --git a/crmeb/crmeb/services/copyproduct/CopyProduct.php b/crmeb/crmeb/services/copyproduct/CopyProduct.php index 0b39f148e..7bf239a63 100644 --- a/crmeb/crmeb/services/copyproduct/CopyProduct.php +++ b/crmeb/crmeb/services/copyproduct/CopyProduct.php @@ -20,7 +20,8 @@ use think\Container; /** * Class Product * @package crmeb\services\copyproduct - * @mixin \crmeb\services\copyproduct\CopyProduct + * @mixin \crmeb\services\copyproduct\storage\Copy + * @mixin \crmeb\services\copyproduct\storage\Copy99api */ class CopyProduct extends BaseManager { diff --git a/crmeb/crmeb/services/copyproduct/storage/Copy.php b/crmeb/crmeb/services/copyproduct/storage/Copy.php index 5308de528..485a2109e 100644 --- a/crmeb/crmeb/services/copyproduct/storage/Copy.php +++ b/crmeb/crmeb/services/copyproduct/storage/Copy.php @@ -52,11 +52,10 @@ class Copy extends BaseCopyProduct * @param string $yihaotongCopyAppid * @return mixed */ - public function goods(string $url, array $options = [], string $yihaotongCopyAppid = '') + public function goods(string $url, array $options = []) { $param['url'] = $url; - $header = $yihaotongCopyAppid != '' ? ['AppId:' . $yihaotongCopyAppid] : []; - return $this->accessToken->httpRequest(self::PRODUCT_GOODS, $param, 'post', true, $header); + return $this->accessToken->httpRequest(self::PRODUCT_GOODS, $param, 'post'); } diff --git a/crmeb/crmeb/services/express/storage/Express.php b/crmeb/crmeb/services/express/storage/Express.php index eff8a5254..e2d38df41 100644 --- a/crmeb/crmeb/services/express/storage/Express.php +++ b/crmeb/crmeb/services/express/storage/Express.php @@ -98,7 +98,7 @@ class Express extends BaseExpress * @email 136327134@qq.com * @date 2023/5/15 */ - public function shippmentCreateOrder(array $data, string $yihaotongSendAppid = '') + public function shippmentCreateOrder(array $data) { $siid = sys_config('config_export_siid'); $param = [ @@ -119,8 +119,7 @@ class Express extends BaseExpress 'pickup_start_time' => $data['pickup_start_time'], 'pickup_end_time' => $data['pickup_end_time'], ]; - $header = $yihaotongSendAppid != '' ? ['AppId:' . $yihaotongSendAppid] : []; - return $this->accessToken->httpRequest(self::SHIPMENT_CREATE_ORDER, $param, 'post', true, $header); + return $this->accessToken->httpRequest(self::SHIPMENT_CREATE_ORDER, $param, 'post'); } /** @@ -248,7 +247,7 @@ class Express extends BaseExpress * @return 物流状态:status 0在途,1揽收,2疑难,3签收,4退签,5派件,6退回,7转单,10待清关,11清关中,12已清关,13清关异常,14收件人拒签 * @return 物流详情 content */ - public function query(string $num, string $com = '', $phone = '', $yihaotongExpressAppid = '') + public function query(string $num, string $com = '', $phone = '') { $param = [ 'com' => $com, @@ -258,20 +257,18 @@ class Express extends BaseExpress if ($com === null) { unset($param['com']); } - $header = $yihaotongExpressAppid != '' ? ['AppId:' . $yihaotongExpressAppid] : []; - return $this->accessToken->httpRequest(self::EXPRESS_QUERY, $param, 'post', true, $header); + return $this->accessToken->httpRequest(self::EXPRESS_QUERY, $param, 'post'); } /** * 电子面单打印 * @param array $data 必需参数: com(快递公司编码)、to_name(寄件人)、to_tel(寄件人电话)、to_addr(寄件人详细地址)、from_name(收件人)、from_tel(收件人电话)、from_addr(收件人地址)、temp_id(电子面单模板ID)、siid(云打印机编号)、count(商品数量) - * @param string $yihaotongFaceAppid * @return bool|mixed * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException */ - public function dump($data, $yihaotongFaceAppid = '') + public function dump($data) { $param = $data; $param['com'] = $data['com'] ?? ''; @@ -315,7 +312,6 @@ class Express extends BaseExpress if (!sys_config('config_export_siid')) { $header = ['version:v1.1']; } - $header = array_merge($header, $yihaotongFaceAppid != '' ? ['AppId:' . $yihaotongFaceAppid] : []); return $this->accessToken->httpRequest(self::EXPRESS_DUMP, $param, 'POST', true, $header); } diff --git a/crmeb/crmeb/services/sms/storage/Yihaotong.php b/crmeb/crmeb/services/sms/storage/Yihaotong.php index 5df856ef6..3eeb5d6bf 100644 --- a/crmeb/crmeb/services/sms/storage/Yihaotong.php +++ b/crmeb/crmeb/services/sms/storage/Yihaotong.php @@ -199,10 +199,9 @@ class Yihaotong extends BaseSms * @param string $phone * @param string $templateId * @param array $data - * @param string $yihaotongSmsAppid * @return bool|string */ - public function send(string $phone, string $templateId, array $data = [], string $yihaotongSmsAppid = '') + public function send(string $phone, string $templateId, array $data = []) { if (!$phone) { throw new AdminException(400719); @@ -216,8 +215,7 @@ class Yihaotong extends BaseSms throw new AdminException(400720); } $param['param'] = json_encode($data); - $header = $yihaotongSmsAppid != '' ? ['AppId:' . $yihaotongSmsAppid] : []; - return $this->accessToken->httpRequest(self::SMS_SEND, $param, 'post', true, $header); + return $this->accessToken->httpRequest(self::SMS_SEND, $param, 'post'); } /**