删除掉应用id

This commit is contained in:
liaofei 2023-06-20 18:31:23 +08:00
parent 6ef5e6baa7
commit 00d57b0465
9 changed files with 18 additions and 23 deletions

View File

@ -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'];
/**
* 获取请求的数据

View File

@ -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());
}

View File

@ -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([

View File

@ -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);
}

View File

@ -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 {

View File

@ -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
{

View File

@ -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');
}

View File

@ -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);
}

View File

@ -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');
}
/**