diff --git a/app/api/controller/BackgroundController.php b/app/api/controller/BackgroundController.php new file mode 100644 index 0000000..d10ad64 --- /dev/null +++ b/app/api/controller/BackgroundController.php @@ -0,0 +1,25 @@ + 1])->field('url')->find(); + + return $this->json([ + 'code' => ResponseCode::SUCCESS, + 'data' => $background, + 'msg' => 'success' + ]); + } + +} \ No newline at end of file diff --git a/app/api/controller/SlideshowController.php b/app/api/controller/SlideshowController.php new file mode 100644 index 0000000..d979df2 --- /dev/null +++ b/app/api/controller/SlideshowController.php @@ -0,0 +1,20 @@ +getSlideshow(); + return $this->json($result); + } + +} \ No newline at end of file diff --git a/app/common/model/Background.php b/app/common/model/Background.php new file mode 100644 index 0000000..b92e6ef --- /dev/null +++ b/app/common/model/Background.php @@ -0,0 +1,19 @@ +field('img')->select(); + + return [ + 'code' => ResponseCode::SUCCESS, + 'data' => $list, + 'msg' => 'success' + ]; + } + +} \ No newline at end of file diff --git a/plugin/admin/app/controller/BackgroundController.php b/plugin/admin/app/controller/BackgroundController.php new file mode 100644 index 0000000..47a18c8 --- /dev/null +++ b/plugin/admin/app/controller/BackgroundController.php @@ -0,0 +1,68 @@ +model = new Background; + } + + /** + * 浏览 + * @return Response + */ + public function index(): Response + { + return view('background/index'); + } + + /** + * 插入 + * @param Request $request + * @return Response + * @throws BusinessException + */ + public function insert(Request $request): Response + { + if ($request->method() === 'POST') { + return parent::insert($request); + } + return view('background/insert'); + } + + /** + * 更新 + * @param Request $request + * @return Response + * @throws BusinessException + */ + public function update(Request $request): Response + { + if ($request->method() === 'POST') { + return parent::update($request); + } + return view('background/update'); + } + +} diff --git a/plugin/admin/app/controller/SlideshowController.php b/plugin/admin/app/controller/SlideshowController.php new file mode 100644 index 0000000..c453c21 --- /dev/null +++ b/plugin/admin/app/controller/SlideshowController.php @@ -0,0 +1,68 @@ +model = new Slideshow; + } + + /** + * 浏览 + * @return Response + */ + public function index(): Response + { + return view('slideshow/index'); + } + + /** + * 插入 + * @param Request $request + * @return Response + * @throws BusinessException + */ + public function insert(Request $request): Response + { + if ($request->method() === 'POST') { + return parent::insert($request); + } + return view('slideshow/insert'); + } + + /** + * 更新 + * @param Request $request + * @return Response + * @throws BusinessException + */ + public function update(Request $request): Response + { + if ($request->method() === 'POST') { + return parent::update($request); + } + return view('slideshow/update'); + } + +} diff --git a/plugin/admin/app/model/Background.php b/plugin/admin/app/model/Background.php new file mode 100644 index 0000000..0ee230b --- /dev/null +++ b/plugin/admin/app/model/Background.php @@ -0,0 +1,32 @@ + + + + + 浏览页面 + + + + + + + + + +
+
+
+
+
+ + + + + + + + + + + + + + + diff --git a/plugin/admin/app/view/background/insert.html b/plugin/admin/app/view/background/insert.html new file mode 100644 index 0000000..84abafa --- /dev/null +++ b/plugin/admin/app/view/background/insert.html @@ -0,0 +1,121 @@ + + + + + 新增页面 + + + + + + +
+ +
+
+ +
+ +
+ + + + +
+
+ +
+
+ +
+
+ + +
+
+ +
+ + + + + + + + + + diff --git a/plugin/admin/app/view/background/update.html b/plugin/admin/app/view/background/update.html new file mode 100644 index 0000000..274e7f6 --- /dev/null +++ b/plugin/admin/app/view/background/update.html @@ -0,0 +1,159 @@ + + + + + 更新页面 + + + + + + + +
+ +
+
+ +
+ +
+ + + + +
+
+ +
+
+ +
+
+ + +
+
+ +
+ + + + + + + + + + + diff --git a/plugin/admin/app/view/slideshow/index.html b/plugin/admin/app/view/slideshow/index.html new file mode 100644 index 0000000..d97b4c8 --- /dev/null +++ b/plugin/admin/app/view/slideshow/index.html @@ -0,0 +1,265 @@ + + + + + + 浏览页面 + + + + + + + + + +
+
+
+
+
+ + + + + + + + + + + + + + + diff --git a/plugin/admin/app/view/slideshow/insert.html b/plugin/admin/app/view/slideshow/insert.html new file mode 100644 index 0000000..483dce6 --- /dev/null +++ b/plugin/admin/app/view/slideshow/insert.html @@ -0,0 +1,128 @@ + + + + + 新增页面 + + + + + + +
+ +
+
+ +
+ +
+ + + + +
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+ + +
+
+ +
+ + + + + + + + + + diff --git a/plugin/admin/app/view/slideshow/update.html b/plugin/admin/app/view/slideshow/update.html new file mode 100644 index 0000000..5200cbe --- /dev/null +++ b/plugin/admin/app/view/slideshow/update.html @@ -0,0 +1,166 @@ + + + + + 更新页面 + + + + + + + +
+ +
+
+ +
+ +
+ + + + +
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+ + +
+
+ +
+ + + + + + + + + + +