liaofei 2 лет назад
Родитель
Сommit
e62cee0192

+ 13 - 0
crmeb/crmeb/services/AccessTokenServeService.php

@@ -51,6 +51,16 @@ class AccessTokenServeService extends HttpService
      */
     protected $apiHost = 'http://sms.crmeb.net/api/';
 
+    /**
+     * @var string
+     */
+    protected $sandBoxApi = 'https://api_v2.crmeb.net/';
+
+    /**
+     * @var bool
+     */
+    protected $sandBox = true;
+
     /**
      * 登录接口
      */
@@ -166,6 +176,9 @@ class AccessTokenServeService extends HttpService
      */
     public function get(string $apiUrl = '')
     {
+        if ($this->sandBox) {
+            return $this->sandBoxApi . $apiUrl;
+        }
         return $this->apiHost . $apiUrl;
     }
 }

+ 3 - 0
crmeb/crmeb/services/express/storage/Express.php

@@ -165,6 +165,9 @@ class Express extends BaseExpress
         if ($expressData['check_man'] == 1) $param['checkMan'] = $expressData['courier_name'];
         if ($expressData['partner_name'] == 1) $param['partnerName'] = $expressData['customer_name'];
         if ($expressData['is_code'] == 1) $param['code'] = $expressData['code_name'];
+        if (!$data['siid']) {
+            $param['print_type'] = 'IMAGE';
+        }
         return $this->accessToken->httpRequest(self::EXPRESS_DUMP, $param, 'POST');
     }