wesmiler 1 month ago
parent
commit
2e12e3c7d5

+ 8 - 0
app/Http/Controllers/Admin/NoticeController.php

@@ -34,6 +34,14 @@ class NoticeController extends Backend
         $this->service = new NoticeService();
     }
 
+    public function index()
+    {
+        $params = request()->all();
+        $result = $this->service->getDataList($params);
+        return message(1010, true, $result['list'] ?? [], $result['total'] ?? 0);
+
+    }
+
     /**
      * 设置置顶
      * @return mixed

+ 4 - 0
app/Services/Api/GoodsService.php

@@ -224,6 +224,10 @@ class GoodsService extends BaseService
      */
     public function getOrderGoods($ids, $goods, $userId, $orderNo='', $discountPoint=0)
     {
+        if(empty($ids) || empty($goods)){
+            $this->error = '请选择商品';
+            return false;
+        }
         // 用户信息
         if(empty($orderNo)){
             $userInfo = MemberModel::where(['id' => $userId, 'mark' => 1])

+ 2 - 3
app/Services/Common/NoticeService.php

@@ -54,7 +54,7 @@ class NoticeService extends BaseService
      * @param int $pageSize
      * @return array
      */
-    public function getDataList($params, $pageSize = 15)
+    public function getDataList($params, $pageSize = 10)
     {
         $where = ['a.mark' => 1,'status'=>1];
         $status = isset($params['status'])? $params['status'] : 0;
@@ -173,8 +173,7 @@ class NoticeService extends BaseService
         $data = [
             'title'=> $title,
             'content'=> $content?$content:$title,
-            'type'=> 2,
-            'is_top'=> 1,
+            'type'=> 1,
             'create_time'=>time(),
             'update_time'=>time(),
             'status'=>1,

File diff suppressed because it is too large
+ 1 - 1
public/jkadm/static/js/36.js


File diff suppressed because it is too large
+ 1 - 1
public/jkadm/static/js/38.js