|
@@ -0,0 +1,47 @@
|
|
|
+<?php
|
|
|
+/*
|
|
|
+|--------------------------------------------------------------------------
|
|
|
+| 发货 https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/order-shipping/order-shipping.html#%E4%B8%80%E3%80%81%E5%8F%91%E8%B4%A7%E4%BF%A1%E6%81%AF%E5%BD%95%E5%85%A5%E6%8E%A5%E5%8F%A3
|
|
|
+|--------------------------------------------------------------------------
|
|
|
+*/
|
|
|
+namespace Wechat_applet\Src;
|
|
|
+
|
|
|
+use Dever;
|
|
|
+use Token\Lib\Wechat;
|
|
|
+use Token\Lib\Core;
|
|
|
+
|
|
|
+class Ship
|
|
|
+{
|
|
|
+ # 获取物流
|
|
|
+ public function delivery($method, $project_id = 1)
|
|
|
+ {
|
|
|
+ return Core::run($project_id, 'delivery', '', 'ship.deliveryAction', 'wechat_applet', $method, true);
|
|
|
+ }
|
|
|
+
|
|
|
+ public function deliveryAction($project_id, $data, $method = false)
|
|
|
+ {
|
|
|
+ Dever::load($method, $data);
|
|
|
+ }
|
|
|
+
|
|
|
+ # 发货信息录入
|
|
|
+ public function add($callback, $project_id = 1)
|
|
|
+ {
|
|
|
+ return Core::run($project_id, 'ship', 'ship.addParam', '', 'wechat_applet', $callback, true);
|
|
|
+ }
|
|
|
+
|
|
|
+ public function addParam($callback)
|
|
|
+ {
|
|
|
+ return $callback();
|
|
|
+ }
|
|
|
+
|
|
|
+ # 发货信息确认
|
|
|
+ public function act($callback, $project_id = 1)
|
|
|
+ {
|
|
|
+ return Core::run($project_id, 'ship_confirm', 'ship.actParam', '', 'wechat_applet', $callback, true);
|
|
|
+ }
|
|
|
+
|
|
|
+ public function actParam($callback)
|
|
|
+ {
|
|
|
+ return $callback();
|
|
|
+ }
|
|
|
+}
|