From a29809b72cf641312fc5ccabf2a63d6143c59a39 Mon Sep 17 00:00:00 2001 From: 15090180611 <215509543@qq.com> Date: Mon, 13 Jan 2025 18:03:44 +0800 Subject: [PATCH] =?UTF-8?q?api=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/controller/manystore/Apirule.php | 149 ++++ .../admin/controller/manystore/Index.php | 67 ++ .../admin/lang/zh-cn/manystore/apirule.php | 20 + .../admin/validate/ManystoreApiAuthRule.php | 52 ++ .../admin/validate/manystore/Apirule.php | 52 ++ .../admin/view/manystore/apirule/add.html | 68 ++ .../admin/view/manystore/apirule/edit.html | 68 ++ .../admin/view/manystore/apirule/index.html | 35 + .../admin/view/manystore/apirule/tpl.html | 43 + .../admin/view/manystore/index/index.html | 2 + .../admin/view/school/help/cate/index.html | 2 +- application/api/controller/Crontab.php | 90 +- application/api/controller/WechatUtil.php | 126 ++- application/api/controller/school/BigData.php | 128 +++ .../common/controller/ManystoreApiBase.php | 802 ++++++++++++++++++ .../common/library/NightSchoolBigData.php | 133 +++ .../common/listener/manystore/ShopHook.php | 2 + .../common/model/dyqc/ManystoreShop.php | 17 +- .../common/model/manystore/UserAuth.php | 10 +- .../school/classes/activity/order/Order.php | 38 + .../model/school/classes/order/Order.php | 38 + .../manystore/model/ManystoreApiAuthGroup.php | 21 + .../model/ManystoreApiAuthGroupAccess.php | 10 + .../manystore/model/ManystoreApiAuthRule.php | 29 + .../manystoreapi/behavior/ManystoreLog.php | 13 + application/manystoreapi/common.php | 226 +++++ application/manystoreapi/config.php | 8 + application/manystoreapi/controller/Ajax.php | 288 +++++++ .../manystoreapi/controller/Dashboard.php | 59 ++ application/manystoreapi/controller/Index.php | 133 +++ .../manystoreapi/controller/auth/Group.php | 299 +++++++ .../controller/auth/Manystore.php | 264 ++++++ .../controller/auth/Manystorelog.php | 134 +++ .../controller/csmtable/Cligenerateexcel.php | 325 +++++++ .../controller/csmtable/Csmgenerate.php | 88 ++ .../controller/csmtable/Csmxlstable.php | 85 ++ .../controller/csmtable/Datasource.php | 34 + .../manystoreapi/controller/csmtable/Test.php | 107 +++ .../controller/csmtable/Xlstask.php | 57 ++ .../controller/general/Attachment.php | 174 ++++ .../controller/general/Config.php | 162 ++++ .../manystoreapi/controller/general/Log.php | 46 + .../controller/general/Profile.php | 155 ++++ .../controller/manystore/ShopLog.php | 76 ++ .../controller/manystore/UserAuth.php | 336 ++++++++ .../controller/school/Message.php | 79 ++ .../controller/school/classes/Cate.php | 40 + .../controller/school/classes/ClassesLib.php | 707 +++++++++++++++ .../controller/school/classes/ClassesSpec.php | 311 +++++++ .../controller/school/classes/Collect.php | 75 ++ .../controller/school/classes/Evaluate.php | 300 +++++++ .../controller/school/classes/Label.php | 40 + .../controller/school/classes/Teacher.php | 372 ++++++++ .../controller/school/classes/Type.php | 40 + .../school/classes/Verification.php | 310 +++++++ .../controller/school/classes/VirtualHead.php | 40 + .../controller/school/classes/VirtualUser.php | 197 +++++ .../school/classes/activity/Activity.php | 520 ++++++++++++ .../school/classes/activity/ActivityAuth.php | 462 ++++++++++ .../school/classes/activity/ActivityItem.php | 77 ++ .../classes/activity/ActivityItemAuth.php | 77 ++ .../school/classes/activity/order/Order.php | 211 +++++ .../classes/activity/order/OrderDetail.php | 85 ++ .../classes/activity/order/OrderItem.php | 80 ++ .../classes/activity/order/OrderLog.php | 74 ++ .../school/classes/hourorder/Order.php | 324 +++++++ .../school/classes/hourorder/OrderLog.php | 74 ++ .../controller/school/classes/order/Order.php | 166 ++++ .../school/classes/order/OrderDetail.php | 79 ++ .../school/classes/order/OrderLog.php | 77 ++ .../school/classes/order/ServiceOrder.php | 235 +++++ .../school/classes/order/ServiceOrderLog.php | 80 ++ .../manystoreapi/controller/user/User.php | 244 ++++++ application/manystoreapi/lang/zh-cn.php | 186 ++++ application/manystoreapi/lang/zh-cn/addon.php | 93 ++ application/manystoreapi/lang/zh-cn/ajax.php | 8 + .../manystoreapi/lang/zh-cn/auth/group.php | 12 + .../lang/zh-cn/auth/manystore.php | 9 + .../lang/zh-cn/auth/manystorelog.php | 14 + .../manystoreapi/lang/zh-cn/auth/rule.php | 20 + .../manystoreapi/lang/zh-cn/category.php | 18 + .../manystoreapi/lang/zh-cn/command.php | 16 + .../manystoreapi/lang/zh-cn/config.php | 9 + .../manystoreapi/lang/zh-cn/dashboard.php | 48 ++ .../lang/zh-cn/general/attachment.php | 45 + .../lang/zh-cn/general/config.php | 65 ++ .../lang/zh-cn/general/database.php | 43 + .../manystoreapi/lang/zh-cn/general/log.php | 9 + .../lang/zh-cn/general/profile.php | 65 ++ application/manystoreapi/lang/zh-cn/index.php | 57 ++ .../lang/zh-cn/manystore/shop_log.php | 42 + .../lang/zh-cn/manystore/user_auth.php | 21 + .../school/classes/activity/activity.php | 73 ++ .../school/classes/activity/activity_auth.php | 80 ++ .../school/classes/activity/activity_item.php | 29 + .../classes/activity/activity_item_auth.php | 29 + .../school/classes/activity/order/order.php | 79 ++ .../classes/activity/order/order_detail.php | 72 ++ .../classes/activity/order/order_item.php | 38 + .../classes/activity/order/order_log.php | 22 + .../lang/zh-cn/school/classes/cate.php | 12 + .../lang/zh-cn/school/classes/classes_lib.php | 95 +++ .../zh-cn/school/classes/classes_spec.php | 21 + .../lang/zh-cn/school/classes/collect.php | 14 + .../lang/zh-cn/school/classes/evaluate.php | 38 + .../zh-cn/school/classes/hourorder/order.php | 50 ++ .../school/classes/hourorder/order_log.php | 13 + .../lang/zh-cn/school/classes/label.php | 12 + .../lang/zh-cn/school/classes/order/order.php | 80 ++ .../school/classes/order/order_detail.php | 64 ++ .../zh-cn/school/classes/order/order_log.php | 30 + .../school/classes/order/service_order.php | 65 ++ .../classes/order/service_order_log.php | 42 + .../lang/zh-cn/school/classes/teacher.php | 31 + .../lang/zh-cn/school/classes/type.php | 12 + .../zh-cn/school/classes/verification.php | 27 + .../zh-cn/school/classes/virtual_head.php | 6 + .../zh-cn/school/classes/virtual_user.php | 16 + .../lang/zh-cn/school/message.php | 41 + .../manystoreapi/lang/zh-cn/user/user.php | 37 + application/manystoreapi/library/Auth.php | 579 +++++++++++++ .../manystoreapi/library/ManystoreAuth.php | 265 ++++++ .../manystoreapi/library/traits/Backend.php | 497 +++++++++++ application/manystoreapi/model/Admin.php | 12 + application/manystoreapi/model/Manystore.php | 45 + .../model/ManystoreApiAuthGroup.php | 21 + .../model/ManystoreApiAuthGroupAccess.php | 10 + .../model/ManystoreApiAuthRule.php | 29 + .../manystoreapi/model/ManystoreCommand.php | 59 ++ .../manystoreapi/model/ManystoreLog.php | 79 ++ .../manystoreapi/model/ManystoreShop.php | 155 ++++ .../model/SchoolClassesHourOrder.php | 12 + .../manystoreapi/model/SchoolClassesLib.php | 12 + .../model/SchoolClassesLibSpec.php | 12 + .../manystoreapi/model/SchoolClassesOrder.php | 12 + .../model/SchoolClassesOrderDetail.php | 12 + application/manystoreapi/model/User.php | 12 + .../manystoreapi/model/manystore/ShopLog.php | 110 +++ .../manystoreapi/model/manystore/UserAuth.php | 83 ++ .../manystoreapi/model/school/Message.php | 119 +++ .../model/school/classes/Cate.php | 57 ++ .../model/school/classes/ClassesLib.php | 249 ++++++ .../model/school/classes/ClassesSpec.php | 86 ++ .../model/school/classes/Collect.php | 58 ++ .../model/school/classes/Evaluate.php | 118 +++ .../model/school/classes/Label.php | 57 ++ .../model/school/classes/Teacher.php | 73 ++ .../model/school/classes/Type.php | 57 ++ .../model/school/classes/Verification.php | 77 ++ .../model/school/classes/VirtualHead.php | 48 ++ .../model/school/classes/VirtualUser.php | 78 ++ .../school/classes/activity/Activity.php | 255 ++++++ .../school/classes/activity/ActivityAuth.php | 271 ++++++ .../school/classes/activity/ActivityItem.php | 89 ++ .../classes/activity/ActivityItemAuth.php | 89 ++ .../school/classes/activity/order/Order.php | 217 +++++ .../classes/activity/order/OrderDetail.php | 236 ++++++ .../classes/activity/order/OrderItem.php | 117 +++ .../classes/activity/order/OrderLog.php | 53 ++ .../model/school/classes/hourorder/Order.php | 154 ++++ .../school/classes/hourorder/OrderLog.php | 53 ++ .../model/school/classes/order/Order.php | 189 +++++ .../school/classes/order/OrderDetail.php | 99 +++ .../model/school/classes/order/OrderLog.php | 95 +++ .../school/classes/order/ServiceOrder.php | 205 +++++ .../school/classes/order/ServiceOrderLog.php | 106 +++ application/manystoreapi/model/user/User.php | 87 ++ application/manystoreapi/tags.php | 18 + .../manystoreapi/validate/Manystore.php | 57 ++ .../validate/ManystoreAuthRule.php | 52 ++ .../validate/ManystoreCommand.php | 27 + .../validate/manystore/ShopLog.php | 27 + .../validate/manystore/UserAuth.php | 27 + .../manystoreapi/validate/school/Message.php | 27 + .../validate/school/classes/Cate.php | 27 + .../validate/school/classes/ClassesLib.php | 43 + .../validate/school/classes/ClassesSpec.php | 27 + .../validate/school/classes/Collect.php | 27 + .../validate/school/classes/Evaluate.php | 27 + .../validate/school/classes/Label.php | 27 + .../validate/school/classes/Teacher.php | 27 + .../validate/school/classes/Type.php | 27 + .../validate/school/classes/Verification.php | 27 + .../validate/school/classes/VirtualHead.php | 27 + .../validate/school/classes/VirtualUser.php | 27 + .../school/classes/activity/Activity.php | 27 + .../school/classes/activity/ActivityAuth.php | 27 + .../school/classes/activity/ActivityItem.php | 27 + .../classes/activity/ActivityItemAuth.php | 27 + .../school/classes/activity/order/Order.php | 27 + .../classes/activity/order/OrderDetail.php | 27 + .../classes/activity/order/OrderItem.php | 27 + .../classes/activity/order/OrderLog.php | 27 + .../school/classes/hourorder/Order.php | 27 + .../school/classes/hourorder/OrderLog.php | 27 + .../validate/school/classes/order/Order.php | 27 + .../school/classes/order/OrderDetail.php | 27 + .../school/classes/order/OrderLog.php | 27 + .../school/classes/order/ServiceOrder.php | 27 + .../school/classes/order/ServiceOrderLog.php | 27 + .../manystoreapi/validate/user/User.php | 27 + .../manystoreapi/view/auth/group/add.html | 38 + .../manystoreapi/view/auth/group/edit.html | 38 + .../manystoreapi/view/auth/group/index.html | 21 + .../manystoreapi/view/auth/manystore/add.html | 46 + .../view/auth/manystore/edit.html | 52 ++ .../view/auth/manystore/index.html | 21 + .../view/auth/manystorelog/detail.html | 22 + .../view/auth/manystorelog/index.html | 21 + .../manystoreapi/view/common/control.html | 71 ++ .../manystoreapi/view/common/header.html | 110 +++ .../manystoreapi/view/common/menu.html | 41 + .../manystoreapi/view/common/meta.html | 23 + .../manystoreapi/view/common/script.html | 1 + .../manystoreapi/view/dashboard/index.html | 403 +++++++++ .../view/general/attachment/add.html | 51 ++ .../view/general/attachment/edit.html | 76 ++ .../view/general/attachment/index.html | 54 ++ .../view/general/attachment/select.html | 51 ++ .../view/general/config/index.html | 160 ++++ .../manystoreapi/view/general/log/index.html | 28 + .../view/general/profile/index.html | 531 ++++++++++++ .../manystoreapi/view/index/index.html | 50 ++ .../manystoreapi/view/index/login.html | 145 ++++ .../manystoreapi/view/layout/default.html | 45 + .../view/manystore/shop_log/add.html | 224 +++++ .../view/manystore/shop_log/edit.html | 224 +++++ .../view/manystore/shop_log/index.html | 44 + .../view/manystore/user_auth/add.html | 45 + .../view/manystore/user_auth/changeuser.html | 27 + .../view/manystore/user_auth/edit.html | 45 + .../view/manystore/user_auth/index.html | 44 + .../school/classes/activity/activity/add.html | 292 +++++++ .../classes/activity/activity/edit.html | 279 ++++++ .../classes/activity/activity/index.html | 44 + .../classes/activity/activity/recyclebin.html | 25 + .../classes/activity/activity_auth/add.html | 292 +++++++ .../classes/activity/activity_auth/edit.html | 298 +++++++ .../classes/activity/activity_auth/index.html | 44 + .../activity/activity_auth/recyclebin.html | 25 + .../classes/activity/activity_item/add.html | 88 ++ .../classes/activity/activity_item/edit.html | 88 ++ .../classes/activity/activity_item/index.html | 44 + .../activity/activity_item/recyclebin.html | 25 + .../activity/activity_item_auth/add.html | 88 ++ .../activity/activity_item_auth/edit.html | 88 ++ .../activity/activity_item_auth/index.html | 44 + .../activity_item_auth/recyclebin.html | 25 + .../classes/activity/order/order/add.html | 264 ++++++ .../classes/activity/order/order/edit.html | 284 +++++++ .../classes/activity/order/order/examine.html | 32 + .../classes/activity/order/order/index.html | 44 + .../activity/order/order/recyclebin.html | 25 + .../activity/order/order_detail/add.html | 290 +++++++ .../activity/order/order_detail/edit.html | 290 +++++++ .../activity/order/order_detail/index.html | 44 + .../order/order_detail/recyclebin.html | 25 + .../activity/order/order_item/add.html | 112 +++ .../activity/order/order_item/edit.html | 112 +++ .../activity/order/order_item/index.html | 44 + .../activity/order/order_item/recyclebin.html | 25 + .../classes/activity/order/order_log/add.html | 46 + .../activity/order/order_log/edit.html | 46 + .../activity/order/order_log/index.html | 44 + .../activity/order/order_log/recyclebin.html | 25 + .../view/school/classes/cate/add.html | 34 + .../view/school/classes/cate/edit.html | 34 + .../view/school/classes/cate/index.html | 44 + .../view/school/classes/cate/recyclebin.html | 25 + .../view/school/classes/classes_lib/add.html | 360 ++++++++ .../school/classes/classes_lib/addnew.html | 437 ++++++++++ .../view/school/classes/classes_lib/copy.html | 447 ++++++++++ .../view/school/classes/classes_lib/edit.html | 447 ++++++++++ .../school/classes/classes_lib/index.html | 65 ++ .../classes/classes_lib/recyclebin.html | 25 + .../view/school/classes/classes_spec/add.html | 82 ++ .../school/classes/classes_spec/edit.html | 79 ++ .../school/classes/classes_spec/index.html | 44 + .../classes/classes_spec/recyclebin.html | 25 + .../view/school/classes/collect/add.html | 28 + .../view/school/classes/collect/edit.html | 28 + .../view/school/classes/collect/index.html | 34 + .../view/school/classes/evaluate/add.html | 120 +++ .../view/school/classes/evaluate/edit.html | 120 +++ .../view/school/classes/evaluate/index.html | 44 + .../school/classes/hourorder/order/add.html | 19 + .../school/classes/hourorder/order/edit.html | 25 + .../classes/hourorder/order/examine.html | 32 + .../school/classes/hourorder/order/index.html | 50 ++ .../classes/hourorder/order/recyclebin.html | 25 + .../classes/hourorder/order_log/add.html | 34 + .../classes/hourorder/order_log/edit.html | 34 + .../classes/hourorder/order_log/index.html | 44 + .../view/school/classes/label/add.html | 34 + .../view/school/classes/label/edit.html | 34 + .../view/school/classes/label/index.html | 44 + .../view/school/classes/label/recyclebin.html | 25 + .../view/school/classes/order/order/add.html | 258 ++++++ .../classes/order/order/after_sales.html | 30 + .../view/school/classes/order/order/edit.html | 253 ++++++ .../school/classes/order/order/index.html | 44 + .../classes/order/order/recyclebin.html | 25 + .../classes/order/order_detail/add.html | 254 ++++++ .../classes/order/order_detail/edit.html | 254 ++++++ .../classes/order/order_detail/index.html | 34 + .../order/order_detail/recyclebin.html | 25 + .../school/classes/order/order_log/add.html | 70 ++ .../school/classes/order/order_log/edit.html | 70 ++ .../school/classes/order/order_log/index.html | 44 + .../classes/order/service_order/add.html | 214 +++++ .../service_order/admin_confirmation.html | 61 ++ .../classes/order/service_order/edit.html | 214 +++++ .../classes/order/service_order/index.html | 44 + .../order/service_order/recyclebin.html | 25 + .../service_order/shop_confirmation.html | 61 ++ .../service_order/user_confirmation.html | 61 ++ .../classes/order/service_order_log/add.html | 100 +++ .../classes/order/service_order_log/edit.html | 100 +++ .../order/service_order_log/index.html | 44 + .../view/school/classes/teacher/add.html | 99 +++ .../view/school/classes/teacher/edit.html | 96 +++ .../view/school/classes/teacher/index.html | 44 + .../school/classes/teacher/recyclebin.html | 25 + .../view/school/classes/type/add.html | 34 + .../view/school/classes/type/edit.html | 34 + .../view/school/classes/type/index.html | 44 + .../view/school/classes/type/recyclebin.html | 25 + .../view/school/classes/verification/add.html | 51 ++ .../school/classes/verification/edit.html | 51 ++ .../school/classes/verification/index.html | 44 + .../view/school/classes/virtual_head/add.html | 30 + .../school/classes/virtual_head/edit.html | 30 + .../school/classes/virtual_head/index.html | 34 + .../view/school/classes/virtual_user/add.html | 52 ++ .../school/classes/virtual_user/edit.html | 65 ++ .../school/classes/virtual_user/index.html | 34 + .../manystoreapi/view/school/message/add.html | 100 +++ .../view/school/message/edit.html | 100 +++ .../view/school/message/index.html | 44 + .../manystoreapi/view/user/user/add.html | 108 +++ .../manystoreapi/view/user/user/edit.html | 122 +++ .../manystoreapi/view/user/user/index.html | 37 + extend/traits/ModelTrait.php | 25 +- public/assets/js/backend/manystore/apirule.js | 176 ++++ public/assets/js/backend/manystore/index.js | 32 +- .../school/classes/activity/activity.js | 3 +- .../school/classes/activity/order/order.js | 3 +- .../js/backend/school/classes/evaluate.js | 3 +- .../school/classes/order/service_order.js | 3 +- public/assets/js/backend/school/help/cate.js | 4 +- public/assets/js/backend/third.js | 3 +- .../school/classes/activity/activity.js | 3 +- .../school/classes/activity/order/order.js | 3 +- .../manystore/school/classes/classes_lib.js | 3 +- .../js/manystore/school/classes/evaluate.js | 3 +- .../school/classes/hourorder/order.js | 3 +- .../manystore/school/classes/order/order.js | 3 +- .../school/classes/order/service_order.js | 3 +- public/assets/js/manystore/user/user.js | 3 +- 359 files changed, 31763 insertions(+), 59 deletions(-) create mode 100644 application/admin/controller/manystore/Apirule.php create mode 100644 application/admin/lang/zh-cn/manystore/apirule.php create mode 100644 application/admin/validate/ManystoreApiAuthRule.php create mode 100644 application/admin/validate/manystore/Apirule.php create mode 100644 application/admin/view/manystore/apirule/add.html create mode 100644 application/admin/view/manystore/apirule/edit.html create mode 100644 application/admin/view/manystore/apirule/index.html create mode 100644 application/admin/view/manystore/apirule/tpl.html create mode 100644 application/common/controller/ManystoreApiBase.php create mode 100644 application/manystore/model/ManystoreApiAuthGroup.php create mode 100644 application/manystore/model/ManystoreApiAuthGroupAccess.php create mode 100644 application/manystore/model/ManystoreApiAuthRule.php create mode 100644 application/manystoreapi/behavior/ManystoreLog.php create mode 100644 application/manystoreapi/common.php create mode 100644 application/manystoreapi/config.php create mode 100644 application/manystoreapi/controller/Ajax.php create mode 100644 application/manystoreapi/controller/Dashboard.php create mode 100644 application/manystoreapi/controller/Index.php create mode 100644 application/manystoreapi/controller/auth/Group.php create mode 100644 application/manystoreapi/controller/auth/Manystore.php create mode 100644 application/manystoreapi/controller/auth/Manystorelog.php create mode 100644 application/manystoreapi/controller/csmtable/Cligenerateexcel.php create mode 100644 application/manystoreapi/controller/csmtable/Csmgenerate.php create mode 100644 application/manystoreapi/controller/csmtable/Csmxlstable.php create mode 100644 application/manystoreapi/controller/csmtable/Datasource.php create mode 100644 application/manystoreapi/controller/csmtable/Test.php create mode 100644 application/manystoreapi/controller/csmtable/Xlstask.php create mode 100644 application/manystoreapi/controller/general/Attachment.php create mode 100644 application/manystoreapi/controller/general/Config.php create mode 100644 application/manystoreapi/controller/general/Log.php create mode 100644 application/manystoreapi/controller/general/Profile.php create mode 100644 application/manystoreapi/controller/manystore/ShopLog.php create mode 100644 application/manystoreapi/controller/manystore/UserAuth.php create mode 100644 application/manystoreapi/controller/school/Message.php create mode 100644 application/manystoreapi/controller/school/classes/Cate.php create mode 100644 application/manystoreapi/controller/school/classes/ClassesLib.php create mode 100644 application/manystoreapi/controller/school/classes/ClassesSpec.php create mode 100644 application/manystoreapi/controller/school/classes/Collect.php create mode 100644 application/manystoreapi/controller/school/classes/Evaluate.php create mode 100644 application/manystoreapi/controller/school/classes/Label.php create mode 100644 application/manystoreapi/controller/school/classes/Teacher.php create mode 100644 application/manystoreapi/controller/school/classes/Type.php create mode 100644 application/manystoreapi/controller/school/classes/Verification.php create mode 100644 application/manystoreapi/controller/school/classes/VirtualHead.php create mode 100644 application/manystoreapi/controller/school/classes/VirtualUser.php create mode 100644 application/manystoreapi/controller/school/classes/activity/Activity.php create mode 100644 application/manystoreapi/controller/school/classes/activity/ActivityAuth.php create mode 100644 application/manystoreapi/controller/school/classes/activity/ActivityItem.php create mode 100644 application/manystoreapi/controller/school/classes/activity/ActivityItemAuth.php create mode 100644 application/manystoreapi/controller/school/classes/activity/order/Order.php create mode 100644 application/manystoreapi/controller/school/classes/activity/order/OrderDetail.php create mode 100644 application/manystoreapi/controller/school/classes/activity/order/OrderItem.php create mode 100644 application/manystoreapi/controller/school/classes/activity/order/OrderLog.php create mode 100644 application/manystoreapi/controller/school/classes/hourorder/Order.php create mode 100644 application/manystoreapi/controller/school/classes/hourorder/OrderLog.php create mode 100644 application/manystoreapi/controller/school/classes/order/Order.php create mode 100644 application/manystoreapi/controller/school/classes/order/OrderDetail.php create mode 100644 application/manystoreapi/controller/school/classes/order/OrderLog.php create mode 100644 application/manystoreapi/controller/school/classes/order/ServiceOrder.php create mode 100644 application/manystoreapi/controller/school/classes/order/ServiceOrderLog.php create mode 100644 application/manystoreapi/controller/user/User.php create mode 100644 application/manystoreapi/lang/zh-cn.php create mode 100644 application/manystoreapi/lang/zh-cn/addon.php create mode 100644 application/manystoreapi/lang/zh-cn/ajax.php create mode 100644 application/manystoreapi/lang/zh-cn/auth/group.php create mode 100644 application/manystoreapi/lang/zh-cn/auth/manystore.php create mode 100644 application/manystoreapi/lang/zh-cn/auth/manystorelog.php create mode 100644 application/manystoreapi/lang/zh-cn/auth/rule.php create mode 100644 application/manystoreapi/lang/zh-cn/category.php create mode 100644 application/manystoreapi/lang/zh-cn/command.php create mode 100644 application/manystoreapi/lang/zh-cn/config.php create mode 100644 application/manystoreapi/lang/zh-cn/dashboard.php create mode 100644 application/manystoreapi/lang/zh-cn/general/attachment.php create mode 100644 application/manystoreapi/lang/zh-cn/general/config.php create mode 100644 application/manystoreapi/lang/zh-cn/general/database.php create mode 100644 application/manystoreapi/lang/zh-cn/general/log.php create mode 100644 application/manystoreapi/lang/zh-cn/general/profile.php create mode 100644 application/manystoreapi/lang/zh-cn/index.php create mode 100644 application/manystoreapi/lang/zh-cn/manystore/shop_log.php create mode 100644 application/manystoreapi/lang/zh-cn/manystore/user_auth.php create mode 100644 application/manystoreapi/lang/zh-cn/school/classes/activity/activity.php create mode 100644 application/manystoreapi/lang/zh-cn/school/classes/activity/activity_auth.php create mode 100644 application/manystoreapi/lang/zh-cn/school/classes/activity/activity_item.php create mode 100644 application/manystoreapi/lang/zh-cn/school/classes/activity/activity_item_auth.php create mode 100644 application/manystoreapi/lang/zh-cn/school/classes/activity/order/order.php create mode 100644 application/manystoreapi/lang/zh-cn/school/classes/activity/order/order_detail.php create mode 100644 application/manystoreapi/lang/zh-cn/school/classes/activity/order/order_item.php create mode 100644 application/manystoreapi/lang/zh-cn/school/classes/activity/order/order_log.php create mode 100644 application/manystoreapi/lang/zh-cn/school/classes/cate.php create mode 100644 application/manystoreapi/lang/zh-cn/school/classes/classes_lib.php create mode 100644 application/manystoreapi/lang/zh-cn/school/classes/classes_spec.php create mode 100644 application/manystoreapi/lang/zh-cn/school/classes/collect.php create mode 100644 application/manystoreapi/lang/zh-cn/school/classes/evaluate.php create mode 100644 application/manystoreapi/lang/zh-cn/school/classes/hourorder/order.php create mode 100644 application/manystoreapi/lang/zh-cn/school/classes/hourorder/order_log.php create mode 100644 application/manystoreapi/lang/zh-cn/school/classes/label.php create mode 100644 application/manystoreapi/lang/zh-cn/school/classes/order/order.php create mode 100644 application/manystoreapi/lang/zh-cn/school/classes/order/order_detail.php create mode 100644 application/manystoreapi/lang/zh-cn/school/classes/order/order_log.php create mode 100644 application/manystoreapi/lang/zh-cn/school/classes/order/service_order.php create mode 100644 application/manystoreapi/lang/zh-cn/school/classes/order/service_order_log.php create mode 100644 application/manystoreapi/lang/zh-cn/school/classes/teacher.php create mode 100644 application/manystoreapi/lang/zh-cn/school/classes/type.php create mode 100644 application/manystoreapi/lang/zh-cn/school/classes/verification.php create mode 100644 application/manystoreapi/lang/zh-cn/school/classes/virtual_head.php create mode 100644 application/manystoreapi/lang/zh-cn/school/classes/virtual_user.php create mode 100644 application/manystoreapi/lang/zh-cn/school/message.php create mode 100644 application/manystoreapi/lang/zh-cn/user/user.php create mode 100644 application/manystoreapi/library/Auth.php create mode 100644 application/manystoreapi/library/ManystoreAuth.php create mode 100644 application/manystoreapi/library/traits/Backend.php create mode 100644 application/manystoreapi/model/Admin.php create mode 100644 application/manystoreapi/model/Manystore.php create mode 100644 application/manystoreapi/model/ManystoreApiAuthGroup.php create mode 100644 application/manystoreapi/model/ManystoreApiAuthGroupAccess.php create mode 100644 application/manystoreapi/model/ManystoreApiAuthRule.php create mode 100644 application/manystoreapi/model/ManystoreCommand.php create mode 100644 application/manystoreapi/model/ManystoreLog.php create mode 100644 application/manystoreapi/model/ManystoreShop.php create mode 100644 application/manystoreapi/model/SchoolClassesHourOrder.php create mode 100644 application/manystoreapi/model/SchoolClassesLib.php create mode 100644 application/manystoreapi/model/SchoolClassesLibSpec.php create mode 100644 application/manystoreapi/model/SchoolClassesOrder.php create mode 100644 application/manystoreapi/model/SchoolClassesOrderDetail.php create mode 100644 application/manystoreapi/model/User.php create mode 100644 application/manystoreapi/model/manystore/ShopLog.php create mode 100644 application/manystoreapi/model/manystore/UserAuth.php create mode 100644 application/manystoreapi/model/school/Message.php create mode 100644 application/manystoreapi/model/school/classes/Cate.php create mode 100644 application/manystoreapi/model/school/classes/ClassesLib.php create mode 100644 application/manystoreapi/model/school/classes/ClassesSpec.php create mode 100644 application/manystoreapi/model/school/classes/Collect.php create mode 100644 application/manystoreapi/model/school/classes/Evaluate.php create mode 100644 application/manystoreapi/model/school/classes/Label.php create mode 100644 application/manystoreapi/model/school/classes/Teacher.php create mode 100644 application/manystoreapi/model/school/classes/Type.php create mode 100644 application/manystoreapi/model/school/classes/Verification.php create mode 100644 application/manystoreapi/model/school/classes/VirtualHead.php create mode 100644 application/manystoreapi/model/school/classes/VirtualUser.php create mode 100644 application/manystoreapi/model/school/classes/activity/Activity.php create mode 100644 application/manystoreapi/model/school/classes/activity/ActivityAuth.php create mode 100644 application/manystoreapi/model/school/classes/activity/ActivityItem.php create mode 100644 application/manystoreapi/model/school/classes/activity/ActivityItemAuth.php create mode 100644 application/manystoreapi/model/school/classes/activity/order/Order.php create mode 100644 application/manystoreapi/model/school/classes/activity/order/OrderDetail.php create mode 100644 application/manystoreapi/model/school/classes/activity/order/OrderItem.php create mode 100644 application/manystoreapi/model/school/classes/activity/order/OrderLog.php create mode 100644 application/manystoreapi/model/school/classes/hourorder/Order.php create mode 100644 application/manystoreapi/model/school/classes/hourorder/OrderLog.php create mode 100644 application/manystoreapi/model/school/classes/order/Order.php create mode 100644 application/manystoreapi/model/school/classes/order/OrderDetail.php create mode 100644 application/manystoreapi/model/school/classes/order/OrderLog.php create mode 100644 application/manystoreapi/model/school/classes/order/ServiceOrder.php create mode 100644 application/manystoreapi/model/school/classes/order/ServiceOrderLog.php create mode 100644 application/manystoreapi/model/user/User.php create mode 100644 application/manystoreapi/tags.php create mode 100644 application/manystoreapi/validate/Manystore.php create mode 100644 application/manystoreapi/validate/ManystoreAuthRule.php create mode 100644 application/manystoreapi/validate/ManystoreCommand.php create mode 100644 application/manystoreapi/validate/manystore/ShopLog.php create mode 100644 application/manystoreapi/validate/manystore/UserAuth.php create mode 100644 application/manystoreapi/validate/school/Message.php create mode 100644 application/manystoreapi/validate/school/classes/Cate.php create mode 100644 application/manystoreapi/validate/school/classes/ClassesLib.php create mode 100644 application/manystoreapi/validate/school/classes/ClassesSpec.php create mode 100644 application/manystoreapi/validate/school/classes/Collect.php create mode 100644 application/manystoreapi/validate/school/classes/Evaluate.php create mode 100644 application/manystoreapi/validate/school/classes/Label.php create mode 100644 application/manystoreapi/validate/school/classes/Teacher.php create mode 100644 application/manystoreapi/validate/school/classes/Type.php create mode 100644 application/manystoreapi/validate/school/classes/Verification.php create mode 100644 application/manystoreapi/validate/school/classes/VirtualHead.php create mode 100644 application/manystoreapi/validate/school/classes/VirtualUser.php create mode 100644 application/manystoreapi/validate/school/classes/activity/Activity.php create mode 100644 application/manystoreapi/validate/school/classes/activity/ActivityAuth.php create mode 100644 application/manystoreapi/validate/school/classes/activity/ActivityItem.php create mode 100644 application/manystoreapi/validate/school/classes/activity/ActivityItemAuth.php create mode 100644 application/manystoreapi/validate/school/classes/activity/order/Order.php create mode 100644 application/manystoreapi/validate/school/classes/activity/order/OrderDetail.php create mode 100644 application/manystoreapi/validate/school/classes/activity/order/OrderItem.php create mode 100644 application/manystoreapi/validate/school/classes/activity/order/OrderLog.php create mode 100644 application/manystoreapi/validate/school/classes/hourorder/Order.php create mode 100644 application/manystoreapi/validate/school/classes/hourorder/OrderLog.php create mode 100644 application/manystoreapi/validate/school/classes/order/Order.php create mode 100644 application/manystoreapi/validate/school/classes/order/OrderDetail.php create mode 100644 application/manystoreapi/validate/school/classes/order/OrderLog.php create mode 100644 application/manystoreapi/validate/school/classes/order/ServiceOrder.php create mode 100644 application/manystoreapi/validate/school/classes/order/ServiceOrderLog.php create mode 100644 application/manystoreapi/validate/user/User.php create mode 100644 application/manystoreapi/view/auth/group/add.html create mode 100644 application/manystoreapi/view/auth/group/edit.html create mode 100644 application/manystoreapi/view/auth/group/index.html create mode 100644 application/manystoreapi/view/auth/manystore/add.html create mode 100644 application/manystoreapi/view/auth/manystore/edit.html create mode 100644 application/manystoreapi/view/auth/manystore/index.html create mode 100644 application/manystoreapi/view/auth/manystorelog/detail.html create mode 100644 application/manystoreapi/view/auth/manystorelog/index.html create mode 100644 application/manystoreapi/view/common/control.html create mode 100644 application/manystoreapi/view/common/header.html create mode 100644 application/manystoreapi/view/common/menu.html create mode 100644 application/manystoreapi/view/common/meta.html create mode 100644 application/manystoreapi/view/common/script.html create mode 100644 application/manystoreapi/view/dashboard/index.html create mode 100644 application/manystoreapi/view/general/attachment/add.html create mode 100644 application/manystoreapi/view/general/attachment/edit.html create mode 100644 application/manystoreapi/view/general/attachment/index.html create mode 100644 application/manystoreapi/view/general/attachment/select.html create mode 100644 application/manystoreapi/view/general/config/index.html create mode 100644 application/manystoreapi/view/general/log/index.html create mode 100644 application/manystoreapi/view/general/profile/index.html create mode 100644 application/manystoreapi/view/index/index.html create mode 100644 application/manystoreapi/view/index/login.html create mode 100644 application/manystoreapi/view/layout/default.html create mode 100644 application/manystoreapi/view/manystore/shop_log/add.html create mode 100644 application/manystoreapi/view/manystore/shop_log/edit.html create mode 100644 application/manystoreapi/view/manystore/shop_log/index.html create mode 100644 application/manystoreapi/view/manystore/user_auth/add.html create mode 100644 application/manystoreapi/view/manystore/user_auth/changeuser.html create mode 100644 application/manystoreapi/view/manystore/user_auth/edit.html create mode 100644 application/manystoreapi/view/manystore/user_auth/index.html create mode 100644 application/manystoreapi/view/school/classes/activity/activity/add.html create mode 100644 application/manystoreapi/view/school/classes/activity/activity/edit.html create mode 100644 application/manystoreapi/view/school/classes/activity/activity/index.html create mode 100644 application/manystoreapi/view/school/classes/activity/activity/recyclebin.html create mode 100644 application/manystoreapi/view/school/classes/activity/activity_auth/add.html create mode 100644 application/manystoreapi/view/school/classes/activity/activity_auth/edit.html create mode 100644 application/manystoreapi/view/school/classes/activity/activity_auth/index.html create mode 100644 application/manystoreapi/view/school/classes/activity/activity_auth/recyclebin.html create mode 100644 application/manystoreapi/view/school/classes/activity/activity_item/add.html create mode 100644 application/manystoreapi/view/school/classes/activity/activity_item/edit.html create mode 100644 application/manystoreapi/view/school/classes/activity/activity_item/index.html create mode 100644 application/manystoreapi/view/school/classes/activity/activity_item/recyclebin.html create mode 100644 application/manystoreapi/view/school/classes/activity/activity_item_auth/add.html create mode 100644 application/manystoreapi/view/school/classes/activity/activity_item_auth/edit.html create mode 100644 application/manystoreapi/view/school/classes/activity/activity_item_auth/index.html create mode 100644 application/manystoreapi/view/school/classes/activity/activity_item_auth/recyclebin.html create mode 100644 application/manystoreapi/view/school/classes/activity/order/order/add.html create mode 100644 application/manystoreapi/view/school/classes/activity/order/order/edit.html create mode 100644 application/manystoreapi/view/school/classes/activity/order/order/examine.html create mode 100644 application/manystoreapi/view/school/classes/activity/order/order/index.html create mode 100644 application/manystoreapi/view/school/classes/activity/order/order/recyclebin.html create mode 100644 application/manystoreapi/view/school/classes/activity/order/order_detail/add.html create mode 100644 application/manystoreapi/view/school/classes/activity/order/order_detail/edit.html create mode 100644 application/manystoreapi/view/school/classes/activity/order/order_detail/index.html create mode 100644 application/manystoreapi/view/school/classes/activity/order/order_detail/recyclebin.html create mode 100644 application/manystoreapi/view/school/classes/activity/order/order_item/add.html create mode 100644 application/manystoreapi/view/school/classes/activity/order/order_item/edit.html create mode 100644 application/manystoreapi/view/school/classes/activity/order/order_item/index.html create mode 100644 application/manystoreapi/view/school/classes/activity/order/order_item/recyclebin.html create mode 100644 application/manystoreapi/view/school/classes/activity/order/order_log/add.html create mode 100644 application/manystoreapi/view/school/classes/activity/order/order_log/edit.html create mode 100644 application/manystoreapi/view/school/classes/activity/order/order_log/index.html create mode 100644 application/manystoreapi/view/school/classes/activity/order/order_log/recyclebin.html create mode 100644 application/manystoreapi/view/school/classes/cate/add.html create mode 100644 application/manystoreapi/view/school/classes/cate/edit.html create mode 100644 application/manystoreapi/view/school/classes/cate/index.html create mode 100644 application/manystoreapi/view/school/classes/cate/recyclebin.html create mode 100644 application/manystoreapi/view/school/classes/classes_lib/add.html create mode 100644 application/manystoreapi/view/school/classes/classes_lib/addnew.html create mode 100644 application/manystoreapi/view/school/classes/classes_lib/copy.html create mode 100644 application/manystoreapi/view/school/classes/classes_lib/edit.html create mode 100644 application/manystoreapi/view/school/classes/classes_lib/index.html create mode 100644 application/manystoreapi/view/school/classes/classes_lib/recyclebin.html create mode 100644 application/manystoreapi/view/school/classes/classes_spec/add.html create mode 100644 application/manystoreapi/view/school/classes/classes_spec/edit.html create mode 100644 application/manystoreapi/view/school/classes/classes_spec/index.html create mode 100644 application/manystoreapi/view/school/classes/classes_spec/recyclebin.html create mode 100644 application/manystoreapi/view/school/classes/collect/add.html create mode 100644 application/manystoreapi/view/school/classes/collect/edit.html create mode 100644 application/manystoreapi/view/school/classes/collect/index.html create mode 100644 application/manystoreapi/view/school/classes/evaluate/add.html create mode 100644 application/manystoreapi/view/school/classes/evaluate/edit.html create mode 100644 application/manystoreapi/view/school/classes/evaluate/index.html create mode 100644 application/manystoreapi/view/school/classes/hourorder/order/add.html create mode 100644 application/manystoreapi/view/school/classes/hourorder/order/edit.html create mode 100644 application/manystoreapi/view/school/classes/hourorder/order/examine.html create mode 100644 application/manystoreapi/view/school/classes/hourorder/order/index.html create mode 100644 application/manystoreapi/view/school/classes/hourorder/order/recyclebin.html create mode 100644 application/manystoreapi/view/school/classes/hourorder/order_log/add.html create mode 100644 application/manystoreapi/view/school/classes/hourorder/order_log/edit.html create mode 100644 application/manystoreapi/view/school/classes/hourorder/order_log/index.html create mode 100644 application/manystoreapi/view/school/classes/label/add.html create mode 100644 application/manystoreapi/view/school/classes/label/edit.html create mode 100644 application/manystoreapi/view/school/classes/label/index.html create mode 100644 application/manystoreapi/view/school/classes/label/recyclebin.html create mode 100644 application/manystoreapi/view/school/classes/order/order/add.html create mode 100644 application/manystoreapi/view/school/classes/order/order/after_sales.html create mode 100644 application/manystoreapi/view/school/classes/order/order/edit.html create mode 100644 application/manystoreapi/view/school/classes/order/order/index.html create mode 100644 application/manystoreapi/view/school/classes/order/order/recyclebin.html create mode 100644 application/manystoreapi/view/school/classes/order/order_detail/add.html create mode 100644 application/manystoreapi/view/school/classes/order/order_detail/edit.html create mode 100644 application/manystoreapi/view/school/classes/order/order_detail/index.html create mode 100644 application/manystoreapi/view/school/classes/order/order_detail/recyclebin.html create mode 100644 application/manystoreapi/view/school/classes/order/order_log/add.html create mode 100644 application/manystoreapi/view/school/classes/order/order_log/edit.html create mode 100644 application/manystoreapi/view/school/classes/order/order_log/index.html create mode 100644 application/manystoreapi/view/school/classes/order/service_order/add.html create mode 100644 application/manystoreapi/view/school/classes/order/service_order/admin_confirmation.html create mode 100644 application/manystoreapi/view/school/classes/order/service_order/edit.html create mode 100644 application/manystoreapi/view/school/classes/order/service_order/index.html create mode 100644 application/manystoreapi/view/school/classes/order/service_order/recyclebin.html create mode 100644 application/manystoreapi/view/school/classes/order/service_order/shop_confirmation.html create mode 100644 application/manystoreapi/view/school/classes/order/service_order/user_confirmation.html create mode 100644 application/manystoreapi/view/school/classes/order/service_order_log/add.html create mode 100644 application/manystoreapi/view/school/classes/order/service_order_log/edit.html create mode 100644 application/manystoreapi/view/school/classes/order/service_order_log/index.html create mode 100644 application/manystoreapi/view/school/classes/teacher/add.html create mode 100644 application/manystoreapi/view/school/classes/teacher/edit.html create mode 100644 application/manystoreapi/view/school/classes/teacher/index.html create mode 100644 application/manystoreapi/view/school/classes/teacher/recyclebin.html create mode 100644 application/manystoreapi/view/school/classes/type/add.html create mode 100644 application/manystoreapi/view/school/classes/type/edit.html create mode 100644 application/manystoreapi/view/school/classes/type/index.html create mode 100644 application/manystoreapi/view/school/classes/type/recyclebin.html create mode 100644 application/manystoreapi/view/school/classes/verification/add.html create mode 100644 application/manystoreapi/view/school/classes/verification/edit.html create mode 100644 application/manystoreapi/view/school/classes/verification/index.html create mode 100644 application/manystoreapi/view/school/classes/virtual_head/add.html create mode 100644 application/manystoreapi/view/school/classes/virtual_head/edit.html create mode 100644 application/manystoreapi/view/school/classes/virtual_head/index.html create mode 100644 application/manystoreapi/view/school/classes/virtual_user/add.html create mode 100644 application/manystoreapi/view/school/classes/virtual_user/edit.html create mode 100644 application/manystoreapi/view/school/classes/virtual_user/index.html create mode 100644 application/manystoreapi/view/school/message/add.html create mode 100644 application/manystoreapi/view/school/message/edit.html create mode 100644 application/manystoreapi/view/school/message/index.html create mode 100644 application/manystoreapi/view/user/user/add.html create mode 100644 application/manystoreapi/view/user/user/edit.html create mode 100644 application/manystoreapi/view/user/user/index.html create mode 100644 public/assets/js/backend/manystore/apirule.js diff --git a/application/admin/controller/manystore/Apirule.php b/application/admin/controller/manystore/Apirule.php new file mode 100644 index 0000000..9b58e7c --- /dev/null +++ b/application/admin/controller/manystore/Apirule.php @@ -0,0 +1,149 @@ +model = new ManystoreApiAuthRule(); + // 必须将结果集转换为数组 + $ruleList = collection($this->model->order('weigh', 'desc')->order('id', 'asc')->select())->toArray(); + foreach ($ruleList as $k => &$v) { + $v['title'] = __($v['title']); + $v['remark'] = __($v['remark']); + } + unset($v); + Tree::instance()->init($ruleList); + $this->rulelist = Tree::instance()->getTreeList(Tree::instance()->getTreeArray(0), 'title'); + $ruledata = [0 => __('None')]; + foreach ($this->rulelist as $k => &$v) { + if (!$v['ismenu']) { + continue; + } + $ruledata[$v['id']] = $v['title']; + } + unset($v); + $this->view->assign('ruledata', $ruledata); + } + + /** + * 查看 + */ + public function index() + { + if ($this->request->isAjax()) { + $list = $this->rulelist; + $total = count($this->rulelist); + + $result = array("total" => $total, "rows" => $list); + + return json($result); + } + return $this->view->fetch(); + } + + /** + * 添加 + */ + public function add() + { + if ($this->request->isPost()) { + $this->token(); + $params = $this->request->post("row/a", [], 'strip_tags'); + if ($params) { + if (!$params['ismenu'] && !$params['pid']) { + $this->error(__('The non-menu rule must have parent')); + } + $result = $this->model->validate()->save($params); + if ($result === false) { + $this->error($this->model->getError()); + } + Cache::rm('__menu__'); + $this->success(); + } + $this->error(); + } + return $this->view->fetch(); + } + + /** + * 编辑 + */ + public function edit($ids = null) + { + $row = $this->model->get(['id' => $ids]); + if (!$row) { + $this->error(__('No Results were found')); + } + if ($this->request->isPost()) { + $this->token(); + $params = $this->request->post("row/a", [], 'strip_tags'); + if ($params) { + if (!$params['ismenu'] && !$params['pid']) { + $this->error(__('The non-menu rule must have parent')); + } + if ($params['pid'] != $row['pid']) { + $childrenIds = Tree::instance()->init(collection(ManystoreApiAuthRule::select())->toArray())->getChildrenIds($row['id']); + if (in_array($params['pid'], $childrenIds)) { + $this->error(__('Can not change the parent to child')); + } + } + //这里需要针对name做唯一验证 + $ruleValidate = \think\Loader::validate('ManystoreApiAuthRule'); + $ruleValidate->rule([ + 'name' => 'require|format|unique:ManystoreApiAuthRule,name,' . $row->id, + ]); + $result = $row->validate()->save($params); + if ($result === false) { + $this->error($row->getError()); + } + Cache::rm('__manystore_menu__'); + $this->success(); + } + $this->error(); + } + $this->view->assign("row", $row); + return $this->view->fetch(); + } + + /** + * 删除 + */ + public function del($ids = "") + { + if ($ids) { + $delIds = []; + foreach (explode(',', $ids) as $k => $v) { + $delIds = array_merge($delIds, Tree::instance()->getChildrenIds($v, true)); + } + $delIds = array_unique($delIds); + $count = $this->model->where('id', 'in', $delIds)->delete(); + if ($count) { + Cache::rm('__manystore_menu__'); + $this->success(); + } + } + $this->error(); + } +} diff --git a/application/admin/controller/manystore/Index.php b/application/admin/controller/manystore/Index.php index 13f49ab..850fa78 100644 --- a/application/admin/controller/manystore/Index.php +++ b/application/admin/controller/manystore/Index.php @@ -15,6 +15,8 @@ use app\common\model\school\classes\Order; use app\common\model\school\classes\order\OrderDetail; use app\common\model\school\classes\order\ServiceOrder; use app\manystore\model\Manystore; +use app\manystore\model\ManystoreApiAuthGroup; +use app\manystore\model\ManystoreApiAuthGroupAccess; use app\manystore\model\ManystoreLog; use app\manystore\model\ManystoreShop; use app\manystore\model\ManystoreAuthGroup; @@ -71,6 +73,7 @@ class Index extends Backend $this->view->assign("statusList", $this->shopModel->getStatusList()); $this->view->assign("typeList", $this->shopModel->getTypeList()); $this->view->assign("shop_backend_url", config("site.shop_backend_url")); + $this->view->assign("shop_api_backend_url", config("site.shop_api_backend_url")); $this->getCity(); $this->getAuthMsg(); @@ -124,6 +127,53 @@ class Index extends Backend + /** + * 免登录进入机构api版本后台 + * @return string + * @throws \think\Exception + * @throws \think\db\exception\BindParamException + * @throws \think\exception\DbException + * @throws \think\exception\PDOException + */ + public function freeapi($ids = ''){ + $param = $this->request->param(); + if($this->request->isPost()){ + + $this->error("API版本后台正在开发中,敬请期待!"); +// try{ + if(isset($param['ids']))$ids = $param['ids']; +// //机构登录 +// //如果存在登录,先退出登录 +// $auth = \app\manystore\library\Auth::instance(); +// if($auth->isLogin()){ +// $auth->logout(); +// Hook::listen("manystore_logout_after", $this->request); +// } +// //执行登录 +// ManystoreLog::setTitle(__('Login')); +// $result = $auth->freelogin($ids, 0); +// if ($result === true) { +// Hook::listen("admin_login_after", $this->request); +// $this->success(__('Login successful'), null, [ 'id' => $auth->id, 'avatar' => $auth->avatar]); +// } else { +// $msg = $auth->getError(); +// $msg = $msg ? $msg : __('Username or password is incorrect'); +// $this->error($msg, null, ['token' => $this->request->token()]); +// } +// + + +// }catch (\Exception $e){ +// $this->error($e->getMessage()); +// } + + } + $row = $this->model->get($ids); + $this->view->assign('vo', $row); + return $this->view->fetch(); + } + + /** * 查看 @@ -485,6 +535,11 @@ class Index extends Backend if(!$group_id){ throw new \Exception('添加失败'); } + $manystoreApiAuthGroupModel = new ManystoreApiAuthGroup(); + $api_group_id = $manystoreApiAuthGroupModel->insertGetId($group); + if(!$api_group_id){ + throw new \Exception('添加失败'); + } $manystoreAuthGroupAccessModel = new ManystoreAuthGroupAccess(); $group_access = []; @@ -493,6 +548,14 @@ class Index extends Backend $manystoreAuthGroupAccessModel->insert($group_access); + $manystoreApiAuthGroupAccessModel = new ManystoreApiAuthGroupAccess(); + $group_access = []; + $group_access['uid'] = $this->model->id; + $group_access['group_id'] = $api_group_id; + + $manystoreApiAuthGroupAccessModel->insert($group_access); + + //调用事件 $data = ['shop' => $this->shopModel]; @@ -642,6 +705,10 @@ class Index extends Backend \app\common\model\school\classes\Verification::where(array('shop_id'=>$row['shop_id']))->delete(); Order::where(array('shop_id'=>$row['shop_id']))->delete(); OrderDetail::where(array('shop_id'=>$row['shop_id']))->delete(); + + \app\admin\model\school\classes\activity\order\Order::where(array('shop_id'=>$row['shop_id']))->delete(); + \app\admin\model\school\classes\activity\order\OrderDetail::where(array('shop_id'=>$row['shop_id']))->delete(); + \app\admin\model\school\classes\hour\Order::where(array('shop_id'=>$row['shop_id']))->delete(); ServiceOrder::where(array('shop_id'=>$row['shop_id']))->delete(); $classesLibs = \app\common\model\school\classes\ClassesLib::where(array('shop_id'=>$row['shop_id']))->select(); diff --git a/application/admin/lang/zh-cn/manystore/apirule.php b/application/admin/lang/zh-cn/manystore/apirule.php new file mode 100644 index 0000000..1c533fd --- /dev/null +++ b/application/admin/lang/zh-cn/manystore/apirule.php @@ -0,0 +1,20 @@ + '显示全部', + 'Condition' => '规则条件', + 'Remark' => '备注', + 'Icon' => '图标', + 'Alert' => '警告', + 'Name' => '规则', + 'Controller/Action' => '控制器名/方法名', + 'Ismenu' => '菜单', + 'Search icon' => '搜索图标', + 'Toggle menu visible' => '点击切换菜单显示', + 'Toggle sub menu' => '点击切换子菜单', + 'Menu tips' => '父级菜单无需匹配控制器和方法,子级菜单请使用控制器名', + 'Node tips' => '控制器/方法名,如果有目录请使用 目录名/控制器名/方法名', + 'The non-menu rule must have parent' => '非菜单规则节点必须有父级', + 'Can not change the parent to child' => '父组别不能是它的子组别', + 'Name only supports letters, numbers, underscore and slash' => 'URL规则只能是小写字母、数字、下划线和/组成', +]; diff --git a/application/admin/validate/ManystoreApiAuthRule.php b/application/admin/validate/ManystoreApiAuthRule.php new file mode 100644 index 0000000..33cb831 --- /dev/null +++ b/application/admin/validate/ManystoreApiAuthRule.php @@ -0,0 +1,52 @@ + '[a-z0-9_\/]+']; + + /** + * 验证规则 + */ + protected $rule = [ + 'name' => 'require|format|unique:ManystoreApiAuthRule', + 'title' => 'require', + ]; + + /** + * 提示消息 + */ + protected $message = [ + 'name.format' => 'URL规则只能是小写字母、数字、下划线和/组成' + ]; + + /** + * 字段描述 + */ + protected $field = [ + ]; + + /** + * 验证场景 + */ + protected $scene = [ + ]; + + public function __construct(array $rules = [], $message = [], $field = []) + { + $this->field = [ + 'name' => __('Name'), + 'title' => __('Title'), + ]; + $this->message['name.format'] = __('Name only supports letters, numbers, underscore and slash'); + parent::__construct($rules, $message, $field); + } + +} diff --git a/application/admin/validate/manystore/Apirule.php b/application/admin/validate/manystore/Apirule.php new file mode 100644 index 0000000..2ea7dff --- /dev/null +++ b/application/admin/validate/manystore/Apirule.php @@ -0,0 +1,52 @@ + '[a-z0-9_\/]+']; + + /** + * 验证规则 + */ + protected $rule = [ + 'name' => 'require|format|unique:Apirule', + 'title' => 'require', + ]; + + /** + * 提示消息 + */ + protected $message = [ + 'name.format' => 'URL规则只能是小写字母、数字、下划线和/组成' + ]; + + /** + * 字段描述 + */ + protected $field = [ + ]; + + /** + * 验证场景 + */ + protected $scene = [ + ]; + + public function __construct(array $rules = [], $message = [], $field = []) + { + $this->field = [ + 'name' => __('Name'), + 'title' => __('Title'), + ]; + $this->message['name.format'] = __('Name only supports letters, numbers, underscore and slash'); + parent::__construct($rules, $message, $field); + } + +} diff --git a/application/admin/view/manystore/apirule/add.html b/application/admin/view/manystore/apirule/add.html new file mode 100644 index 0000000..4a9d737 --- /dev/null +++ b/application/admin/view/manystore/apirule/add.html @@ -0,0 +1,68 @@ +
+{include file="auth/rule/tpl" /} \ No newline at end of file diff --git a/application/admin/view/manystore/apirule/edit.html b/application/admin/view/manystore/apirule/edit.html new file mode 100644 index 0000000..ba12a20 --- /dev/null +++ b/application/admin/view/manystore/apirule/edit.html @@ -0,0 +1,68 @@ + +{include file="auth/rule/tpl" /} \ No newline at end of file diff --git a/application/admin/view/manystore/apirule/index.html b/application/admin/view/manystore/apirule/index.html new file mode 100644 index 0000000..7b418b4 --- /dev/null +++ b/application/admin/view/manystore/apirule/index.html @@ -0,0 +1,35 @@ + +卸载将会删除所有插件文件且不可找回!!! 插件如果有创建数据库表请手动删除!!!
如有重要数据请备份后再操作!', + 'Upgrade tips' => '确认升级[%s]?如果之前购买插件时未登录,此次升级可能出现购买后才可以下载的提示!!!
升级后可能出现部分冗余数据记录,请根据需要移除即可!!!
{:__('Title')} | +{:__('Content')} | +
---|---|
{:__($key)} | +{$vo|htmlentities} | +
{$manystore.nickname|htmlentities} {$auth_type_text}
+ {:__('Online')} +