shish 2 yıl önce
ebeveyn
işleme
05ce9d4093
1 değiştirilmiş dosya ile 9 ekleme ve 1 silme
  1. 9 1
      app-pt/controllers/PtCpController.php

+ 9 - 1
app-pt/controllers/PtCpController.php

@@ -18,7 +18,15 @@ class PtCpController extends BaseController
         $classId = $post['classId'] ?? 0;
         $str = $post['ids'] ?? '';
         $ids = json_decode($str, true);
-        print_r($ids);
+        if (empty($ids)) {
+            util::fail('没有产品');
+        }
+        $class = PtCpClassClass::getById($classId, true);
+        if (empty($class)) {
+            util::fail('没有找到分类');
+        }
+        $cpList = PtCpClass::getAllByCondition(['id' => ['in', $ids]], null, "*");
+        print_r($cpList);die;
         util::complete('修改成功');
     }