wupengfei 2 rokov pred
rodič
commit
b9ffc90afd
2 zmenil súbory, kde vykonal 49 pridanie a 5 odobranie
  1. 5 5
      .idea/workspace.xml
  2. 44 0
      application/api/controller/Qc.php

+ 5 - 5
.idea/workspace.xml

@@ -3,7 +3,7 @@
   <component name="ChangeListManager">
     <list default="true" id="1a36929e-c054-4875-a943-593a74e55fa4" name="Default Changelist" comment="">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/api/controller/Forum.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Forum.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/api/controller/Qc.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Qc.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -121,7 +121,7 @@
   <component name="PropertiesComponent">
     <property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
     <property name="WebServerToolWindowFactoryState" value="false" />
-    <property name="last_opened_file_path" value="$PROJECT_DIR$/public/wx_cert" />
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/../dineng" />
     <property name="node.js.detected.package.eslint" value="true" />
     <property name="node.js.detected.package.tslint" value="true" />
     <property name="node.js.path.for.package.eslint" value="project" />
@@ -215,7 +215,7 @@
       <workItem from="1673052319155" duration="16867000" />
       <workItem from="1673226266250" duration="24113000" />
       <workItem from="1673312216057" duration="9503000" />
-      <workItem from="1673399011843" duration="12679000" />
+      <workItem from="1673399011843" duration="15185000" />
     </task>
     <servers />
   </component>
@@ -345,10 +345,10 @@
       <screen x="0" y="0" width="2560" height="1400" />
     </state>
     <state x="283" y="145" width="1942" height="1088" key="DiffContextDialog/0.0.2560.1400@0.0.2560.1400" timestamp="1672820850032" />
-    <state x="1418" y="514" key="FileChooserDialogImpl" timestamp="1673071857948">
+    <state x="1418" y="514" key="FileChooserDialogImpl" timestamp="1673420027516">
       <screen x="0" y="0" width="2560" height="1400" />
     </state>
-    <state x="1418" y="514" key="FileChooserDialogImpl/0.0.2560.1400@0.0.2560.1400" timestamp="1673071857948" />
+    <state x="1418" y="514" key="FileChooserDialogImpl/0.0.2560.1400@0.0.2560.1400" timestamp="1673420027516" />
     <state x="1051" y="472" key="MultipleFileMergeDialog" timestamp="1671416392056">
       <screen x="0" y="0" width="2560" height="1400" />
     </state>

+ 44 - 0
application/api/controller/Qc.php

@@ -14,8 +14,52 @@ use Easemob\User;
 
 class Qc extends Base {
 
+
+    function express_search(){
+        $uid = $this->uid;
+        $type = input('type',1);
+        $id = input('id');
+        if(empty($id)) $this->error('参数错误');
+
+        $order_info = Db::name($type == 1 ? 'exchange_order' : 'magic_order')->field('express_send_no')->where('id',$id)->where('uid',$uid)->find();
+
+        if(empty($order_info['express_send_no'])){
+            $this->error('订单信息有误');
+        }
+        $host = "https://wuliu.market.alicloudapi.com";//api访问链接
+        $path = "/kdi";//API访问后缀
+        $method = "GET";
+        $appcode = "43e8ad1f62ed42d8ac3c724d58e0e794";//开通服务后 买家中心-查看AppCode
+        $headers = array();
+        array_push($headers, "Authorization:APPCODE " . $appcode);
+        $querys = "no=".$order_info['express_send_no'];  //参数写在这里
+        $bodys = "";
+        $url = $host . $path . "?" . $querys;
+        $curl = curl_init();
+        curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
+        curl_setopt($curl, CURLOPT_URL, $url);
+        curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
+        curl_setopt($curl, CURLOPT_FAILONERROR, false);
+        curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
+        curl_setopt($curl, CURLOPT_HEADER, false);
+        if (1 == strpos("$" . $host, "https://")) {
+            curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
+            curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
+        }
+        $out_put = curl_exec($curl);
+        if($out_put){
+            $res = json_decode($out_put,true);
+            $this->success('获取成功',$res['result']);
+        }else{
+            $this->success('暂无快递信息');
+        }
+    }
+
     public function index()
     {
+        $type = 1;
+        $order_info = Db::name($type == 1 ? 'valid_date' : 'store_member')->field('express_send_no')->where('id',65)->find();
+        var_dump($order_info);
         die();
         $user_info = [];
         if($user_info['pid'] > 0) {