WIN-2308041133\Administrator 6 hónapja
szülő
commit
0239c2bd92

+ 10 - 0
application/admin/model/WechatPlan.php

@@ -38,4 +38,14 @@ class WechatPlan extends Model
         $count = $model->where($xwhere)->count();
         return compact('count', 'data');
     }
+    public static function read($where)
+    {
+        $model = new self;
+        $xwhere = null;
+        $order = "id desc";
+        if (isset($where['id']) && $where['id'] > 0) $xwhere['id'] = $where['id'];
+        $data = $model->where($xwhere)->order($order)->page($where['page'], $where['limit'])->select();
+//        $count = $model->where($xwhere)->count();
+        return $data;
+    }
 }

+ 10 - 0
application/api/controller/Lave.php

@@ -399,6 +399,16 @@ class Lave extends Api
         );
         $this->success('获取成功', WechatPlan::lst($where));
     }
+    public function plan_read(Request $request)
+    {
+        $where = UtilService::getMore(
+            [
+                ['id', 0],
+                ['cid', $this->cid],
+            ], $request
+        );
+        $this->success('获取成功', WechatPlan::read($where));
+    }
 }
 
 ?>

+ 1 - 0
application/route.php

@@ -90,6 +90,7 @@ Route::group('api', function () {
         Route::get('query_sign', 'api/lave/querySign');  //查询签约
         Route::get('cs_query_sign', 'api/lave/csquerySign');  //测试查询签约
         Route::get('plan_lst', 'api/lave/plan_lst');  //模版列表
+        Route::get('plan_info', 'api/lave/plan_read');  //模版列表
     });
     //帮扶
     Route::group('help', function () {