From 4907354aae04c08a742df6cc5039364ef80c1121 Mon Sep 17 00:00:00 2001 From: Dai Date: Mon, 15 Jul 2024 00:09:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=99=E5=B8=88=E6=8E=92=E8=AF=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/TeacherController.php | 1 + ....php => TeacherScheduleTimeController.php} | 8 +- app/common/model/BiddingOrder.php | 25 -- app/common/model/CaseShare.php | 29 -- app/common/model/ChatFriend.php | 33 -- app/common/model/ChatRecords.php | 14 - app/common/model/DepositOrder.php | 31 -- app/common/model/Device.php | 11 - app/common/model/Favorite.php | 24 -- app/common/model/PaidService.php | 21 - app/common/model/PhotoService.php | 24 -- app/common/model/PhotoServiceOrder.php | 39 -- app/common/model/Photographer.php | 28 -- app/common/model/Ratio.php | 20 - app/common/model/Requirement.php | 21 - app/common/model/RequirementOrder.php | 31 -- app/common/model/ServiceType.php | 11 - app/common/model/Slideshow.php | 20 - .../{ServiceStandard.php => Subject.php} | 9 +- ...erFreeTime.php => TeacherScheduleTime.php} | 12 +- ...ice.php => TeacherScheduleTimeService.php} | 9 +- .../TeacherScheduleTimeController.php | 150 +++++++ .../TeacherScheduleTimeController232.php | 68 +++ ...p => TeacherScheduleTimebakController.php} | 16 +- plugin/admin/app/model/TeacherSchedule.php | 39 ++ .../admin/app/model/TeacherScheduleTime.php | 38 ++ .../index.html | 112 ++++- .../insert.html | 0 .../schedule_time_setting.html | 197 +++++++++ .../view/teacher-schedule-time/update.html | 294 +++++++++++++ .../view/teacher-schedule-time12/index.html | 398 ++++++++++++++++++ .../insert.html} | 102 ++--- .../schedule_time_setting.html | 190 +++++++++ .../update.bak.html | 0 .../update.html | 23 +- plugin/admin/config/view.php | 7 +- 36 files changed, 1563 insertions(+), 492 deletions(-) rename app/api/controller/{TeacherFreeTimeController.php => TeacherScheduleTimeController.php} (57%) delete mode 100644 app/common/model/BiddingOrder.php delete mode 100644 app/common/model/CaseShare.php delete mode 100644 app/common/model/ChatFriend.php delete mode 100644 app/common/model/ChatRecords.php delete mode 100644 app/common/model/DepositOrder.php delete mode 100644 app/common/model/Device.php delete mode 100644 app/common/model/Favorite.php delete mode 100644 app/common/model/PaidService.php delete mode 100644 app/common/model/PhotoService.php delete mode 100644 app/common/model/PhotoServiceOrder.php delete mode 100644 app/common/model/Photographer.php delete mode 100644 app/common/model/Ratio.php delete mode 100644 app/common/model/Requirement.php delete mode 100644 app/common/model/RequirementOrder.php delete mode 100644 app/common/model/ServiceType.php delete mode 100644 app/common/model/Slideshow.php rename app/common/model/{ServiceStandard.php => Subject.php} (58%) rename app/common/model/{TeacherFreeTime.php => TeacherScheduleTime.php} (58%) rename app/common/service/{TeacherFreeTimeService.php => TeacherScheduleTimeService.php} (91%) create mode 100644 plugin/admin/app/controller/TeacherScheduleTimeController.php create mode 100644 plugin/admin/app/controller/TeacherScheduleTimeController232.php rename plugin/admin/app/controller/{TeacherFreeTimeController.php => TeacherScheduleTimebakController.php} (78%) create mode 100644 plugin/admin/app/model/TeacherSchedule.php create mode 100644 plugin/admin/app/model/TeacherScheduleTime.php rename plugin/admin/app/view/{teacher-free-time => teacher-schedule-time}/index.html (71%) rename plugin/admin/app/view/{teacher-free-time => teacher-schedule-time}/insert.html (100%) create mode 100644 plugin/admin/app/view/teacher-schedule-time/schedule_time_setting.html create mode 100644 plugin/admin/app/view/teacher-schedule-time/update.html create mode 100644 plugin/admin/app/view/teacher-schedule-time12/index.html rename plugin/admin/app/view/{teacher-free-time/free_time_setting.html => teacher-schedule-time12/insert.html} (64%) create mode 100644 plugin/admin/app/view/teacher-schedule-time12/schedule_time_setting.html rename plugin/admin/app/view/{teacher-free-time => teacher-schedule-time12}/update.bak.html (100%) rename plugin/admin/app/view/{teacher-free-time => teacher-schedule-time12}/update.html (93%) diff --git a/app/api/controller/TeacherController.php b/app/api/controller/TeacherController.php index 4dda45a..264dcfe 100644 --- a/app/api/controller/TeacherController.php +++ b/app/api/controller/TeacherController.php @@ -31,4 +31,5 @@ class TeacherController extends BaseController return $this->json($res); } + } \ No newline at end of file diff --git a/app/api/controller/TeacherFreeTimeController.php b/app/api/controller/TeacherScheduleTimeController.php similarity index 57% rename from app/api/controller/TeacherFreeTimeController.php rename to app/api/controller/TeacherScheduleTimeController.php index da48bfd..797d688 100644 --- a/app/api/controller/TeacherFreeTimeController.php +++ b/app/api/controller/TeacherScheduleTimeController.php @@ -3,10 +3,10 @@ namespace app\api\controller; use app\BaseController; -use app\common\service\TeacherFreeTimeService; +use app\common\service\TeacherScheduleTimeService; use support\Request; -class TeacherFreeTimeController extends BaseController +class TeacherScheduleTimeController extends BaseController { /** @@ -14,9 +14,9 @@ class TeacherFreeTimeController extends BaseController * @param Request $request * @return \support\Response */ - public function addFreeTime(Request $request) + public function addScheduleTime(Request $request) { - $service = new TeacherFreeTimeService(); + $service = new TeacherScheduleTimeService(); $res = $service->addFreeTime($request); return $this->json($res); } diff --git a/app/common/model/BiddingOrder.php b/app/common/model/BiddingOrder.php deleted file mode 100644 index de9d27d..0000000 --- a/app/common/model/BiddingOrder.php +++ /dev/null @@ -1,25 +0,0 @@ -hasOne(Photographer::class, 'id', 'photographer_id'); - } - - public function requirement() - { - return $this->hasOne(Requirement::class, 'id', 'requirement_id'); - } - -} diff --git a/app/common/model/CaseShare.php b/app/common/model/CaseShare.php deleted file mode 100644 index 1eebdc1..0000000 --- a/app/common/model/CaseShare.php +++ /dev/null @@ -1,29 +0,0 @@ -hasOne(ServiceType::class, 'id', 'service_type'); - } - - public function photographer() - { - return $this->hasOne(Photographer::class, 'id', 'photographer_id'); - } - -} diff --git a/app/common/model/ChatFriend.php b/app/common/model/ChatFriend.php deleted file mode 100644 index a8b3336..0000000 --- a/app/common/model/ChatFriend.php +++ /dev/null @@ -1,33 +0,0 @@ -hasOne(User::class, 'id', 'friend_id')->bind(['nickname', 'avatar', 'is_photographer']); - } - - /** - * @desc 好友摄影师信息 - * @return \think\model\relation\HasOne - */ - public function photographer() - { - return $this->hasOne(Photographer::class, 'id', 'photographer_id')->bind([ -// 'photographer_id' => 'id', - 'photographer_name' => 'name', - 'photographer_avatar' => 'avatar', - ]); - } - -} diff --git a/app/common/model/ChatRecords.php b/app/common/model/ChatRecords.php deleted file mode 100644 index e75ffb5..0000000 --- a/app/common/model/ChatRecords.php +++ /dev/null @@ -1,14 +0,0 @@ -hasOne(Photographer::class, 'id', 'photographer_id'); - } -} diff --git a/app/common/model/PaidService.php b/app/common/model/PaidService.php deleted file mode 100644 index 4f1b19c..0000000 --- a/app/common/model/PaidService.php +++ /dev/null @@ -1,21 +0,0 @@ -hasOne(Photographer::class, 'id', 'photographer_id'); - } - - -} diff --git a/app/common/model/Photographer.php b/app/common/model/Photographer.php deleted file mode 100644 index fea9389..0000000 --- a/app/common/model/Photographer.php +++ /dev/null @@ -1,28 +0,0 @@ -hasOne(Studio::class, 'id', 'studio_id')->bind([ - 'studio_name', - 'studio_img' => 'img', - 'studio_introductions' => 'introductions', - ]); - } - - public function user() - { - return $this->hasOne(User::class, 'id', 'user_id')->bind(['nickname']); - } -} diff --git a/app/common/model/Ratio.php b/app/common/model/Ratio.php deleted file mode 100644 index 3bbcc9c..0000000 --- a/app/common/model/Ratio.php +++ /dev/null @@ -1,20 +0,0 @@ -hasOne(ServiceType::class, 'id', 'service_type')->bind(['service_name']); - } - - - public function bidWinPhotographer() - { - return $this->hasOne(Photographer::class, 'id', 'bid_win_photographer_id'); - } -} diff --git a/app/common/model/RequirementOrder.php b/app/common/model/RequirementOrder.php deleted file mode 100644 index e17cc2d..0000000 --- a/app/common/model/RequirementOrder.php +++ /dev/null @@ -1,31 +0,0 @@ -hasOne(Teacher::class, 'id', 'teacher_id'); + } + + public function subject() + { + return $this->hasOne(Subject::class, 'id', 'subject_id')->bind(['subject_name','english_name']); + } } diff --git a/app/common/service/TeacherFreeTimeService.php b/app/common/service/TeacherScheduleTimeService.php similarity index 91% rename from app/common/service/TeacherFreeTimeService.php rename to app/common/service/TeacherScheduleTimeService.php index 098e9b7..dde2aa8 100644 --- a/app/common/service/TeacherFreeTimeService.php +++ b/app/common/service/TeacherScheduleTimeService.php @@ -3,12 +3,12 @@ namespace app\common\service; use app\common\model\Teacher; -use app\common\model\TeacherFreeTime; +use app\common\model\TeacherScheduleTime; use app\constant\ResponseCode; use DateTime; use think\Exception; -class TeacherFreeTimeService +class TeacherScheduleTimeService { /** @@ -52,7 +52,7 @@ class TeacherFreeTimeService // ]; $data = $request->post(); - $free_time = json_decode($data['free_time'], true); + $free_time = json_decode($data['schedule_time'], true); if (empty($free_time)) { throw new Exception('请选择时间段之后再提交'); @@ -74,7 +74,8 @@ class TeacherFreeTimeService 'hour' => $hour, 'month' => date('Y-m', strtotime($free_date)), ]; - $res = TeacherFreeTime::create($free_data); + //@todo:判断是否已经存在 + $res = TeacherScheduleTime::create($free_data); if(!$res){ throw new Exception('保存失败'); } diff --git a/plugin/admin/app/controller/TeacherScheduleTimeController.php b/plugin/admin/app/controller/TeacherScheduleTimeController.php new file mode 100644 index 0000000..1c43593 --- /dev/null +++ b/plugin/admin/app/controller/TeacherScheduleTimeController.php @@ -0,0 +1,150 @@ +model = new TeacherScheduleTime; + } + + /** + * 浏览 + * @return Response + */ + public function index(): Response + { + return view('teacher-schedule-time/index'); + } + + + /** + * 插入 + * @param Request $request + * @return Response + * @throws BusinessException + */ + public function insert(Request $request): Response + { + if ($request->method() === 'POST') { + return parent::insert($request); + } + return view('teacher-schedule-time/insert'); + } + + /** + * 更新 + * @param Request $request + * @return Response + * @throws BusinessException + */ + public function update(Request $request): Response + { + if ($request->method() === 'POST') { + return parent::update($request); + } + $teacher = []; + + if ($request->get('id')) { + $teacher_free_time = \app\common\model\TeacherScheduleTime::where(['id' => $request->get('id')])->findOrEmpty(); + $teacher = Teacher::where(['id' => $teacher_free_time->teacher_id])->field('teacher_name,account')->findOrEmpty()->toArray(); + } + return view('teacher-schedule-time/update', ['teacher' => $teacher]); + } + + /** + * 更新 + * @param Request $request + * @return Response + * @throws BusinessException + */ + public function scheduleTimeSet(Request $request): Response + { + if ($request->method() === 'POST') { + + if($request->post('is_publish')){ + $request->post('is_publish', 0); + } +// parent::update($request); + + return parent::update($request); + } + $free_time_id = $request->get('free_time_id'); + $schedule_time = \app\common\model\TeacherScheduleTime::where(['id' => $free_time_id])->with(['teacher'])->findOrEmpty()->toArray(); + $project = Subject::order('sort desc, id asc')->select()->toArray(); + + return view('teacher-schedule-time/schedule_time_setting', ['schedule_time' => $schedule_time, 'project' => $project]); + } + + /** + * @desc 时间列表 + * @param Request $request + * @return Response + */ + public function getScheduleTime(Request $request) + { + try { + $list = \app\common\model\TeacherScheduleTime::where(['teacher_id' => $request->get('id'), 'month' => '2024-07']) + ->with(['subject']) + ->select() + ->toArray(); + + $free_time = []; + foreach ($list as $item) { + $time_period = explode('-', $item['time']); + if ($item['subject_id']) { + $title = $item['time'] . ' - ' . $item['subject_name'] . '/' .$item['english_name']; + if($item['is_publish'] == 0){ + $color = 'orange'; + }else{ + $color = 'green'; + } + } else { + $color = 'red'; + $title = $item['time']; + } + $free_time[] = [ + 'free_time_id' => $item['id'], + 'title' => $title, + 'start' => $item['date'] . ' ' . $time_period[0], + 'color' => $color, + ]; + } + + return json([ + 'code' => ResponseCode::WEB_API_SUCCESS, + 'data' => $free_time, + 'msg' => 'success' + ]); + } catch (Exception $e) { + return json([ + 'code' => ResponseCode::WEB_API_FAIL, + 'msg' => $e->getMessage() + ]); + } + } + +} diff --git a/plugin/admin/app/controller/TeacherScheduleTimeController232.php b/plugin/admin/app/controller/TeacherScheduleTimeController232.php new file mode 100644 index 0000000..ff63e5d --- /dev/null +++ b/plugin/admin/app/controller/TeacherScheduleTimeController232.php @@ -0,0 +1,68 @@ +model = new TeacherScheduleTime; + } + + /** + * 浏览 + * @return Response + */ + public function index(): Response + { + return view('teacher-schedule-time/index'); + } + + /** + * 插入 + * @param Request $request + * @return Response + * @throws BusinessException + */ + public function insert(Request $request): Response + { + if ($request->method() === 'POST') { + return parent::insert($request); + } + return view('teacher-schedule-time/insert'); + } + + /** + * 更新 + * @param Request $request + * @return Response + * @throws BusinessException + */ + public function update(Request $request): Response + { + if ($request->method() === 'POST') { + return parent::update($request); + } + return view('teacher-schedule-time/update'); + } + +} diff --git a/plugin/admin/app/controller/TeacherFreeTimeController.php b/plugin/admin/app/controller/TeacherScheduleTimebakController.php similarity index 78% rename from plugin/admin/app/controller/TeacherFreeTimeController.php rename to plugin/admin/app/controller/TeacherScheduleTimebakController.php index f114d36..6005c83 100644 --- a/plugin/admin/app/controller/TeacherFreeTimeController.php +++ b/plugin/admin/app/controller/TeacherScheduleTimebakController.php @@ -2,6 +2,7 @@ namespace plugin\admin\app\controller; +use app\common\model\Teacher; use app\constant\ResponseCode; use support\Request; use support\Response; @@ -13,7 +14,7 @@ use think\Exception; /** * 教师空闲时间 */ -class TeacherFreeTimeController extends Crud +class TeacherScheduleTimebakController extends Crud { /** @@ -64,8 +65,15 @@ class TeacherFreeTimeController extends Crud if ($request->method() === 'POST') { return parent::update($request); } - return view('teacher-free-time/update'); + $teacher = []; + if ($request->get('id')) { + $teacher_free_time = \app\common\model\TeacherScheduleTime::where(['id' => $request->get('id')])->findOrEmpty(); + $teacher = Teacher::where(['id' => $teacher_free_time->teacher_id])->field('teacher_name,account')->findOrEmpty()->toArray(); + } + + return view('teacher-free-time/update', ['teacher'=>$teacher]); } + /** * 更新 * @param Request $request @@ -88,13 +96,13 @@ class TeacherFreeTimeController extends Crud public function getFreeTime(Request $request) { try { - $list = \app\common\model\TeacherFreeTime::where(['teacher_id' => $request->get('id'), 'month' => '2024-07'])->select()->toArray(); + $list = \app\common\model\TeacherScheduleTime::where(['teacher_id' => $request->get('id'), 'month' => '2024-07'])->select()->toArray(); $free_time = []; foreach ($list as $item) { $time_period = explode('-', $item['time']); $free_time[] = [ - 'free_time_id'=> $item['id'], + 'free_time_id' => $item['id'], 'title' => $item['time'], 'start' => $item['date'] . ' ' . $time_period[0] ]; diff --git a/plugin/admin/app/model/TeacherSchedule.php b/plugin/admin/app/model/TeacherSchedule.php new file mode 100644 index 0000000..063ff3d --- /dev/null +++ b/plugin/admin/app/model/TeacherSchedule.php @@ -0,0 +1,39 @@ +
- + +
+ + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+
@@ -61,18 +89,18 @@ @@ -84,12 +112,44 @@ // 相关常量 const PRIMARY_KEY = "id"; - const SELECT_API = "/app/admin/teacher-free-time/select"; - const UPDATE_API = "/app/admin/teacher-free-time/update"; - const DELETE_API = "/app/admin/teacher-free-time/delete"; - const INSERT_URL = "/app/admin/teacher-free-time/insert"; - const UPDATE_URL = "/app/admin/teacher-free-time/update"; + const SELECT_API = "/app/admin/teacher-schedule-time/select"; + const UPDATE_API = "/app/admin/teacher-schedule-time/update"; + const DELETE_API = "/app/admin/teacher-schedule-time/delete"; + const INSERT_URL = "/app/admin/teacher-schedule-time/insert"; + const UPDATE_URL = "/app/admin/teacher-schedule-time/update"; + // 字段 时间 time + layui.use(["laydate"], function() { + layui.laydate.render({ + elem: "#time", + type: "datetime", + }); + }) + + // 字段 月份 month + layui.use(["laydate"], function() { + layui.laydate.render({ + elem: "#month", + + }); + }) + + // 字段 是否发布 is_publish + layui.use(["jquery", "xmSelect"], function() { + let value = layui.$("#is_publish").attr("value"); + let initValue = value ? value.split(",") : []; + layui.xmSelect.render({ + el: "#is_publish", + name: "is_publish", + filterable: true, + initValue: initValue, + data: [{"value":"1","name":"是"},{"value":"0","name":"否"}], + model: {"icon":"hidden","label":{"type":"text"}}, + clickClose: true, + radio: true, + }) + }); + // 表格渲染 layui.use(["table", "form", "common", "popup", "util"], function() { let table = layui.table; @@ -118,15 +178,47 @@ },{ title: "课时",align: "center", field: "hour", + },{ + title: "月份",align: "center", + field: "month", + },{ + title: "课程id",align: "center", + field: "subject_id", + },{ + title: "是否发布",align: "center", + field: "is_publish", + templet: function (d) { + let field = "is_publish"; + form.on("switch("+field+")", function (data) { + let load = layer.load(); + let postData = {}; + postData[field] = data.elem.checked ? 1 : 0; + postData[PRIMARY_KEY] = this.value; + $.post(UPDATE_API, postData, function (res) { + layer.close(load); + if (res.code) { + return layui.popup.failure(res.msg, function () { + data.elem.checked = !data.elem.checked; + form.render(); + }); + } + return layui.popup.success("操作成功"); + }) + }); + let checked = d[field] === 1 ? "checked" : ""; + return ''; + } },{ title: "创建时间",align: "center", field: "created_at", },{ title: "更新时间",align: "center", field: "updated_at", + hide: true, },{ title: "deleted_at",align: "center", field: "deleted_at", + hide: true, },{ title: "操作", toolbar: "#table-bar", diff --git a/plugin/admin/app/view/teacher-free-time/insert.html b/plugin/admin/app/view/teacher-schedule-time/insert.html similarity index 100% rename from plugin/admin/app/view/teacher-free-time/insert.html rename to plugin/admin/app/view/teacher-schedule-time/insert.html diff --git a/plugin/admin/app/view/teacher-schedule-time/schedule_time_setting.html b/plugin/admin/app/view/teacher-schedule-time/schedule_time_setting.html new file mode 100644 index 0000000..bef9a6c --- /dev/null +++ b/plugin/admin/app/view/teacher-schedule-time/schedule_time_setting.html @@ -0,0 +1,197 @@ + + + + + 更新页面 + + + + + + + +
+ +
+
+ +
+ +
+ + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+
+ +
+ + +
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+ + +
+
+ +
+ + + + + + + + + + + diff --git a/plugin/admin/app/view/teacher-schedule-time/update.html b/plugin/admin/app/view/teacher-schedule-time/update.html new file mode 100644 index 0000000..cc07b11 --- /dev/null +++ b/plugin/admin/app/view/teacher-schedule-time/update.html @@ -0,0 +1,294 @@ + + + + + 更新页面 + + + + + + + + + + + +
+ +
+
+
+
+

老师信息

+
+
+
+
+ + + + + + + + + + + + +
+ + + + + +
+ +
+
+
+
+ +
+
+ + +
+
+ +
+ + + + + + + + + + + + diff --git a/plugin/admin/app/view/teacher-schedule-time12/index.html b/plugin/admin/app/view/teacher-schedule-time12/index.html new file mode 100644 index 0000000..a3c1c10 --- /dev/null +++ b/plugin/admin/app/view/teacher-schedule-time12/index.html @@ -0,0 +1,398 @@ + + + + + + 浏览页面 + + + + + + +
+
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+
+
+
+ +
+ + + +
+
+ 展开 + 收起 +
+
+
+
+ + +
+
+
+
+
+ + + + + + + + + + + + + + + diff --git a/plugin/admin/app/view/teacher-free-time/free_time_setting.html b/plugin/admin/app/view/teacher-schedule-time12/insert.html similarity index 64% rename from plugin/admin/app/view/teacher-free-time/free_time_setting.html rename to plugin/admin/app/view/teacher-schedule-time12/insert.html index 3cc8754..bb29eed 100644 --- a/plugin/admin/app/view/teacher-free-time/free_time_setting.html +++ b/plugin/admin/app/view/teacher-schedule-time12/insert.html @@ -2,15 +2,14 @@ - 更新页面 + 新增页面 - -
+
@@ -18,7 +17,7 @@
- +
@@ -39,7 +38,7 @@
- +
@@ -69,7 +68,8 @@
- + +
+
+ + + + + + + + + + + + + diff --git a/plugin/admin/app/view/teacher-free-time/update.bak.html b/plugin/admin/app/view/teacher-schedule-time12/update.bak.html similarity index 100% rename from plugin/admin/app/view/teacher-free-time/update.bak.html rename to plugin/admin/app/view/teacher-schedule-time12/update.bak.html diff --git a/plugin/admin/app/view/teacher-free-time/update.html b/plugin/admin/app/view/teacher-schedule-time12/update.html similarity index 93% rename from plugin/admin/app/view/teacher-free-time/update.html rename to plugin/admin/app/view/teacher-schedule-time12/update.html index a477387..cc5acd1 100644 --- a/plugin/admin/app/view/teacher-free-time/update.html +++ b/plugin/admin/app/view/teacher-schedule-time12/update.html @@ -69,13 +69,12 @@
- - - - - - - +
+

老师信息

+
+
+
+
@@ -88,13 +87,13 @@ - +
- +
@@ -188,8 +187,8 @@ title: "排课", shade: 0.1, maxmin: true, - area: ["650px", "550px"], - content: "/app/admin/teacherFreeTime/freeTimeSet?free_time_id=" + free_time_id + area: ["750px", "700px"], + content: "/app/admin/teacherScheduleTime/scheduleTimeSet?free_time_id=" + free_time_id }); // if (confirm('您确定要删除此事件吗?')) { // arg.event.remove() @@ -200,7 +199,7 @@ events: function (info, successCallback, failureCallback) { console.log('12312313') layui.$.ajax({ - url: '/app/admin/teacherFreeTime/getFreeTime?id=1', + url: '/app/admin/teacherScheduleTime/getScheduleTime?id=1', type: "POST", dateType: "json", // data: data.field, diff --git a/plugin/admin/config/view.php b/plugin/admin/config/view.php index e3a7b85..c200147 100644 --- a/plugin/admin/config/view.php +++ b/plugin/admin/config/view.php @@ -18,5 +18,10 @@ use support\view\Blade; use support\view\ThinkPHP; return [ - 'handler' => Raw::class + 'handler' => ThinkPHP::class, + 'options' => [ + 'view_suffix' => 'html', + 'tpl_begin' => '{', + 'tpl_end' => '}' + ] ];