作者 竞泽

docs

@@ -21,36 +21,37 @@ http://47.107.73.162:8099/lackoxygen/top-warehouse.git @@ -21,36 +21,37 @@ http://47.107.73.162:8099/lackoxygen/top-warehouse.git
21 21
22 ### 配置文件 22 ### 配置文件
23 ``` 23 ```
24 -发布暂时无法生成,手动copy到config 24 +php artisan vendor:publish --tag=lackoxygen-top-warehouse
25 ``` 25 ```
26 26
27 ### 用法 27 ### 用法
28 ``` 28 ```
  29 +try {
29 /** 30 /**
30 * 订单推送 31 * 订单推送
31 */ 32 */
32 - $response = TopWarehouseFacade::ordersB2cAdd(function (OrdersB2cAddRequest $request){ 33 + $response = TopWarehouseFacade::ordersB2cAdd(static function (OrdersB2cAddRequest $request){
33 $request->warehouse_id = 1; 34 $request->warehouse_id = 1;
34 }); 35 });
35 36
36 /** 37 /**
37 * 状态回退 38 * 状态回退
38 */ 39 */
39 - $response = TopWarehouseFacade::orderEntryStatus(function (OrderEntryStatusRequest $request){ 40 + $response = TopWarehouseFacade::orderEntryStatus(static function (OrderEntryStatusRequest $request){
40 41
41 }); 42 });
42 43
43 /** 44 /**
44 * 货运装载 45 * 货运装载
45 */ 46 */
46 - $response = TopWarehouseFacade::loadDelivery(function (OrderLoadingDeliveryRequest $request){ 47 + $response = TopWarehouseFacade::loadDelivery(static function (OrderLoadingDeliveryRequest $request){
47 48
48 }); 49 });
49 50
50 /** 51 /**
51 * 查询库存 52 * 查询库存
52 */ 53 */
53 - $response = TopWarehouseFacade::getStockInventory(function (GetStockInventoryRequest $request){ 54 + $response = TopWarehouseFacade::getStockInventory(static function (GetStockInventoryRequest $request){
54 55
55 }); 56 });
56 57
@@ -66,10 +67,7 @@ http://47.107.73.162:8099/lackoxygen/top-warehouse.git @@ -66,10 +67,7 @@ http://47.107.73.162:8099/lackoxygen/top-warehouse.git
66 67
67 } 68 }
68 69
69 - /**  
70 - * 异常  
71 - */  
72 - \Lackoxygen\TopWarehouse\Exception\Exception\Exception::class; 70 +
73 71
74 /** 72 /**
75 * 获取返回内容 string 73 * 获取返回内容 string
@@ -80,6 +78,9 @@ http://47.107.73.162:8099/lackoxygen/top-warehouse.git @@ -80,6 +78,9 @@ http://47.107.73.162:8099/lackoxygen/top-warehouse.git
80 * 获取返回内容 array 78 * 获取返回内容 array
81 */ 79 */
82 $response->toArray(); 80 $response->toArray();
  81 +}catch (Lackoxygen\TopWarehouse\Exception\Exception\Exception $exception){
  82 +
  83 +}
83 ``` 84 ```
84 85
85 86