|
@@ -0,0 +1,28 @@
|
|
|
|
+<?php
|
|
|
|
+
|
|
|
|
+namespace app\api\controller;
|
|
|
|
+
|
|
|
|
+use app\common\controller\Api;
|
|
|
|
+use think\Db;
|
|
|
|
+/**
|
|
|
|
+ * 市民学院
|
|
|
|
+ */
|
|
|
|
+class Shiminxueyuan extends Api
|
|
|
|
+{
|
|
|
|
+ protected $noNeedLogin = ['*'];
|
|
|
|
+ protected $noNeedRight = ['*'];
|
|
|
|
+
|
|
|
|
+ public function lists(){
|
|
|
|
+ $list = Db::name('shiminxueyuan')->field('id,title,image,video_file,updatetime')->where('status',1)->order('weigh','desc')->select();
|
|
|
|
+ $list = list_domain_image($list,['image','video_file']);
|
|
|
|
+ $this->success(1,$list);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public function detail(){
|
|
|
|
+ $id = input('id');
|
|
|
|
+ $info = Db::name('shiminxueyuan')->where('id',$id)->find();
|
|
|
|
+ $info = info_domain_image($info,['image','video_file']);
|
|
|
|
+
|
|
|
|
+ $this->success(1,$info);
|
|
|
|
+ }
|
|
|
|
+}
|