lvhao 2 дней назад
Родитель
Сommit
5c398c60e3
2 измененных файлов с 20 добавлено и 2 удалено
  1. 7 2
      core/CoreApp/controllers/Aatest.php
  2. 13 0
      core/CoreApp/models/Model_apitt.php

+ 7 - 2
core/CoreApp/controllers/Aatest.php

@@ -92,12 +92,17 @@ class Aatest extends Start_Controller {
     //定义方法的调用规则 获取URI第二段值
     public function _remap($arg,$arg_array)
     {  
+		$shop = $this->shop->read(35);
+		$order_id = "577182146069041251";
 		// $info = $this->logic_order->getInfo("orderinfo = '577179541684588966'");
 		// $r = $this->express_tt->get_data($info,'CBT');
 		// echo "<pre>";
 		// print_r($r);
-		$r = $this->check->checkOverdue("Miran Emmanuel","KISS-PF1-251105-003","");
-		var_dump($r);
+		// $r = $this->check->checkOverdue("Miran Emmanuel","KISS-PF1-251105-003","");
+		// var_dump($r);
+		$r = $this->apiyy->get_detail($order_id,$shop);
+		echo "<pre>";
+		print_r($r);
 		die;
 
         // $res = "";

+ 13 - 0
core/CoreApp/models/Model_apitt.php

@@ -510,6 +510,19 @@ function __construct(){
 		$res = json_decode($res,true);
 		return $res;
 	}
+
+	public function get_detail($order_id,$shop){
+		$url = 'https://open-api.tiktokglobalshop.com';
+		$link = '/order/202309/orders';
+		$time = time();
+		$link .= '?shop_cipher='.$shop['shop_cipher'].'&app_key='.$shop['app_key'].'&timestamp='.$time.'&ids='.$order_id;
+		$sign = $this->sign($link,$shop['app_secret'],'');
+		$url .= $link.'&sign='.$sign;
+		$headers = array('Content-Type: application/json','x-tts-access-token:'.$shop['token']);
+		$res = $this->su_curl('',$url,$headers,$date_type='json',$timeout=300,$httptype="GET");
+		$res = json_decode($res,true);
+		return $res;
+	}
 	//下载快递面单
 	public function downloadLabel($package_id,$shop,$info){
 		$url = 'https://open-api.tiktokglobalshop.com';