shizhongqi il y a 7 mois
Parent
commit
c8175edaf2

+ 4 - 0
app-mall/controllers/OrderController.php

@@ -531,6 +531,10 @@ class OrderController extends BaseController
             $mapSet = ShopClass::hasIntraCity($shop);
             $openIntraCity = $mapSet['openIntraCity'] ?? 0;
 
+            if($openIntraCity == 2){
+                util::fail('不能使用跑腿');
+            }
+
             if ($sendType == dict::getDict('sendType', 'thirdSend') && $openIntraCity == 1) {
                 // if (dict::getDict('hasMap') == 0) {
                 //     util::fail('不能使用跑腿,请选其它方式');

+ 1 - 18
common/components/delivery/platform/fengniao/Auth.php

@@ -3,8 +3,6 @@ namespace common\components\delivery\platform\fengniao;
 
 use common\components\delivery\helpers\HttpClient;
 use Yii;
-use yii\helpers\Json;
-use linslin\yii2\curl;
 
 class Auth
 {
@@ -51,7 +49,6 @@ class Auth
      */
     public function generateAuthUrl($redirectUri)
     {
-        //$redirectUri = urlencode($redirectUri);
         $params = [
             'appId' => $this->appId,
             'devId' => 133146508, // 蜂鸟开放平台 【开发者中心】->【应用管理】->【发起商户授权】获得的
@@ -83,11 +80,6 @@ class Auth
      */
     protected function generateSignature(array $params)
     {
-        // Step 1: 过滤空值  --  不能清除,不然 code 就被排除了
-//        $params = array_filter($params, function ($v) {
-//            return $v !== null && $v !== '';
-//        });
-
         // Step 2: 按字典序排序
         ksort($params);
 
@@ -95,9 +87,6 @@ class Auth
         $paramStr = '';
         $first = true;
         foreach ($params as $key => $value) {
-//            if ($value == "") {
-//                $value = "''";
-//            }
             if ($first) {
                 $paramStr = "{$key}={$value}";
                 $first = false;
@@ -108,7 +97,6 @@ class Auth
 
         // Step 4: 拼接 appSecret
         $signBefore = $this->appSecret . $paramStr;
-        //$signBefore = '1111app_id=222&code=4444&grant_type=authorization_code&merchant_id=333&timestamp=1719297100558';
         // Step 5: 使用SHA-256加密
         $signature = hash('sha256', $signBefore);
 
@@ -176,7 +164,7 @@ class Auth
             //$params['code'] = "";
         }
 
-            // 生成签名
+        // 生成签名
         $signature = $this->generateSignature($params);
         $params['signature'] = $signature;
 
@@ -185,11 +173,6 @@ class Auth
         $response = HttpClient::post($url, $params, [
             'Content-Type' => 'application/json',
         ]);
-
-//        $curl = new curl\Curl();
-//        $response = $curl->setOption(CURLOPT_POSTFIELDS, Json::encode($params))->post($url);
-//        $response = Json::decode($response);
-
         Yii::info("[FengniaAuth] GetAccessToken Response: " . json_encode($response));
 
         return $this->parseResponse($response);

+ 0 - 1
common/components/delivery/platform/fengniao/Fengniao.php

@@ -1,7 +1,6 @@
 <?php
 namespace common\components\delivery\platform\fengniao;
 
-
 use common\components\delivery\helpers\SignHelper;
 use Yii;
 

+ 0 - 1
common/components/delivery/platform/fengniao/Shop.php

@@ -48,7 +48,6 @@ class Shop extends Fengniao
                 'data' => null
             ];
         }
-        //$this->setMerchantId($merchantId);
 
         // 构建业务数据
         $businessData = [];

+ 2 - 4
common/components/delivery/platform/huolala/Auth.php

@@ -87,11 +87,11 @@ class Auth
         $isProduction = getenv('YII_ENV') == 'production'; // TODO 先变更为测试  --- production  /  dev
 
         if($isProduction){
-            // 货拉拉配置(需要替换为真实的appKey和appSecret)
+            // 货拉拉配置
             $this->appKey = 'gBhmCdWtX7hi7qnljduk0yK21XgQg8w3';
             $this->appSecret = 'bARxI68FFHpEXAcCQ23fxVQyxtJ9RONU';
         }else{
-            // 货拉拉配置(需要替换为真实的appKey和appSecret)
+            // 货拉拉配置
             $this->appKey = '8S2uZQrWwM1mkG2Cj576PsMiNIe25UNT';
             $this->appSecret = 'olzor07UgmUWaagahNGQAKQKXRtvhK8j';
         }
@@ -156,9 +156,7 @@ class Auth
         ];
 
         $response = HttpClient::get(self::TOKEN_URL, $params);
-
         Yii::info("[HuoLalaAuthGetToken] Response: " . json_encode($response));
-
         return $this->parseResponse($response);
     }
 

+ 0 - 1
common/components/delivery/util/DeliveryQuoteUtil.php

@@ -6,7 +6,6 @@ use biz\shop\classes\ShopClass;
 use biz\shop\classes\ShopExtClass;
 use common\components\delivery\services\DispatchService;
 use common\components\noticeUtil;
-use common\components\util;
 use Yii;
 
 /**