|
@@ -14,15 +14,35 @@ class deliveryControl extends mobileHomeControl
|
|
|
parent::__construct();
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc:物流信息查询
|
|
|
+ * @author:jiafang.wang
|
|
|
+ * @since: 2016.2.22
|
|
|
+ */
|
|
|
public function queryOp()
|
|
|
{
|
|
|
+ //获取物流单号
|
|
|
+ //$order_sn = $_GET['order_sn'];
|
|
|
+ //$condition = ['order_sn' => $order_sn];
|
|
|
+ //$postid = model()->table('goods')->where($condition)->field('shipping_code')->find();
|
|
|
+ $postid = '227270508536';
|
|
|
|
|
|
- // 查询本地是否有
|
|
|
- //取参数
|
|
|
- //请求快递100
|
|
|
- //取得json
|
|
|
- //存数据库
|
|
|
+ //获取物流公司
|
|
|
+ $com = 'shentong';
|
|
|
+ //key
|
|
|
+ $key = '5b634ac27f4c1a82';
|
|
|
+ //组装URL查询
|
|
|
+ $url = "http://api.kuaidi100.com/api?id={$key}&com={$com}&nu={$postid}&show=0&muti=1&order=desc";
|
|
|
+ $params = array();
|
|
|
+ $response = http_request($url, $params, 'GET');
|
|
|
+ $data = json_decode($response);
|
|
|
|
|
|
+ Tpl::output('info', $data);
|
|
|
Tpl::showpage('express_info');
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|