├── Library-miniProject ├── resources │ ├── images │ │ ├── function │ │ │ ├── conf │ │ │ ├── receive_rule.svg │ │ │ ├── receive_fast.svg │ │ │ ├── receive_common.svg │ │ │ └── receive_record.svg │ │ ├── tabBar │ │ │ ├── _index.png │ │ │ ├── center.png │ │ │ ├── index.png │ │ │ ├── _center.png │ │ │ ├── _function.png │ │ │ └── function.png │ │ ├── library │ │ │ ├── selectDown.svg │ │ │ ├── success.svg │ │ │ ├── delete.svg │ │ │ ├── content.svg │ │ │ ├── yizi-normal.svg │ │ │ ├── yizi-red.svg │ │ │ └── yizi-green.svg │ │ ├── receive │ │ │ └── selectDown.svg │ │ ├── Author │ │ │ ├── level.svg │ │ │ ├── credit.svg │ │ │ ├── setting.svg │ │ │ └── message.svg │ │ └── love.svg │ └── .DS_Store ├── pages │ ├── center │ │ ├── user │ │ │ ├── user.json │ │ │ ├── user.wxss │ │ │ ├── user.wxml │ │ │ └── user.js │ │ ├── login │ │ │ ├── login.json │ │ │ ├── confirm │ │ │ │ ├── confirm.json │ │ │ │ ├── confirm.wxml │ │ │ │ └── confirm.wxss │ │ │ ├── login.wxss │ │ │ └── login.wxml │ │ ├── feedback │ │ │ ├── feedback.json │ │ │ ├── feedback.wxml │ │ │ ├── feedback.wxss │ │ │ └── feedback.js │ │ ├── messages │ │ │ ├── messages.json │ │ │ ├── messages.wxss │ │ │ ├── messages.wxml │ │ │ └── messages.js │ │ ├── settings │ │ │ ├── settings.json │ │ │ ├── settings.wxss │ │ │ ├── settings.wxml │ │ │ └── settings.js │ │ ├── mycredit │ │ │ ├── mycredit.json │ │ │ ├── mycredit.wxss │ │ │ ├── mycredit.wxml │ │ │ └── mycredit.js │ │ ├── userInfo │ │ │ ├── userInfo.json │ │ │ └── userInfo.wxss │ │ ├── center.json │ │ ├── cquptLogin │ │ │ ├── cquptLogin.json │ │ │ ├── cquptLogin.wxml │ │ │ └── cquptLogin.wxss │ │ └── learnCount │ │ │ ├── learnCount.json │ │ │ └── learnCount.wxss │ ├── function │ │ ├── function.json │ │ ├── book │ │ │ └── book.json │ │ ├── downUp │ │ │ ├── downUp.json │ │ │ ├── downUp.wxss │ │ │ └── downUp.wxml │ │ ├── bookRule │ │ │ ├── bookRule.json │ │ │ ├── bookRule.wxml │ │ │ ├── bookRule.wxss │ │ │ └── bookRule.js │ │ ├── fastBook │ │ │ ├── fastBook.json │ │ │ └── fastBook.wxss │ │ ├── bookGuide │ │ │ ├── bookGuide.json │ │ │ ├── bookGuide.wxml │ │ │ └── bookGuide.wxss │ │ ├── bookRecord │ │ │ ├── bookRecord.json │ │ │ └── bookRecord.wxss │ │ └── notify │ │ │ ├── notifyItem │ │ │ ├── notifyItem.json │ │ │ ├── notifyItem.wxss │ │ │ ├── notifyItem.wxml │ │ │ └── notifyItem.js │ │ │ ├── notify.json │ │ │ ├── notify.wxml │ │ │ ├── notify.wxss │ │ │ └── notify.js │ └── index │ │ └── index.json ├── ec-canvas │ ├── ec-canvas.json │ ├── ec-canvas.wxss │ ├── .DS_Store │ └── ec-canvas.wxml ├── .DS_Store ├── utils │ ├── .DS_Store │ ├── util.js │ ├── storage.js │ └── request.js ├── node_modules │ ├── mobx-miniprogram │ │ ├── lib │ │ │ ├── utils │ │ │ │ ├── eq.d.ts │ │ │ │ ├── iterable.d.ts │ │ │ │ ├── comparer.d.ts │ │ │ │ └── decorators2.d.ts │ │ │ ├── api │ │ │ │ ├── isobservable.d.ts │ │ │ │ ├── iscomputed.d.ts │ │ │ │ ├── trace.d.ts │ │ │ │ ├── observabledecorator.d.ts │ │ │ │ ├── transaction.d.ts │ │ │ │ ├── configure.d.ts │ │ │ │ ├── decorate.d.ts │ │ │ │ ├── extras.d.ts │ │ │ │ ├── when.d.ts │ │ │ │ ├── extendobservable.d.ts │ │ │ │ ├── tojs.d.ts │ │ │ │ ├── flow.d.ts │ │ │ │ ├── actiondecorator.d.ts │ │ │ │ ├── become-observed.d.ts │ │ │ │ ├── computed.d.ts │ │ │ │ ├── intercept-read.d.ts │ │ │ │ ├── autorun.d.ts │ │ │ │ ├── intercept.d.ts │ │ │ │ └── observe.d.ts │ │ │ ├── types │ │ │ │ ├── type-utils.d.ts │ │ │ │ ├── modifiers.d.ts │ │ │ │ ├── listen-utils.d.ts │ │ │ │ ├── intercept-utils.d.ts │ │ │ │ └── observablevalue.d.ts │ │ │ ├── core │ │ │ │ ├── spy.d.ts │ │ │ │ ├── action.d.ts │ │ │ │ └── atom.d.ts │ │ │ └── internal.d.ts │ │ └── LICENSE │ ├── mobx-miniprogram-bindings │ │ ├── .babelrc │ │ ├── LICENSE │ │ └── gulpfile.js │ └── .package-lock.json ├── package.json ├── sitemap.json ├── .eslintrc.js ├── project.config.json ├── app.wxss ├── package-lock.json └── app.js ├── Library-vue ├── src │ ├── assets │ │ ├── css │ │ │ ├── theme.less │ │ │ └── common.css │ │ ├── logo.png │ │ └── img │ │ │ ├── library.jpg │ │ │ ├── home.svg │ │ │ ├── email.svg │ │ │ ├── tel.svg │ │ │ └── library │ │ │ ├── yizi-normal.svg │ │ │ ├── yizi-red.svg │ │ │ └── yizi-green.svg │ ├── store │ │ ├── getters.js │ │ ├── states │ │ │ ├── receive.js │ │ │ ├── school.js │ │ │ └── user.js │ │ ├── index.js │ │ └── mutations.js │ ├── utils │ │ └── services │ │ │ ├── FileService.js │ │ │ ├── RuleService.js │ │ │ ├── ReceiveService.js │ │ │ ├── SeatService.js │ │ │ ├── TableService.js │ │ │ ├── SchoolService.js │ │ │ ├── LibraryService.js │ │ │ ├── NotificationService.js │ │ │ ├── AuthService.js │ │ │ ├── RoomService.js │ │ │ ├── ReservationService.js │ │ │ ├── index.js │ │ │ └── UserService.js │ ├── main.js │ ├── App.vue │ ├── router │ │ ├── index.js │ │ └── routers.js │ └── components │ │ └── NotFount.vue ├── public │ └── favicon.ico ├── babel.config.js ├── jsconfig.json ├── README.md ├── vue.config.js └── package.json ├── resource ├── 图书馆.png └── favicon.ico ├── Library-Server ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── src │ ├── main │ │ ├── resources │ │ │ ├── sql │ │ │ │ ├── merge.sh │ │ │ │ ├── cqupt.sql │ │ │ │ └── receive.sql │ │ │ ├── static │ │ │ │ └── img │ │ │ │ │ ├── bg.jpg │ │ │ │ │ ├── bg1.jpg │ │ │ │ │ ├── headicon.webp │ │ │ │ │ └── schoolbg.jpeg │ │ │ ├── config │ │ │ │ └── config.properties │ │ │ └── application.properties │ │ └── java │ │ │ └── cool │ │ │ └── leeson │ │ │ └── library │ │ │ ├── entity │ │ │ ├── wx │ │ │ │ └── AccessToken.java │ │ │ ├── receive │ │ │ │ ├── ReceiveItemPost.java │ │ │ │ ├── ReceiveFast.java │ │ │ │ └── ReceiveItem.java │ │ │ ├── library │ │ │ │ ├── simple │ │ │ │ │ ├── SeatSimple.java │ │ │ │ │ ├── TableSimple.java │ │ │ │ │ ├── LibrarySimple.java │ │ │ │ │ ├── SchoolSimple.java │ │ │ │ │ └── RoomSimple.java │ │ │ │ ├── SchoolRule.java │ │ │ │ ├── School.java │ │ │ │ ├── LibraryTable.java │ │ │ │ ├── LibraryRoom.java │ │ │ │ ├── LibrarySeat.java │ │ │ │ ├── LibraryFeedback.java │ │ │ │ ├── SchoolNotification.java │ │ │ │ └── Library.java │ │ │ └── user │ │ │ │ ├── CquptInfo.java │ │ │ │ ├── UserOnline.java │ │ │ │ ├── UserCredit.java │ │ │ │ ├── UserSchool.java │ │ │ │ ├── UserLearned.java │ │ │ │ ├── User.java │ │ │ │ ├── UserInfoQuery.java │ │ │ │ ├── UserInfo.java │ │ │ │ └── UserRecord.java │ │ │ ├── controller │ │ │ ├── TestController.java │ │ │ ├── WebController.java │ │ │ ├── user │ │ │ │ ├── WXController.java │ │ │ │ └── UserOnlineController.java │ │ │ ├── CommonController.java │ │ │ ├── clock │ │ │ │ └── ClockController.java │ │ │ └── library │ │ │ │ └── SchoolRuleController.java │ │ │ ├── LibraryServerApplication.java │ │ │ ├── config │ │ │ ├── Config.java │ │ │ ├── WebConfig.java │ │ │ └── RedisConfig.java │ │ │ ├── util │ │ │ ├── WxUtil.java │ │ │ └── TimeUtil.java │ │ │ └── exceptions │ │ │ └── MyException.java │ └── test │ │ └── java │ │ └── cool │ │ └── leeson │ │ └── library │ │ └── RedisTest.java ├── library.sh ├── README.md └── Dockerfile ├── Library-Server-Cloud ├── account │ └── src │ │ └── main │ │ ├── java │ │ └── cool │ │ │ └── leeson │ │ │ └── lib │ │ │ ├── dao │ │ │ └── UserDao.java │ │ │ ├── Account.java │ │ │ ├── controller │ │ │ └── LoginController.java │ │ │ └── service │ │ │ └── LoginServiceImpl.java │ │ └── resources │ │ └── application.yml ├── gateway │ ├── src │ │ └── main │ │ │ ├── java │ │ │ └── cool │ │ │ │ └── leeson │ │ │ │ └── lib │ │ │ │ └── Gateway.java │ │ │ └── resources │ │ │ └── application.yml │ └── pom.xml └── common-util │ ├── src │ └── main │ │ └── java │ │ └── cool │ │ └── leeson │ │ └── lib │ │ ├── entity │ │ └── User.java │ │ ├── utils │ │ ├── WxUtil.java │ │ └── TimeUtil.java │ │ └── exceptions │ │ └── MyException.java │ └── pom.xml └── .gitignore /Library-miniProject/resources/images/function/conf: -------------------------------------------------------------------------------- 1 | # 4e63dd -------------------------------------------------------------------------------- /Library-vue/src/assets/css/theme.less: -------------------------------------------------------------------------------- 1 | @raudis: 10; 2 | -------------------------------------------------------------------------------- /Library-miniProject/pages/center/user/user.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /Library-miniProject/pages/function/function.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /resource/图书馆.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leeson0202/Library/HEAD/resource/图书馆.png -------------------------------------------------------------------------------- /resource/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leeson0202/Library/HEAD/resource/favicon.ico -------------------------------------------------------------------------------- /Library-vue/src/store/getters.js: -------------------------------------------------------------------------------- 1 | export default { 2 | bigSum(state){ 3 | return 10; 4 | } 5 | }; -------------------------------------------------------------------------------- /Library-miniProject/ec-canvas/ec-canvas.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /Library-miniProject/ec-canvas/ec-canvas.wxss: -------------------------------------------------------------------------------- 1 | .ec-canvas { 2 | width: 100%; 3 | height: 100%; 4 | } 5 | -------------------------------------------------------------------------------- /Library-vue/src/store/states/receive.js: -------------------------------------------------------------------------------- 1 | export default { 2 | schedule: [], 3 | receiveRecord: [], 4 | }; -------------------------------------------------------------------------------- /Library-miniProject/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leeson0202/Library/HEAD/Library-miniProject/.DS_Store -------------------------------------------------------------------------------- /Library-vue/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leeson0202/Library/HEAD/Library-vue/public/favicon.ico -------------------------------------------------------------------------------- /Library-vue/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leeson0202/Library/HEAD/Library-vue/src/assets/logo.png -------------------------------------------------------------------------------- /Library-vue/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /Library-miniProject/pages/center/login/login.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarTitleText": "登陆" 4 | } -------------------------------------------------------------------------------- /Library-miniProject/pages/function/book/book.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarTitleText": "预约" 4 | } -------------------------------------------------------------------------------- /Library-miniProject/utils/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leeson0202/Library/HEAD/Library-miniProject/utils/.DS_Store -------------------------------------------------------------------------------- /Library-miniProject/ec-canvas/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leeson0202/Library/HEAD/Library-miniProject/ec-canvas/.DS_Store -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/utils/eq.d.ts: -------------------------------------------------------------------------------- 1 | export declare function deepEqual(a: any, b: any): boolean; 2 | -------------------------------------------------------------------------------- /Library-miniProject/pages/center/feedback/feedback.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarTitleText": "反馈" 4 | } -------------------------------------------------------------------------------- /Library-miniProject/pages/center/messages/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarTitleText": "信息" 4 | } -------------------------------------------------------------------------------- /Library-miniProject/pages/center/settings/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarTitleText": "设置" 4 | } -------------------------------------------------------------------------------- /Library-miniProject/pages/function/downUp/downUp.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarTitleText": "我的二维码" 4 | } -------------------------------------------------------------------------------- /Library-miniProject/resources/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leeson0202/Library/HEAD/Library-miniProject/resources/.DS_Store -------------------------------------------------------------------------------- /Library-vue/src/assets/img/library.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leeson0202/Library/HEAD/Library-vue/src/assets/img/library.jpg -------------------------------------------------------------------------------- /Library-miniProject/pages/center/login/confirm/confirm.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarTitleText": "登陆" 4 | } -------------------------------------------------------------------------------- /Library-miniProject/pages/center/mycredit/mycredit.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarTitleText": "我的信用" 4 | } -------------------------------------------------------------------------------- /Library-miniProject/pages/center/userInfo/userInfo.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarTitleText": "个人资料" 4 | } -------------------------------------------------------------------------------- /Library-miniProject/pages/function/bookRule/bookRule.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarTitleText": "预约规则" 4 | } -------------------------------------------------------------------------------- /Library-miniProject/pages/function/fastBook/fastBook.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarTitleText": "快速预约" 4 | } -------------------------------------------------------------------------------- /Library-miniProject/pages/function/bookGuide/bookGuide.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarTitleText": "选择图书馆" 4 | } -------------------------------------------------------------------------------- /Library-miniProject/pages/function/bookRecord/bookRecord.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarTitleText": "预约记录" 4 | } -------------------------------------------------------------------------------- /Library-Server/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leeson0202/Library/HEAD/Library-Server/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /Library-miniProject/pages/function/notify/notifyItem/notifyItem.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarTitleText": "详情" 4 | } -------------------------------------------------------------------------------- /Library-Server/src/main/resources/sql/merge.sh: -------------------------------------------------------------------------------- 1 | cat user.sql school.sql cqupt.sql receive.sql ./data/library_seat.sql ./data/library_table.sql > all.sql -------------------------------------------------------------------------------- /Library-Server/src/main/resources/static/img/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leeson0202/Library/HEAD/Library-Server/src/main/resources/static/img/bg.jpg -------------------------------------------------------------------------------- /Library-Server/src/main/resources/static/img/bg1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leeson0202/Library/HEAD/Library-Server/src/main/resources/static/img/bg1.jpg -------------------------------------------------------------------------------- /Library-miniProject/pages/center/center.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "enablePullDownRefresh": true, 4 | "backgroundTextStyle":"dark" 5 | } -------------------------------------------------------------------------------- /Library-miniProject/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "mobx-miniprogram": "^4.13.2", 4 | "mobx-miniprogram-bindings": "^1.2.1" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Library-miniProject/resources/images/tabBar/_index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leeson0202/Library/HEAD/Library-miniProject/resources/images/tabBar/_index.png -------------------------------------------------------------------------------- /Library-miniProject/resources/images/tabBar/center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leeson0202/Library/HEAD/Library-miniProject/resources/images/tabBar/center.png -------------------------------------------------------------------------------- /Library-miniProject/resources/images/tabBar/index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leeson0202/Library/HEAD/Library-miniProject/resources/images/tabBar/index.png -------------------------------------------------------------------------------- /Library-miniProject/resources/images/tabBar/_center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leeson0202/Library/HEAD/Library-miniProject/resources/images/tabBar/_center.png -------------------------------------------------------------------------------- /Library-miniProject/resources/images/tabBar/_function.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leeson0202/Library/HEAD/Library-miniProject/resources/images/tabBar/_function.png -------------------------------------------------------------------------------- /Library-miniProject/resources/images/tabBar/function.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leeson0202/Library/HEAD/Library-miniProject/resources/images/tabBar/function.png -------------------------------------------------------------------------------- /Library-Server/src/main/resources/static/img/headicon.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leeson0202/Library/HEAD/Library-Server/src/main/resources/static/img/headicon.webp -------------------------------------------------------------------------------- /Library-Server/src/main/resources/static/img/schoolbg.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leeson0202/Library/HEAD/Library-Server/src/main/resources/static/img/schoolbg.jpeg -------------------------------------------------------------------------------- /Library-miniProject/pages/center/cquptLogin/cquptLogin.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarTitleText": "统一认证码登陆", 4 | "enablePullDownRefresh": false 5 | } -------------------------------------------------------------------------------- /Library-miniProject/pages/function/notify/notify.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarTitleText": "通知", 4 | "navigationBarBackgroundColor": "#ffffff" 5 | } -------------------------------------------------------------------------------- /Library-miniProject/sitemap.json: -------------------------------------------------------------------------------- 1 | { 2 | "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html", 3 | "rules": [{ 4 | "action": "allow", 5 | "page": "*" 6 | }] 7 | } -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/api/isobservable.d.ts: -------------------------------------------------------------------------------- 1 | export declare function isObservable(value: any): boolean; 2 | export declare function isObservableProp(value: any, propName: string): boolean; 3 | -------------------------------------------------------------------------------- /Library-miniProject/pages/index/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "ec-canvas": "../../ec-canvas/ec-canvas" 4 | }, 5 | "navigationBarTitleText": "首页", 6 | "enablePullDownRefresh": true 7 | 8 | } -------------------------------------------------------------------------------- /Library-miniProject/pages/center/learnCount/learnCount.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "ec-canvas": "../../../ec-canvas/ec-canvas" 4 | }, 5 | "navigationBarTitleText": "学习统计", 6 | "enablePullDownRefresh": true 7 | } -------------------------------------------------------------------------------- /Library-vue/src/utils/services/FileService.js: -------------------------------------------------------------------------------- 1 | import http from '../http'; 2 | 3 | export default { 4 | 5 | fileUpload: (data) => http.upload("api/upload", data), 6 | fileDownload: (fileName) => http.get("api/download/" + fileName), 7 | } -------------------------------------------------------------------------------- /Library-Server/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar 3 | -------------------------------------------------------------------------------- /Library-miniProject/resources/images/library/selectDown.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Library-vue/src/store/states/school.js: -------------------------------------------------------------------------------- 1 | export default { 2 | hasSchool: false, 3 | schoolId: null, 4 | name: null, 5 | descs: null, 6 | icon: null, 7 | background: null, 8 | libraries: null, 9 | schoolRule: null, 10 | 11 | options: [], 12 | }; 13 | -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/api/iscomputed.d.ts: -------------------------------------------------------------------------------- 1 | export declare function _isComputed(value: any, property?: string): boolean; 2 | export declare function isComputed(value: any): boolean; 3 | export declare function isComputedProp(value: any, propName: string): boolean; 4 | -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/api/trace.d.ts: -------------------------------------------------------------------------------- 1 | export declare function trace(thing?: any, prop?: string, enterBreakPoint?: boolean): void; 2 | export declare function trace(thing?: any, enterBreakPoint?: boolean): void; 3 | export declare function trace(enterBreakPoint?: boolean): void; 4 | -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram-bindings/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | ["module-resolver", { 4 | "root": ["./src"], 5 | "alias": {} 6 | }] 7 | ], 8 | "presets": [ 9 | ["env", {"loose": true, "modules": "commonjs"}] 10 | ] 11 | } -------------------------------------------------------------------------------- /Library-Server/library.sh: -------------------------------------------------------------------------------- 1 | # /bin/bash 2 | # 删除container 3 | docker rm -vf library 4 | # 删除image 5 | docker rmi -f library-server:1.0 6 | docker build -t library-server:1.0 . --no-cache 7 | docker run -d -p 8080:8080 --network docker-net --name library library-server:1.0 8 | 9 | # -p 设置暴露端口 10 | # --network 加入网络 11 | # -------------------------------------------------------------------------------- /Library-vue/src/utils/services/RuleService.js: -------------------------------------------------------------------------------- 1 | import http from '../http'; 2 | 3 | export default { 4 | queryRule: (schoolId) => http.get("api/rule/id/" + schoolId), 5 | insertRule: (data) => http.post("api/rule", { data }), 6 | updateRule: (data) => http.put("api/rule", data), 7 | deleteRule: (ruleId) => http.delete("api/rule", { ruleId }), 8 | } -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/types/type-utils.d.ts: -------------------------------------------------------------------------------- 1 | import { IDepTreeNode } from "../internal"; 2 | export declare function getAtom(thing: any, property?: string): IDepTreeNode; 3 | export declare function getAdministration(thing: any, property?: string): any; 4 | export declare function getDebugName(thing: any, property?: string): string; 5 | -------------------------------------------------------------------------------- /Library-miniProject/resources/images/receive/selectDown.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Library-Server/src/main/resources/config/config.properties: -------------------------------------------------------------------------------- 1 | # 阿里云 短信配置 2 | sms.signName=Leeson 3 | sms.regionId=cn-hangzhou 4 | sms.accessKeyId=LTAIadsXXXXXXXX 5 | sms.secret=3CyKbDS07dasXXXXXXXXXXXXX 6 | # email配置 7 | email.hostEmail=asedrfa11@163.com 8 | email.AuthorizationCode=OXMSjcwXXXXXXXX 9 | email.SMTPEmail=smtp.163.com 10 | email.personal=Leeson 11 | email.title=Leeson Library 12 | -------------------------------------------------------------------------------- /Library-vue/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "esnext", 5 | "baseUrl": "./", 6 | "moduleResolution": "node", 7 | "paths": { 8 | "@/*": [ 9 | "src/*" 10 | ] 11 | }, 12 | "lib": [ 13 | "esnext", 14 | "dom", 15 | "dom.iterable", 16 | "scripthost" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Library-Server-Cloud/account/src/main/java/cool/leeson/lib/dao/UserDao.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.lib.dao; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import cool.leeson.lib.entity.User; 5 | 6 | /** 7 | * (User)表数据库访问层 8 | * 9 | * @author Leeson0202 10 | * @since 2023-04-25 21:49:55 11 | */ 12 | public interface UserDao extends BaseMapper { 13 | 14 | } 15 | 16 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/entity/wx/AccessToken.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.entity.wx; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | @Data 8 | @NoArgsConstructor 9 | @AllArgsConstructor 10 | public class AccessToken { 11 | private String access_token; 12 | private Long expires_in; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/api/observabledecorator.d.ts: -------------------------------------------------------------------------------- 1 | import { IEnhancer } from "../internal"; 2 | export declare type IObservableDecorator = { 3 | (target: Object, property: string | symbol, descriptor?: PropertyDescriptor): void; 4 | enhancer: IEnhancer; 5 | }; 6 | export declare function createDecoratorForEnhancer(enhancer: IEnhancer): IObservableDecorator; 7 | -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/core/spy.d.ts: -------------------------------------------------------------------------------- 1 | import { Lambda } from "../internal"; 2 | export declare function isSpyEnabled(): boolean; 3 | export declare function spyReport(event: any): void; 4 | export declare function spyReportStart(event: any): void; 5 | export declare function spyReportEnd(change?: any): void; 6 | export declare function spy(listener: (change: any) => void): Lambda; 7 | -------------------------------------------------------------------------------- /Library-miniProject/pages/center/settings/settings.wxss: -------------------------------------------------------------------------------- 1 | /* pages/center/settings/settings.wxss */ 2 | 3 | .logout{ 4 | 5 | margin: auto; 6 | margin-top: 90rpx; 7 | width: 90%; 8 | height: 60rpx; 9 | line-height: 60rpx; 10 | background-color: rgb(248, 100, 100); 11 | border-radius: 14rpx; 12 | text-align: center; 13 | color: #fff; 14 | font-size: 28rpx; 15 | } -------------------------------------------------------------------------------- /Library-miniProject/pages/center/user/user.wxss: -------------------------------------------------------------------------------- 1 | /* pages/center/user/user.wxss */ 2 | .card{ 3 | margin-top: 20rpx; 4 | width: calc(100% - 40rpx); 5 | } 6 | .label{ 7 | display: inline-block; 8 | width: 20%; 9 | margin-left: 20rpx; 10 | text-align: left; 11 | } 12 | .label-input{ 13 | position: relative; 14 | display: inline-block; 15 | width: 50%; 16 | top: 10rpx; 17 | } -------------------------------------------------------------------------------- /Library-vue/src/utils/services/ReceiveService.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request'; 2 | 3 | export default class ReceiveService { 4 | static receive(items) { 5 | return request.post('/receive', items); 6 | } 7 | 8 | static cancel(receiveId) { 9 | return request.put('/receive/cancel', { receiveId }); 10 | } 11 | 12 | static schedule() { 13 | return request.get('/receive/schedule'); 14 | } 15 | } -------------------------------------------------------------------------------- /Library-vue/src/utils/services/SeatService.js: -------------------------------------------------------------------------------- 1 | import http from '../http'; 2 | 3 | export default { 4 | querySeat: (seatId) => http.get("api/seat/id/" + seatId), 5 | insertSeat: (data) => http.post("api/seat", { data }), 6 | updateSeat: (data) => http.put("api/seat", data), 7 | insertOrUpdateSeat: (data) => http.post("api/seat/insert", data), 8 | deleteSeat: (seatId) => http.delete("api/seat", { seatId }), 9 | } -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/utils/iterable.d.ts: -------------------------------------------------------------------------------- 1 | export declare function iteratorSymbol(): any; 2 | export declare const IS_ITERATING_MARKER = "__$$iterating"; 3 | export declare function declareIterator(prototType: any, iteratorFactory: () => IterableIterator): void; 4 | export declare function makeIterable(iterator: Iterator): IterableIterator; 5 | export declare function toStringTagSymbol(): any; 6 | -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/api/transaction.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * During a transaction no views are updated until the end of the transaction. 3 | * The transaction will be run synchronously nonetheless. 4 | * 5 | * @param action a function that updates some reactive state 6 | * @returns any value that was returned by the 'action' parameter. 7 | */ 8 | export declare function transaction(action: () => T, thisArg?: undefined): T; 9 | -------------------------------------------------------------------------------- /Library-vue/README.md: -------------------------------------------------------------------------------- 1 | # library-vue 2 | 3 | ## Project setup 4 | ``` 5 | npm install 6 | ``` 7 | 8 | ### Compiles and hot-reloads for development 9 | ``` 10 | npm run serve 11 | ``` 12 | 13 | ### Compiles and minifies for production 14 | ``` 15 | npm run build 16 | ``` 17 | 18 | ### Lints and fixes files 19 | ``` 20 | npm run lint 21 | ``` 22 | 23 | ### Customize configuration 24 | See [Configuration Reference](https://cli.vuejs.org/config/). 25 | -------------------------------------------------------------------------------- /Library-vue/src/utils/services/TableService.js: -------------------------------------------------------------------------------- 1 | import http from '../http'; 2 | 3 | export default { 4 | queryTable: (tableId) => http.get("api/table/id/" + tableId), 5 | insertTable: (data) => http.post("api/table", { data }), 6 | updateTable: (data) => http.put("api/table", data), 7 | insertOrUpdateTable: (data) => http.post("api/table/insert", data), 8 | deleteTable: (tableId) => http.delete("api/table", { tableId }), 9 | } 10 | -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/api/configure.d.ts: -------------------------------------------------------------------------------- 1 | export declare function configure(options: { 2 | enforceActions?: boolean | "strict" | "never" | "always" | "observed"; 3 | computedRequiresReaction?: boolean; 4 | computedConfigurable?: boolean; 5 | isolateGlobalState?: boolean; 6 | disableErrorBoundaries?: boolean; 7 | arrayBuffer?: number; 8 | reactionScheduler?: (f: () => void) => void; 9 | }): void; 10 | -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/api/decorate.d.ts: -------------------------------------------------------------------------------- 1 | export declare function decorate(clazz: new (...args: any[]) => T, decorators: { 2 | [P in keyof T]?: MethodDecorator | PropertyDecorator | Array | Array; 3 | }): void; 4 | export declare function decorate(object: T, decorators: { 5 | [P in keyof T]?: MethodDecorator | PropertyDecorator | Array | Array; 6 | }): T; 7 | -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/api/extras.d.ts: -------------------------------------------------------------------------------- 1 | export interface IDependencyTree { 2 | name: string; 3 | dependencies?: IDependencyTree[]; 4 | } 5 | export interface IObserverTree { 6 | name: string; 7 | observers?: IObserverTree[]; 8 | } 9 | export declare function getDependencyTree(thing: any, property?: string): IDependencyTree; 10 | export declare function getObserverTree(thing: any, property?: string): IObserverTree; 11 | -------------------------------------------------------------------------------- /Library-Server/README.md: -------------------------------------------------------------------------------- 1 | ## Library-Server(后端) 2 | 3 | ### 技术栈 4 | 5 | 技术栈:SpringBoot、MyBatis、Redis、MySQL、JWT、阿里云SMS、邮箱 6 | 7 | jdk:1.8 8 | 9 | MySQL:8.0 10 | 11 | Redis:7.0 12 | 13 | ### 如何运行? 14 | 15 | 1.resource目录下application.properties修改对应的配置。比如mysql、redis。 16 | 17 | 2.使用邮箱和短信服务的话,将resource/config/config.properties重命名private-config.properties,修改对应的配置。比如msm和email 18 | 19 | 3.Linux下运行resouce/sql/merge.sh后(就是将四个脚本放在all里面),运行数据库脚步all.sql。 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Library-miniProject/resources/images/library/success.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/types/modifiers.d.ts: -------------------------------------------------------------------------------- 1 | export interface IEnhancer { 2 | (newValue: T, oldValue: T | undefined, name: string): T; 3 | } 4 | export declare function deepEnhancer(v: any, _: any, name: any): any; 5 | export declare function shallowEnhancer(v: any, _: any, name: any): any; 6 | export declare function referenceEnhancer(newValue?: any): any; 7 | export declare function refStructEnhancer(v: any, oldValue: any, name: any): any; 8 | -------------------------------------------------------------------------------- /Library-miniProject/pages/function/bookRule/bookRule.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 我的信用 4 | 5 | 6 | 96 7 | 8 | 9 | 信用记录 10 | 11 | 12 | 13 | 14 | {{item}} 15 | 16 | -------------------------------------------------------------------------------- /Library-miniProject/pages/center/user/user.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 手机号 8 | 9 | 10 | 11 | 12 | 13 | 邮箱 14 | 15 | 16 | -------------------------------------------------------------------------------- /Library-Server-Cloud/account/src/main/java/cool/leeson/lib/Account.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.lib; 2 | 3 | import org.mybatis.spring.annotation.MapperScan; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | 7 | @SpringBootApplication 8 | @MapperScan("cool.leeson.lib.dao") 9 | public class Account { 10 | public static void main(String[] args) { 11 | SpringApplication.run(Account.class, args); 12 | } 13 | } -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/api/when.d.ts: -------------------------------------------------------------------------------- 1 | import { Lambda, IReactionDisposer } from "../internal"; 2 | export interface IWhenOptions { 3 | name?: string; 4 | timeout?: number; 5 | onError?: (error: any) => void; 6 | } 7 | export declare function when(predicate: () => boolean, opts?: IWhenOptions): Promise & { 8 | cancel(): void; 9 | }; 10 | export declare function when(predicate: () => boolean, effect: Lambda, opts?: IWhenOptions): IReactionDisposer; 11 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/entity/receive/ReceiveItemPost.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.entity.receive; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | @Data 8 | @AllArgsConstructor 9 | @NoArgsConstructor 10 | public class ReceiveItemPost { 11 | private String libraryId; 12 | private String roomId; 13 | private String seatId; 14 | private Boolean today; 15 | private Integer timeIdx; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/api/extendobservable.d.ts: -------------------------------------------------------------------------------- 1 | import { CreateObservableOptions } from "../internal"; 2 | export declare function extendShallowObservable(target: A, properties: B, decorators?: { 3 | [K in keyof B]?: Function; 4 | }): A & B; 5 | export declare function extendObservable(target: A, properties: B, decorators?: { 6 | [K in keyof B]?: Function; 7 | }, options?: CreateObservableOptions): A & B; 8 | -------------------------------------------------------------------------------- /Library-Server-Cloud/gateway/src/main/java/cool/leeson/lib/Gateway.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.lib; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.cloud.client.discovery.EnableDiscoveryClient; 6 | 7 | @SpringBootApplication 8 | @EnableDiscoveryClient 9 | public class Gateway { 10 | public static void main(String[] args) { 11 | SpringApplication.run(Gateway.class, args); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Library-Server/Dockerfile: -------------------------------------------------------------------------------- 1 | #FROM ubuntu 2 | #FROM openjdk:8u212-jre-alpine 3 | FROM openjdk:8-jdk-alpine 4 | WORKDIR /usr/local/code 5 | #将源码复制到下一个镜像中 6 | COPY ./target/Library-Server-1.0.jar /usr/local/code 7 | 8 | RUN echo "Asia/Shanghai" > /etc/timezone 9 | 10 | #声明项目所用端口 11 | EXPOSE 8080 12 | 13 | #启动java项目程序 14 | ENTRYPOINT ["java","-jar","Library-Server-1.0.jar"] 15 | # docker build -t library-server:1.0 . --no-cache 16 | # docker run -d -p 8080:8080 --network docker-net --name library library-server:1.0 17 | -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/utils/comparer.d.ts: -------------------------------------------------------------------------------- 1 | export interface IEqualsComparer { 2 | (a: T, b: T): boolean; 3 | } 4 | declare function identityComparer(a: any, b: any): boolean; 5 | declare function structuralComparer(a: any, b: any): boolean; 6 | declare function defaultComparer(a: any, b: any): boolean; 7 | export declare const comparer: { 8 | identity: typeof identityComparer; 9 | structural: typeof structuralComparer; 10 | default: typeof defaultComparer; 11 | }; 12 | export {}; 13 | -------------------------------------------------------------------------------- /Library-Server-Cloud/gateway/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 80 3 | 4 | spring: 5 | application: 6 | name: gateway 7 | cloud: 8 | # nacos地址 9 | nacos: 10 | discovery: 11 | server-addr: localhost:8848 12 | config: 13 | server-addr: localhost:8848 #Nacos地址 14 | file-extension: yaml #这里我们获取的yaml格式的配置 15 | gateway: 16 | enabled: true 17 | discovery: 18 | locator: 19 | # 这个配置是动态路由开启,自动识别nacos的服务名进行路由 20 | enabled: true 21 | -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/api/tojs.d.ts: -------------------------------------------------------------------------------- 1 | export declare type ToJSOptions = { 2 | detectCycles?: boolean; 3 | exportMapsAsObjects?: boolean; 4 | recurseEverything?: boolean; 5 | }; 6 | /** 7 | * Basically, a deep clone, so that no reactive property will exist anymore. 8 | */ 9 | export declare function toJS(source: T, options?: ToJSOptions): T; 10 | export declare function toJS(source: any, options?: ToJSOptions): any; 11 | export declare function toJS(source: any, options: ToJSOptions): any; 12 | -------------------------------------------------------------------------------- /Library-vue/src/utils/services/SchoolService.js: -------------------------------------------------------------------------------- 1 | import http from '../http'; 2 | 3 | export default { 4 | // 获取整个学校信息 5 | querSchoolSimple: (schoolId) => http.get("api/school/simple", { schoolId }), 6 | // 获取学校信息-token 7 | querySchool: () => http.get("api/school"), 8 | // 修改学校 9 | updateSchool: (data) => http.put("api/school", data), 10 | // 添加学校 11 | insertSchool: (data) => http.post("api/school", data), 12 | // 删除学校 13 | deleteSchool: (schoolId) => http.delete("api/school", { schoolId }), 14 | 15 | } -------------------------------------------------------------------------------- /Library-Server-Cloud/account/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 7001 3 | spring: 4 | application: 5 | name: account 6 | cloud: 7 | nacos: 8 | discovery: 9 | server-addr: localhost:8848 10 | config: 11 | server-addr: localhost:8848 12 | 13 | datasource: 14 | driver-class-name: com.mysql.cj.jdbc.Driver 15 | url: jdbc:mysql://localhost:3306/library?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&useSSL=true 16 | username: root 17 | password: root 18 | 19 | 20 | -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/types/listen-utils.d.ts: -------------------------------------------------------------------------------- 1 | import { Lambda } from "../internal"; 2 | export interface IListenable { 3 | changeListeners: Function[] | undefined; 4 | observe(handler: (change: any, oldValue?: any) => void, fireImmediately?: boolean): Lambda; 5 | } 6 | export declare function hasListeners(listenable: IListenable): boolean; 7 | export declare function registerListener(listenable: IListenable, handler: Function): Lambda; 8 | export declare function notifyListeners(listenable: IListenable, change: T): void; 9 | -------------------------------------------------------------------------------- /Library-vue/src/utils/services/LibraryService.js: -------------------------------------------------------------------------------- 1 | import http from '../http'; 2 | 3 | export default { 4 | // 获取图书馆 5 | queryLibraries: (schoolId) => http.get("api/library", { schoolId }), 6 | queryLibrariesByToken: () => http.get("api/library"), 7 | queryLibrary: (libraryId) => http.get("api/library/id/" + libraryId), 8 | insertLibrary: (data) => http.post("api/library", data), 9 | updateLibrary: (data) => http.put("api/library", data), 10 | deleteLibrary: (libraryId) => http.delete("api/library", { libraryId }), 11 | } -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/controller/TestController.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.controller; 2 | 3 | import org.springframework.boot.context.properties.ConfigurationProperties; 4 | import org.springframework.context.annotation.PropertySource; 5 | import org.springframework.web.bind.annotation.GetMapping; 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | @RestController 9 | public class TestController { 10 | @GetMapping ("hello") 11 | public String test(){ 12 | return "hello"; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Library-vue/src/utils/services/NotificationService.js: -------------------------------------------------------------------------------- 1 | import http from '../http'; 2 | 3 | export default { 4 | queryNotifications: (data) => http.get("api/notification", data), 5 | queryNotification: (notificationId) => 6 | http.get("api/notification/id" + notificationId), 7 | insertNotification: (data) => http.post("api/notification", data), 8 | updateNotification: (data) => http.put("api/notification", data), 9 | deleteNotification: (notificationId) => 10 | http.delete("api/notification", { notificationId }), 11 | 12 | } 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | HELP.md 3 | target/* 4 | dist/* 5 | !.mvn/wrapper/maven-wrapper.jar 6 | !**/src/main/**/target/ 7 | !**/src/test/**/target/ 8 | 9 | 10 | ### 隐私 ## 11 | 12 | private* 13 | 14 | ### STS ### 15 | .apt_generated 16 | .classpath 17 | .factorypath 18 | .project 19 | .settings 20 | .springBeans 21 | .sts4-cache 22 | 23 | ### IntelliJ IDEA ### 24 | .idea 25 | *.iws 26 | *.iml 27 | *.ipr 28 | 29 | ### NetBeans ### 30 | /nbproject/private/ 31 | /nbbuild/ 32 | /dist/ 33 | /nbdist/ 34 | /.nb-gradle/ 35 | build/ 36 | 37 | 38 | ### VS Code ### 39 | .vscode/ 40 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/controller/WebController.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.controller; 2 | 3 | import lombok.extern.slf4j.Slf4j; 4 | import org.springframework.stereotype.Controller; 5 | import org.springframework.web.bind.annotation.GetMapping; 6 | 7 | import javax.servlet.http.HttpServletResponse; 8 | 9 | @Controller 10 | @Slf4j 11 | public class WebController { 12 | 13 | @GetMapping 14 | public void index(HttpServletResponse response) throws Exception { 15 | response.sendRedirect("https://library.leeson.cool"); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /Library-miniProject/utils/util.js: -------------------------------------------------------------------------------- 1 | const formatTime = date => { 2 | const year = date.getFullYear() 3 | const month = date.getMonth() + 1 4 | const day = date.getDate() 5 | const hour = date.getHours() 6 | const minute = date.getMinutes() 7 | const second = date.getSeconds() 8 | 9 | return `${[year, month, day].map(formatNumber).join('/')} ${[hour, minute, second].map(formatNumber).join(':')}` 10 | } 11 | 12 | const formatNumber = n => { 13 | n = n.toString() 14 | return n[1] ? n : `0${n}` 15 | } 16 | 17 | 18 | module.exports = { 19 | formatTime 20 | } -------------------------------------------------------------------------------- /Library-Server/src/test/java/cool/leeson/library/RedisTest.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library; 2 | 3 | import cool.leeson.library.entity.tools.RedisTool; 4 | import org.junit.jupiter.api.Test; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.boot.test.context.SpringBootTest; 7 | 8 | @SpringBootTest 9 | public class RedisTest { 10 | @Autowired 11 | private RedisTool redisTool; 12 | 13 | @Test 14 | public void flushByEnd() { 15 | redisTool.deleteByEnd("Info"); 16 | redisTool.deleteByPrefix("school"); 17 | 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Library-vue/src/utils/services/AuthService.js: -------------------------------------------------------------------------------- 1 | import http from '../http'; 2 | 3 | export default { 4 | // 登陆-tel 5 | loginTel: (tel) => http.get("api/login/tel", { tel }), 6 | confirmTel: (tel, code) => http.get("api/confirm/tel", { tel, code }), 7 | 8 | // 登陆 - 邮箱 9 | loginEmail: (email) => http.get("api/login/email", { email }), 10 | confirmEmail: (email, code) => 11 | http.get("api/confirm/email", { email, code }), 12 | 13 | // 重新登陆 14 | loginUpdate: () => http.get("api/update"), 15 | // 测试登陆 16 | loginTest: () => http.get("api/login/admin") 17 | 18 | } -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/utils/decorators2.d.ts: -------------------------------------------------------------------------------- 1 | export declare type BabelDescriptor = PropertyDescriptor & { 2 | initializer?: () => any; 3 | }; 4 | export declare type PropertyCreator = (instance: any, propertyName: string, descriptor: BabelDescriptor | undefined, decoratorTarget: any, decoratorArgs: any[]) => void; 5 | export declare function initializeInstance(target: any): any; 6 | export declare function createPropDecorator(propertyInitiallyEnumerable: boolean, propertyCreator: PropertyCreator): Function; 7 | export declare function quacksLikeADecorator(args: IArguments): boolean; 8 | -------------------------------------------------------------------------------- /Library-miniProject/pages/center/messages/messages.wxss: -------------------------------------------------------------------------------- 1 | /* pages/center/messages/messages.wxss */ 2 | .line-item { 3 | height: 100rpx; 4 | line-height: 100rpx; 5 | font-size: 28rpx; 6 | } 7 | 8 | .point { 9 | position: relative; 10 | top: -4rpx; 11 | margin-left: 10rpx; 12 | display: inline-block; 13 | height: 10rpx; 14 | width: 10rpx; 15 | background-color: rgb(21, 102, 253); 16 | border-radius: 50%; 17 | } 18 | 19 | 20 | /* // 行 */ 21 | 22 | .title{ 23 | width: 100%; 24 | margin-top: 20rpx; 25 | text-align: center; 26 | padding-bottom: 10rpx; 27 | } -------------------------------------------------------------------------------- /Library-miniProject/ec-canvas/ec-canvas.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Library-vue/src/utils/services/RoomService.js: -------------------------------------------------------------------------------- 1 | import http from '../http'; 2 | 3 | export default { 4 | queryRooms: (libraryId) => http.get("api/room/rooms", { libraryId }), 5 | queryRoomByTime: (libraryId, today, idx) => 6 | http.get("api/room/time", { 7 | libraryId, 8 | today, 9 | idx, 10 | }), 11 | queryRoom: (roomId) => http.get("api/room/id/" + roomId), 12 | insertRoom: (data) => http.post("api/room", data), 13 | updateRoom: (data) => http.put("api/room", data), 14 | deleteRoom: (roomId) => http.delete("api/room", { roomId }), 15 | 16 | } -------------------------------------------------------------------------------- /Library-miniProject/pages/function/notify/notifyItem/notifyItem.wxss: -------------------------------------------------------------------------------- 1 | /* pages/notifyItem/notifyItem.wxss */ 2 | .view-container { 3 | position: absolute; 4 | left: 0; 5 | top: 0; 6 | width: 100%; 7 | height: 100%; 8 | } 9 | 10 | .notifyCard { 11 | padding: 0 20rpx 0; 12 | width: calc(100% - 40rpx); 13 | } 14 | 15 | .notify-title { 16 | margin: 10rpx auto 26rpx; 17 | font-size: 36rpx; 18 | text-align: center; 19 | } 20 | .notify-more{ 21 | font-size: 22rpx; 22 | margin-bottom: 14rpx; 23 | } 24 | 25 | .notify-context{ 26 | text-indent:2em; 27 | font-size: 28rpx; 28 | } -------------------------------------------------------------------------------- /Library-vue/src/store/index.js: -------------------------------------------------------------------------------- 1 | //引入Vue核心库 2 | import Vue from 'vue' 3 | //引入Vuex 4 | import Vuex from 'vuex' 5 | // state 6 | import school from './states/school' 7 | import user from './states/user' 8 | import receive from './states/receive' 9 | // action 10 | import actions from './actions' 11 | // mutation 12 | import mutations from "./mutations"; 13 | // getter 14 | import getters from './getters'; 15 | 16 | 17 | //应用Vuex插件 18 | Vue.use(Vuex) 19 | 20 | export default new Vuex.Store({ 21 | state:{ 22 | user, 23 | school, 24 | receive, 25 | }, 26 | actions, 27 | mutations, 28 | getters, 29 | }); 30 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/entity/library/simple/SeatSimple.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.entity.library.simple; 2 | 3 | import cool.leeson.library.entity.library.LibrarySeat; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Data; 6 | import lombok.NoArgsConstructor; 7 | 8 | @Data 9 | @AllArgsConstructor 10 | @NoArgsConstructor 11 | public class SeatSimple { 12 | private String seatId; 13 | private String name; 14 | 15 | public SeatSimple(LibrarySeat librarySeat) { 16 | this.seatId = librarySeat.getSeatId(); 17 | this.name = librarySeat.getName(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Library-miniProject/pages/function/downUp/downUp.wxss: -------------------------------------------------------------------------------- 1 | .main { 2 | width: 100%; 3 | height: 100%; 4 | 5 | } 6 | 7 | .qR { 8 | width: 100%; 9 | height: 100%; 10 | } 11 | 12 | .qR-block { 13 | display: block; 14 | margin: auto; 15 | margin-top: 100rpx; 16 | width: 90%; 17 | text-align: center; 18 | } 19 | 20 | #qRcode { 21 | display: block; 22 | margin: auto; 23 | padding: 20rpx; 24 | width: 360rpx; 25 | height: 360rpx; 26 | border-radius: 20rpx; 27 | background-color: rgba(235, 230, 230,0.4); 28 | } 29 | 30 | .info-block { 31 | margin-top: 100rpx; 32 | } 33 | -------------------------------------------------------------------------------- /Library-miniProject/pages/function/downUp/downUp.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 请使扫码二维码 10 | 11 | 12 | 返回 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Library-miniProject/pages/function/notify/notify.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | {{item.title}} 9 | 10 | 11 | {{item.context}} 12 | 13 | {{item.time}} 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/types/intercept-utils.d.ts: -------------------------------------------------------------------------------- 1 | import { Lambda } from "../internal"; 2 | export declare type IInterceptor = (change: T) => T | null; 3 | export interface IInterceptable { 4 | interceptors: IInterceptor[] | undefined; 5 | intercept(handler: IInterceptor): Lambda; 6 | } 7 | export declare function hasInterceptors(interceptable: IInterceptable): boolean; 8 | export declare function registerInterceptor(interceptable: IInterceptable, handler: IInterceptor): Lambda; 9 | export declare function interceptChange(interceptable: IInterceptable, change: T | null): T | null; 10 | -------------------------------------------------------------------------------- /Library-miniProject/resources/images/library/delete.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/core/action.d.ts: -------------------------------------------------------------------------------- 1 | export interface IAction { 2 | isMobxAction: boolean; 3 | } 4 | export declare function createAction(actionName: string, fn: Function): Function & IAction; 5 | export declare function executeAction(actionName: string, fn: Function, scope?: any, args?: IArguments): any; 6 | export declare function allowStateChanges(allowStateChanges: boolean, func: () => T): T; 7 | export declare function allowStateChangesStart(allowStateChanges: boolean): boolean; 8 | export declare function allowStateChangesEnd(prev: boolean): void; 9 | export declare function allowStateChangesInsideComputed(func: () => T): T; 10 | -------------------------------------------------------------------------------- /Library-miniProject/pages/function/notify/notifyItem/notifyItem.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 对不起,你的页面已过时 5 | 6 | 7 | 8 | {{notifyText.title}} 9 | 10 | 11 | {{notifyText.time}} · {{notifyText.view}} 已读 12 | 13 | 14 | {{notifyText.context}} 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/entity/library/simple/TableSimple.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.entity.library.simple; 2 | 3 | import cool.leeson.library.entity.library.LibrarySeat; 4 | import cool.leeson.library.entity.library.LibraryTable; 5 | import lombok.AllArgsConstructor; 6 | import lombok.Data; 7 | import lombok.NoArgsConstructor; 8 | 9 | @Data 10 | @AllArgsConstructor 11 | @NoArgsConstructor 12 | public class TableSimple { 13 | private String tableId; 14 | private String name; 15 | 16 | public TableSimple(LibraryTable libraryTable) { 17 | this.tableId = libraryTable.getTableId(); 18 | this.name = libraryTable.getName(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/entity/library/simple/LibrarySimple.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.entity.library.simple; 2 | 3 | import cool.leeson.library.entity.library.Library; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Data; 6 | import lombok.NoArgsConstructor; 7 | 8 | import java.util.List; 9 | 10 | @Data 11 | @AllArgsConstructor 12 | @NoArgsConstructor 13 | public class LibrarySimple { 14 | private String libraryId; 15 | private String name; 16 | private List roomSimpleList; 17 | 18 | public LibrarySimple(Library library) { 19 | this.libraryId = library.getLibraryId(); 20 | this.name = library.getName(); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/entity/library/simple/SchoolSimple.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.entity.library.simple; 2 | 3 | import cool.leeson.library.entity.library.School; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Data; 6 | import lombok.NoArgsConstructor; 7 | 8 | import java.util.List; 9 | 10 | @Data 11 | @AllArgsConstructor 12 | @NoArgsConstructor 13 | public class SchoolSimple { 14 | private String schoolId; 15 | 16 | private String name; 17 | private List librarySimpleList; 18 | 19 | public SchoolSimple(School school) { 20 | this.schoolId = school.getSchoolId(); 21 | this.name = school.getName(); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /Library-miniProject/resources/images/Author/level.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Library-vue/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from "vue"; 2 | // 引入 less 3 | import "@/assets/css/theme.less"; 4 | import "@/assets/css/common.css"; 5 | 6 | //引入store 7 | import store from "./store"; 8 | // router 9 | import router from "./router"; 10 | // element 11 | import ElementUI from "element-ui"; 12 | import "element-ui/lib/theme-chalk/index.css"; 13 | import plugin from "./plugins/plugin"; 14 | // 组件 15 | import App from "./App.vue"; 16 | import * as api from '@/utils/services' 17 | 18 | Vue.use(plugin); // 使用插件 19 | Vue.use(ElementUI); 20 | 21 | Vue.config.productionTip = false; 22 | 23 | Vue.prototype.$api = api; 24 | 25 | new Vue({ 26 | store, 27 | router, 28 | render: (h) => h(App), 29 | }).$mount("#app"); 30 | -------------------------------------------------------------------------------- /Library-Server-Cloud/account/src/main/java/cool/leeson/lib/controller/LoginController.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.lib.controller; 2 | 3 | import cool.leeson.lib.service.LoginServiceImpl; 4 | import org.springframework.web.bind.annotation.PathVariable; 5 | import org.springframework.web.bind.annotation.RequestMapping; 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | import javax.annotation.Resource; 9 | 10 | @RestController 11 | public class LoginController { 12 | @Resource 13 | private LoginServiceImpl loginService; 14 | 15 | @RequestMapping("login/{id}") 16 | public String login(@PathVariable("id") String id) { 17 | return loginService.login(id); 18 | } 19 | 20 | 21 | } 22 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/entity/user/CquptInfo.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.entity.user; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | @Data 8 | @AllArgsConstructor 9 | @NoArgsConstructor 10 | public class CquptInfo { 11 | private String userId; 12 | private String role; 13 | private String name; 14 | private String cqupt_id; 15 | private String student_id; 16 | private String grade; 17 | private String classs; 18 | private String unit_name; 19 | private String profession_name; 20 | private String gender; 21 | private String counselor_name; 22 | private String counselor_cqupt_id; 23 | } 24 | -------------------------------------------------------------------------------- /Library-vue/src/assets/css/common.css: -------------------------------------------------------------------------------- 1 | .containner { 2 | height: 100%; 3 | width: 100%; 4 | } 5 | 6 | .card { 7 | display: block; 8 | margin: auto; 9 | width: 100%; 10 | height: 100%; 11 | border-radius: 6px; 12 | box-shadow: 0 0 10px #eee; 13 | } 14 | .line-item { 15 | width: 100%; 16 | height: 50px; 17 | 18 | } 19 | .button { 20 | padding: 0 14px; 21 | height: 40px; 22 | line-height: 40px; 23 | border-radius: 6px; 24 | border: 1px solid #e9e7e789; 25 | background-color: #e9e7e7a7; 26 | user-select: none; 27 | cursor: pointer; 28 | } 29 | input { 30 | border: 1px solid #ccc; 31 | border-radius: 4px; 32 | height: 40px; 33 | line-height: 40px; 34 | } 35 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/LibraryServerApplication.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library; 2 | 3 | import org.mybatis.spring.annotation.MapperScan; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | import org.springframework.scheduling.annotation.EnableScheduling; 7 | import org.springframework.web.bind.annotation.CrossOrigin; 8 | 9 | @SpringBootApplication 10 | @MapperScan("cool.leeson.library.dao") 11 | @CrossOrigin 12 | @EnableScheduling // 定时任务 13 | public class LibraryServerApplication { 14 | 15 | public static void main(String[] args) { 16 | SpringApplication.run(LibraryServerApplication.class, args); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /Library-vue/src/utils/services/ReservationService.js: -------------------------------------------------------------------------------- 1 | import http from '../http'; 2 | 3 | export default { 4 | /** 5 | * 预约 6 | */ 7 | queryReceiveAll: (data) => http.get("api/receive/all", data), 8 | queryReceive: (receiveId) => http.get("api/receive/id/" + receiveId), 9 | insertReceive: (data) => http.post("api/receive", { data }), 10 | updateReceive: (data) => http.put("api/receive", data), 11 | deleteReceive: (receiveId, userId) => 12 | http.put("api/receive/cancel", { receiveId, userId }), 13 | 14 | /** 15 | * 快速预约 16 | */ 17 | queryReceiveFastAll: (data) => http.get("api/receive/fast/all", data), 18 | updateReceiveFast: (data) => http.put("api/receive/fast", data), 19 | 20 | } -------------------------------------------------------------------------------- /Library-miniProject/.eslintrc.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Eslint config file 3 | * Documentation: https://eslint.org/docs/user-guide/configuring/ 4 | * Install the Eslint extension before using this feature. 5 | */ 6 | module.exports = { 7 | env: { 8 | es6: true, 9 | browser: true, 10 | node: true, 11 | }, 12 | ecmaFeatures: { 13 | modules: true, 14 | }, 15 | parserOptions: { 16 | ecmaVersion: 2018, 17 | sourceType: 'module', 18 | }, 19 | globals: { 20 | wx: true, 21 | App: true, 22 | Page: true, 23 | getCurrentPages: true, 24 | getApp: true, 25 | Component: true, 26 | requirePlugin: true, 27 | requireMiniProgram: true, 28 | }, 29 | // extends: 'eslint:recommended', 30 | rules: {}, 31 | } 32 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/config/Config.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.config; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean; 6 | 7 | @Configuration 8 | public class Config { 9 | @Bean 10 | public LocalValidatorFactoryBean getValidatorFactory() { 11 | LocalValidatorFactoryBean localValidatorFactoryBean = new LocalValidatorFactoryBean(); 12 | localValidatorFactoryBean.getValidationPropertyMap().put("hibernate.validator.fail_fast", "true"); 13 | // System.out.println("已配置快速失败返回模式"); 14 | return localValidatorFactoryBean; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/entity/library/simple/RoomSimple.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.entity.library.simple; 2 | 3 | import cool.leeson.library.entity.library.LibraryRoom; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Data; 6 | import lombok.NoArgsConstructor; 7 | 8 | import java.util.List; 9 | 10 | @Data 11 | @AllArgsConstructor 12 | @NoArgsConstructor 13 | public class RoomSimple { 14 | private String roomId; 15 | private String name; 16 | private List seatSimpleList; 17 | private List tableSimpleList; 18 | 19 | public RoomSimple(LibraryRoom libraryRoom) { 20 | this.roomId = libraryRoom.getRoomId(); 21 | this.name = libraryRoom.getName(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/api/flow.d.ts: -------------------------------------------------------------------------------- 1 | export declare type CancellablePromise = Promise & { 2 | cancel(): void; 3 | }; 4 | export interface FlowYield { 5 | "!!flowYield": undefined; 6 | } 7 | export interface FlowReturn { 8 | "!!flowReturn": T; 9 | } 10 | export declare type FlowReturnType = IfAllAreFlowYieldThenVoid ? FR extends Promise ? FRP : FR : R extends Promise ? FlowYield : R>; 11 | export declare type IfAllAreFlowYieldThenVoid = Exclude extends never ? void : Exclude; 12 | export declare function flow(generator: (...args: Args) => IterableIterator): (...args: Args) => CancellablePromise>; 13 | -------------------------------------------------------------------------------- /Library-Server-Cloud/account/src/main/java/cool/leeson/lib/service/LoginServiceImpl.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.lib.service; 2 | 3 | import cool.leeson.lib.dao.UserDao; 4 | import cool.leeson.lib.entity.User; 5 | import org.springframework.stereotype.Service; 6 | 7 | import javax.annotation.Resource; 8 | import java.util.HashMap; 9 | import java.util.List; 10 | import java.util.Map; 11 | 12 | @Service 13 | public class LoginServiceImpl { 14 | @Resource 15 | private UserDao userDao; 16 | 17 | public String login(String id) { 18 | Map map = new HashMap<>(); 19 | map.put("phone_num", id); 20 | List users = userDao.selectByMap(map); 21 | System.out.println(users); 22 | return id + users.size(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Library-miniProject/pages/center/userInfo/userInfo.wxss: -------------------------------------------------------------------------------- 1 | /* pages/userInfo/userInfo.wxss */ 2 | 3 | .label { 4 | float: left; 5 | width: 180rpx; 6 | } 7 | 8 | .val { 9 | display: inline-block; 10 | height: 86rpx; 11 | } 12 | 13 | .submit { 14 | margin: auto; 15 | margin-top: 100rpx; 16 | width: 500rpx; 17 | height: 60rpx; 18 | line-height: 60rpx; 19 | background-color: #f2f2f2; 20 | border-radius: 16rpx; 21 | text-align: center; 22 | font-size: 30rpx; 23 | color: #666; 24 | 25 | } 26 | .avatar-button { 27 | display: inline-block; 28 | padding: 0; 29 | margin-left: 0; 30 | margin-right: 0; 31 | background-color: #fff; 32 | line-height: 86rpx; 33 | font-size: 30rpx; 34 | font-weight: normal; 35 | text-align: left; 36 | } -------------------------------------------------------------------------------- /Library-Server-Cloud/common-util/src/main/java/cool/leeson/lib/entity/User.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.lib.entity; 2 | 3 | 4 | import com.baomidou.mybatisplus.annotation.IdType; 5 | import com.baomidou.mybatisplus.annotation.TableId; 6 | import lombok.AllArgsConstructor; 7 | import lombok.Data; 8 | import lombok.NoArgsConstructor; 9 | 10 | /** 11 | * (User)表实体类 12 | * 13 | * @author Leeson0202 14 | * @since 2023-04-25 20:41:38 15 | */ 16 | @Data 17 | @AllArgsConstructor 18 | @NoArgsConstructor 19 | public class User { 20 | //id 21 | @TableId(type = IdType.AUTO) 22 | private String userId; 23 | //电话 24 | private String phoneNum; 25 | //邮件 26 | private String email; 27 | //密码 28 | private String pwd; 29 | //微信id 30 | private String openid; 31 | 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/api/actiondecorator.d.ts: -------------------------------------------------------------------------------- 1 | import { BabelDescriptor } from "../internal"; 2 | declare function dontReassignFields(): void; 3 | export declare function namedActionDecorator(name: string): (target: any, prop: any, descriptor: BabelDescriptor) => any; 4 | export declare function actionFieldDecorator(name: string): (target: any, prop: any, descriptor: any) => void; 5 | export declare function boundActionDecorator(target: any, propertyName: any, descriptor: any, applyToInstance?: boolean): { 6 | configurable: boolean; 7 | enumerable: boolean; 8 | get(): any; 9 | set: typeof dontReassignFields; 10 | } | { 11 | enumerable: boolean; 12 | configurable: boolean; 13 | set(v: any): void; 14 | get(): undefined; 15 | } | null; 16 | export {}; 17 | -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/api/become-observed.d.ts: -------------------------------------------------------------------------------- 1 | import { IObservableArray, IObservable, IComputedValue, ObservableMap, ObservableSet, Lambda } from "../internal"; 2 | export declare function onBecomeObserved(value: IObservable | IComputedValue | IObservableArray | ObservableMap | ObservableSet, listener: Lambda): Lambda; 3 | export declare function onBecomeObserved(value: ObservableMap | Object, property: K, listener: Lambda): Lambda; 4 | export declare function onBecomeUnobserved(value: IObservable | IComputedValue | IObservableArray | ObservableMap | ObservableSet, listener: Lambda): Lambda; 5 | export declare function onBecomeUnobserved(value: ObservableMap | Object, property: K, listener: Lambda): Lambda; 6 | -------------------------------------------------------------------------------- /Library-miniProject/pages/function/bookRule/bookRule.wxss: -------------------------------------------------------------------------------- 1 | /* pages/function/bookRule/bookRule.wxss */ 2 | .credit { 3 | margin-top: 10rpx; 4 | padding: 16rpx 30rpx; 5 | width: calc(95% - 60rpx); 6 | height: 60rpx; 7 | line-height: 60rpx; 8 | font-size: 30rpx; 9 | } 10 | 11 | .in-block { 12 | display: inline-block; 13 | } 14 | 15 | .my-credit { 16 | margin-left: 30rpx; 17 | width: 60rpx; 18 | height: 46rpx; 19 | line-height: 46rpx; 20 | text-align: center; 21 | border-radius: 20rpx; 22 | font-size: 26rpx; 23 | background-color: rgb(20, 248, 70); 24 | } 25 | 26 | .tur-my-credit { 27 | float: right; 28 | } 29 | 30 | .rule{ 31 | margin: auto; 32 | padding-top: 20rpx; 33 | padding-bottom: 60rpx; 34 | width: 90%; 35 | font-size: 24rpx; 36 | } -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/entity/user/UserOnline.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.entity.user; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import java.io.Serializable; 8 | import java.util.Date; 9 | 10 | /** 11 | * (UserOnline)实体类 12 | * 13 | * @author Leeson0202 14 | * @since 2023-03-24 01:05:34 15 | */ 16 | @Data 17 | @NoArgsConstructor 18 | @AllArgsConstructor 19 | public class UserOnline implements Serializable { 20 | private static final long serialVersionUID = 932945363786125073L; 21 | /** 22 | * id 23 | */ 24 | private String userId; 25 | /** 26 | * 在座状态 27 | */ 28 | private Integer online; 29 | /** 30 | * 开始就坐时间 31 | */ 32 | private Date date; 33 | 34 | } 35 | 36 | -------------------------------------------------------------------------------- /Library-Server/src/main/resources/sql/cqupt.sql: -------------------------------------------------------------------------------- 1 | use library; 2 | 3 | -- 重邮用户表 4 | drop table if exists cquptInfo; 5 | create table cquptInfo 6 | ( 7 | user_id varchar(100) primary key comment 'id', 8 | `role` varchar(50) comment 'role', 9 | `name` varchar(50) comment '姓名', 10 | cqupt_id varchar(50) unique comment 'cqupt_id', 11 | student_id varchar(50) comment '学生号', 12 | grade varchar(50) comment '年级', 13 | `classs` varchar(50) comment '班级', 14 | unit_name varchar(50) comment '学院', 15 | profession_name varchar(50) comment '专业', 16 | gender varchar(50) comment '性别', 17 | counselor_name varchar(50) comment '辅导员', 18 | counselor_cqupt_id varchar(50) comment '辅导员cqupt_id' 19 | ); -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/entity/library/SchoolRule.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.entity.library; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import javax.validation.constraints.NotBlank; 8 | import java.io.Serializable; 9 | 10 | /** 11 | * (SchoolRule)实体类 12 | * 13 | * @author Leeson0202 14 | * @since 2023-03-11 20:18:35 15 | */ 16 | @Data 17 | @AllArgsConstructor 18 | @NoArgsConstructor 19 | public class SchoolRule implements Serializable { 20 | private static final long serialVersionUID = -36179764281798462L; 21 | /** 22 | * 学校id 23 | */ 24 | @NotBlank 25 | private String schoolId; 26 | /** 27 | * 内容 28 | */ 29 | @NotBlank 30 | private String context; 31 | 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /Library-vue/src/utils/services/index.js: -------------------------------------------------------------------------------- 1 | import AuthService from './AuthService'; 2 | import UserService from './UserService'; 3 | import SchoolService from './SchoolService'; 4 | import LibraryService from './LibraryService'; 5 | import ReservationService from './ReservationService'; 6 | import RoomService from './RoomService'; 7 | import RuleService from './RuleService'; 8 | import NotificationService from './NotificationService'; 9 | import FileService from './FileService'; 10 | import TableService from './TableService'; 11 | import SeatService from './SeatService'; 12 | 13 | export { 14 | AuthService, 15 | UserService, 16 | SchoolService, 17 | LibraryService, 18 | ReservationService, 19 | RoomService, 20 | RuleService, 21 | NotificationService, 22 | FileService, 23 | TableService, 24 | SeatService, 25 | }; -------------------------------------------------------------------------------- /Library-vue/src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 24 | 25 | 40 | -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/api/computed.d.ts: -------------------------------------------------------------------------------- 1 | import { IComputedValueOptions, IComputedValue } from "../internal"; 2 | export interface IComputed { 3 | (options: IComputedValueOptions): any; 4 | (func: () => T, setter: (v: T) => void): IComputedValue; 5 | (func: () => T, options?: IComputedValueOptions): IComputedValue; 6 | (target: Object, key: string | symbol, baseDescriptor?: PropertyDescriptor): void; 7 | struct(target: Object, key: string | symbol, baseDescriptor?: PropertyDescriptor): void; 8 | } 9 | export declare const computedDecorator: Function; 10 | /** 11 | * Decorator for class properties: @computed get value() { return expr; }. 12 | * For legacy purposes also invokable as ES5 observable created: `computed(() => expr)`; 13 | */ 14 | export declare const computed: IComputed; 15 | -------------------------------------------------------------------------------- /Library-vue/src/assets/img/home.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Library-vue/src/utils/services/UserService.js: -------------------------------------------------------------------------------- 1 | import http from '../http'; 2 | 3 | export default { 4 | 5 | // 获取用户信息 UserInfo 6 | queryUserInfo: () => http.get("api/userInfo"), 7 | // 更新用户信息 8 | updateUserInfo: (data) => http.put("api/userInfo", data), 9 | // 重邮信息登陆 10 | userBindCqupt: (cqupt_id, password) => 11 | http.post("api/user/bind/cqupt", { cqupt_id, password }), 12 | // 获取用户 User 13 | queryUser: () => http.get("api/user"), 14 | // 修改用户确定-验证码 15 | updateUserConfirm: (code) => http.put("api/usre/comfirm", { code }), 16 | /** 17 | * 用户管理 18 | */ 19 | queryUserAll: (schoolId) => http.get("api/user/all", { schoolId }), 20 | insertUser: (data) => http.post("api/user", data), 21 | updateUser: (data) => http.put("api/user", data), 22 | deleteUser: (userId) => http.delete("api/user", { userId }), 23 | } -------------------------------------------------------------------------------- /Library-miniProject/pages/center/feedback/feedback.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 标题: 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | {{textNum}}/500 18 | 19 | 20 | 提交 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Library-miniProject/pages/center/feedback/feedback.wxss: -------------------------------------------------------------------------------- 1 | /* pages/center/feedback/feedback.wxss */ 2 | .input { 3 | position: relative; 4 | top: 12rpx; 5 | display: inline-block; 6 | width: 80%; 7 | margin-left: 10rpx; 8 | } 9 | 10 | .feedback-input { 11 | margin: auto; 12 | padding: 0rpx 24rpx; 13 | width: calc(100%); 14 | height: 400rpx; 15 | } 16 | 17 | .fixed { 18 | height: 80rpx; 19 | line-height: 80rpx; 20 | text-align: center; 21 | } 22 | 23 | .numshow { 24 | float: left; 25 | margin-left: 20rpx; 26 | } 27 | 28 | .submit-button { 29 | margin-right: 20rpx; 30 | margin-top: 10rpx; 31 | float: right; 32 | width: 160rpx; 33 | height: 60rpx; 34 | line-height: 60rpx; 35 | font-weight: 400; 36 | color: #fff; 37 | background-color: rgba(169, 171, 172, 0.74); 38 | border-radius: 20rpx; 39 | } -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/entity/user/UserCredit.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.entity.user; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import java.io.Serializable; 8 | 9 | /** 10 | * (UserCredit)实体类 11 | * 12 | * @author Leeson0202 13 | * @since 2023-03-07 22:18:19 14 | */ 15 | @Data 16 | @AllArgsConstructor 17 | @NoArgsConstructor 18 | public class UserCredit implements Serializable { 19 | private static final long serialVersionUID = 599893950732877222L; 20 | /** 21 | * 信用记录id 22 | */ 23 | private String id; 24 | /** 25 | * userId 26 | */ 27 | private String userId; 28 | /** 29 | * 信用条目 30 | */ 31 | private Integer userCredit; 32 | /** 33 | * 备注 34 | */ 35 | private String description; 36 | 37 | 38 | } 39 | 40 | -------------------------------------------------------------------------------- /Library-vue/src/assets/img/email.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Library-vue/src/assets/img/tel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/entity/user/UserSchool.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.entity.user; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import java.io.Serializable; 8 | 9 | /** 10 | * (UserSchool)实体类 11 | * 12 | * @author Leeson0202 13 | * @since 2023-03-07 22:24:58 14 | */ 15 | @Data 16 | @AllArgsConstructor 17 | @NoArgsConstructor 18 | public class UserSchool implements Serializable { 19 | private static final long serialVersionUID = -69430525157765173L; 20 | /** 21 | * 用户学校记录id 22 | */ 23 | private String id; 24 | /** 25 | * userId 26 | */ 27 | private String userId; 28 | /** 29 | * 学校id 30 | */ 31 | private String schoolId; 32 | 33 | /** 34 | * 是否管理 35 | */ 36 | private Boolean management; 37 | 38 | 39 | } 40 | 41 | -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/api/intercept-read.d.ts: -------------------------------------------------------------------------------- 1 | import { Lambda, IObservableValue, IObservableArray, ObservableMap, ObservableSet } from "../internal"; 2 | export declare type ReadInterceptor = (value: any) => T; 3 | /** Experimental feature right now, tested indirectly via Mobx-State-Tree */ 4 | export declare function interceptReads(value: IObservableValue, handler: ReadInterceptor): Lambda; 5 | export declare function interceptReads(observableArray: IObservableArray, handler: ReadInterceptor): Lambda; 6 | export declare function interceptReads(observableMap: ObservableMap, handler: ReadInterceptor): Lambda; 7 | export declare function interceptReads(observableSet: ObservableSet, handler: ReadInterceptor): Lambda; 8 | export declare function interceptReads(object: Object, property: string, handler: ReadInterceptor): Lambda; 9 | -------------------------------------------------------------------------------- /Library-vue/src/store/states/user.js: -------------------------------------------------------------------------------- 1 | export default { 2 | // 是否登陆 3 | hasLogin: false, 4 | // 是否有用户信息 5 | hasUserInfo: false, 6 | // 用户私密信息 7 | user: { 8 | userId: null, 9 | phoneNum: null, 10 | email: null, 11 | pwd: null, 12 | openId: null, 13 | }, 14 | // 用户基本信息 15 | userInfo: { 16 | userId: null, 17 | openid: null, 18 | sessionKey: null, 19 | avatarUrl: 20 | "https://img0.baidu.com/it/u=1624701516,3985681371&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500", 21 | city: null, 22 | province: null, 23 | country: null, 24 | gender: null, 25 | language: null, 26 | nickName: "Leeson", 27 | age: null, 28 | syuId: null, 29 | background: null, 30 | userRecord: null, 31 | }, 32 | userOnline: false, 33 | }; 34 | -------------------------------------------------------------------------------- /Library-miniProject/node_modules/.package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Library-miniProject", 3 | "lockfileVersion": 2, 4 | "requires": true, 5 | "packages": { 6 | "node_modules/mobx-miniprogram": { 7 | "version": "4.13.2", 8 | "resolved": "https://registry.npmmirror.com/mobx-miniprogram/-/mobx-miniprogram-4.13.2.tgz", 9 | "integrity": "sha512-C3HtkqHCLKp35N2gXA80yFD6PNfSqwioPFmnjTQpBLrEqYm1F6yiWZ57CW+8FqgmR306mw6ZfsM5q7hSTHw8BQ==" 10 | }, 11 | "node_modules/mobx-miniprogram-bindings": { 12 | "version": "1.2.1", 13 | "resolved": "https://registry.npmmirror.com/mobx-miniprogram-bindings/-/mobx-miniprogram-bindings-1.2.1.tgz", 14 | "integrity": "sha512-OleJ0IIc4g8rC7ul0wtn+imapVQvWo/1UxZyvdMrfwcenmHBjY4Bddr90RoIwkM+Ul7nOxsYdsmOsB/mZ0PJmA==", 15 | "peerDependencies": { 16 | "mobx-miniprogram": "^4.0.0" 17 | } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/entity/user/UserLearned.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.entity.user; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import java.util.Date; 8 | import java.io.Serializable; 9 | 10 | /** 11 | * (UserLearned)实体类 12 | * 13 | * @author Leeson0202 14 | * @since 2023-03-07 22:21:28 15 | */ 16 | @Data 17 | @AllArgsConstructor 18 | @NoArgsConstructor 19 | public class UserLearned implements Serializable { 20 | private static final long serialVersionUID = 821278655247545109L; 21 | /** 22 | * 用户的单日记录 23 | */ 24 | private String id; 25 | /** 26 | * userId 27 | */ 28 | private String userId; 29 | /** 30 | * 日期 31 | */ 32 | private Date date; 33 | /** 34 | * 今日的时长 35 | */ 36 | private Integer learnTime; 37 | 38 | 39 | } 40 | 41 | -------------------------------------------------------------------------------- /Library-miniProject/resources/images/function/receive_rule.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Library-vue/src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from "vue"; 2 | //引入VueRouter 3 | import VueRouter from "vue-router"; 4 | // 我的子router 5 | import routers from "./routers"; 6 | Vue.use(VueRouter); // 应用插件 7 | 8 | //创建router实例对象,去管理一组一组的路由规则 9 | const router = new VueRouter({ 10 | // mode:"history", 11 | routes: [ 12 | { 13 | path: "/", 14 | component: (resolve) => require(["@/components/Index"], resolve), 15 | children: routers, 16 | }, 17 | { 18 | path: "/login", 19 | name: "login", 20 | component: (resolve) => require(["@/components/Login"], resolve), 21 | }, 22 | 23 | { 24 | path: "/404", 25 | name: "page404", 26 | component: (resolve) => require(["@/components/NotFount"], resolve), 27 | }, 28 | ], 29 | }); 30 | 31 | //暴露router 32 | export default router; 33 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/entity/user/User.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.entity.user; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import java.io.Serializable; 8 | 9 | /** 10 | * (User)实体类 11 | * 12 | * @author Leeson0202 13 | * @since 2023-02-26 15:42:15 14 | */ 15 | @Data 16 | @NoArgsConstructor 17 | @AllArgsConstructor 18 | public class User implements Serializable { 19 | private static final long serialVersionUID = -14002840480059827L; 20 | /** 21 | * id 22 | */ 23 | private String userId; 24 | private String nickName; 25 | /** 26 | * 电话 27 | */ 28 | private String phoneNum; 29 | /** 30 | * 邮件 31 | */ 32 | private String email; 33 | /** 34 | * 密码 35 | */ 36 | private String pwd; 37 | /** 38 | * 微信id 39 | */ 40 | private String openId; 41 | 42 | } 43 | 44 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/config/WebConfig.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.config; 2 | 3 | import cool.leeson.library.interceptor.TokenInterceptor; 4 | import cool.leeson.library.interceptor.WebInterceptor; 5 | import org.springframework.context.annotation.Configuration; 6 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; 7 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 8 | 9 | import javax.annotation.Resource; 10 | 11 | @Configuration 12 | public class WebConfig implements WebMvcConfigurer { 13 | @Resource 14 | private WebInterceptor webInterceptor; 15 | @Resource 16 | private TokenInterceptor tokenInterceptor; 17 | 18 | public void addInterceptors(InterceptorRegistry registry) { 19 | registry.addInterceptor(webInterceptor).addPathPatterns("/**"); 20 | registry.addInterceptor(tokenInterceptor).addPathPatterns("/**"); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Library-miniProject/pages/center/user/user.js: -------------------------------------------------------------------------------- 1 | // pages/center/user/user.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | 9 | }, 10 | 11 | /** 12 | * 生命周期函数--监听页面加载 13 | */ 14 | onLoad(options) { 15 | 16 | }, 17 | 18 | /** 19 | * 生命周期函数--监听页面初次渲染完成 20 | */ 21 | onReady() { 22 | 23 | }, 24 | 25 | /** 26 | * 生命周期函数--监听页面显示 27 | */ 28 | onShow() { 29 | 30 | }, 31 | 32 | /** 33 | * 生命周期函数--监听页面隐藏 34 | */ 35 | onHide() { 36 | 37 | }, 38 | 39 | /** 40 | * 生命周期函数--监听页面卸载 41 | */ 42 | onUnload() { 43 | 44 | }, 45 | 46 | /** 47 | * 页面相关事件处理函数--监听用户下拉动作 48 | */ 49 | onPullDownRefresh() { 50 | 51 | }, 52 | 53 | /** 54 | * 页面上拉触底事件的处理函数 55 | */ 56 | onReachBottom() { 57 | 58 | }, 59 | 60 | /** 61 | * 用户点击右上角分享 62 | */ 63 | onShareAppMessage() { 64 | 65 | } 66 | }) -------------------------------------------------------------------------------- /Library-miniProject/pages/function/notify/notify.wxss: -------------------------------------------------------------------------------- 1 | /* pages/notify/notify.wxss */ 2 | .notify-item { 3 | margin: 0 0 10rpx; 4 | padding: 10rpx 20rpx; 5 | height: 140rpx; 6 | width: calc(100% - 40rpx); 7 | /* background-color: #eee; */ 8 | border-bottom: 1rpx solid #f2f2f2; 9 | } 10 | 11 | .notify-title { 12 | margin-top: 10rpx; 13 | margin-left: 10rpx; 14 | letter-spacing: 1rpx; 15 | height: 50rpx; 16 | font-size: 30rpx; 17 | } 18 | 19 | .notify-more { 20 | margin: 0; 21 | height: 80rpx; 22 | overflow: hidden; 23 | } 24 | 25 | .notify-context { 26 | margin: 0 0 0 20rpx; 27 | height: 32rpx; 28 | overflow: hidden; 29 | font-size: 24rpx; 30 | font-weight: 400; 31 | } 32 | 33 | .item-more { 34 | margin-top: 14rpx; 35 | font-size: 20rpx; 36 | 37 | } 38 | 39 | .notify-time { 40 | letter-spacing: 1rpx; 41 | margin-right: 20rpx; 42 | float: right; 43 | /* font-weight: 200; */ 44 | } 45 | 46 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/entity/user/UserInfoQuery.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.entity.user; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | @Data 8 | @AllArgsConstructor 9 | @NoArgsConstructor 10 | public class UserInfoQuery { 11 | // user_id 12 | private String userId; 13 | //OPEN_id 14 | private String openid; 15 | //会话密钥 16 | private String sessionKey; 17 | //头像路径 18 | private String avatarUrl; 19 | //城市 20 | private String city; 21 | //省份 22 | private String province; 23 | //国家 24 | private String country; 25 | //性别 26 | private String gender; 27 | //语言 28 | private String language; 29 | //昵称 30 | private String nickName; 31 | //备注名或真实名 32 | private String realName; 33 | // 年龄 34 | private Short age; 35 | //学生ID 36 | private Integer stuId; 37 | // 背景 38 | private String background; 39 | } 40 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/entity/user/UserInfo.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.entity.user; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | @Data 8 | @AllArgsConstructor 9 | @NoArgsConstructor 10 | public class UserInfo { 11 | // user_id 12 | private String userId; 13 | //OPEN_id 14 | private String openid; 15 | //会话密钥 16 | private String sessionKey; 17 | //头像路径 18 | private String avatarUrl; 19 | //城市 20 | private String city; 21 | //省份 22 | private String province; 23 | //国家 24 | private String country; 25 | //性别 26 | private String gender; 27 | //语言 28 | private String language; 29 | //昵称 30 | private String nickName; 31 | //备注名或真实名 32 | private String realName; 33 | // 年龄 34 | private Short age; 35 | //学生ID 36 | private Integer stuId; 37 | // 背景 38 | private String background; 39 | // 用户记录 40 | private UserRecord userRecord; 41 | } 42 | -------------------------------------------------------------------------------- /Library-vue/vue.config.js: -------------------------------------------------------------------------------- 1 | const { defineConfig } = require("@vue/cli-service"); 2 | module.exports = defineConfig({ 3 | transpileDependencies: true, 4 | /* 代码保存时进行eslint检测 */ 5 | lintOnSave: false, 6 | 7 | /* 输出文件目录:在npm run build时,生成文件的目录名称 */ 8 | outputDir: "dist", 9 | /* 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录 */ 10 | assetsDir: "assets", 11 | /* 是否在构建生产包时生成 sourceMap 文件,false将提高构建速度 */ 12 | productionSourceMap: false, 13 | /* 默认情况下,生成的静态资源在它们的文件名中包含了 hash 以便更好的控制缓存,你可以通过将这个选项设为 false 来关闭文件名哈希。(false的时候就是让原来的文件名不改变) */ 14 | filenameHashing: false, 15 | 16 | devServer: { 17 | port: 8070, 18 | proxy: { 19 | "/api": { 20 | //这里最好有一个 / 21 | // target: "https://api.library.leeson.cool", // 后台接口域名 22 | target: "http://localhost:8080", // 后台接口域名 23 | changeOrigin: true, //是否跨域 24 | pathRewrite: { 25 | "^/api": "", 26 | }, 27 | }, 28 | }, 29 | }, 30 | }); 31 | -------------------------------------------------------------------------------- /Library-vue/src/components/NotFount.vue: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 37 | 43 | -------------------------------------------------------------------------------- /Library-miniProject/pages/center/settings/settings.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 切换账号 9 | 10 | 11 | 账号安全 12 | 13 | 14 | 15 | 16 | 17 | 18 | 消息通知 19 | 20 | 21 | 帮助与反馈 22 | 23 | 24 | 隐私政策 25 | 26 | 27 | 关于 28 | 29 | 30 | 31 | 32 | 退出登陆 33 | 34 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/util/WxUtil.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.util; 2 | 3 | public class WxUtil { 4 | 5 | private final static String APP_ID = "wx120544f5baefb8a0"; 6 | private final static String APP_SECRET = "49d8a66ca5a8936462d84ce4956596c8"; 7 | private final static String WX_LOGIN_SERVER_URL = "https://api.weixin.qq.com/sns/jscode2session?appid=%s&secret=%s&js_code=%s&grant_type=authorization_code"; 8 | private final static String WX_TOKEN_SERVER_URL = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s"; 9 | 10 | /** 11 | * 获取用户 openid 和 session_key 的 url 12 | * @param code 小程序code 13 | * @return url 14 | */ 15 | public static String getWxLoginUrl(String code) { 16 | return String.format(WX_LOGIN_SERVER_URL, APP_ID, APP_SECRET, code); 17 | 18 | } 19 | 20 | /** 21 | * 获取 session_token的url 22 | * @return url 23 | */ 24 | public static String getWxTokenUrl() { 25 | return String.format(WX_TOKEN_SERVER_URL, APP_ID, APP_SECRET); 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/api/autorun.d.ts: -------------------------------------------------------------------------------- 1 | import { IReactionPublic, IReactionDisposer, IEqualsComparer } from "../internal"; 2 | export interface IAutorunOptions { 3 | delay?: number; 4 | name?: string; 5 | scheduler?: (callback: () => void) => any; 6 | onError?: (error: any) => void; 7 | } 8 | /** 9 | * Creates a named reactive view and keeps it alive, so that the view is always 10 | * updated if one of the dependencies changes, even when the view is not further used by something else. 11 | * @param view The reactive view 12 | * @returns disposer function, which can be used to stop the view from being updated in the future. 13 | */ 14 | export declare function autorun(view: (r: IReactionPublic) => any, opts?: IAutorunOptions): IReactionDisposer; 15 | export declare type IReactionOptions = IAutorunOptions & { 16 | fireImmediately?: boolean; 17 | equals?: IEqualsComparer; 18 | }; 19 | export declare function reaction(expression: (r: IReactionPublic) => T, effect: (arg: T, r: IReactionPublic) => void, opts?: IReactionOptions): IReactionDisposer; 20 | -------------------------------------------------------------------------------- /Library-Server-Cloud/common-util/src/main/java/cool/leeson/lib/utils/WxUtil.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.lib.utils; 2 | 3 | public class WxUtil { 4 | 5 | private final static String APP_ID = "wx120544f5baefb8a0"; 6 | private final static String APP_SECRET = "49d8a66ca5a8936462d84ce4956596c8"; 7 | private final static String WX_LOGIN_SERVER_URL = "https://api.weixin.qq.com/sns/jscode2session?appid=%s&secret=%s&js_code=%s&grant_type=authorization_code"; 8 | private final static String WX_TOKEN_SERVER_URL = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s"; 9 | 10 | /** 11 | * 获取用户 openid 和 session_key 的 url 12 | * @param code 小程序code 13 | * @return url 14 | */ 15 | public static String getWxLoginUrl(String code) { 16 | return String.format(WX_LOGIN_SERVER_URL, APP_ID, APP_SECRET, code); 17 | 18 | } 19 | 20 | /** 21 | * 获取 session_token的url 22 | * @return url 23 | */ 24 | public static String getWxTokenUrl() { 25 | return String.format(WX_TOKEN_SERVER_URL, APP_ID, APP_SECRET); 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/entity/library/School.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.entity.library; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import java.io.Serializable; 8 | import java.util.List; 9 | 10 | /** 11 | * (School)实体类 12 | * 13 | * @author Leeson0202 14 | * @since 2023-03-10 22:59:40 15 | */ 16 | @Data 17 | @AllArgsConstructor 18 | @NoArgsConstructor 19 | public class School implements Serializable { 20 | private static final long serialVersionUID = 166594818735096072L; 21 | /** 22 | * id 23 | */ 24 | private String schoolId; 25 | /** 26 | * 名称 27 | */ 28 | private String name; 29 | /** 30 | * 简介 31 | */ 32 | private String descs; 33 | /** 34 | * 图标 35 | */ 36 | private String icon; 37 | /** 38 | * 背景 39 | */ 40 | private String background; 41 | /** 42 | * 图书馆列表 43 | */ 44 | private List libraries; 45 | /** 46 | * 预约规则 47 | */ 48 | private SchoolRule schoolRule; 49 | 50 | 51 | } 52 | 53 | -------------------------------------------------------------------------------- /Library-miniProject/resources/images/function/receive_fast.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/entity/library/LibraryTable.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.entity.library; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import java.io.Serializable; 8 | 9 | /** 10 | * (LibraryTable)实体类 11 | * 12 | * @author Leeson0202 13 | * @since 2023-03-11 02:09:06 14 | */ 15 | @Data 16 | @AllArgsConstructor 17 | @NoArgsConstructor 18 | public class LibraryTable implements Serializable { 19 | private static final long serialVersionUID = 513201302054058878L; 20 | /** 21 | * 桌子id 22 | */ 23 | private String tableId; 24 | /** 25 | * 图书室id 26 | */ 27 | private String roomId; 28 | /** 29 | * 座位名称 30 | */ 31 | private String name; 32 | /** 33 | * x坐标 34 | */ 35 | private Integer x; 36 | /** 37 | * y坐标 38 | */ 39 | private Integer y; 40 | /** 41 | * 方向 42 | */ 43 | private Integer direction; 44 | /** 45 | * 宽 46 | */ 47 | private Integer width; 48 | /** 49 | * 高 50 | */ 51 | private Integer height; 52 | 53 | } 54 | 55 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/entity/receive/ReceiveFast.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.entity.receive; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import java.io.Serializable; 8 | 9 | /** 10 | * (ReceiveFast)实体类 11 | * 12 | * @author Leeson0202 13 | * @since 2023-03-24 22:40:36 14 | */ 15 | @Data 16 | @AllArgsConstructor 17 | @NoArgsConstructor 18 | public class ReceiveFast implements Serializable { 19 | private static final long serialVersionUID = -99968772837888274L; 20 | /** 21 | * id 22 | */ 23 | private String userId; 24 | private String nickName; 25 | /** 26 | * 学校id 27 | */ 28 | private String schoolId; 29 | /** 30 | * 图书馆Id 31 | */ 32 | private String libraryId; 33 | private String libraryName; 34 | /** 35 | * 图书室id 36 | */ 37 | private String roomId; 38 | private String roomName; 39 | 40 | /** 41 | * 座位id 42 | */ 43 | private String seatId; 44 | private String seatName; 45 | 46 | /** 47 | * 是否打开 48 | */ 49 | private Boolean open; 50 | 51 | 52 | } 53 | 54 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/entity/user/UserRecord.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.entity.user; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import java.io.Serializable; 8 | 9 | /** 10 | * (UserRecord)实体类 11 | * 12 | * @author Leeson0202 13 | * @since 2023-03-07 22:17:03 14 | */ 15 | @Data 16 | @AllArgsConstructor 17 | @NoArgsConstructor 18 | public class UserRecord implements Serializable { 19 | private static final long serialVersionUID = -50965009124288477L; 20 | /** 21 | * userId 22 | */ 23 | private String userId; 24 | /** 25 | * 信用 26 | */ 27 | private Integer credit; 28 | /** 29 | * 单日最长时间 30 | */ 31 | private Integer maxTime; 32 | /** 33 | * 总时间 34 | */ 35 | private Integer allTime; 36 | /** 37 | * 单日排名 38 | */ 39 | private Integer dayRank; 40 | /** 41 | * 周排名 42 | */ 43 | private Integer weekRank; 44 | /** 45 | * 月排名 46 | */ 47 | private Integer monthRank; 48 | /** 49 | * 总排名 50 | */ 51 | private Integer allRank; 52 | 53 | 54 | } 55 | 56 | -------------------------------------------------------------------------------- /Library-miniProject/pages/center/mycredit/mycredit.wxss: -------------------------------------------------------------------------------- 1 | /* pages/center/mycredit/mycredit.wxss */ 2 | 3 | 4 | .my-view { 5 | display: inline-block; 6 | height: 100%; 7 | width: 100%; 8 | /* background-color: #eee; */ 9 | } 10 | 11 | .head-show { 12 | position: relative; 13 | display: block; 14 | margin: auto; 15 | margin-top: 20rpx; 16 | padding: 20rpx 20rpx; 17 | width: calc(100% - 60rpx); 18 | height: 100rpx; 19 | } 20 | 21 | .credit { 22 | position: relative; 23 | margin: auto; 24 | margin-right: 20rpx; 25 | width: 100rpx; 26 | height: 100rpx; 27 | line-height: 100rpx; 28 | text-align: center; 29 | border-radius: 50%; 30 | background-color: rgba(8, 252, 20, 0.507); 31 | color: #fff; 32 | } 33 | 34 | .credit-val { 35 | position: relative; 36 | width: 100%; 37 | background-color: rgb(247, 221, 150); 38 | } 39 | 40 | 41 | .records{ 42 | margin-top: 20rpx; 43 | padding: 10rpx; 44 | width: calc(100% - 20rpx); 45 | background-color: #fff; 46 | } 47 | .line-item{ 48 | padding-top: 20rpx; 49 | height: 110rpx; 50 | font-size: 22rpx; 51 | line-height: 40rpx; 52 | } -------------------------------------------------------------------------------- /Library-miniProject/resources/images/library/content.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/api/intercept.d.ts: -------------------------------------------------------------------------------- 1 | import { IInterceptor, IValueWillChange, IObservableValue, Lambda, IObservableArray, IArrayWillChange, IArrayWillSplice, ObservableMap, IMapWillChange, ObservableSet, ISetWillChange, IObjectWillChange } from "../internal"; 2 | export declare function intercept(value: IObservableValue, handler: IInterceptor>): Lambda; 3 | export declare function intercept(observableArray: IObservableArray, handler: IInterceptor | IArrayWillSplice>): Lambda; 4 | export declare function intercept(observableMap: ObservableMap, handler: IInterceptor>): Lambda; 5 | export declare function intercept(observableMap: ObservableSet, handler: IInterceptor>): Lambda; 6 | export declare function intercept(observableMap: ObservableMap, property: K, handler: IInterceptor>): Lambda; 7 | export declare function intercept(object: Object, handler: IInterceptor): Lambda; 8 | export declare function intercept(object: T, property: K, handler: IInterceptor>): Lambda; 9 | -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram-bindings/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 wechat-miniprogram 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Michel Weststrate 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Library-miniProject/pages/center/cquptLogin/cquptLogin.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 登陆 8 | 9 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Library-miniProject/pages/function/notify/notifyItem/notifyItem.js: -------------------------------------------------------------------------------- 1 | // pages/notifyItem/notifyItem.js 2 | import api from '../../../../utils/api' 3 | Page({ 4 | 5 | /** 6 | * 页面的初始数据 7 | */ 8 | data: { 9 | tag: false, 10 | notifyText: { 11 | "id": 5, 12 | "time": "2022/01/13", 13 | "title": "寒假放假通知", 14 | "context": "劳动节放假通知,本馆将于10.1正式放假5天,放假时间为10.1-10.5,10.6正常开馆。", 15 | "view": 10 16 | } 17 | 18 | }, 19 | // 获取 notifyText by id 20 | getNotifyTextById(id) { 21 | let that = this 22 | api.queryNotification(id).then(data => { 23 | data.data.time = new Date(data.data.date).toLocaleString().slice(0, 9) 24 | that.setData({ 25 | notifyText: data.data 26 | }) 27 | }) 28 | 29 | }, 30 | /** 31 | * 生命周期函数--监听页面加载 32 | */ 33 | onLoad(options) { 34 | if (options.id !== undefined) { 35 | // console.log(options.id); 36 | this.getNotifyTextById(options.id); 37 | } 38 | }, 39 | 40 | 41 | /** 42 | * 生命周期函数--监听页面显示 43 | */ 44 | onShow() { 45 | 46 | }, 47 | 48 | 49 | 50 | }) -------------------------------------------------------------------------------- /Library-miniProject/pages/center/login/confirm/confirm.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 请输入验证码 5 | 已发送至{{tel}} 6 | 已发送至{{email}} 7 | 8 | 9 | 10 | 11 | 12 | 13 | 登陆 14 | 15 | 16 | 17 | 18 | 19 | 22 | 23 | 24 | 昵称 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Library-miniProject/pages/center/login/login.wxss: -------------------------------------------------------------------------------- 1 | /* pages/login/login.wxss */ 2 | 3 | .login-block { 4 | width: calc(100% - 80rpx); 5 | padding: 50rpx 40rpx; 6 | } 7 | 8 | .login-title-block { 9 | font-size: 38rpx; 10 | } 11 | 12 | .login-title { 13 | font-size: 24rpx; 14 | color: #666; 15 | margin-top: 12rpx; 16 | } 17 | 18 | .login-mian-block { 19 | margin-top: 50rpx; 20 | padding-bottom: 16rpx; 21 | border-bottom: 1rpx solid #ddd; 22 | } 23 | 24 | .input { 25 | display: inline-block; 26 | position: relative; 27 | top: 10rpx; 28 | font-size: 32rpx; 29 | } 30 | 31 | 32 | /* 按钮 */ 33 | .load-submit1 { 34 | width: 90%; 35 | height: 80rpx; 36 | line-height: 80rpx; 37 | margin: auto; 38 | margin-top: 140rpx; 39 | text-align: center; 40 | background-color: #f4f4f4; 41 | border-radius: 30rpx; 42 | font-size: 30rpx; 43 | color: #666; 44 | } 45 | 46 | .load-submit1:hover { 47 | background-color: #ddd; 48 | } 49 | .op{ 50 | margin-top: 40rpx; 51 | font-size: 26rpx; 52 | } 53 | 54 | .agreement { 55 | float: left; 56 | } 57 | 58 | .other-option { 59 | float: right; 60 | margin-right: 5%; 61 | color: rgb(110, 124, 204); 62 | } -------------------------------------------------------------------------------- /Library-miniProject/pages/center/learnCount/learnCount.wxss: -------------------------------------------------------------------------------- 1 | /* pages/center/learnCount/learnCount.wxss */ 2 | 3 | .info-block { 4 | margin-top: 20rpx; 5 | height: 120rpx; 6 | line-height: 40rpx; 7 | border: 1rpx solid #eee; 8 | border-radius: 10rpx; 9 | } 10 | 11 | .info { 12 | display: inline-block; 13 | width: calc(25% - 1rpx); 14 | padding: 10rpx 0; 15 | font-size: 26rpx; 16 | text-align: center; 17 | border-right: 1rpx solid #eee; 18 | } 19 | 20 | .info:last-child { 21 | border-right: none; 22 | } 23 | 24 | .info-num { 25 | font-size: 32rpx; 26 | color: rgba(124, 124, 236, 0.7); 27 | line-height: 60rpx; 28 | } 29 | 30 | /* 图表 */ 31 | .card { 32 | margin: auto; 33 | margin-top: 10rpx; 34 | padding: 20rpx 0; 35 | width: calc(100% - 30rpx); 36 | } 37 | 38 | .manu-block { 39 | margin: auto; 40 | height: 60rpx; 41 | width: 90%; 42 | border-radius: 10rpx; 43 | background-color: #eee; 44 | } 45 | 46 | .manu { 47 | margin: 6rpx 0 0 8rpx; 48 | display: inline-block; 49 | width: calc(50% - 12rpx); 50 | height: 48rpx; 51 | line-height: 48rpx; 52 | border-radius: 10rpx; 53 | font-size: 24rpx; 54 | text-align: center; 55 | } -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/entity/library/LibraryRoom.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.entity.library; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import javax.validation.constraints.NotBlank; 8 | import java.time.LocalTime; 9 | import java.io.Serializable; 10 | import java.util.List; 11 | 12 | /** 13 | * (LibraryRoom)实体类 14 | * 15 | * @author Leeson0202 16 | * @since 2023-03-11 02:02:35 17 | */ 18 | @Data 19 | @AllArgsConstructor 20 | @NoArgsConstructor 21 | public class LibraryRoom implements Serializable { 22 | private static final long serialVersionUID = 458821484453473103L; 23 | /** 24 | * 图书室id 25 | */ 26 | private String roomId; 27 | /** 28 | * 图书馆Id 29 | */ 30 | @NotBlank(message = "libraryId 不能为空") 31 | private String libraryId; 32 | /** 33 | * 图书室名字 34 | */ 35 | @NotBlank(message = "名字 不能为空") 36 | private String name; 37 | /** 38 | * 图书室描述 39 | */ 40 | private String descs; 41 | /** 42 | * 座位数量 43 | */ 44 | private Integer seatNum; 45 | // 椅子 46 | private List librarySeats; 47 | // 桌子 48 | private List libraryTables; 49 | 50 | } 51 | 52 | -------------------------------------------------------------------------------- /Library-miniProject/utils/storage.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 设置时效缓存 3 | * @param {String} key 存储的key值 4 | * @param {String} value 存储的value值 (不填则默认为1) 5 | * @param {Number} time 有效时间,(单位:秒,不填则默认一天) 6 | */ 7 | var setStorageSyncSecond = function (key, value, time) { 8 | value = value ? value : 1 9 | wx.setStorageSync(key, value) 10 | var t = time ? +time : 24 * 3600 11 | if (t > 0) { 12 | var timestamp = new Date().getTime() 13 | timestamp = timestamp / 1000 + t 14 | wx.setStorageSync(key + 'dtime', timestamp + "") 15 | } else { 16 | wx.removeStorageSync(k + 'dtime') 17 | } 18 | } 19 | 20 | /** 21 | * 读取时效缓存 22 | * @param {String} key 存储的key值 23 | * @return {*} true为当前时间已失效、或者该值不存在,undefined默认返回则为当前时间未到失效时间 24 | */ 25 | var getStorageSyncTime = function (key) { 26 | var deadtime = +wx.getStorageSync(key + 'dtime') 27 | if (deadtime) { 28 | if (deadtime < (new Date().getTime()) / 1000) { 29 | wx.removeStorageSync(key) 30 | wx.removeStorageSync(key + 'dtime') 31 | return true 32 | } 33 | } else { 34 | return true 35 | } 36 | } 37 | 38 | module.exports = { 39 | setStorageSyncSecond: setStorageSyncSecond, 40 | getStorageSyncTime: getStorageSyncTime 41 | } -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/entity/library/LibrarySeat.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.entity.library; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import java.io.Serializable; 8 | 9 | /** 10 | * (LibrarySeat)实体类 11 | * 12 | * @author Leeson0202 13 | * @since 2023-03-11 02:08:49 14 | */ 15 | @Data 16 | @AllArgsConstructor 17 | @NoArgsConstructor 18 | public class LibrarySeat implements Serializable { 19 | private static final long serialVersionUID = -26186246891426743L; 20 | /** 21 | * 座位id 22 | */ 23 | private String seatId; 24 | /** 25 | * 图书室id 26 | */ 27 | private String roomId; 28 | /** 29 | * 座位名称 30 | */ 31 | private String name; 32 | /** 33 | * 维修状态 34 | */ 35 | private Boolean repair; 36 | /** 37 | * x坐标 38 | */ 39 | private Integer x; 40 | /** 41 | * y坐标 42 | */ 43 | private Integer y; 44 | /** 45 | * 方向 46 | */ 47 | private Integer direction; 48 | /** 49 | * 宽 50 | */ 51 | private Integer width; 52 | /** 53 | * 高 54 | */ 55 | private Integer height; 56 | /** 57 | * 有没有人 58 | */ 59 | private Boolean red; 60 | 61 | 62 | } 63 | 64 | -------------------------------------------------------------------------------- /Library-miniProject/resources/images/function/receive_common.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/entity/library/LibraryFeedback.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.entity.library; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import javax.validation.constraints.NotBlank; 8 | import java.io.Serializable; 9 | import java.util.Date; 10 | 11 | /** 12 | * (LibraryFeedback)实体类 13 | * 14 | * @author Leeson0202 15 | * @since 2023-04-12 16:35:47 16 | */ 17 | @Data 18 | @AllArgsConstructor 19 | @NoArgsConstructor 20 | public class LibraryFeedback implements Serializable { 21 | private static final long serialVersionUID = 708830664657785057L; 22 | /** 23 | * id 24 | */ 25 | private String feedbackId; 26 | /** 27 | * 学校id 28 | */ 29 | @NotBlank(message = "schoolId不能为空") 30 | private String schoolId; 31 | /** 32 | * 用户id 33 | */ 34 | @NotBlank(message = "userId不能为空") 35 | private String userId; 36 | /** 37 | * 标题 38 | */ 39 | @NotBlank(message = "标题不能为空") 40 | private String title; 41 | /** 42 | * 内容 43 | */ 44 | @NotBlank(message = "内容不能为空") 45 | private String context; 46 | /** 47 | * 处理情况 48 | */ 49 | private Integer tag; 50 | /** 51 | * 发布日期 52 | */ 53 | private Date date; 54 | 55 | 56 | } 57 | 58 | -------------------------------------------------------------------------------- /Library-miniProject/pages/center/settings/settings.js: -------------------------------------------------------------------------------- 1 | // pages/center/settings/settings.js 2 | 3 | import { 4 | createStoreBindings 5 | } from 'mobx-miniprogram-bindings' 6 | import { 7 | store 8 | } from '../../../store/store' 9 | 10 | Page({ 11 | 12 | /** 13 | * 页面的初始数据 14 | */ 15 | data: { 16 | 17 | }, 18 | 19 | logout() { 20 | this.InitData(); 21 | wx.reLaunch({ 22 | url: '/pages/center/login/login', 23 | }) 24 | }, 25 | 26 | 27 | /** 28 | * 生命周期函数--监听页面加载 29 | */ 30 | onLoad(options) { 31 | this.storeBindings = createStoreBindings(this, { 32 | store, 33 | fields: ['userInfo', 'hasUserInfo', 'hasLogin'], 34 | actions: ['GetUserInfo', 'InitData', 'CheckError'] 35 | }); 36 | 37 | }, 38 | 39 | 40 | 41 | /** 42 | * 生命周期函数--监听页面显示 43 | */ 44 | onShow() { 45 | 46 | }, 47 | 48 | /** 49 | 50 | 51 | /** 52 | * 页面相关事件处理函数--监听用户下拉动作 53 | */ 54 | onPullDownRefresh() { 55 | 56 | }, 57 | 58 | 59 | toUser() { 60 | wx.navigateTo({ 61 | url: '/pages/center/user/user', 62 | }) 63 | }, 64 | toPrivate() { 65 | wx.navigateTo({ 66 | url: '/pages/center/login/private/private', 67 | }) 68 | } 69 | }) -------------------------------------------------------------------------------- /Library-miniProject/pages/center/messages/messages.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{item.title}} 6 | 7 | 8 | 9 | 10 | 11 | 12 | {{item.time}} 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | {{messages[index].title}} 23 | 24 | 25 | 26 | {{messages[index].time}} 27 | 28 | 29 | {{messages[index].msg}} 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/controller/user/WXController.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.controller.user; 2 | 3 | import cool.leeson.library.service.wx.WxServiceImpl; 4 | import cool.leeson.library.util.ResMap; 5 | import lombok.extern.slf4j.Slf4j; 6 | import org.springframework.http.ResponseEntity; 7 | import org.springframework.web.bind.annotation.*; 8 | 9 | import javax.annotation.Resource; 10 | import java.util.Map; 11 | 12 | @RestController 13 | @Slf4j 14 | @RequestMapping("wx") 15 | public class WXController { 16 | @Resource 17 | private WxServiceImpl wxService; 18 | 19 | /** 20 | * 微信登陆 注册过程 21 | * 22 | * @param code 微信code 23 | * @return 实体对象 24 | */ 25 | @PostMapping("login") 26 | public ResponseEntity> Login(String code) { 27 | log.info("method in wx.Login(code)" + code); 28 | 29 | String token = wxService.getLoginCertificate(code); 30 | log.info("token: " + token); 31 | if (token == null) 32 | return ResponseEntity.ok(ResMap.err("服务器错误")); 33 | 34 | 35 | return ResponseEntity.ok(ResMap.ok("token", token).build()); 36 | } 37 | 38 | @GetMapping("/login/access") 39 | public ResponseEntity> accessToken(){ 40 | return ResponseEntity.ok(this.wxService.getAccessToken()); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /Library-Server/src/main/resources/sql/receive.sql: -------------------------------------------------------------------------------- 1 | use library; 2 | 3 | 4 | -- 用户预约详细表 5 | drop table if exists receive_item; 6 | create table receive_item 7 | ( 8 | receive_id varchar(100) primary key comment 'id', 9 | user_id varchar(100) comment '用户id', 10 | library_id varchar(100) comment '图书馆id', 11 | room_id varchar(100) comment '图书室id', 12 | seat_id varchar(100) comment '座位id', 13 | -- 多少号几点 14 | receive_date date comment '预约日期', 15 | time_idx smallint comment '预约时间', 16 | `time` datetime comment '创建时间' 17 | 18 | ); 19 | 20 | -- 用户在线 21 | drop table if exists user_online; 22 | create table user_online 23 | ( 24 | user_id varchar(100) primary key comment 'id', 25 | `online` int comment '在座状态', 26 | `date` datetime comment '开始就坐时间' 27 | ); 28 | 29 | -- 快速预约_订单 (具体体位置 时间) 面向考研 30 | drop table if exists receive_fast; 31 | create table receive_fast 32 | ( 33 | user_id varchar(100) primary key comment 'id', 34 | school_id varchar(100) comment '学校id', 35 | library_id varchar(100) comment '图书馆Id', 36 | room_id varchar(100) comment '图书室id', 37 | seat_id varchar(100) comment '座位id', 38 | `open` boolean comment '是否打开' 39 | ); 40 | 41 | 42 | insert into receive_fast 43 | values ('admin', 'schoolId', 'jdgchvauajkuvbh', 'dsackacbjakcaw3', 'A1001', 1); 44 | 45 | 46 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/config/RedisConfig.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.config; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.data.redis.connection.RedisConnectionFactory; 6 | import org.springframework.data.redis.core.RedisTemplate; 7 | import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer; 8 | import org.springframework.data.redis.serializer.StringRedisSerializer; 9 | 10 | @Configuration 11 | public class RedisConfig { 12 | 13 | @Bean 14 | public RedisTemplate redisTemplate(RedisConnectionFactory redisConnectionFactory) { 15 | RedisTemplate redisTemplate = new RedisTemplate<>(); 16 | //key序列化 17 | redisTemplate.setKeySerializer(new StringRedisSerializer()); 18 | //value序列化 19 | redisTemplate.setValueSerializer(new GenericJackson2JsonRedisSerializer()); 20 | //hash类型key序列化 21 | redisTemplate.setHashKeySerializer(new StringRedisSerializer()); 22 | //hash类型value序列化 23 | redisTemplate.setHashValueSerializer(new GenericJackson2JsonRedisSerializer()); 24 | //注入连接工厂 25 | redisTemplate.setConnectionFactory(redisConnectionFactory); 26 | return redisTemplate; 27 | } 28 | 29 | } 30 | 31 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/controller/CommonController.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.controller; 2 | 3 | import cool.leeson.library.util.code.CodeUtil; 4 | import lombok.extern.slf4j.Slf4j; 5 | import org.springframework.web.bind.annotation.GetMapping; 6 | import org.springframework.web.bind.annotation.RequestMapping; 7 | import org.springframework.web.bind.annotation.RestController; 8 | 9 | import javax.imageio.ImageIO; 10 | import javax.servlet.ServletOutputStream; 11 | import javax.servlet.http.HttpServletResponse; 12 | import javax.servlet.http.HttpSession; 13 | import java.awt.image.BufferedImage; 14 | 15 | @RestController 16 | @Slf4j 17 | @RequestMapping("common") 18 | public class CommonController { 19 | 20 | @GetMapping 21 | public String test() { 22 | return "hello"; 23 | } 24 | 25 | @GetMapping("codeImage") 26 | public void getImage(HttpSession session, HttpServletResponse response) throws Exception { 27 | System.out.println("正在生成验证码"); 28 | //生产验证码 6位 29 | String securityCode = CodeUtil.createCode(); 30 | BufferedImage image = CodeUtil.createImage(securityCode); 31 | session.setAttribute("sessionCode", securityCode); // 存入session作用域 32 | // 响应图片 33 | ServletOutputStream os = response.getOutputStream(); 34 | ImageIO.write(image, "png", os); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/api/observe.d.ts: -------------------------------------------------------------------------------- 1 | import { IObservableArray, IArrayChange, IArraySplice, IObservableValue, IComputedValue, IValueDidChange, Lambda, ObservableSet, ISetDidChange, ObservableMap, IMapDidChange, IObjectDidChange } from "../internal"; 2 | export declare function observe(value: IObservableValue | IComputedValue, listener: (change: IValueDidChange) => void, fireImmediately?: boolean): Lambda; 3 | export declare function observe(observableArray: IObservableArray, listener: (change: IArrayChange | IArraySplice) => void, fireImmediately?: boolean): Lambda; 4 | export declare function observe(observableMap: ObservableSet, listener: (change: ISetDidChange) => void, fireImmediately?: boolean): Lambda; 5 | export declare function observe(observableMap: ObservableMap, listener: (change: IMapDidChange) => void, fireImmediately?: boolean): Lambda; 6 | export declare function observe(observableMap: ObservableMap, property: K, listener: (change: IValueDidChange) => void, fireImmediately?: boolean): Lambda; 7 | export declare function observe(object: Object, listener: (change: IObjectDidChange) => void, fireImmediately?: boolean): Lambda; 8 | export declare function observe(object: T, property: K, listener: (change: IValueDidChange) => void, fireImmediately?: boolean): Lambda; 9 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/exceptions/MyException.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.exceptions; 2 | 3 | import lombok.*; 4 | 5 | @EqualsAndHashCode(callSuper = true) 6 | @Data 7 | @AllArgsConstructor 8 | @NoArgsConstructor 9 | @ToString 10 | public class MyException extends Exception { 11 | private Integer code; 12 | private String msg; 13 | 14 | public enum STATUS { 15 | ok(200, "请求成功"), 16 | requestErr(400,"请求出现问题"), 17 | badToken(401, "token失效"), 18 | noToken(402, "没有token"), 19 | err(500, "服务器内部错误"); 20 | private final Integer code; 21 | private final String msg; 22 | 23 | STATUS(int code, String msg) { 24 | this.code = code; 25 | this.msg = msg; 26 | } 27 | 28 | public Integer getCode() { 29 | return this.code; 30 | } 31 | 32 | public String getMsg() { 33 | return this.msg; 34 | } 35 | 36 | @Override 37 | public String toString() { 38 | return "{code: " + this.code + ", msg: " + msg + "}"; 39 | } 40 | } 41 | 42 | public MyException(STATUS status) { 43 | this.code = status.code; 44 | this.msg = status.msg; 45 | } 46 | 47 | public MyException(String msg) { 48 | this.code = 400; 49 | this.msg = msg; 50 | } 51 | 52 | 53 | } 54 | -------------------------------------------------------------------------------- /Library-Server-Cloud/common-util/src/main/java/cool/leeson/lib/exceptions/MyException.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.lib.exceptions; 2 | 3 | import lombok.*; 4 | 5 | @EqualsAndHashCode(callSuper = true) 6 | @Data 7 | @AllArgsConstructor 8 | @NoArgsConstructor 9 | @ToString 10 | public class MyException extends Exception { 11 | private Integer code; 12 | private String msg; 13 | 14 | public enum STATUS { 15 | ok(200, "请求成功"), 16 | requestErr(400,"请求出现问题"), 17 | badToken(401, "token失效"), 18 | noToken(402, "没有token"), 19 | err(500, "服务器内部错误"); 20 | private final Integer code; 21 | private final String msg; 22 | 23 | STATUS(int code, String msg) { 24 | this.code = code; 25 | this.msg = msg; 26 | } 27 | 28 | public Integer getCode() { 29 | return this.code; 30 | } 31 | 32 | public String getMsg() { 33 | return this.msg; 34 | } 35 | 36 | @Override 37 | public String toString() { 38 | return "{code: " + this.code + ", msg: " + msg + "}"; 39 | } 40 | } 41 | 42 | public MyException(STATUS status) { 43 | this.code = status.code; 44 | this.msg = status.msg; 45 | } 46 | 47 | public MyException(String msg) { 48 | this.code = 400; 49 | this.msg = msg; 50 | } 51 | 52 | 53 | } 54 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/entity/library/SchoolNotification.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.entity.library; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import javax.validation.constraints.NotBlank; 8 | import java.io.Serializable; 9 | import java.util.Date; 10 | 11 | /** 12 | * (SchoolNotification)实体类 13 | * 14 | * @author Leeson0202 15 | * @since 2023-04-10 00:28:20 16 | */ 17 | @Data 18 | @AllArgsConstructor 19 | @NoArgsConstructor 20 | public class SchoolNotification implements Serializable { 21 | private static final long serialVersionUID = -26626992453291970L; 22 | /** 23 | * id 24 | */ 25 | private String notificationId; 26 | /** 27 | * 学校id 28 | */ 29 | @NotBlank(message = "schoolId 不能为空") 30 | private String schoolId; 31 | /** 32 | * 用户id 33 | */ 34 | @NotBlank(message = "userId 不能为空") 35 | private String userId; 36 | private String nickName; 37 | /** 38 | * 标题 39 | */ 40 | @NotBlank(message = "title 不能为空") 41 | private String title; 42 | 43 | /** 44 | * 内容 45 | */ 46 | @NotBlank(message = "context 不能为空") 47 | private String context; 48 | /** 49 | * 浏览量 50 | */ 51 | private Integer view; 52 | /** 53 | * 发布日期 54 | */ 55 | private Date date; 56 | 57 | 58 | } 59 | 60 | -------------------------------------------------------------------------------- /Library-Server/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | server.port=8080 2 | # 数据库相关 3 | spring.datasource.type=com.alibaba.druid.pool.DruidDataSource 4 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver 5 | spring.datasource.url=jdbc:mysql://mysql:3306/library?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true 6 | spring.datasource.username=root 7 | spring.datasource.password=root 8 | # redis 9 | # 超时事件 10 | spring.redis.timeout=10000ms 11 | # 服务器地址 12 | spring.redis.host=redis 13 | # 服务器端口 14 | spring.redis.port=6379 15 | # 数据库 16 | spring.redis.database=0 17 | # 密码 18 | # spring.redis.password: root 19 | # 最大连接数 20 | spring.redis.lettuce.pool.max-active=1000 21 | # 最大连接阻塞等待时间 22 | spring.redis.lettuce.pool.max-wait=10000ms 23 | # 最大空闲连接 24 | spring.redis.lettuce.pool.max-idle=20 25 | # 最小空闲连接 26 | spring.redis.lettuce.pool.min-idle=5 27 | # 静态资源 28 | spring.web.resources.static-locations=classpath:/static/, classpath:/templates/ 29 | spring.thymeleaf.check-template-location=false 30 | # mybatis 31 | mybatis.mapper-locations=classpath:/mapper/*.xml 32 | mybatis.type-aliases-package=cool.leeson.library.entity 33 | # sql日志类型 34 | #logging.level.cool.leeson.library.dao=debug 35 | # 日志格式 36 | #logging.pattern.console=%d{MM-dd-HH:mm:ss} [%logger] --- %msg%n 37 | #logging.pattern.console=%d{yyyy-MM-dd HH:mm:ss} [%p] %highlight(%C:%L) : %m%n 38 | 39 | 40 | -------------------------------------------------------------------------------- /Library-miniProject/pages/center/mycredit/mycredit.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | {{userInfo.nickName}} 12 | 13 | 14 | 15 | 16 | 90 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | {{item.msg}} 25 | 26 | 27 | 28 | {{item.date}} 29 | 30 | 31 | 32 | 33 | -{{item.record}} 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Library-miniProject/resources/images/Author/credit.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Library-vue/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "library-vue", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint", 9 | "start": "node index.js", 10 | "server": "nodemon index.js --ignore client" 11 | }, 12 | "dependencies": { 13 | "@panzoom/panzoom": "^4.5.1", 14 | "axios": "^1.3.4", 15 | "core-js": "^3.8.3", 16 | "echarts": "^5.4.2", 17 | "element-ui": "^2.15.13", 18 | "jquery": "^3.6.4", 19 | "less": "^4.1.3", 20 | "less-loader": "^11.1.0", 21 | "vue": "^2.6.14", 22 | "vue-router": "^3.6.5", 23 | "vuex": "^3.6.2" 24 | }, 25 | "devDependencies": { 26 | "@babel/core": "^7.12.16", 27 | "@babel/eslint-parser": "^7.12.16", 28 | "@vue/cli-plugin-babel": "~5.0.0", 29 | "@vue/cli-plugin-eslint": "~5.0.0", 30 | "@vue/cli-service": "~5.0.0", 31 | "eslint": "^7.32.0", 32 | "eslint-plugin-vue": "^8.0.3", 33 | "vue-template-compiler": "^2.6.14" 34 | }, 35 | "eslintConfig": { 36 | "root": true, 37 | "env": { 38 | "node": true 39 | }, 40 | "extends": [ 41 | "plugin:vue/essential", 42 | "eslint:recommended" 43 | ], 44 | "parserOptions": { 45 | "parser": "@babel/eslint-parser" 46 | }, 47 | "rules": {} 48 | }, 49 | "browserslist": [ 50 | "> 1%", 51 | "last 2 versions", 52 | "not dead" 53 | ] 54 | } 55 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/entity/receive/ReceiveItem.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.entity.receive; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import java.io.Serializable; 8 | import java.util.Date; 9 | 10 | /** 11 | * (ReceiveItem)实体类 12 | * 13 | * @author Leeson0202 14 | * @since 2023-03-21 00:28:36 15 | */ 16 | @Data 17 | @AllArgsConstructor 18 | @NoArgsConstructor 19 | public class ReceiveItem implements Serializable { 20 | private static final long serialVersionUID = -35046167202956545L; 21 | /** 22 | * id 23 | */ 24 | private String receiveId; 25 | /** 26 | * 用户id 27 | */ 28 | private String userId; 29 | /** 30 | * 图书馆id 31 | */ 32 | private String libraryId; 33 | /** 34 | * 图书室id 35 | */ 36 | private String roomId; 37 | /** 38 | * 座位id 39 | */ 40 | private String seatId; 41 | /** 42 | * 预约日期 43 | */ 44 | private Date receiveDate; 45 | /** 46 | * 预约时间 47 | */ 48 | private Integer timeIdx; 49 | /** 50 | * 创建时间 51 | */ 52 | private Date time; 53 | 54 | public ReceiveItem(ReceiveFast receiveFast) { 55 | this.userId = receiveFast.getUserId(); 56 | this.libraryId = receiveFast.getLibraryId(); 57 | this.roomId = receiveFast.getRoomId(); 58 | this.seatId = receiveFast.getSeatId(); 59 | } 60 | 61 | } 62 | 63 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/controller/user/UserOnlineController.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.controller.user; 2 | 3 | import cool.leeson.library.config.JwtConfig; 4 | import cool.leeson.library.entity.user.UserOnline; 5 | import cool.leeson.library.exceptions.MyException; 6 | import cool.leeson.library.service.user.UserOnlineService; 7 | import org.springframework.data.domain.Page; 8 | import org.springframework.data.domain.PageRequest; 9 | import org.springframework.http.ResponseEntity; 10 | import org.springframework.web.bind.annotation.*; 11 | 12 | import javax.annotation.Resource; 13 | import javax.servlet.http.HttpServletRequest; 14 | import java.util.Map; 15 | 16 | /** 17 | * (UserOnline)表控制层 18 | * 19 | * @author Leeson0202 20 | * @since 2023-03-24 01:05:34 21 | */ 22 | @RestController 23 | @RequestMapping("online") 24 | public class UserOnlineController { 25 | /** 26 | * 服务对象 27 | */ 28 | @Resource 29 | private UserOnlineService userOnlineService; 30 | @Resource 31 | private HttpServletRequest request; 32 | @Resource 33 | private JwtConfig jwtConfig; 34 | 35 | 36 | /** 37 | * 通过主键查询单条数据 38 | * 39 | * @return 单条数据 40 | */ 41 | @GetMapping() 42 | public Map queryById() throws MyException { 43 | String userId = jwtConfig.getUsernameFromToken(request.getHeader("token")); 44 | return this.userOnlineService.queryById(userId); 45 | } 46 | 47 | 48 | 49 | } 50 | 51 | -------------------------------------------------------------------------------- /Library-vue/src/store/mutations.js: -------------------------------------------------------------------------------- 1 | export default { 2 | //初始化 3 | launch(state, value) { 4 | console.log("launch被调用了"); 5 | state.user.userInfo = { 6 | avatarUrl: 7 | "https://img1.baidu.com/it/u=1047817807,648960205&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500", 8 | }; 9 | state.user.hasLogin = false; 10 | state.user.hasUserInfo = false; 11 | state.school = { 12 | hasSchool: false, 13 | schoolId: null, 14 | name: null, 15 | descs: null, 16 | icon: null, 17 | background: null, 18 | libraries: null, 19 | schoolRule: null, 20 | 21 | options: [], 22 | }; 23 | }, 24 | updateLogin(state, value) { 25 | state.user.hasLogin = value; 26 | }, 27 | // 更新userInfo 28 | updateUserInfo(state, value) { 29 | state.user.userInfo = value; 30 | state.user.hasUserInfo = true; 31 | state.user.hasLogin = true; 32 | }, 33 | logout(state, value) { 34 | state.user.hasLogin = false; 35 | state.user.hasUserInfo = false; 36 | state.school.hasSchool = false; 37 | window.localStorage.clear(); 38 | }, 39 | // 更新学校信息 40 | updateSchool(state, value) { 41 | state.school = value; 42 | state.school.hasSchool = true; 43 | }, 44 | updateOptions(state, value) { 45 | state.school.options = value; 46 | }, 47 | }; 48 | -------------------------------------------------------------------------------- /Library-vue/src/assets/img/library/yizi-normal.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Library-vue/src/assets/img/library/yizi-red.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Library-miniProject/pages/center/mycredit/mycredit.js: -------------------------------------------------------------------------------- 1 | // pages/center/mycredit/mycredit.js 2 | 3 | import { 4 | createStoreBindings 5 | } from 'mobx-miniprogram-bindings' 6 | import { 7 | store 8 | } from '../../../store/store' 9 | Page({ 10 | 11 | /** 12 | * 页面的初始数据 13 | */ 14 | data: { 15 | records: [{ 16 | id: "idauckba", 17 | date: "2023-02-24 8:14", 18 | libraryName: "数字图书馆", 19 | roomName: "一楼阅览室", 20 | seatName: "A1001", 21 | record: 5, 22 | msg: "迟到超过10分钟" 23 | }, { 24 | id: "idauckba", 25 | date: "2023-02-24 8:14", 26 | libraryName: "数字图书馆", 27 | roomName: "一楼阅览室", 28 | seatName: "A1001", 29 | record: 5, 30 | msg: "迟到超过10分钟" 31 | }] 32 | 33 | }, 34 | 35 | /** 36 | * 生命周期函数--监听页面加载 37 | */ 38 | onLoad(options) { 39 | this.storeBindings = createStoreBindings(this, { 40 | store, 41 | fields: ['userInfo', 'hasUserInfo', 'hasLogin'], 42 | actions: ['GetStorage', 'GetUserInfo'] 43 | }); 44 | 45 | }, 46 | 47 | 48 | /** 49 | * 生命周期函数--监听页面显示 50 | */ 51 | onShow() { 52 | 53 | }, 54 | 55 | 56 | /** 57 | * 生命周期函数--监听页面卸载 58 | */ 59 | onUnload() { 60 | 61 | }, 62 | 63 | /** 64 | * 页面相关事件处理函数--监听用户下拉动作 65 | */ 66 | onPullDownRefresh() { 67 | 68 | }, 69 | 70 | 71 | }) -------------------------------------------------------------------------------- /Library-miniProject/resources/images/library/yizi-normal.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Library-miniProject/resources/images/library/yizi-red.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/util/TimeUtil.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.util; 2 | 3 | import java.util.Date; 4 | 5 | public class TimeUtil { 6 | 7 | /** 8 | * 获取当前时间相对的零点 9 | * 10 | * @param day 前后几天 11 | */ 12 | public static Date getZeroTimeOf(Integer day) { 13 | Date now = new Date(); 14 | now.setDate(now.getDate() + day); 15 | return getZeroTimeAt(now, 0); 16 | } 17 | 18 | /** 19 | * 获取剩余时间 相对于当前的零点 20 | * 21 | * @param day 前后几天 22 | * @return 23 | */ 24 | public static Long getLeftToZeroOf(Integer day) { 25 | Date now = new Date(); 26 | now.setDate(now.getDate() + day); 27 | return getLeftToTime(now, 0); 28 | } 29 | 30 | /** 31 | * 获取当天的零点 32 | */ 33 | public static Date getZero(Date date) { 34 | return getZeroTimeAt(date, 0); 35 | } 36 | 37 | /** 38 | * 获取到当天零点的剩余时间 39 | */ 40 | public static Long getLeftToZero(Date date) { 41 | return getLeftToTime(date, 0); 42 | } 43 | 44 | 45 | /** 46 | * 获取到当天某整点的剩余时间 47 | */ 48 | public static Long getLeftToTime(Date date, Integer time) { 49 | return getZeroTimeAt(date, time).getTime() - new Date().getTime(); 50 | } 51 | 52 | /** 53 | * 获取当天 某整点的时间 54 | */ 55 | 56 | public static Date getZeroTimeAt(Date date, Integer time) { 57 | return new Date(date.getYear(), date.getMonth(), date.getDate(), time, 0, 0); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/controller/clock/ClockController.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.controller.clock; 2 | 3 | import cool.leeson.library.config.JwtConfig; 4 | import cool.leeson.library.exceptions.MyException; 5 | import cool.leeson.library.service.clock.ClockService; 6 | import org.springframework.web.bind.annotation.PutMapping; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | import org.springframework.web.bind.annotation.RestController; 9 | 10 | import javax.annotation.Resource; 11 | import javax.servlet.http.HttpServletRequest; 12 | import java.util.Map; 13 | 14 | @RestController 15 | @RequestMapping("clock") 16 | public class ClockController { 17 | @Resource 18 | private ClockService clockService; 19 | @Resource 20 | private HttpServletRequest request; 21 | @Resource 22 | private JwtConfig jwtConfig; 23 | 24 | /** 25 | * 用户入座请求 26 | * 27 | * @param seed 种子 28 | * @param tag 是否为暂时离座 0表示入座或出座 1 表示暂时 29 | * @return 实体 30 | * @throws MyException 1 31 | */ 32 | @PutMapping("user") 33 | public Map user(String seed, Integer tag) throws MyException { 34 | String userId = jwtConfig.getUsernameFromToken(request.getHeader("token")); 35 | return clockService.user(userId, seed, tag); 36 | } 37 | 38 | @PutMapping("equipment") 39 | public Map equipment(String equipment, String seed) throws MyException { 40 | return clockService.equipment(equipment, seed); 41 | } 42 | 43 | 44 | } 45 | -------------------------------------------------------------------------------- /Library-Server-Cloud/common-util/src/main/java/cool/leeson/lib/utils/TimeUtil.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.lib.utils; 2 | 3 | import java.util.Date; 4 | 5 | public class TimeUtil { 6 | 7 | /** 8 | * 获取当前时间相对的零点 9 | * 10 | * @param day 前后几天 11 | */ 12 | public static Date getZeroTimeOf(Integer day) { 13 | Date now = new Date(); 14 | now.setDate(now.getDate() + day); 15 | return getZeroTimeAt(now, 0); 16 | } 17 | 18 | /** 19 | * 获取剩余时间 相对于当前的零点 20 | * 21 | * @param day 前后几天 22 | * @return 23 | */ 24 | public static Long getLeftToZeroOf(Integer day) { 25 | Date now = new Date(); 26 | now.setDate(now.getDate() + day); 27 | return getLeftToTime(now, 0); 28 | } 29 | 30 | /** 31 | * 获取当天的零点 32 | */ 33 | public static Date getZero(Date date) { 34 | return getZeroTimeAt(date, 0); 35 | } 36 | 37 | /** 38 | * 获取到当天零点的剩余时间 39 | */ 40 | public static Long getLeftToZero(Date date) { 41 | return getLeftToTime(date, 0); 42 | } 43 | 44 | 45 | /** 46 | * 获取到当天某整点的剩余时间 47 | */ 48 | public static Long getLeftToTime(Date date, Integer time) { 49 | return getZeroTimeAt(date, time).getTime() - new Date().getTime(); 50 | } 51 | 52 | /** 53 | * 获取当天 某整点的时间 54 | */ 55 | 56 | public static Date getZeroTimeAt(Date date, Integer time) { 57 | return new Date(date.getYear(), date.getMonth(), date.getDate(), time, 0, 0); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Library-miniProject/resources/images/function/receive_record.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Library-vue/src/assets/img/library/yizi-green.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Library-miniProject/resources/images/library/yizi-green.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Library-miniProject/pages/center/cquptLogin/cquptLogin.wxss: -------------------------------------------------------------------------------- 1 | /* pages/cquptLogin/cquptLogin.wxss */ 2 | page { 3 | height: 100%; 4 | } 5 | 6 | .container { 7 | height: 100%; 8 | background: url('https://ids.cqupt.edu.cn/authserver/cquptDzTheme/static/web/dzimages/bg5.jpg'); 9 | background-size: cover; 10 | background-attachment: fixed; 11 | background-repeat: no-repeat; 12 | /* -webkit-backdrop-filter: blur(8px); */ 13 | } 14 | 15 | .main { 16 | margin: auto; 17 | width: calc(78% - 40rpx); 18 | margin-top: 300rpx; 19 | background-color: rgba(255, 255, 255, 1); 20 | box-shadow: 0 0 5rpx #eee; 21 | border-radius: 20rpx; 22 | /* filter: blur(1px); */ 23 | } 24 | 25 | .title { 26 | text-align: center; 27 | padding: 30rpx 0; 28 | border-bottom: 1rpx solid #eee; 29 | /* background-color: #eee; */ 30 | font-size: 38rpx; 31 | border-top-left-radius: 10rpx; 32 | border-top-right-radius: 10rpx; 33 | } 34 | 35 | .login-main { 36 | padding: 10rpx; 37 | font-size: 28rpx; 38 | 39 | } 40 | 41 | .input-block { 42 | height: 80rpx; 43 | margin-top: 20rpx; 44 | } 45 | 46 | .input-block>image { 47 | display: inline-block; 48 | height: 80rpx; 49 | position: relative; 50 | top: 16rpx; 51 | margin-left: 20rpx; 52 | 53 | } 54 | 55 | .login-input { 56 | display: inline-block; 57 | margin-left: 10rpx; 58 | border-bottom: 1rpx solid #eee; 59 | width: 76%; 60 | height: 60rpx; 61 | 62 | } 63 | 64 | .button{ 65 | margin-top: 60rpx; 66 | margin-bottom: 50rpx; 67 | } -------------------------------------------------------------------------------- /Library-miniProject/pages/center/feedback/feedback.js: -------------------------------------------------------------------------------- 1 | // pages/center/feedback/feedback.js 2 | import { 3 | store 4 | } from '../../../store/store' 5 | import api from '../../../utils/api' 6 | Page({ 7 | 8 | /** 9 | * 页面的初始数据 10 | */ 11 | data: { 12 | title: "", 13 | text: "", 14 | textNum: 0 15 | 16 | }, 17 | 18 | /** 19 | * 生命周期函数--监听页面加载 20 | */ 21 | onLoad(options) { 22 | 23 | }, 24 | 25 | 26 | /** 27 | * 生命周期函数--监听页面显示 28 | */ 29 | onShow() { 30 | this.setData({ 31 | title: "", 32 | text: "", 33 | textNum: 0 34 | }) 35 | 36 | }, 37 | inputTitle(e) { 38 | this.setData({ 39 | title: e.detail.value, 40 | }) 41 | }, 42 | inputBind(e) { 43 | this.setData({ 44 | text: e.detail.text, 45 | textNum: e.detail.text.length 46 | }) 47 | }, 48 | submit() { 49 | let form = { 50 | schoolId: store.school.schoolId, 51 | userId: store.userInfo.userId, 52 | title: this.data.title, 53 | context: this.data.text.trim() 54 | } 55 | // console.log(form); 56 | api.insertFeedback(form).then(data => { 57 | wx.showToast({ 58 | title: '提交成功', 59 | }) 60 | setTimeout(() => { 61 | wx.switchTab({ 62 | url: '/pages/center/center', 63 | }) 64 | }, 1000); 65 | }) 66 | 67 | } 68 | }) -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/types/observablevalue.d.ts: -------------------------------------------------------------------------------- 1 | import { Lambda, IInterceptor, Atom, IInterceptable, IListenable, IEnhancer, IEqualsComparer } from "../internal"; 2 | export interface IValueWillChange { 3 | object: any; 4 | type: "update"; 5 | newValue: T; 6 | } 7 | export interface IValueDidChange extends IValueWillChange { 8 | oldValue: T | undefined; 9 | } 10 | export interface IObservableValue { 11 | get(): T; 12 | set(value: T): void; 13 | intercept(handler: IInterceptor>): Lambda; 14 | observe(listener: (change: IValueDidChange) => void, fireImmediately?: boolean): Lambda; 15 | } 16 | export declare class ObservableValue extends Atom implements IObservableValue, IInterceptable>, IListenable { 17 | enhancer: IEnhancer; 18 | name: string; 19 | private equals; 20 | hasUnreportedChange: boolean; 21 | interceptors: any; 22 | changeListeners: any; 23 | value: any; 24 | dehancer: any; 25 | constructor(value: T, enhancer: IEnhancer, name?: string, notifySpy?: boolean, equals?: IEqualsComparer); 26 | private dehanceValue; 27 | set(newValue: T): void; 28 | private prepareNewValue; 29 | setNewValue(newValue: T): void; 30 | get(): T; 31 | intercept(handler: IInterceptor>): Lambda; 32 | observe(listener: (change: IValueDidChange) => void, fireImmediately?: boolean): Lambda; 33 | toJSON(): T; 34 | toString(): string; 35 | valueOf(): T; 36 | } 37 | export declare const isObservableValue: (x: any) => x is IObservableValue; 38 | -------------------------------------------------------------------------------- /Library-miniProject/pages/function/bookGuide/bookGuide.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {{school.name}} 8 | 9 | 10 | 11 | 12 | 13 | 14 | 介绍 15 | 16 | 17 | 规则 18 | 19 | 20 | 图书馆 21 | 22 | 23 | 24 | 25 | 28 | 29 | 32 | 33 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Library-miniProject/pages/function/bookRule/bookRule.js: -------------------------------------------------------------------------------- 1 | // pages/function/bookRule/bookRule.js 2 | import { 3 | createStoreBindings 4 | } from 'mobx-miniprogram-bindings' 5 | import { 6 | store 7 | } from '../../../store/store' 8 | Page({ 9 | 10 | /** 11 | * 页面的初始数据 12 | */ 13 | data: { 14 | rules: [] 15 | 16 | }, 17 | 18 | /** 19 | * 生命周期函数--监听页面加载 20 | */ 21 | onLoad(options) { 22 | // 初始化数据 23 | let that = this; 24 | this.storeBindings = createStoreBindings(this, { 25 | store, 26 | fields: ['school', 'hasSchool', 'hasLogin', 'baseUrl'], 27 | actions: ['GetSchool', 'InitData', 'CheckError'] 28 | }); 29 | setTimeout(this.getRules, 500); 30 | 31 | 32 | }, 33 | getRules() { 34 | 35 | this.setData({ 36 | rules: this.data.school.schoolRule.context.split("\n") 37 | }) 38 | }, 39 | 40 | /** 41 | * 生命周期函数--监听页面初次渲染完成 42 | */ 43 | onReady() { 44 | 45 | }, 46 | 47 | /** 48 | * 生命周期函数--监听页面显示 49 | */ 50 | onShow() { 51 | 52 | }, 53 | 54 | /** 55 | * 生命周期函数--监听页面隐藏 56 | */ 57 | onHide() { 58 | 59 | }, 60 | 61 | /** 62 | * 生命周期函数--监听页面卸载 63 | */ 64 | onUnload() { 65 | 66 | }, 67 | 68 | /** 69 | * 页面相关事件处理函数--监听用户下拉动作 70 | */ 71 | onPullDownRefresh() { 72 | 73 | }, 74 | 75 | /** 76 | * 页面上拉触底事件的处理函数 77 | */ 78 | onReachBottom() { 79 | 80 | }, 81 | 82 | /** 83 | * 用户点击右上角分享 84 | */ 85 | onShareAppMessage() { 86 | 87 | } 88 | }) -------------------------------------------------------------------------------- /Library-miniProject/project.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "项目配置文件", 3 | "packOptions": { 4 | "ignore": [], 5 | "include": [] 6 | }, 7 | "setting": { 8 | "bundle": false, 9 | "userConfirmedBundleSwitch": false, 10 | "urlCheck": true, 11 | "scopeDataCheck": false, 12 | "coverView": true, 13 | "es6": true, 14 | "postcss": true, 15 | "compileHotReLoad": false, 16 | "lazyloadPlaceholderEnable": false, 17 | "preloadBackgroundData": false, 18 | "minified": true, 19 | "autoAudits": false, 20 | "newFeature": false, 21 | "uglifyFileName": true, 22 | "uploadWithSourceMap": true, 23 | "useIsolateContext": true, 24 | "nodeModules": false, 25 | "enhance": true, 26 | "useMultiFrameRuntime": true, 27 | "useApiHook": true, 28 | "useApiHostProcess": true, 29 | "showShadowRootInWxmlPanel": true, 30 | "packNpmManually": false, 31 | "enableEngineNative": false, 32 | "packNpmRelationList": [], 33 | "minifyWXSS": true, 34 | "showES6CompileOption": false, 35 | "minifyWXML": true, 36 | "babelSetting": { 37 | "ignore": [], 38 | "disablePlugins": [], 39 | "outputPath": "" 40 | } 41 | }, 42 | "compileType": "miniprogram", 43 | "libVersion": "2.19.4", 44 | "appid": "wx120544f5baefb8a0", 45 | "projectname": "miniprogram-92", 46 | "condition": {}, 47 | "editorSetting": { 48 | "tabIndent": "insertSpaces", 49 | "tabSize": 4 50 | } 51 | } -------------------------------------------------------------------------------- /Library-miniProject/pages/center/messages/messages.js: -------------------------------------------------------------------------------- 1 | // pages/center/messages/messages.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | index: 0, 9 | tag: false, 10 | messages: [{ 11 | id: "davka", 12 | title: "违规通知", 13 | msg: "您与2023-03-23 8:00 没有按时入座,您的信用值减5分。请注意,\n信用值低于90分,即日起一周内不能预约图书馆。\n信用值低于80分,一个月不能预约图书馆。", 14 | readed: false, 15 | time: "2023-02-23 8:14" 16 | }, { 17 | id: "davka1", 18 | title: "预约通知", 19 | msg: "您已预约2月23日 8:00-10:00 在数字图书馆的座位,请按时入座。", 20 | readed: false, 21 | time: "2023-02-22 8:14" 22 | }, { 23 | id: "davka2", 24 | title: "预约通知", 25 | msg: "您已预约2月23日 8:00-10:00 在数字图书馆的座位,请按时入座。", 26 | readed: false, 27 | time: "2023-02-23 8:14" 28 | }, ] 29 | 30 | }, 31 | 32 | /** 33 | * 生命周期函数--监听页面加载 34 | */ 35 | onLoad(options) { 36 | 37 | }, 38 | 39 | 40 | /** 41 | * 生命周期函数--监听页面显示 42 | */ 43 | onShow() { 44 | 45 | }, 46 | 47 | /** 48 | * 页面相关事件处理函数--监听用户下拉动作 49 | */ 50 | onPullDownRefresh() { 51 | 52 | }, 53 | 54 | look(e) { 55 | let index = e.currentTarget.dataset.index 56 | let name = "messages[" + index + "].readed" 57 | this.setData({ 58 | tag: !this.data.tag, 59 | [name]: true, 60 | index: index 61 | }) 62 | }, 63 | back() { 64 | this.setData({ 65 | tag: !this.data.tag 66 | }) 67 | 68 | } 69 | }) -------------------------------------------------------------------------------- /Library-miniProject/pages/center/login/confirm/confirm.wxss: -------------------------------------------------------------------------------- 1 | /* pages/confirm/confirm.wxss */ 2 | .main{ 3 | margin: 40rpx auto; 4 | padding: 0 30rpx; 5 | font-size: 38rpx; 6 | } 7 | .title{ 8 | font-size: 38rpx; 9 | } 10 | .stitle{ 11 | margin-top: 14rpx; 12 | font-size: 24rpx; 13 | } 14 | .confirm-input{ 15 | margin-top: 60rpx; 16 | padding-bottom: 16rpx; 17 | text-align: center; 18 | font-size: 28rpx; 19 | border-bottom: 1rpx solid #ddd; 20 | } 21 | 22 | .confirm-button{ 23 | width: 90%; 24 | height: 80rpx; 25 | line-height: 80rpx; 26 | margin: auto; 27 | margin-top: 140rpx; 28 | text-align: center; 29 | background-color: #f4f4f4; 30 | border-radius: 30rpx; 31 | font-size: 30rpx; 32 | color: #666; 33 | } 34 | 35 | 36 | 37 | /** 38 | 隐藏部分 39 | **/ 40 | 41 | .avatar-wrapper { 42 | width: 160rpx; 43 | height: 160rpx; 44 | padding: 0; 45 | margin: 0; 46 | margin-top: 160rpx; 47 | background-color: #fff; 48 | 49 | } 50 | 51 | .avatar { 52 | width: 100%; 53 | height: 100%; 54 | border-radius: 20rpx; 55 | } 56 | 57 | .nick-name-block { 58 | 59 | margin-top: 40rpx; 60 | border-top: 1rpx solid #eee; 61 | border-bottom: 1rpx solid #eee; 62 | line-height: 80rpx; 63 | height: 80rpx; 64 | } 65 | 66 | .nick-pre { 67 | width: 15%; 68 | text-align: right; 69 | } 70 | 71 | .weui-input { 72 | display: inline-block; 73 | position: relative; 74 | top: 10rpx; 75 | text-align: center; 76 | width: 70%; 77 | 78 | } 79 | 80 | .load-submit { 81 | margin-top: 80rpx; 82 | font-weight: 400; 83 | font-size: 28rpx; 84 | } -------------------------------------------------------------------------------- /Library-miniProject/app.wxss: -------------------------------------------------------------------------------- 1 | /**app.wxss**/ 2 | page { 3 | height: 100%; 4 | } 5 | 6 | .container { 7 | height: 100%; 8 | display: flex; 9 | flex-direction: column; 10 | align-items: center; 11 | justify-content: space-between; 12 | padding: 20rpx 0; 13 | box-sizing: border-box; 14 | } 15 | .block{ 16 | width: 99%; 17 | border-radius: 16rpx; 18 | background-color: #eee; 19 | height: 100rpx; 20 | 21 | } 22 | 23 | .line-item { 24 | margin: auto; 25 | height: 86rpx; 26 | width: calc(100% - 40rpx); 27 | line-height: 86rpx; 28 | border-bottom: 1rpx solid #f2f2f2; 29 | font-size: 30rpx; 30 | } 31 | 32 | .items>.line-item:last-child { 33 | border-bottom: none 34 | } 35 | 36 | .card { 37 | margin: auto; 38 | position: relative; 39 | width: 100%; 40 | /* min-height: 20rpx; */ 41 | border-radius: 16rpx; 42 | box-shadow: 0 0 20rpx #e2e2e2; 43 | background-color: #fff; 44 | } 45 | 46 | .card-item { 47 | display: block; 48 | margin: auto; 49 | width: 90%; 50 | height: 60rpx; 51 | line-height: 60rpx; 52 | } 53 | 54 | 55 | /* 图表格 */ 56 | .chart { 57 | display: block; 58 | position: relative; 59 | margin: auto; 60 | width: 750rpx; 61 | height: 600rpx; 62 | } 63 | 64 | ec-canvas { 65 | width: 100%; 66 | height: 100%; 67 | } 68 | 69 | /* 按钮 */ 70 | .button { 71 | position: relative; 72 | display: block; 73 | margin: auto; 74 | width: 80%; 75 | height: 70rpx; 76 | line-height: 70rpx; 77 | font-size: 30rpx; 78 | text-align: center; 79 | border-radius: 16rpx; 80 | color: #333; 81 | background-color: rgba(206, 204, 204, 0.3); 82 | } -------------------------------------------------------------------------------- /Library-miniProject/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Library-miniProject", 3 | "lockfileVersion": 2, 4 | "requires": true, 5 | "packages": { 6 | "": { 7 | "dependencies": { 8 | "mobx-miniprogram": "^4.13.2", 9 | "mobx-miniprogram-bindings": "^1.2.1" 10 | } 11 | }, 12 | "node_modules/mobx-miniprogram": { 13 | "version": "4.13.2", 14 | "resolved": "https://registry.npmmirror.com/mobx-miniprogram/-/mobx-miniprogram-4.13.2.tgz", 15 | "integrity": "sha512-C3HtkqHCLKp35N2gXA80yFD6PNfSqwioPFmnjTQpBLrEqYm1F6yiWZ57CW+8FqgmR306mw6ZfsM5q7hSTHw8BQ==" 16 | }, 17 | "node_modules/mobx-miniprogram-bindings": { 18 | "version": "1.2.1", 19 | "resolved": "https://registry.npmmirror.com/mobx-miniprogram-bindings/-/mobx-miniprogram-bindings-1.2.1.tgz", 20 | "integrity": "sha512-OleJ0IIc4g8rC7ul0wtn+imapVQvWo/1UxZyvdMrfwcenmHBjY4Bddr90RoIwkM+Ul7nOxsYdsmOsB/mZ0PJmA==", 21 | "peerDependencies": { 22 | "mobx-miniprogram": "^4.0.0" 23 | } 24 | } 25 | }, 26 | "dependencies": { 27 | "mobx-miniprogram": { 28 | "version": "4.13.2", 29 | "resolved": "https://registry.npmmirror.com/mobx-miniprogram/-/mobx-miniprogram-4.13.2.tgz", 30 | "integrity": "sha512-C3HtkqHCLKp35N2gXA80yFD6PNfSqwioPFmnjTQpBLrEqYm1F6yiWZ57CW+8FqgmR306mw6ZfsM5q7hSTHw8BQ==" 31 | }, 32 | "mobx-miniprogram-bindings": { 33 | "version": "1.2.1", 34 | "resolved": "https://registry.npmmirror.com/mobx-miniprogram-bindings/-/mobx-miniprogram-bindings-1.2.1.tgz", 35 | "integrity": "sha512-OleJ0IIc4g8rC7ul0wtn+imapVQvWo/1UxZyvdMrfwcenmHBjY4Bddr90RoIwkM+Ul7nOxsYdsmOsB/mZ0PJmA==", 36 | "requires": {} 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/internal.d.ts: -------------------------------------------------------------------------------- 1 | export * from "./utils/utils"; 2 | export * from "./utils/iterable"; 3 | export * from "./core/atom"; 4 | export * from "./utils/comparer"; 5 | export * from "./utils/decorators2"; 6 | export * from "./types/modifiers"; 7 | export * from "./api/observabledecorator"; 8 | export * from "./api/observable"; 9 | export * from "./api/computed"; 10 | export * from "./core/action"; 11 | export * from "./types/observablevalue"; 12 | export * from "./core/computedvalue"; 13 | export * from "./core/derivation"; 14 | export * from "./core/globalstate"; 15 | export * from "./core/observable"; 16 | export * from "./core/reaction"; 17 | export * from "./core/spy"; 18 | export * from "./api/actiondecorator"; 19 | export * from "./api/action"; 20 | export * from "./api/autorun"; 21 | export * from "./api/become-observed"; 22 | export * from "./api/configure"; 23 | export * from "./api/decorate"; 24 | export * from "./api/extendobservable"; 25 | export * from "./api/extras"; 26 | export * from "./api/flow"; 27 | export * from "./api/intercept-read"; 28 | export * from "./api/intercept"; 29 | export * from "./api/iscomputed"; 30 | export * from "./api/isobservable"; 31 | export * from "./api/object-api"; 32 | export * from "./api/observe"; 33 | export * from "./api/tojs"; 34 | export * from "./api/trace"; 35 | export * from "./api/transaction"; 36 | export * from "./api/when"; 37 | export * from "./types/intercept-utils"; 38 | export * from "./types/listen-utils"; 39 | export * from "./types/observablearray"; 40 | export * from "./types/observablemap"; 41 | export * from "./types/observableset"; 42 | export * from "./types/observableobject"; 43 | export * from "./types/type-utils"; 44 | export * from "./utils/eq"; 45 | -------------------------------------------------------------------------------- /Library-miniProject/pages/center/login/login.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /Library-Server-Cloud/common-util/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | cool.leeson.lib 8 | Library-Server-Cloud 9 | 1.0 10 | 11 | 12 | common-util 13 | 14 | 15 | 8 16 | 8 17 | UTF-8 18 | 19 | 20 | 21 | org.springframework.boot 22 | spring-boot-starter-web 23 | 24 | 25 | com.baomidou 26 | mybatis-plus-annotation 27 | ${mybatis-plus.version} 28 | 29 | 30 | 31 | 32 | 33 | org.springframework.boot 34 | spring-boot-starter-validation 35 | 36 | 37 | 38 | 39 | 40 | org.apache.httpcomponents 41 | httpclient 42 | 4.5.13 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /Library-miniProject/resources/images/Author/setting.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Library-miniProject/pages/function/notify/notify.js: -------------------------------------------------------------------------------- 1 | // pages/notify/notify.js 2 | import { 3 | store 4 | } from '../../../store/store' 5 | import api from '../../../utils/api' 6 | Page({ 7 | 8 | /** 9 | * 页面的初始数据 10 | */ 11 | data: { 12 | index: 0, 13 | notifyTexts: [] 14 | }, 15 | // 处理点击事件,跳转notifyItem 并带上id 16 | notifyItemHandel(e) { 17 | wx.navigateTo({ 18 | url: './notifyItem/notifyItem?id=' + this.data.notifyTexts[e.currentTarget.dataset.index].notificationId 19 | }) 20 | }, 21 | 22 | /** 23 | * 生命周期函数--监听页面加载 24 | */ 25 | onLoad(options) { 26 | 27 | }, 28 | 29 | /** 30 | * 生命周期函数--监听页面初次渲染完成 31 | */ 32 | onReady() { 33 | 34 | }, 35 | 36 | /** 37 | * 生命周期函数--监听页面显示 38 | */ 39 | onShow() { 40 | setTimeout(() => this.getNotifications(), 50) 41 | 42 | }, 43 | 44 | /** 45 | * 页面相关事件处理函数--监听用户下拉动作 46 | */ 47 | onPullDownRefresh() { 48 | this.getNotifications(); 49 | 50 | }, 51 | 52 | // 获取通知 53 | getNotifications() { 54 | let that = this 55 | if (!store.hasSchool || !store.hasSchool) return; 56 | let form = { 57 | schoolId: store.school.schoolId, 58 | page: 0, 59 | size: 2 60 | } 61 | api.queryNotifications(form).then(data => { 62 | console.log(data); 63 | if (data.data.content.length == 0) return; 64 | data.data.content.forEach(el => { 65 | el.time = new Date(el.date).toLocaleString().slice(0, 9); 66 | }) 67 | that.setData({ 68 | notifyTexts: data.data.content 69 | }) 70 | }) 71 | }, 72 | }) -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram-bindings/gulpfile.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const gulp = require('gulp') 3 | const clean = require('gulp-clean') 4 | const webpack = require('webpack') 5 | const nodeExternals = require('webpack-node-externals') 6 | 7 | const src = path.resolve(__dirname, 'src') 8 | const dist = path.resolve(__dirname, 'miniprogram_dist') 9 | 10 | function getWebpackConfig(production) { 11 | return { 12 | mode: production ? 'production' : 'development', 13 | entry: src, 14 | output: { 15 | path: dist, 16 | filename: 'index.js', 17 | libraryTarget: 'commonjs2', 18 | }, 19 | target: 'node', 20 | externals: [nodeExternals()], 21 | module: { 22 | rules: [{ 23 | test: /\.js$/i, 24 | use: [ 25 | 'babel-loader', 26 | 'eslint-loader' 27 | ], 28 | exclude: /node_modules/ 29 | }], 30 | }, 31 | resolve: { 32 | modules: [src, 'node_modules'], 33 | extensions: ['.js', '.json'], 34 | }, 35 | plugins: [ 36 | new webpack.DefinePlugin({}), 37 | new webpack.optimize.LimitChunkCountPlugin({maxChunks: 1}), 38 | ], 39 | optimization: { 40 | minimize: false, 41 | }, 42 | devtool: 'nosources-source-map', 43 | performance: { 44 | hints: 'warning', 45 | assetFilter: assetFilename => assetFilename.endsWith('.js') 46 | } 47 | } 48 | } 49 | 50 | gulp.task('clean', () => gulp.src(dist, {read: false, allowEmpty: true}).pipe(clean())) 51 | 52 | gulp.task('dev', (cb) => { 53 | webpack(getWebpackConfig(false), cb) 54 | }) 55 | 56 | gulp.task('build', (cb) => { 57 | webpack(getWebpackConfig(true), cb) 58 | }) 59 | 60 | gulp.task('default', gulp.series('clean', 'build')) 61 | -------------------------------------------------------------------------------- /Library-miniProject/pages/function/fastBook/fastBook.wxss: -------------------------------------------------------------------------------- 1 | /* pages/function/fastBook/fastBook.wxss */ 2 | page { 3 | height: 100%; 4 | } 5 | 6 | .ad-block { 7 | height: 300rpx; 8 | font-size: 30rpx; 9 | letter-spacing: 1rpx; 10 | background: linear-gradient(to right bottom, rgb(252, 156, 156), rgb(199, 247, 187), rgb(142, 142, 240) 80%); 11 | 12 | } 13 | 14 | .ad-ii { 15 | display: inline-block; 16 | font-size: 50rpx; 17 | color: rgb(170, 3, 170); 18 | } 19 | 20 | /* 主体部分 */ 21 | .fast-switch { 22 | float: right; 23 | margin-right: 30rpx; 24 | margin-top: -5rpx; 25 | } 26 | .wx-switch-input{width:42px !important;height:22px !important;} 27 | .wx-switch-input::before{width:40px !important;height: 20px !important;} 28 | .wx-switch-input::after{width: 18px !important;height: 18px !important;} 29 | 30 | /* 预约表单 */ 31 | .items { 32 | margin-top: 20rpx; 33 | width: 95%; 34 | } 35 | 36 | .line-item { 37 | width: 90%; 38 | } 39 | 40 | .picker-name { 41 | display: inline-block; 42 | width: 30%; 43 | text-align: center; 44 | } 45 | 46 | .picker-block { 47 | display: inline-block; 48 | padding-left: 60rpx; 49 | width: 60%; 50 | 51 | } 52 | 53 | 54 | /* 提示消息 */ 55 | 56 | .info { 57 | margin: auto; 58 | margin-top: 30rpx; 59 | width: 90%; 60 | font-size: 20rpx; 61 | } 62 | 63 | .fast-book-submit { 64 | position: absolute; 65 | bottom: 80rpx; 66 | display: block; 67 | margin: auto; 68 | margin-top: 30rpx; 69 | width: 100%; 70 | text-align: center; 71 | } 72 | 73 | .fast-book-button { 74 | width: 80%; 75 | margin: auto; 76 | background-color: rgba(100, 100, 100, 0.1); 77 | border-radius: 10rpx; 78 | height: 60rpx; 79 | line-height: 60rpx; 80 | font-size: 30rpx; 81 | color: #444; 82 | } -------------------------------------------------------------------------------- /Library-miniProject/resources/images/love.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Library-miniProject/pages/function/bookGuide/bookGuide.wxss: -------------------------------------------------------------------------------- 1 | /* pages/function/bookGuide/bookGuide.wxss */ 2 | 3 | page { 4 | height: 100%; 5 | width: 100%; 6 | } 7 | 8 | .main-container { 9 | width: 100%; 10 | height: 100%; 11 | } 12 | 13 | .head { 14 | width: 100%; 15 | height: 300rpx; 16 | background-size: 122%; 17 | background-position: 0rpx center 100rpx; 18 | 19 | } 20 | 21 | .title { 22 | position: relative; 23 | display: inline-block; 24 | color: white; 25 | text-shadow: #777 0 0 20rpx; 26 | margin: 30rpx 20rpx; 27 | font-size: 40rpx; 28 | } 29 | 30 | 31 | .mm { 32 | display: inline-block; 33 | width: calc(100% / 3); 34 | height: 70rpx; 35 | line-height: 70rpx; 36 | text-align: center; 37 | } 38 | 39 | .selected { 40 | border-bottom: 4rpx solid #099cf1; 41 | 42 | } 43 | 44 | .manu { 45 | padding: 20rpx 0; 46 | } 47 | 48 | .manu-descs { 49 | padding: 40rpx 30rpx; 50 | text-indent: 2em; 51 | font-size: 28rpx; 52 | line-height: 55rpx; 53 | /* letter-spacing: 1rpx; */ 54 | } 55 | 56 | .manu-rule { 57 | padding: 40rpx 30rpx; 58 | font-size: 28rpx; 59 | line-height: 55rpx; 60 | 61 | } 62 | 63 | .manu-label { 64 | position: relative; 65 | margin: auto; 66 | margin-bottom: 20rpx; 67 | width: 97%; 68 | height: 300rpx; 69 | line-height: 300rpx; 70 | text-align: center; 71 | background-size: 100%; 72 | background-position: center; 73 | /* background-attachment: fixed; */ 74 | border-radius: 22rpx; 75 | 76 | color: #fff; 77 | font-size: 70rpx; 78 | font-weight: 450; 79 | text-shadow: #777 0rpx 0rpx 30rpx; 80 | font-family: YouYuan; 81 | letter-spacing: 10rpx; 82 | 83 | 84 | } 85 | 86 | .label { 87 | background-color: rgba(255, 255, 255, 0.2); 88 | } -------------------------------------------------------------------------------- /Library-Server-Cloud/gateway/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | cool.leeson.lib 8 | Library-Server-Cloud 9 | 1.0 10 | 11 | 12 | gateway 13 | 14 | 15 | 8 16 | 8 17 | UTF-8 18 | 19 | 20 | 21 | 22 | 23 | 24 | org.springframework.cloud 25 | spring-cloud-starter-gateway 26 | 27 | 28 | org.springframework.cloud 29 | spring-cloud-starter-loadbalancer 30 | 31 | 32 | 33 | 34 | com.alibaba.cloud 35 | spring-cloud-alibaba-nacos-discovery 36 | 2.2.0.RELEASE 37 | 38 | 39 | 40 | com.alibaba.cloud 41 | spring-cloud-starter-alibaba-nacos-config 42 | 43 | 44 | -------------------------------------------------------------------------------- /Library-miniProject/utils/request.js: -------------------------------------------------------------------------------- 1 | import { 2 | store 3 | } from '../store/store' 4 | class Request { 5 | 6 | get(url, data) { 7 | return this.request('GET', url, data) 8 | } 9 | post(url, data) { 10 | return this.request('POST', url, data) 11 | } 12 | put(url, data) { 13 | return this.request('PUT', url, data) 14 | } 15 | request(method, url, data) { 16 | const that = this 17 | if (url[0] != '/') url = '/' + url 18 | url = store.baseUrl + url 19 | console.log(url); 20 | return new Promise((resolve, reject) => { 21 | wx.request({ 22 | url: url, 23 | data: data, 24 | method, // 一种做法,在header中带上登录态,方式取决于和后端的约定 25 | header: { 26 | "Content-Type": method == "POST" ? "application/json" : "application/x-www-form-urlencoded", 27 | "token": wx.getStorageSync('token') 28 | }, 29 | success(res) { 30 | wx.hideLoading(); 31 | wx.stopPullDownRefresh(); 32 | if (store.CheckError(res.data)) return; 33 | resolve(res.data) 34 | }, 35 | fail(res) { 36 | wx.hideLoading(); 37 | wx.stopPullDownRefresh(); 38 | reject({ 39 | message: res.errMsg, 40 | url: that.baseURL + url, 41 | method, 42 | data, 43 | statusCode: res.statusCode, 44 | result: res.data 45 | }) 46 | } 47 | }) 48 | }) 49 | } 50 | } 51 | 52 | 53 | const request = new Request() 54 | 55 | module.exports = request -------------------------------------------------------------------------------- /Library-miniProject/node_modules/mobx-miniprogram/lib/core/atom.d.ts: -------------------------------------------------------------------------------- 1 | import { IObservable, IDerivationState } from "../internal"; 2 | export interface IAtom extends IObservable { 3 | reportObserved(): any; 4 | reportChanged(): any; 5 | } 6 | /** 7 | * Anything that can be used to _store_ state is an Atom in mobx. Atoms have two important jobs 8 | * 9 | * 1) detect when they are being _used_ and report this (using reportObserved). This allows mobx to make the connection between running functions and the data they used 10 | * 2) they should notify mobx whenever they have _changed_. This way mobx can re-run any functions (derivations) that are using this atom. 11 | */ 12 | export declare class Atom implements IAtom { 13 | name: string; 14 | isPendingUnobservation: boolean; 15 | isBeingObserved: boolean; 16 | observers: never[]; 17 | observersIndexes: {}; 18 | diffValue: number; 19 | lastAccessedBy: number; 20 | lowestObserverState: IDerivationState; 21 | /** 22 | * Create a new atom. For debugging purposes it is recommended to give it a name. 23 | * The onBecomeObserved and onBecomeUnobserved callbacks can be used for resource management. 24 | */ 25 | constructor(name?: string); 26 | onBecomeUnobserved(): void; 27 | onBecomeObserved(): void; 28 | /** 29 | * Invoke this method to notify mobx that your atom has been used somehow. 30 | * Returns true if there is currently a reactive context. 31 | */ 32 | reportObserved(): boolean; 33 | /** 34 | * Invoke this method _after_ this method has changed to signal mobx that all its observers should invalidate. 35 | */ 36 | reportChanged(): void; 37 | toString(): string; 38 | } 39 | export declare const isAtom: (x: any) => x is Atom; 40 | export declare function createAtom(name: string, onBecomeObservedHandler?: () => void, onBecomeUnobservedHandler?: () => void): IAtom; 41 | -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/entity/library/Library.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.entity.library; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | import org.springframework.format.annotation.DateTimeFormat; 7 | 8 | import javax.validation.constraints.NotBlank; 9 | import javax.validation.constraints.NotNull; 10 | import java.io.Serializable; 11 | import java.time.LocalTime; 12 | import java.util.List; 13 | 14 | /** 15 | * (Library)实体类 16 | * 17 | * @author Leeson0202 18 | * @since 2023-03-10 22:59:52 19 | */ 20 | @Data 21 | @AllArgsConstructor 22 | @NoArgsConstructor 23 | public class Library implements Serializable { 24 | private static final long serialVersionUID = 507207274478901005L; 25 | /** 26 | * 图书馆Id 27 | */ 28 | private String libraryId; 29 | /** 30 | * 学校id 31 | */ 32 | @NotBlank(message = "schoolId不能为空") 33 | private String schoolId; 34 | /** 35 | * 图书馆名字 36 | */ 37 | @NotBlank(message = "名字不能为空") 38 | private String name; 39 | /** 40 | * 简介 41 | */ 42 | private String descs; 43 | /** 44 | * 背景 45 | */ 46 | private String background; 47 | /** 48 | * 周末是否开放 49 | */ 50 | private Boolean weekend; 51 | /** 52 | * 每日开放开始时间 53 | */ 54 | // @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") 55 | @DateTimeFormat(pattern = "HH:mm") 56 | @NotNull(message = "开始时间不能为空") 57 | private LocalTime beginTime; 58 | /** 59 | * 每日开放结束时间 60 | */ 61 | @DateTimeFormat(pattern = "HH:mm") 62 | @NotNull(message = "结束时间不能为空") 63 | private LocalTime endTime; 64 | /** 65 | * 时段长度 66 | */ 67 | @DateTimeFormat(pattern = "HH:mm") 68 | @NotNull(message = "时间段不能为空") 69 | private LocalTime tt; 70 | 71 | private List libraryRooms; 72 | 73 | 74 | } 75 | 76 | -------------------------------------------------------------------------------- /Library-miniProject/pages/function/bookRecord/bookRecord.wxss: -------------------------------------------------------------------------------- 1 | /* pages/function/bookRecord/bookRecord.wxss */ 2 | page { 3 | height: calc(100% - 20rpx); 4 | } 5 | 6 | .record-label { 7 | position: fixed; 8 | top: 0rpx; 9 | height: 60rpx; 10 | width: 100%; 11 | z-index: 1000; 12 | background-color: #fff; 13 | } 14 | 15 | .label { 16 | display: inline-block; 17 | width: 25%; 18 | text-align: center; 19 | font-size: 28rpx; 20 | } 21 | 22 | .label-bottom { 23 | border-bottom: 6rpx solid rgba(9, 9, 245, 0.281); 24 | } 25 | 26 | .main-content { 27 | display: block; 28 | position: relative; 29 | margin: 50rpx 0; 30 | padding: 20rpx 0; 31 | width: 100%; 32 | 33 | } 34 | 35 | .items { 36 | display: block; 37 | position: relative; 38 | width: calc(95% - 40rpx); 39 | padding: 10rpx 20rpx; 40 | margin-bottom: 30rpx; 41 | } 42 | 43 | .line-item { 44 | padding: 20rpx 20rpx 0rpx; 45 | height: 120rpx; 46 | } 47 | 48 | .line-item-title { 49 | height: 50rpx; 50 | line-height: 50rpx; 51 | color: #666; 52 | font-size: 30rpx; 53 | font-weight: 600; 54 | border-bottom: 1rpx solid rgb(231, 229, 229); 55 | } 56 | 57 | .seat-room { 58 | font-size: 26rpx; 59 | color: rgb(61, 59, 59); 60 | } 61 | 62 | 63 | .record-status { 64 | display: inline-block; 65 | margin-left: 10rpx; 66 | padding: 0rpx 14rpx; 67 | line-height: 36rpx; 68 | font-size: 18rpx; 69 | border-radius: 14rpx; 70 | } 71 | 72 | .library-time { 73 | font-size: 24rpx; 74 | color: #444; 75 | } 76 | 77 | .delete-button { 78 | float: right; 79 | margin-top: 32rpx; 80 | width: 130rpx; 81 | height: 42rpx; 82 | line-height: 42rpx; 83 | font-size: 22rpx; 84 | font-weight: normal; 85 | text-align: center; 86 | color: #fff; 87 | border-radius: 10rpx; 88 | background-color: rgba(253, 186, 0, 0.7); 89 | } -------------------------------------------------------------------------------- /Library-miniProject/resources/images/Author/message.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Library-vue/src/router/routers.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | // home 3 | { 4 | path: "/home", 5 | component: (resolve) => require(["@/pages/home/Home"], resolve), 6 | }, 7 | { 8 | path: "/", 9 | component: (resolve) => require(["@/pages/home/Home"], resolve), 10 | }, 11 | // school 12 | { 13 | path: "school", 14 | component: (resolve) => 15 | require(["@/pages/school/School"], resolve), 16 | }, 17 | { 18 | path: "notification", 19 | component: (resolve) => 20 | require(["@/pages/school/Notification"], resolve), 21 | }, 22 | { 23 | path: "library", 24 | component: (resolve) => require(["@/pages/school/Library"], resolve), 25 | }, 26 | { 27 | path: "seat", 28 | component: (resolve) => require(["@/pages/school/Seat"], resolve), 29 | }, 30 | // receive 31 | { 32 | path: "receive", 33 | component: (resolve) => require(["@/pages/receive/Receive"], resolve), 34 | }, 35 | { 36 | path: "receivefast", 37 | component: (resolve) => require(["@/pages/receive/ReceiveFast"], resolve), 38 | }, 39 | { 40 | path: "receiveRule", 41 | component: (resolve) => 42 | require(["@/pages/receive/ReceiveRule"], resolve), 43 | }, 44 | 45 | // credit 46 | { 47 | path: "credit", 48 | component: (resolve) => require(["@/pages/credit/Credit"], resolve), 49 | }, 50 | // feedback 51 | { 52 | path: "feedback", 53 | component: (resolve) => require(["@/pages/feedback/Feedback"], resolve), 54 | }, 55 | // user 56 | { 57 | path: "user", 58 | component: (resolve) => require(["@/pages/user/User"], resolve), 59 | }, 60 | // settings 61 | { 62 | path: "settings", 63 | component: (resolve) => require(["@/pages/setting/Settings"], resolve), 64 | }, 65 | ]; 66 | -------------------------------------------------------------------------------- /Library-miniProject/app.js: -------------------------------------------------------------------------------- 1 | // app.js 2 | import { 3 | store 4 | } from './store/store' 5 | 6 | App({ 7 | globalData: { 8 | baseUrl: store.baseUrl 9 | }, 10 | onLaunch() { 11 | let that = this 12 | wx.getSystemInfo({ 13 | success: res => { 14 | that.globalData.screenHeight = res.screenHeight; 15 | that.globalData.screenWidth = res.screenWidth; 16 | that.globalData.statusBarHeight = res.statusBarHeight 17 | } 18 | }) 19 | }, 20 | // 登陆检测 21 | loginUpdate() { 22 | // console.log("login Updating"); 23 | let that = this; 24 | // 获取token 25 | let token = wx.getStorageSync('token') 26 | if (token == "") { 27 | store.InitData(); 28 | return 29 | } 30 | let url = that.globalData.baseUrl + "/update"; 31 | console.log(url); 32 | wx.request({ 33 | url: url, 34 | method: "GET", 35 | header: { 36 | token: token 37 | }, 38 | success({ 39 | data 40 | }) { 41 | // console.log(data); 42 | if (data.code != 200) { 43 | store.InitData(); 44 | return; 45 | } 46 | if (data.code == 200) { 47 | wx.setStorageSync('token', data.token); 48 | store.hasLogin = true; 49 | store.GetUserInfo(); 50 | } 51 | }, 52 | fail() { 53 | wx.showToast({ 54 | title: '网络错误或浏览器错误', 55 | icon: "none" 56 | }) 57 | } 58 | }) 59 | }, 60 | onShow(options) { 61 | console.log("app onShow"); 62 | // 加载缓存 63 | store.Launch(); 64 | // 检测重新登陆 65 | this.loginUpdate(); 66 | } 67 | 68 | }) -------------------------------------------------------------------------------- /Library-Server/src/main/java/cool/leeson/library/controller/library/SchoolRuleController.java: -------------------------------------------------------------------------------- 1 | package cool.leeson.library.controller.library; 2 | 3 | import cool.leeson.library.entity.library.SchoolRule; 4 | import cool.leeson.library.exceptions.MyException; 5 | import cool.leeson.library.service.library.SchoolRuleService; 6 | import org.springframework.validation.annotation.Validated; 7 | import org.springframework.web.bind.annotation.*; 8 | 9 | import javax.annotation.Resource; 10 | import java.util.Map; 11 | 12 | /** 13 | * (SchoolRule)表控制层 14 | * 15 | * @author Leeson0202 16 | * @since 2023-04-09 23:37:17 17 | */ 18 | @RestController 19 | @RequestMapping("rule") 20 | public class SchoolRuleController { 21 | /** 22 | * 服务对象 23 | */ 24 | @Resource 25 | private SchoolRuleService schoolRuleService; 26 | 27 | 28 | /** 29 | * 通过主键查询单条数据 30 | * 31 | * @param schoolId 主键 32 | * @return 单条数据 33 | */ 34 | @GetMapping("id/{schoolId}") 35 | public Object queryById(@PathVariable("schoolId") String schoolId) { 36 | return this.schoolRuleService.queryById(schoolId); 37 | } 38 | 39 | /** 40 | * 新增数据 41 | * 42 | * @param schoolRule 实体 43 | * @return 新增结果 44 | */ 45 | @PostMapping 46 | public Map add(@RequestBody @Validated SchoolRule schoolRule) { 47 | return this.schoolRuleService.insert(schoolRule); 48 | } 49 | 50 | /** 51 | * 编辑数据 52 | * 53 | * @param schoolRule 实体 54 | * @return 编辑结果 55 | */ 56 | @PutMapping 57 | public Map edit(SchoolRule schoolRule) { 58 | return this.schoolRuleService.update(schoolRule); 59 | } 60 | 61 | /** 62 | * 删除数据 63 | * 64 | * @param id 主键 65 | * @return 删除是否成功 66 | */ 67 | @DeleteMapping 68 | public Map deleteById(String id) throws MyException { 69 | return this.schoolRuleService.deleteById(id); 70 | } 71 | 72 | } 73 | 74 | --------------------------------------------------------------------------------