Переглянути джерело

订单中心-添加获取广告位尺寸的接口

15313670163 2 місяців тому
батько
коміт
6a973d3fce
2 змінених файлів з 18 додано та 1 видалено
  1. 13 0
      app/JsonRpc/OrderService.php
  2. 5 1
      app/JsonRpc/OrderServiceInterface.php

+ 13 - 0
app/JsonRpc/OrderService.php

@@ -955,4 +955,17 @@ class OrderService implements OrderServiceInterface
             return Result::success($result);
         }
     }
+    /**
+     * 获取广告位的尺寸
+     *
+     * 
+     */
+    public function getAdSize(): array
+    {
+        $result = AdSize::get()->all();
+        if (empty($result)) {
+            return Result::error("暂无数据"); 
+        }
+        return Result::success($result);  
+    }
 }

+ 5 - 1
app/JsonRpc/OrderServiceInterface.php

@@ -106,5 +106,9 @@ interface OrderServiceInterface
      *  @return array
      */
     public function delShoppingCartAD(array $data): array;
-
+    /**
+     * 
+     *  @return array
+     */
+    public function getAdSize(): array;
 }