├── web ├── static │ ├── .gitkeep │ ├── img │ │ ├── login.jpg │ │ └── login.png │ └── tinymce4.7.5 │ │ ├── skins │ │ └── lightgray │ │ │ ├── img │ │ │ ├── trans.gif │ │ │ ├── anchor.gif │ │ │ ├── loader.gif │ │ │ └── object.gif │ │ │ └── fonts │ │ │ ├── tinymce.eot │ │ │ ├── tinymce.ttf │ │ │ ├── tinymce.woff │ │ │ ├── tinymce-small.eot │ │ │ ├── tinymce-small.ttf │ │ │ ├── tinymce-mobile.woff │ │ │ └── tinymce-small.woff │ │ └── plugins │ │ └── emoticons │ │ └── img │ │ ├── smiley-cool.gif │ │ ├── smiley-cry.gif │ │ ├── smiley-kiss.gif │ │ ├── smiley-wink.gif │ │ ├── smiley-yell.gif │ │ ├── smiley-frown.gif │ │ ├── smiley-sealed.gif │ │ ├── smiley-smile.gif │ │ ├── smiley-innocent.gif │ │ ├── smiley-laughing.gif │ │ ├── smiley-surprised.gif │ │ ├── smiley-undecided.gif │ │ ├── smiley-embarassed.gif │ │ ├── smiley-money-mouth.gif │ │ ├── smiley-tongue-out.gif │ │ └── smiley-foot-in-mouth.gif ├── .eslintignore ├── favicon.ico ├── build │ ├── logo.png │ ├── vue-loader.conf.js │ ├── build.js │ └── check-versions.js ├── .travis.yml ├── src │ ├── assets │ │ └── 404_images │ │ │ ├── 404.png │ │ │ └── 404_cloud.png │ ├── App.vue │ ├── views │ │ ├── layout │ │ │ ├── components │ │ │ │ ├── index.js │ │ │ │ ├── Sidebar │ │ │ │ │ ├── Item.vue │ │ │ │ │ ├── Link.vue │ │ │ │ │ └── index.vue │ │ │ │ └── AppMain.vue │ │ │ ├── mixin │ │ │ │ └── ResizeHandler.js │ │ │ └── Layout.vue │ │ ├── portrayal │ │ │ └── index.vue │ │ └── system │ │ │ └── updatePassword │ │ │ └── index.vue │ ├── utils │ │ ├── get-page-title.js │ │ ├── auth.js │ │ ├── validate.js │ │ ├── index.js │ │ └── request.js │ ├── icons │ │ ├── svg │ │ │ ├── link.svg │ │ │ ├── user.svg │ │ │ ├── example.svg │ │ │ ├── table.svg │ │ │ ├── password.svg │ │ │ ├── index.svg │ │ │ ├── ck.svg │ │ │ ├── nested.svg │ │ │ ├── tj.svg │ │ │ ├── eye.svg │ │ │ ├── bm.svg │ │ │ ├── dr.svg │ │ │ ├── gd.svg │ │ │ ├── pj.svg │ │ │ ├── tree.svg │ │ │ └── xt.svg │ │ ├── index.js │ │ └── svgo.yml │ ├── test.html │ ├── settings.js │ ├── store │ │ ├── getters.js │ │ ├── index.js │ │ └── modules │ │ │ ├── settings.js │ │ │ ├── app.js │ │ │ └── permission.js │ ├── api │ │ ├── favorite.js │ │ ├── result.js │ │ ├── notice.js │ │ ├── reply.js │ │ ├── knowledge.js │ │ └── user.js │ └── main.js ├── config │ ├── prod.env.js │ └── dev.env.js ├── .gitignore ├── .babelrc ├── .postcssrc.js ├── .editorconfig ├── index.html ├── vue.config.js └── LICENSE ├── server ├── image │ ├── 1700118786356.docx │ ├── 1700125260067.docx │ ├── 1700115556897.png │ ├── 1700118628847.png │ ├── 1700118647958.png │ ├── 1700181461979.webp │ ├── 1700185460923.jpg │ ├── 1700534572344.png │ ├── 1700534613027.png │ ├── 1700534639707.png │ ├── 1700534960731.webp │ ├── 1700534966336.webp │ ├── 1700661114459.webp │ └── 1733728519210.jpg └── src │ └── main │ └── java │ └── com │ └── cn │ └── psychological │ ├── mapper │ ├── PUserMapper.java │ ├── PNoticeMapper.java │ ├── PReplyMapper.java │ ├── PKnowledgeMapper.java │ ├── PFavoriteMapper.java │ └── PResultMapper.java │ ├── utils │ ├── page │ │ └── PageResult.java │ ├── mybatisplus │ │ └── MyMetaObjectHandler.java │ ├── response │ │ └── R.java │ └── CrosACofig.java │ ├── service │ ├── PUserService.java │ ├── PNoticeService.java │ ├── FileService.java │ ├── PReplyService.java │ ├── PFavoriteService.java │ ├── PKnowledgeService.java │ ├── PResultService.java │ └── impl │ │ ├── PNoticeServiceImpl.java │ │ ├── FileServiceImpl.java │ │ ├── PUserServiceImpl.java │ │ ├── PReplyServiceImpl.java │ │ ├── PFavoriteServiceImpl.java │ │ ├── PKnowledgeServiceImpl.java │ │ └── PResultServiceImpl.java │ ├── WorkOrderApplication.java │ ├── entity │ ├── PNotice.java │ ├── PFavorite.java │ ├── PKnowledge.java │ ├── PReply.java │ └── PUser.java │ └── controller │ ├── PFavoriteController.java │ ├── PNoticeController.java │ └── PKnowledgeController.java ├── wx ├── pages │ ├── answer_info │ │ ├── index.json │ │ ├── index.wxss │ │ ├── index.js │ │ └── index.wxml │ ├── consult │ │ ├── index.json │ │ ├── index.wxml │ │ ├── index.js │ │ └── index.wxss │ ├── answer │ │ ├── index.json │ │ ├── index.wxss │ │ └── index.wxml │ ├── favorite │ │ ├── index.json │ │ ├── index.js │ │ ├── index.wxss │ │ └── index.wxml │ ├── info │ │ ├── index.json │ │ ├── index.wxss │ │ └── index.wxml │ ├── notice │ │ ├── index.json │ │ ├── index.wxss │ │ ├── index.js │ │ └── index.wxml │ ├── answer_list │ │ ├── index.json │ │ ├── index.wxml │ │ ├── index.wxss │ │ └── index.js │ ├── knowledge │ │ ├── index.json │ │ ├── index.js │ │ ├── index.wxss │ │ └── index.wxml │ ├── line │ │ ├── index.wxss │ │ ├── index.json │ │ ├── index.wxml │ │ └── index.js │ ├── notice_info │ │ ├── index.json │ │ ├── index.wxss │ │ ├── index.wxml │ │ └── index.js │ ├── counselor_info │ │ ├── index.json │ │ ├── index.js │ │ ├── index.wxml │ │ └── index.wxss │ ├── knowledge_info │ │ ├── index.json │ │ ├── index.wxml │ │ └── index.js │ ├── online_counsel │ │ ├── index.json │ │ └── index.wxml │ ├── updatePassword │ │ ├── index.json │ │ ├── index.wxss │ │ ├── index.wxml │ │ └── index.js │ ├── index │ │ ├── index.json │ │ ├── index.js │ │ └── index.wxss │ ├── wode │ │ ├── wode.json │ │ └── wode.js │ ├── counselor │ │ ├── index.json │ │ ├── index.js │ │ ├── index.wxss │ │ └── index.wxml │ ├── curve │ │ ├── index.json │ │ ├── index.wxss │ │ └── index.wxml │ ├── login │ │ ├── index.json │ │ ├── index.wxss │ │ ├── index.wxml │ │ └── index.js │ └── register │ │ ├── index.json │ │ ├── index.wxss │ │ └── index.wxml ├── images │ ├── 111.webp │ ├── button1.png │ ├── button2.png │ ├── homegood.jpg │ ├── team_top.png │ ├── user_top.png │ ├── cash_balance.png │ ├── logo.svg │ ├── icon_arrow.svg │ ├── icon_rule.svg │ ├── tabbar_01_active.svg │ ├── icon_close.svg │ ├── tabbar_03_active.svg │ ├── icon-notice.svg │ ├── icon_good.svg │ ├── weixin_2.svg │ ├── icon_zhuce.svg │ ├── vajra_02.svg │ ├── user_panel_07.svg │ ├── user_panel_04.svg │ ├── user_type_02.svg │ ├── mobile.svg │ ├── user_panel_02.svg │ ├── vajra_04.svg │ ├── vajra_03.svg │ ├── icon_setup.svg │ ├── user_type_01.svg │ ├── vajra_01.svg │ ├── user_panel_06.svg │ ├── user_panel_03.svg │ ├── user_panel_01.svg │ └── user_panel_05.svg ├── sitemap.json ├── app.js ├── utils │ ├── util.js │ ├── help.js │ └── request.js ├── project.private.config.json ├── .eslintrc.js ├── app.json └── project.config.json ├── image ├── A1.png ├── A10.png ├── A11.png ├── A12.png ├── A13.png ├── A14.png ├── A15.png ├── A16.png ├── A17.png ├── A18.png ├── A19.png ├── A2.png ├── A3.png ├── A4.png ├── A5.png ├── A6.png ├── A7.png ├── A8.png ├── A9.png ├── B1.png ├── B10.png ├── B11.png ├── B12.png ├── B2.png ├── B3.png ├── B4.png ├── B5.png ├── B6.png ├── B7.png ├── B8.png └── B9.png └── README.md /web/static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server/image/1700118786356.docx: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server/image/1700125260067.docx: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /wx/pages/answer_info/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "测试结果" 3 | } -------------------------------------------------------------------------------- /wx/pages/consult/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "选择咨询方式" 3 | } -------------------------------------------------------------------------------- /image/A1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/image/A1.png -------------------------------------------------------------------------------- /image/A10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/image/A10.png -------------------------------------------------------------------------------- /image/A11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/image/A11.png -------------------------------------------------------------------------------- /image/A12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/image/A12.png -------------------------------------------------------------------------------- /image/A13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/image/A13.png -------------------------------------------------------------------------------- /image/A14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/image/A14.png -------------------------------------------------------------------------------- /image/A15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/image/A15.png -------------------------------------------------------------------------------- /image/A16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/image/A16.png -------------------------------------------------------------------------------- /image/A17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/image/A17.png -------------------------------------------------------------------------------- /image/A18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/image/A18.png -------------------------------------------------------------------------------- /image/A19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/image/A19.png -------------------------------------------------------------------------------- /image/A2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/image/A2.png -------------------------------------------------------------------------------- /image/A3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/image/A3.png -------------------------------------------------------------------------------- /image/A4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/image/A4.png -------------------------------------------------------------------------------- /image/A5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/image/A5.png -------------------------------------------------------------------------------- /image/A6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/image/A6.png -------------------------------------------------------------------------------- /image/A7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/image/A7.png -------------------------------------------------------------------------------- /image/A8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/image/A8.png -------------------------------------------------------------------------------- /image/A9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/image/A9.png -------------------------------------------------------------------------------- /image/B1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/image/B1.png -------------------------------------------------------------------------------- /image/B10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/image/B10.png -------------------------------------------------------------------------------- /image/B11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/image/B11.png -------------------------------------------------------------------------------- /image/B12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/image/B12.png -------------------------------------------------------------------------------- /image/B2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/image/B2.png -------------------------------------------------------------------------------- /image/B3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/image/B3.png -------------------------------------------------------------------------------- /image/B4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/image/B4.png -------------------------------------------------------------------------------- /image/B5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/image/B5.png -------------------------------------------------------------------------------- /image/B6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/image/B6.png -------------------------------------------------------------------------------- /image/B7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/image/B7.png -------------------------------------------------------------------------------- /image/B8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/image/B8.png -------------------------------------------------------------------------------- /image/B9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/image/B9.png -------------------------------------------------------------------------------- /web/.eslintignore: -------------------------------------------------------------------------------- 1 | build/*.js 2 | config/*.js 3 | src/assets 4 | *.vue 5 | *.js 6 | -------------------------------------------------------------------------------- /web/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/favicon.ico -------------------------------------------------------------------------------- /web/build/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/build/logo.png -------------------------------------------------------------------------------- /wx/images/111.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/wx/images/111.webp -------------------------------------------------------------------------------- /wx/images/button1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/wx/images/button1.png -------------------------------------------------------------------------------- /wx/images/button2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/wx/images/button2.png -------------------------------------------------------------------------------- /wx/images/homegood.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/wx/images/homegood.jpg -------------------------------------------------------------------------------- /wx/images/team_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/wx/images/team_top.png -------------------------------------------------------------------------------- /wx/images/user_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/wx/images/user_top.png -------------------------------------------------------------------------------- /wx/pages/answer/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "评测", 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /wx/pages/favorite/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarTitleText": "我的收藏" 4 | } -------------------------------------------------------------------------------- /wx/pages/info/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarTitleText": "个人信息修改" 4 | } -------------------------------------------------------------------------------- /wx/pages/notice/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarTitleText": "最新通知" 4 | } -------------------------------------------------------------------------------- /web/static/img/login.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/static/img/login.jpg -------------------------------------------------------------------------------- /web/static/img/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/static/img/login.png -------------------------------------------------------------------------------- /wx/images/cash_balance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/wx/images/cash_balance.png -------------------------------------------------------------------------------- /wx/pages/answer_list/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "答题记录", 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /wx/pages/knowledge/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarTitleText": "心理知识" 4 | } -------------------------------------------------------------------------------- /wx/pages/line/index.wxss: -------------------------------------------------------------------------------- 1 | /**index.wxss**/ 2 | ec-canvas { 3 | width: 100%; 4 | height: 100%; 5 | } 6 | -------------------------------------------------------------------------------- /wx/pages/notice_info/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarTitleText": "通知详情" 4 | } -------------------------------------------------------------------------------- /wx/pages/counselor_info/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarTitleText": "心理咨询详情" 4 | } -------------------------------------------------------------------------------- /wx/pages/knowledge_info/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarTitleText": "心理知识详情" 4 | } -------------------------------------------------------------------------------- /wx/pages/online_counsel/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarTitleText": "在线咨询" 4 | } -------------------------------------------------------------------------------- /wx/pages/updatePassword/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarTitleText": "修改密码" 4 | } -------------------------------------------------------------------------------- /server/image/1700115556897.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/server/image/1700115556897.png -------------------------------------------------------------------------------- /server/image/1700118628847.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/server/image/1700118628847.png -------------------------------------------------------------------------------- /server/image/1700118647958.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/server/image/1700118647958.png -------------------------------------------------------------------------------- /server/image/1700181461979.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/server/image/1700181461979.webp -------------------------------------------------------------------------------- /server/image/1700185460923.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/server/image/1700185460923.jpg -------------------------------------------------------------------------------- /server/image/1700534572344.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/server/image/1700534572344.png -------------------------------------------------------------------------------- /server/image/1700534613027.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/server/image/1700534613027.png -------------------------------------------------------------------------------- /server/image/1700534639707.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/server/image/1700534639707.png -------------------------------------------------------------------------------- /server/image/1700534960731.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/server/image/1700534960731.webp -------------------------------------------------------------------------------- /server/image/1700534966336.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/server/image/1700534966336.webp -------------------------------------------------------------------------------- /server/image/1700661114459.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/server/image/1700661114459.webp -------------------------------------------------------------------------------- /server/image/1733728519210.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/server/image/1733728519210.jpg -------------------------------------------------------------------------------- /web/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: stable 3 | script: npm run test 4 | notifications: 5 | email: false 6 | -------------------------------------------------------------------------------- /web/src/assets/404_images/404.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/src/assets/404_images/404.png -------------------------------------------------------------------------------- /wx/pages/line/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "ec-canvas": "../../ec-canvas/ec-canvas" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /web/src/assets/404_images/404_cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/src/assets/404_images/404_cloud.png -------------------------------------------------------------------------------- /web/build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = { 4 | //You can set the vue-loader configuration by yourself. 5 | } 6 | -------------------------------------------------------------------------------- /wx/pages/index/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "tabbar":"/component/tabbar/tabbar" 4 | }, 5 | "navigationBarTitleText": "首页" 6 | } -------------------------------------------------------------------------------- /wx/pages/wode/wode.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "tabbar":"/component/tabbar/tabbar" 4 | }, 5 | "navigationBarTitleText": "我的" 6 | } -------------------------------------------------------------------------------- /wx/pages/counselor/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "tabbar":"/component/tabbar/tabbar" 4 | }, 5 | "navigationBarTitleText": "心理咨询" 6 | } -------------------------------------------------------------------------------- /web/static/tinymce4.7.5/skins/lightgray/img/trans.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/static/tinymce4.7.5/skins/lightgray/img/trans.gif -------------------------------------------------------------------------------- /web/static/tinymce4.7.5/skins/lightgray/img/anchor.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/static/tinymce4.7.5/skins/lightgray/img/anchor.gif -------------------------------------------------------------------------------- /web/static/tinymce4.7.5/skins/lightgray/img/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/static/tinymce4.7.5/skins/lightgray/img/loader.gif -------------------------------------------------------------------------------- /web/static/tinymce4.7.5/skins/lightgray/img/object.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/static/tinymce4.7.5/skins/lightgray/img/object.gif -------------------------------------------------------------------------------- /wx/pages/curve/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "ec-canvas": "../../ec-canvas/ec-canvas" 4 | }, 5 | "navigationBarTitleText": "心理健康指数变化分析" 6 | 7 | } -------------------------------------------------------------------------------- /web/static/tinymce4.7.5/skins/lightgray/fonts/tinymce.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/static/tinymce4.7.5/skins/lightgray/fonts/tinymce.eot -------------------------------------------------------------------------------- /web/static/tinymce4.7.5/skins/lightgray/fonts/tinymce.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/static/tinymce4.7.5/skins/lightgray/fonts/tinymce.ttf -------------------------------------------------------------------------------- /web/static/tinymce4.7.5/skins/lightgray/fonts/tinymce.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/static/tinymce4.7.5/skins/lightgray/fonts/tinymce.woff -------------------------------------------------------------------------------- /wx/pages/info/index.wxss: -------------------------------------------------------------------------------- 1 | page{background: #F4F6FA;} 2 | 3 | 4 | .page_form__item{position: relative;} 5 | .getcode{position:absolute; right: 32rpx; top: 0; z-index: 999;} -------------------------------------------------------------------------------- /web/static/tinymce4.7.5/plugins/emoticons/img/smiley-cool.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/static/tinymce4.7.5/plugins/emoticons/img/smiley-cool.gif -------------------------------------------------------------------------------- /web/static/tinymce4.7.5/plugins/emoticons/img/smiley-cry.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/static/tinymce4.7.5/plugins/emoticons/img/smiley-cry.gif -------------------------------------------------------------------------------- /web/static/tinymce4.7.5/plugins/emoticons/img/smiley-kiss.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/static/tinymce4.7.5/plugins/emoticons/img/smiley-kiss.gif -------------------------------------------------------------------------------- /web/static/tinymce4.7.5/plugins/emoticons/img/smiley-wink.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/static/tinymce4.7.5/plugins/emoticons/img/smiley-wink.gif -------------------------------------------------------------------------------- /web/static/tinymce4.7.5/plugins/emoticons/img/smiley-yell.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/static/tinymce4.7.5/plugins/emoticons/img/smiley-yell.gif -------------------------------------------------------------------------------- /wx/pages/line/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /web/static/tinymce4.7.5/plugins/emoticons/img/smiley-frown.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/static/tinymce4.7.5/plugins/emoticons/img/smiley-frown.gif -------------------------------------------------------------------------------- /web/static/tinymce4.7.5/plugins/emoticons/img/smiley-sealed.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/static/tinymce4.7.5/plugins/emoticons/img/smiley-sealed.gif -------------------------------------------------------------------------------- /web/static/tinymce4.7.5/plugins/emoticons/img/smiley-smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/static/tinymce4.7.5/plugins/emoticons/img/smiley-smile.gif -------------------------------------------------------------------------------- /web/static/tinymce4.7.5/skins/lightgray/fonts/tinymce-small.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/static/tinymce4.7.5/skins/lightgray/fonts/tinymce-small.eot -------------------------------------------------------------------------------- /web/static/tinymce4.7.5/skins/lightgray/fonts/tinymce-small.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/static/tinymce4.7.5/skins/lightgray/fonts/tinymce-small.ttf -------------------------------------------------------------------------------- /wx/pages/updatePassword/index.wxss: -------------------------------------------------------------------------------- 1 | page{background: #F4F6FA;} 2 | 3 | 4 | .page_form__item{position: relative;} 5 | .getcode{position:absolute; right: 32rpx; top: 0; z-index: 999;} -------------------------------------------------------------------------------- /web/config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"', 4 | BASE_API: '"https://easy-mock.com/mock/5950a2419adc231f356a6636/vue-admin"', 5 | } 6 | -------------------------------------------------------------------------------- /web/src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 11 | -------------------------------------------------------------------------------- /web/static/tinymce4.7.5/plugins/emoticons/img/smiley-innocent.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/static/tinymce4.7.5/plugins/emoticons/img/smiley-innocent.gif -------------------------------------------------------------------------------- /web/static/tinymce4.7.5/plugins/emoticons/img/smiley-laughing.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/static/tinymce4.7.5/plugins/emoticons/img/smiley-laughing.gif -------------------------------------------------------------------------------- /web/static/tinymce4.7.5/plugins/emoticons/img/smiley-surprised.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/static/tinymce4.7.5/plugins/emoticons/img/smiley-surprised.gif -------------------------------------------------------------------------------- /web/static/tinymce4.7.5/plugins/emoticons/img/smiley-undecided.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/static/tinymce4.7.5/plugins/emoticons/img/smiley-undecided.gif -------------------------------------------------------------------------------- /web/static/tinymce4.7.5/skins/lightgray/fonts/tinymce-mobile.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/static/tinymce4.7.5/skins/lightgray/fonts/tinymce-mobile.woff -------------------------------------------------------------------------------- /web/static/tinymce4.7.5/skins/lightgray/fonts/tinymce-small.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/static/tinymce4.7.5/skins/lightgray/fonts/tinymce-small.woff -------------------------------------------------------------------------------- /wx/pages/login/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "", 3 | "navigationBarTextStyle": "white", 4 | "navigationBarBackgroundColor": "#5360FE", 5 | "usingComponents": {} 6 | } -------------------------------------------------------------------------------- /web/src/views/layout/components/index.js: -------------------------------------------------------------------------------- 1 | export { default as Navbar } from './Navbar' 2 | export { default as Sidebar } from './Sidebar' 3 | export { default as AppMain } from './AppMain' 4 | -------------------------------------------------------------------------------- /web/static/tinymce4.7.5/plugins/emoticons/img/smiley-embarassed.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/static/tinymce4.7.5/plugins/emoticons/img/smiley-embarassed.gif -------------------------------------------------------------------------------- /web/static/tinymce4.7.5/plugins/emoticons/img/smiley-money-mouth.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/static/tinymce4.7.5/plugins/emoticons/img/smiley-money-mouth.gif -------------------------------------------------------------------------------- /web/static/tinymce4.7.5/plugins/emoticons/img/smiley-tongue-out.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/static/tinymce4.7.5/plugins/emoticons/img/smiley-tongue-out.gif -------------------------------------------------------------------------------- /wx/pages/register/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "", 3 | "navigationBarTextStyle": "white", 4 | "navigationBarBackgroundColor": "#5360FE", 5 | "usingComponents": {} 6 | } -------------------------------------------------------------------------------- /web/static/tinymce4.7.5/plugins/emoticons/img/smiley-foot-in-mouth.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3275035005/weixin519/HEAD/web/static/tinymce4.7.5/plugins/emoticons/img/smiley-foot-in-mouth.gif -------------------------------------------------------------------------------- /wx/sitemap.json: -------------------------------------------------------------------------------- 1 | { 2 | "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html", 3 | "rules": [{ 4 | "action": "allow", 5 | "page": "*" 6 | }] 7 | } -------------------------------------------------------------------------------- /web/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | package-lock.json 8 | 9 | # Editor directories and files 10 | .idea 11 | .vscode 12 | *.suo 13 | *.ntvs* 14 | *.njsproj 15 | *.sln 16 | -------------------------------------------------------------------------------- /wx/pages/curve/index.wxss: -------------------------------------------------------------------------------- 1 | /* 定义容器大小 */ 2 | .container{ 3 | width: 100%; 4 | height: 500rpx; 5 | background-color: rgb(255, 255, 255); 6 | } 7 | 8 | /* ec-canvas 组件宽高与父元素一致即可 */ 9 | ec-canvas{ 10 | width: 100%; 11 | height: 500rpx; 12 | } 13 | -------------------------------------------------------------------------------- /wx/images/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /web/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins":["transform-vue-jsx", "transform-runtime"] 12 | } 13 | -------------------------------------------------------------------------------- /wx/pages/consult/index.wxml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/src/utils/get-page-title.js: -------------------------------------------------------------------------------- 1 | import defaultSettings from '@/settings' 2 | 3 | const title = defaultSettings.title || '大学生心理咨询管理系统' 4 | 5 | export default function getPageTitle(pageTitle) { 6 | if (pageTitle) { 7 | return `${pageTitle} - ${title}` 8 | } 9 | return `${title}` 10 | } 11 | -------------------------------------------------------------------------------- /web/.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-import": {}, 6 | "postcss-url": {}, 7 | // to edit target browsers: use "browserslist" field in package.json 8 | "autoprefixer": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /web/src/icons/svg/link.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/src/test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 9 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /web/.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | end_of_line = lf 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | 12 | [*.md] 13 | insert_final_newline = false 14 | trim_trailing_whitespace = false 15 | -------------------------------------------------------------------------------- /web/config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"', 7 | BASE_API: '"http://localhost:9999"', 8 | OSS_PATH: '"https://edu-guli-20001006.oss-cn-beijing.aliyuncs.com"' 9 | }) 10 | -------------------------------------------------------------------------------- /web/src/icons/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import SvgIcon from '@/components/SvgIcon' // svg组件 3 | 4 | // register globally 5 | Vue.component('svg-icon', SvgIcon) 6 | 7 | const requireAll = requireContext => requireContext.keys().map(requireContext) 8 | const req = require.context('./svg', false, /\.svg$/) 9 | requireAll(req) 10 | -------------------------------------------------------------------------------- /wx/pages/notice_info/index.wxss: -------------------------------------------------------------------------------- 1 | page{padding: 32rpx; box-sizing: border-box;} 2 | 3 | .notice_title{font-size: 40rpx; margin-bottom: 20rpx; font-weight: bolder;} 4 | .notice_time{font-size: 30rpx; display: flex; justify-content: flex-end; margin-bottom: 40rpx;} 5 | 6 | rich-text .wscnph{ 7 | max-width:100%;height:auto;display:block;margin:10px 0; 8 | } -------------------------------------------------------------------------------- /web/src/utils/auth.js: -------------------------------------------------------------------------------- 1 | import Cookies from 'js-cookie' 2 | 3 | const TokenKey = 'Admin-Token' 4 | 5 | export function getToken() { 6 | return Cookies.get(TokenKey) 7 | } 8 | 9 | export function setToken(token) { 10 | return Cookies.set(TokenKey, token) 11 | } 12 | 13 | export function removeToken() { 14 | return Cookies.remove(TokenKey) 15 | } 16 | -------------------------------------------------------------------------------- /web/src/settings.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 3 | title: '大学生心理咨询管理系统', 4 | 5 | /** 6 | * @type {boolean} true | false 7 | * @description Whether fix the header 8 | */ 9 | fixedHeader: false, 10 | 11 | /** 12 | * @type {boolean} true | false 13 | * @description Whether show the logo in sidebar 14 | */ 15 | sidebarLogo: false 16 | } 17 | -------------------------------------------------------------------------------- /web/src/icons/svgo.yml: -------------------------------------------------------------------------------- 1 | # replace default config 2 | 3 | # multipass: true 4 | # full: true 5 | 6 | plugins: 7 | 8 | # - name 9 | # 10 | # or: 11 | # - name: false 12 | # - name: true 13 | # 14 | # or: 15 | # - name: 16 | # param1: 1 17 | # param2: 2 18 | 19 | - removeAttrs: 20 | attrs: 21 | - 'fill' 22 | - 'fill-rule' 23 | -------------------------------------------------------------------------------- /wx/pages/notice_info/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{title}} 4 | 5 | 6 | 7 | 8 | 9 | 发布时间:{{createTime}} 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /web/src/store/getters.js: -------------------------------------------------------------------------------- 1 | const getters = { 2 | sidebar: state => state.app.sidebar, 3 | device: state => state.app.device, 4 | token: state => state.user.token, 5 | avatar: state => state.user.avatar, 6 | name: state => state.user.name, 7 | roles: state => state.user.roles, 8 | permission_routes: state => state.permission.routes// 新增 9 | } 10 | export default getters 11 | -------------------------------------------------------------------------------- /web/src/api/favorite.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | export function pageQuery(page, limit, data) { 4 | return request({ 5 | url: `/p-favorite/pageQuery/${page}/${limit}`, 6 | method: 'post', 7 | data: data 8 | }) 9 | } 10 | export function deleteById(id) { 11 | return request({ 12 | url: `/p-favorite/deleteById/${id}`, 13 | method: 'delete' 14 | }) 15 | } 16 | -------------------------------------------------------------------------------- /wx/pages/notice/index.wxss: -------------------------------------------------------------------------------- 1 | page{background: #F4F6FA;} 2 | 3 | 4 | 5 | /* --- list --- */ 6 | .allowance_list{padding: 32rpx;} 7 | .allowance_item{background: #fff; border-radius: 32rpx; padding: 32rpx; margin-bottom: 32rpx;} 8 | .allowance_item__content{width: 100%;} 9 | .allowance_item__title{font-size: 24rpx; margin-bottom: 8rpx;color: rgb(255, 0, 0);} 10 | .allowance_item__date{font-size: 24rpx; color: #999;} -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/mapper/PUserMapper.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.mapper; 2 | 3 | import com.cn.psychological.entity.PUser; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | *

10 | * 用户信息表 Mapper 接口 11 | *

12 | */ 13 | public interface PUserMapper extends BaseMapper { 14 | 15 | List pageQuery(PUser data); 16 | } 17 | -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/utils/page/PageResult.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.utils.page; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.List; 6 | 7 | @Data 8 | public class PageResult { 9 | 10 | private long total; 11 | 12 | private List records; 13 | 14 | public PageResult(long total, List records) { 15 | this.total = total; 16 | this.records = records; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/mapper/PNoticeMapper.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.mapper; 2 | 3 | import com.cn.psychological.entity.PNotice; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | *

10 | * 通知公告信息表 Mapper 接口 11 | *

12 | */ 13 | public interface PNoticeMapper extends BaseMapper { 14 | 15 | List pageQuery(PNotice data); 16 | } 17 | -------------------------------------------------------------------------------- /web/src/icons/svg/user.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /wx/pages/curve/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 详细分析: 10 | 11 | {{content}} 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /wx/pages/consult/index.js: -------------------------------------------------------------------------------- 1 | let counselorId = '' 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: {}, 8 | onLoad: function (options) { 9 | const { id } = options; 10 | counselorId = id 11 | }, 12 | leaveButton(e){ 13 | let id = e.currentTarget.dataset['index'] 14 | wx.navigateTo({ 15 | url: '/pages/online_counsel/index?flag='+id+'&counselorId='+counselorId, 16 | }) 17 | }, 18 | 19 | }) -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/service/PUserService.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.service; 2 | 3 | import com.cn.psychological.entity.PUser; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | import com.cn.psychological.utils.page.PageResult; 6 | 7 | /** 8 | *

9 | * 用户信息表 服务类 10 | *

11 | */ 12 | public interface PUserService extends IService { 13 | 14 | PageResult pageQuery(int page, int limit, PUser data); 15 | } 16 | -------------------------------------------------------------------------------- /wx/app.js: -------------------------------------------------------------------------------- 1 | // app.js 2 | App({ 3 | onLaunch() { 4 | // 展示本地存储能力 5 | const logs = wx.getStorageSync('logs') || [] 6 | logs.unshift(Date.now()) 7 | wx.setStorageSync('logs', logs) 8 | 9 | // 登录 10 | wx.login({ 11 | success: res => { 12 | // 发送 res.code 到后台换取 openId, sessionKey, unionId 13 | } 14 | }) 15 | }, 16 | globalData: { 17 | version: '大学生心理咨询平台v1.0', 18 | baseURL: "http://127.0.0.1:9999/", 19 | } 20 | }) 21 | -------------------------------------------------------------------------------- /wx/pages/answer_list/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 心理评测记录 6 | 7 | 8 | {{item.createTime}} 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 大学生心理咨询管理系统 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /wx/images/icon_arrow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/service/PNoticeService.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.service; 2 | 3 | import com.cn.psychological.entity.PNotice; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | import com.cn.psychological.utils.page.PageResult; 6 | 7 | /** 8 | *

9 | * 通知公告信息表 服务类 10 | *

11 | */ 12 | public interface PNoticeService extends IService { 13 | 14 | PageResult pageQuery(int page, int limit, PNotice data); 15 | } 16 | -------------------------------------------------------------------------------- /web/src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | import settings from './modules/settings' 4 | import app from './modules/app' 5 | import user from './modules/user' 6 | import getters from './getters' 7 | import permission from '@/store/modules/permission' 8 | Vue.use(Vuex) 9 | 10 | const store = new Vuex.Store({ 11 | modules: { 12 | app, 13 | settings, 14 | user, 15 | permission 16 | }, 17 | getters 18 | }) 19 | 20 | export default store 21 | -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/mapper/PReplyMapper.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.mapper; 2 | 3 | import com.cn.psychological.entity.PReply; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | *

10 | * 咨询信息表 Mapper 接口 11 | *

12 | */ 13 | public interface PReplyMapper extends BaseMapper { 14 | 15 | List pageQuery(PReply pReply); 16 | 17 | List getList(PReply pReply); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /web/src/icons/svg/example.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /wx/pages/answer/index.wxss: -------------------------------------------------------------------------------- 1 | /* pages/test/test.wxss */ 2 | page { 3 | background-color: #fff; 4 | } 5 | .page { 6 | padding: 20rpx; 7 | } 8 | .page__bd { 9 | padding: 20rpx; 10 | } 11 | .my-choosebox { 12 | display: block; 13 | margin-bottom: 20rpx; 14 | } 15 | .toindex-btn { 16 | margin-top: 20rpx; 17 | display:inline-block; 18 | line-height:2.3; 19 | font-size:13px; 20 | padding:0 1.34em; 21 | color: red; 22 | } 23 | .page .radio-group, .page .checkbox-group { 24 | display: block; 25 | } -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/service/FileService.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.service; 2 | 3 | import org.springframework.web.multipart.MultipartFile; 4 | 5 | import java.io.IOException; 6 | 7 | public interface FileService { 8 | 9 | 10 | /** 11 | * 上传文件 12 | * @param multipartFile 13 | * @param fileName 14 | * @return 15 | * @throws IOException 16 | */ 17 | boolean uploadFile(MultipartFile multipartFile, String fileName)throws IOException; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/mapper/PKnowledgeMapper.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.mapper; 2 | 3 | import com.cn.psychological.entity.PKnowledge; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | *

10 | * 心理知识信息表 Mapper 接口 11 | *

12 | */ 13 | public interface PKnowledgeMapper extends BaseMapper { 14 | 15 | List pageQuery(PKnowledge data); 16 | 17 | List getList(); 18 | 19 | PKnowledge getOneById(String id); 20 | } 21 | -------------------------------------------------------------------------------- /wx/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 | module.exports = { 18 | formatTime 19 | } 20 | -------------------------------------------------------------------------------- /wx/pages/answer_info/index.wxss: -------------------------------------------------------------------------------- 1 | @import "/style/icon.wxss"; 2 | @import "/style/colorui.wxss"; 3 | page { 4 | background-color: #fff; 5 | } 6 | .page { 7 | padding: 30rpx; 8 | } 9 | .mw-avatar { 10 | width: 128rpx; 11 | height: 128rpx; 12 | border-radius: 50%; 13 | overflow: hidden; 14 | } 15 | .page-score { 16 | display: flex; 17 | justify-content: center; 18 | align-items: flex-end; 19 | padding-top:20rpx; 20 | } 21 | .score-num { 22 | font-size:100rpx; 23 | } 24 | .page-footer { 25 | margin-top:30rpx; 26 | text-align: center; 27 | } -------------------------------------------------------------------------------- /wx/utils/help.js: -------------------------------------------------------------------------------- 1 | function show(msg){ 2 | wx.showToast({ 3 | title: msg, 4 | icon: 'none', 5 | duration: 2000 6 | }) 7 | } 8 | function okShow(msg){ 9 | wx.showToast({ 10 | title: msg, 11 | icon: 'success', 12 | duration: 2000 13 | }) 14 | } 15 | 16 | 17 | 18 | /** 19 | * module.exports用来导出代码 20 | * js文件中通过var help = require("../util/help.js") 加载 21 | * 在引入引入文件的时候" "里面的内容通过../../../这种类型,小程序的编译器会自动提示,因为你可能 22 | * 项目目录不止一级,不同的js文件对应的工具类的位置不一样 23 | */ 24 | module.exports.show = show; 25 | module.exports.okShow = okShow; 26 | -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/service/PReplyService.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.service; 2 | 3 | import com.cn.psychological.entity.PReply; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | import com.cn.psychological.utils.page.PageResult; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | *

11 | * 咨询信息表 服务类 12 | *

13 | */ 14 | public interface PReplyService extends IService { 15 | 16 | PageResult pageQuery(int page, int limit, PReply data); 17 | 18 | List getList(PReply pReply); 19 | } 20 | -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/WorkOrderApplication.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological; 2 | 3 | import org.mybatis.spring.annotation.MapperScan; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | 7 | /** 8 | * 项目启动类 9 | **/ 10 | @MapperScan("com.cn.psychological.mapper") // 配置包扫描 11 | @SpringBootApplication 12 | public class WorkOrderApplication { 13 | 14 | public static void main(String[] args) { 15 | SpringApplication.run(WorkOrderApplication.class); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/mapper/PFavoriteMapper.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.mapper; 2 | 3 | import com.cn.psychological.entity.PFavorite; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | *

11 | * 收藏信息表 Mapper 接口 12 | *

13 | */ 14 | public interface PFavoriteMapper extends BaseMapper { 15 | 16 | List pageQuery(PFavorite data); 17 | 18 | List favoriteListByUserId(@Param("userId") String userId); 19 | } 20 | -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/service/PFavoriteService.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.service; 2 | 3 | import com.cn.psychological.entity.PFavorite; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | import com.cn.psychological.utils.page.PageResult; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | *

11 | * 收藏信息表 服务类 12 | *

13 | */ 14 | public interface PFavoriteService extends IService { 15 | 16 | PageResult pageQuery(int page, int limit, PFavorite data); 17 | 18 | List favoriteListByUserId(String userId); 19 | } 20 | -------------------------------------------------------------------------------- /wx/pages/login/index.wxss: -------------------------------------------------------------------------------- 1 | /* --- header --- */ 2 | .login-header{background: #5460FE; text-align: center; padding: 40rpx 0; height: 28vh;} 3 | .login-header .logo image{width: 450rpx; height: 200rpx;} 4 | .login-header .title{font-size: 50rpx; color: #fff; font-weight: bolder; margin-bottom: 8rpx;} 5 | .login-header .eng{font-size: 28rpx; font-family: din; color: #fff;} 6 | .login-header .back{position: absolute; right: 0; top: 0;} 7 | .login-header .back image{width: 682rpx; height: 950rpx;} 8 | 9 | /* --- copyright --- */ 10 | .login-copyright{height: 5vh; text-align: center; font-size: 24rpx; color: #ccc;} -------------------------------------------------------------------------------- /web/src/icons/svg/table.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /wx/pages/notice/index.js: -------------------------------------------------------------------------------- 1 | var call = require("../../utils/request.js") 2 | var help = require("../../utils/help.js") 3 | 4 | Page({ 5 | 6 | /** 7 | * 页面的初始数据 8 | */ 9 | data: { 10 | list:[] 11 | }, 12 | onLoad: function () { 13 | this.getInit(); 14 | }, 15 | getInit(){ 16 | call.getData('wx/getNotice' , this.onSuccessclassAll, this.onFaiclassAll); 17 | }, 18 | onSuccessclassAll(res) { 19 | if(res.code == 20000){ 20 | this.setData({ 21 | list:res.data.row 22 | }) 23 | } 24 | }, 25 | onFaiclassAll() { 26 | help.show("网络请求失败"); 27 | } 28 | }) 29 | -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/service/PKnowledgeService.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.service; 2 | 3 | import com.cn.psychological.entity.PKnowledge; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | import com.cn.psychological.utils.page.PageResult; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | *

11 | * 心理知识信息表 服务类 12 | *

13 | */ 14 | public interface PKnowledgeService extends IService { 15 | 16 | PageResult pageQuery(int page, int limit, PKnowledge data); 17 | 18 | List getList(); 19 | 20 | 21 | PKnowledge getOneById(String id); 22 | } 23 | -------------------------------------------------------------------------------- /web/src/icons/svg/password.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/src/views/layout/components/Sidebar/Item.vue: -------------------------------------------------------------------------------- 1 | 30 | -------------------------------------------------------------------------------- /web/src/icons/svg/index.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /wx/pages/answer_list/index.wxss: -------------------------------------------------------------------------------- 1 | @import "/style/icon.wxss"; 2 | @import "/style/colorui.wxss"; 3 | page{ 4 | background-color: #fff; 5 | } 6 | 7 | 8 | .container { 9 | height: 100%; 10 | display: flex; 11 | flex-direction: column; 12 | align-items: center; 13 | justify-content: space-between; 14 | padding: 200rpx 0; 15 | box-sizing: border-box; 16 | } 17 | .mw-weixin.text-center { 18 | color: rgb(238, 238, 238); 19 | padding: 30rpx 0 0; 20 | } 21 | .bg-red { 22 | background-color: #FEAE82; 23 | color: #851000; 24 | } 25 | .text-red, .line-red, .lines-red { 26 | color: #FEAE82; 27 | } 28 | .line-red::after, .lines-red::after { 29 | border-color: #FEAE82; 30 | } -------------------------------------------------------------------------------- /wx/images/icon_rule.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /wx/pages/counselor/index.js: -------------------------------------------------------------------------------- 1 | var call = require("../../utils/request.js") 2 | var help = require("../../utils/help.js") 3 | 4 | Page({ 5 | 6 | data: { 7 | counselorList:[] 8 | }, 9 | onLoad: function () { 10 | this.getCounselorList(); 11 | }, 12 | // 查询所有咨询师 13 | getCounselorList(){ 14 | call.getData('wx/getCounselor' , this.onSuccessCounselorAll, this.onFaiCounselorAll); 15 | }, 16 | onSuccessCounselorAll(res) { 17 | if(res.code == 20000){ 18 | this.setData({ 19 | counselorList:res.data.row 20 | }) 21 | } 22 | }, 23 | onFaiCounselorAll() { 24 | help.show("网络请求失败"); 25 | }, 26 | 27 | }) -------------------------------------------------------------------------------- /web/src/api/result.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | export function pageQuery(page, limit, data) { 4 | return request({ 5 | url: `/p-result/pageQuery/${page}/${limit}`, 6 | method: 'post', 7 | data: data 8 | }) 9 | } 10 | export function deleteById(id) { 11 | return request({ 12 | url: `/p-result/deleteById/${id}`, 13 | method: 'delete' 14 | }) 15 | } 16 | export function update(data){ 17 | return request({ 18 | url: `/p-result/update`, 19 | method: 'put', 20 | data: data 21 | }) 22 | } 23 | export function getTypeHistogram(){ 24 | return request({ 25 | url: `/p-result/getTypeHistogram`, 26 | method: 'get' 27 | }) 28 | } 29 | 30 | -------------------------------------------------------------------------------- /wx/project.private.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", 3 | "projectname": "wx", 4 | "setting": { 5 | "compileHotReLoad": true 6 | }, 7 | "condition": { 8 | "miniprogram": { 9 | "list": [ 10 | { 11 | "name": "", 12 | "pathName": "pages/answer_info/index", 13 | "query": "id=12121", 14 | "launchMode": "default", 15 | "scene": null 16 | } 17 | ] 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /web/src/api/notice.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | export function pageQuery(page, limit, data) { 4 | return request({ 5 | url: `/p-notice/pageQuery/${page}/${limit}`, 6 | method: 'post', 7 | data: data 8 | }) 9 | } 10 | export function deleteById(id) { 11 | return request({ 12 | url: `/p-notice/deleteById/${id}`, 13 | method: 'delete' 14 | }) 15 | } 16 | export function insert(data){ 17 | return request({ 18 | url: `/p-notice/insert`, 19 | method: 'post', 20 | data: data 21 | }) 22 | } 23 | 24 | export function update(data){ 25 | return request({ 26 | url: `/p-notice/update`, 27 | method: 'put', 28 | data: data 29 | }) 30 | } 31 | -------------------------------------------------------------------------------- /wx/pages/knowledge/index.js: -------------------------------------------------------------------------------- 1 | var call = require("../../utils/request.js") 2 | var help = require("../../utils/help.js") 3 | 4 | Page({ 5 | 6 | data: { 7 | knowledgeList:[], 8 | }, 9 | onLoad: function () { 10 | this.getKnowledgeList(); 11 | }, 12 | 13 | 14 | // 查询所有课程类别 15 | getKnowledgeList(){ 16 | call.getData('wx/getKnowledge' , this.onSuccessKnowledgeAll, this.onFaiKnowledgeAll); 17 | }, 18 | onSuccessKnowledgeAll(res) { 19 | if(res.code == 20000){ 20 | this.setData({ 21 | knowledgeList:res.data.row 22 | }) 23 | } 24 | }, 25 | 26 | onFaiKnowledgeAll() { 27 | help.show("网络请求失败"); 28 | } 29 | }) -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/service/PResultService.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.service; 2 | 3 | import com.baomidou.mybatisplus.extension.service.IService; 4 | import com.cn.psychological.entity.PResult; 5 | import com.cn.psychological.utils.page.PageResult; 6 | 7 | import java.util.List; 8 | import java.util.Map; 9 | 10 | /** 11 | *

12 | * 评测结果表 服务类 13 | *

14 | */ 15 | public interface PResultService extends IService { 16 | 17 | PageResult pageQuery(int page, int limit, PResult data); 18 | 19 | List< Map> getThisMonthDay(String userId); 20 | 21 | List> getTypeHistogram(); 22 | 23 | Integer getScoreLimit0(String userId); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /wx/.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 | -------------------------------------------------------------------------------- /wx/images/tabbar_01_active.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /wx/images/icon_close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /web/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | import 'normalize.css/normalize.css' // A modern alternative to CSS resets 4 | 5 | import ElementUI from 'element-ui' 6 | import 'element-ui/lib/theme-chalk/index.css' 7 | import locale from 'element-ui/lib/locale/lang/zh-CN' // lang i18n 8 | 9 | import '@/styles/index.scss' // global css 10 | 11 | import App from './App' 12 | import router from './router' 13 | import store from './store' 14 | 15 | import '@/icons' // icon 16 | import '@/permission' // permission control 17 | import echarts from 'echarts' 18 | 19 | Vue.use(ElementUI, { locale,echarts }) 20 | 21 | Vue.config.productionTip = false 22 | 23 | new Vue({ 24 | el: '#app', 25 | router, 26 | store, 27 | render: h => h(App) 28 | }) 29 | -------------------------------------------------------------------------------- /web/src/store/modules/settings.js: -------------------------------------------------------------------------------- 1 | import defaultSettings from '@/settings' 2 | 3 | const { showSettings, fixedHeader, sidebarLogo } = defaultSettings 4 | 5 | const state = { 6 | showSettings: showSettings, 7 | fixedHeader: fixedHeader, 8 | sidebarLogo: sidebarLogo 9 | } 10 | 11 | const mutations = { 12 | CHANGE_SETTING: (state, { key, value }) => { 13 | // eslint-disable-next-line no-prototype-builtins 14 | if (state.hasOwnProperty(key)) { 15 | state[key] = value 16 | } 17 | } 18 | } 19 | 20 | const actions = { 21 | changeSetting({ commit }, data) { 22 | commit('CHANGE_SETTING', data) 23 | } 24 | } 25 | 26 | export default { 27 | namespaced: true, 28 | state, 29 | mutations, 30 | actions 31 | } 32 | 33 | -------------------------------------------------------------------------------- /web/src/views/layout/components/AppMain.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 21 | 22 | 30 | -------------------------------------------------------------------------------- /wx/pages/register/index.wxss: -------------------------------------------------------------------------------- 1 | /* --- logo --- */ 2 | .register-logo {text-align: center; background: #5460FE; height: 120rpx; position: relative; z-index: 1;} 3 | .register-logo .box{width: 200rpx; height: 200rpx; border-radius: 100rpx; background: #fff; margin: 0 auto;} 4 | .register-logo .box image{width: 262rpx; height: 176rpx; margin-left: -30rpx;} 5 | 6 | 7 | 8 | /* --- column --- */ 9 | .register-column{text-align: center; padding: 20rpx 0;} 10 | .register-column .title{font-size: 64rpx; font-weight: bold;} 11 | .register-column .dep{color: #979797; opacity: .4; font-family: 'DIN-Bold';} 12 | 13 | 14 | 15 | /* --- box --- */ 16 | .register-box{background: #fff; border-radius: 32rpx 32rpx 0 0; margin-top: -20rpx; position: relative; z-index:0;} 17 | 18 | -------------------------------------------------------------------------------- /web/vue.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | module.exports = { 3 | chainWebpack: config => { 4 | // 给svg规则增加⼀个排除选项 5 | config.module 6 | .rule('svg') 7 | .exclude.add(path.resolve(__dirname, './src/icons')) 8 | 9 | // 新增icons规则,设置svg-sprite-loader处理icons⽬录中的svg 10 | config.module 11 | .rule('icons') 12 | .test(/\.svg$/) 13 | .include.add(path.resolve(__dirname, './src/icons')) 14 | .end() 15 | .use('svg-sprite-loader') 16 | .loader('svg-sprite-loader') 17 | .options({ symbolId: 'icon-[name]' }) 18 | .end() 19 | .use('svgo-loader') 20 | .loader('svgo-loader') 21 | 22 | // config.resolve.alias.set('@img', path.resolve(__dirname, 'src/assets/img/')) 23 | }, 24 | } 25 | 26 | -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/utils/mybatisplus/MyMetaObjectHandler.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.utils.mybatisplus; 2 | 3 | import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; 4 | import org.apache.ibatis.reflection.MetaObject; 5 | import org.springframework.stereotype.Component; 6 | 7 | import java.util.Date; 8 | 9 | /** 10 | * 配置mybatisplus自动封装日期类 11 | */ 12 | @Component 13 | public class MyMetaObjectHandler implements MetaObjectHandler { 14 | 15 | 16 | @Override 17 | public void insertFill(MetaObject metaObject) { 18 | // 参数是属性名字 19 | this.setFieldValByName("createTime", new Date(), metaObject); 20 | } 21 | 22 | @Override 23 | public void updateFill(MetaObject metaObject) { 24 | 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /web/src/api/reply.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | export function pageQuery(page, limit, data) { 4 | return request({ 5 | url: `/p-reply/pageQuery/${page}/${limit}`, 6 | method: 'post', 7 | data: data 8 | }) 9 | } 10 | export function deleteById(data) { 11 | return request({ 12 | url: `/p-reply/deleteById`, 13 | method: 'delete', 14 | data:data 15 | }) 16 | } 17 | export function sendReply(data) { 18 | return request({ 19 | url: `/p-reply/sendReply`, 20 | method: 'post', 21 | data: data 22 | }) 23 | } 24 | 25 | export function getReply(userId, counselorId, flag) { 26 | return request({ 27 | url: `/p-reply/getReply?userId=${userId}&counselorId=${counselorId}&flag=${flag}`, 28 | method: 'get' 29 | }) 30 | } 31 | -------------------------------------------------------------------------------- /web/src/icons/svg/ck.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /wx/pages/answer_info/index.js: -------------------------------------------------------------------------------- 1 | // pages/results/results.js 2 | const app = getApp(); 3 | var call = require("../../utils/request.js") 4 | var help = require("../../utils/help.js") 5 | Page({ 6 | data: { 7 | item:{} 8 | }, 9 | 10 | onLoad(options) { 11 | call.getData('wx/getResultById/' + options.id , this.onSuccessAll, this.onFaiAll); 12 | }, 13 | 14 | onSuccessAll(res) { 15 | if (res.code == 20000) { 16 | this.setData({ 17 | item: res.data.data 18 | }) 19 | } 20 | }, 21 | onFaiAll() { 22 | help.show("网络请求失败"); 23 | }, 24 | 25 | // 再答一次 26 | toDoTestAgain(){ 27 | wx.reLaunch({ 28 | url: '../answer/index' 29 | }) 30 | }, 31 | 32 | // 返回首页 33 | toIndex(){ 34 | wx.reLaunch({ 35 | url: '../index/index' 36 | }) 37 | }, 38 | }) -------------------------------------------------------------------------------- /wx/pages/notice_info/index.js: -------------------------------------------------------------------------------- 1 | var call = require("../../utils/request.js") 2 | var help = require("../../utils/help.js") 3 | 4 | Page({ 5 | 6 | /** 7 | * 页面的初始数据 8 | */ 9 | data: { 10 | 11 | title:"", 12 | content:"" 13 | 14 | }, 15 | 16 | onLoad: function (options) { 17 | const {id} = options; 18 | this.getInfo(id); 19 | }, 20 | getInfo(id){ 21 | call.getData('wx/getNoticeById?id='+id , this.onSuccessclassAll, this.onFaiclassAll); 22 | }, 23 | onSuccessclassAll(res) { 24 | if(res.code == 20000){ 25 | this.setData({ 26 | title :res.data.row.title, 27 | content :res.data.row.content, 28 | createTime :res.data.row.createTime 29 | }) 30 | } 31 | }, 32 | onFaiclassAll() { 33 | help.show("网络请求失败"); 34 | }, 35 | }) -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/mapper/PResultMapper.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.cn.psychological.entity.PReply; 5 | import com.cn.psychological.entity.PResult; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | import java.util.List; 9 | import java.util.Map; 10 | 11 | /** 12 | *

13 | * 评测结果表 Mapper 接口 14 | *

15 | */ 16 | public interface PResultMapper extends BaseMapper { 17 | 18 | List pageQuery(PResult pReply); 19 | 20 | List< Map> getThisMonthDay(@Param("userId") String userId,@Param("thisMonth") String thisMonth); 21 | 22 | List> getTypeHistogram(); 23 | 24 | Integer getScoreLimit0(@Param("userId")String userId); 25 | } 26 | -------------------------------------------------------------------------------- /web/src/icons/svg/nested.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/src/views/layout/components/Sidebar/Link.vue: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 40 | -------------------------------------------------------------------------------- /wx/images/tabbar_03_active.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /web/src/api/knowledge.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | export function pageQuery(page, limit, data) { 4 | return request({ 5 | url: `/p-knowledge/pageQuery/${page}/${limit}`, 6 | method: 'post', 7 | data: data 8 | }) 9 | } 10 | export function deleteById(id) { 11 | return request({ 12 | url: `/p-knowledge/deleteById/${id}`, 13 | method: 'delete' 14 | }) 15 | } 16 | export function insert(data){ 17 | return request({ 18 | url: `/p-knowledge/insert`, 19 | method: 'post', 20 | data: data 21 | }) 22 | } 23 | 24 | export function update(data){ 25 | return request({ 26 | url: `/p-knowledge/update`, 27 | method: 'put', 28 | data: data 29 | }) 30 | } 31 | 32 | export function getKnowledgeAll(){ 33 | return request({ 34 | url: `/p-knowledge/getKnowledgeAll`, 35 | method: 'get' 36 | }) 37 | } 38 | -------------------------------------------------------------------------------- /wx/pages/answer_info/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 心理评测 7 | 8 | 共10题 9 | 10 | {{item.score}}分 11 | 12 | {{item.type}} 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /wx/images/icon-notice.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /wx/pages/notice/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{item.title}} 9 | {{item.createTime}} 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 暂无通知 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /web/src/icons/svg/tj.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /wx/pages/favorite/index.js: -------------------------------------------------------------------------------- 1 | var call = require("../../utils/request.js") 2 | var help = require("../../utils/help.js") 3 | 4 | Page({ 5 | 6 | data: { 7 | knowledgeList: [], 8 | }, 9 | onLoad: function () { 10 | this.getKnowledgeList(); 11 | }, 12 | 13 | // 查询所有课程类别 14 | getKnowledgeList() { 15 | let userId = wx.getStorageSync("token") 16 | // 用户信息不存在跳转登录页面 17 | if (userId == null || userId == undefined || userId == '') { 18 | // 跳转到登录页面 19 | wx.reLaunch({ 20 | url: '/pages/login/index' 21 | }) 22 | } 23 | call.getData('wx/appointmentFavoriteList/' + userId, this.onSuccessKnowledgeAll, this.onFaiKnowledgeAll); 24 | 25 | }, 26 | 27 | onSuccessKnowledgeAll(res) { 28 | if (res.code == 20000) { 29 | this.setData({ 30 | knowledgeList: res.data.row 31 | }) 32 | } 33 | }, 34 | 35 | onFaiKnowledgeAll() { 36 | help.show("网络请求失败"); 37 | } 38 | }) -------------------------------------------------------------------------------- /web/src/icons/svg/eye.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/src/views/layout/components/Sidebar/index.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 36 | -------------------------------------------------------------------------------- /wx/pages/online_counsel/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{item.content}} 9 | 10 | 11 | 12 | 13 | 14 | {{item.content}} 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 发送 26 | 27 | 28 | -------------------------------------------------------------------------------- /web/src/utils/validate.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by jiachenpan on 16/11/18. 3 | */ 4 | 5 | export function isvalidUsername(str) { 6 | const valid_map = ['admin', 'editor'] 7 | return valid_map.indexOf(str.trim()) >= 0 8 | } 9 | 10 | /* 合法uri*/ 11 | export function validateURL(textval) { 12 | const urlregex = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/ 13 | return urlregex.test(textval) 14 | } 15 | 16 | /* 小写字母*/ 17 | export function validateLowerCase(str) { 18 | const reg = /^[a-z]+$/ 19 | return reg.test(str) 20 | } 21 | 22 | /* 大写字母*/ 23 | export function validateUpperCase(str) { 24 | const reg = /^[A-Z]+$/ 25 | return reg.test(str) 26 | } 27 | 28 | /* 大小写字母*/ 29 | export function validatAlphabets(str) { 30 | const reg = /^[A-Za-z]+$/ 31 | return reg.test(str) 32 | } 33 | -------------------------------------------------------------------------------- /wx/pages/answer_list/index.js: -------------------------------------------------------------------------------- 1 | 2 | //获取应用实例 3 | 4 | const app = getApp() 5 | var call = require("../../utils/request.js") 6 | var help = require("../../utils/help.js") 7 | Page({ 8 | data: { 9 | historyList: [] 10 | }, 11 | 12 | onLoad() { 13 | this.getInit(); 14 | }, 15 | getInit() { 16 | let userId = wx.getStorageSync("token") 17 | // 用户信息不存在跳转登录页面 18 | if (userId == null || userId == undefined || userId == '') { 19 | // 跳转到登录页面 20 | wx.reLaunch({ 21 | url: '/pages/login/index' 22 | }) 23 | } 24 | 25 | call.getData('wx/getResultByUserId/' + userId , this.onSuccessAll, this.onFaiAll); 26 | }, 27 | 28 | onSuccessAll(res) { 29 | if (res.code == 20000) { 30 | this.setData({ 31 | historyList: res.data.data 32 | }) 33 | } 34 | }, 35 | onFaiAll() { 36 | help.show("网络请求失败"); 37 | }, 38 | 39 | goToResult(event){ 40 | const { id } = event.currentTarget.dataset; 41 | wx.navigateTo({ 42 | url: '../answer_info/index?id=' + id 43 | }) 44 | }, 45 | }) 46 | -------------------------------------------------------------------------------- /wx/images/icon_good.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /wx/pages/updatePassword/index.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 | 29 | -------------------------------------------------------------------------------- /wx/pages/counselor/index.wxss: -------------------------------------------------------------------------------- 1 | page{background: #F4F6FA;} 2 | .active{color: #FF4C4C;} 3 | .scroll_box{ 4 | width: 100%; 5 | height: 50rpx; 6 | overflow: hidden; 7 | padding: 20rpx; 8 | background: #fff; 9 | white-space: nowrap; 10 | } 11 | .scroll_box scroll-view{ 12 | height: 100%; 13 | width: auto; 14 | overflow:hidden; 15 | } 16 | .item_list{ 17 | height: 100%; 18 | margin-right: 23rpx; 19 | display: inline-block; 20 | margin-left: 10px; 21 | } 22 | /* --- list --- */ 23 | .exchange_list__item{background: #fff; padding: 32rpx; margin-bottom: 16rpx; border-bottom: 1rpx solid #efefef;} 24 | .exchange_list__image{width: 160rpx; height: 160rpx;} 25 | .exchange_list__content{width: 65%; margin-left: 25rpx;} 26 | .exchange_list__title{font-size: 28rpx; margin-bottom: 8rpx; height: 70rpx; line-height: 35rpx; overflow: hidden;} 27 | .exchange_list__info{font-size: 24rpx; color: #999;} 28 | .exchange_list__info text{color: #FF4C4C; font-family: din; font-size: 32rpx;} 29 | .exchange_list__icon{width: 32rpx; height: 32rpx; margin-left: auto;} -------------------------------------------------------------------------------- /wx/pages/favorite/index.wxss: -------------------------------------------------------------------------------- 1 | page{background: #F4F6FA;} 2 | .active{color: #FF4C4C;} 3 | .scroll_box{ 4 | width: 100%; 5 | height: 50rpx; 6 | overflow: hidden; 7 | padding: 20rpx; 8 | background: #fff; 9 | white-space: nowrap; 10 | } 11 | .scroll_box scroll-view{ 12 | height: 100%; 13 | width: auto; 14 | overflow:hidden; 15 | } 16 | .item_list{ 17 | height: 100%; 18 | margin-right: 23rpx; 19 | display: inline-block; 20 | margin-left: 10px; 21 | } 22 | /* --- list --- */ 23 | .exchange_list__item{background: #fff; padding: 32rpx; margin-bottom: 16rpx; border-bottom: 1rpx solid #efefef;} 24 | .exchange_list__image{width: 160rpx; height: 160rpx;} 25 | .exchange_list__content{width: 65%; margin-left: 25rpx;} 26 | .exchange_list__title{font-size: 28rpx; margin-bottom: 8rpx; height: 70rpx; line-height: 35rpx; overflow: hidden;} 27 | .exchange_list__info{font-size: 24rpx; color: #999;} 28 | .exchange_list__info text{color: #FF4C4C; font-family: din; font-size: 32rpx;} 29 | .exchange_list__icon{width: 32rpx; height: 32rpx; margin-left: auto;} -------------------------------------------------------------------------------- /wx/pages/knowledge/index.wxss: -------------------------------------------------------------------------------- 1 | page{background: #F4F6FA;} 2 | .active{color: #FF4C4C;} 3 | .scroll_box{ 4 | width: 100%; 5 | height: 50rpx; 6 | overflow: hidden; 7 | padding: 20rpx; 8 | background: #fff; 9 | white-space: nowrap; 10 | } 11 | .scroll_box scroll-view{ 12 | height: 100%; 13 | width: auto; 14 | overflow:hidden; 15 | } 16 | .item_list{ 17 | height: 100%; 18 | margin-right: 23rpx; 19 | display: inline-block; 20 | margin-left: 10px; 21 | } 22 | /* --- list --- */ 23 | .exchange_list__item{background: #fff; padding: 32rpx; margin-bottom: 16rpx; border-bottom: 1rpx solid #efefef;} 24 | .exchange_list__image{width: 160rpx; height: 160rpx;} 25 | .exchange_list__content{width: 65%; margin-left: 25rpx;} 26 | .exchange_list__title{font-size: 28rpx; margin-bottom: 8rpx; height: 70rpx; line-height: 35rpx; overflow: hidden;} 27 | .exchange_list__info{font-size: 24rpx; color: #999;} 28 | .exchange_list__info text{color: #FF4C4C; font-family: din; font-size: 32rpx;} 29 | .exchange_list__icon{width: 32rpx; height: 32rpx; margin-left: auto;} -------------------------------------------------------------------------------- /web/src/views/portrayal/index.vue: -------------------------------------------------------------------------------- 1 | 7 | 45 | -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/service/impl/PNoticeServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.service.impl; 2 | 3 | import com.cn.psychological.entity.PNotice; 4 | import com.cn.psychological.mapper.PNoticeMapper; 5 | import com.cn.psychological.service.PNoticeService; 6 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 7 | import com.cn.psychological.utils.page.PageResult; 8 | import com.github.pagehelper.PageHelper; 9 | import com.github.pagehelper.PageInfo; 10 | import org.springframework.stereotype.Service; 11 | 12 | import java.util.List; 13 | 14 | /** 15 | *

16 | * 通知公告信息表 服务实现类 17 | *

18 | */ 19 | @Service 20 | public class PNoticeServiceImpl extends ServiceImpl implements PNoticeService { 21 | 22 | @Override 23 | public PageResult pageQuery(int page, int limit, PNotice data) { 24 | PageHelper.startPage(page, limit); 25 | List queryList = baseMapper.pageQuery(data); 26 | PageInfo pageInfo = new PageInfo<>(queryList); 27 | return new PageResult<>(pageInfo.getTotal(), queryList); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/service/impl/FileServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.service.impl; 2 | import com.cn.psychological.service.FileService; 3 | import org.springframework.stereotype.Service; 4 | import org.springframework.web.multipart.MultipartFile; 5 | 6 | import java.io.File; 7 | import java.io.IOException; 8 | 9 | @Service 10 | public class FileServiceImpl implements FileService { 11 | 12 | 13 | 14 | public boolean uploadFile(MultipartFile multipartFile, String fileName)throws IOException { 15 | File fileDir = new File(System.getProperty("user.dir")+"\\image"); 16 | if (!fileDir.exists()) { 17 | if (!fileDir.mkdirs()) { 18 | return false; 19 | } 20 | } 21 | File file = new File(fileDir.getAbsolutePath() +"/"+fileName); 22 | if (file.exists()) { 23 | if (!file.delete()) { 24 | return false; 25 | } 26 | } 27 | if (file.createNewFile()) { 28 | multipartFile.transferTo(file); 29 | return true; 30 | } 31 | return false; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /wx/images/weixin_2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/service/impl/PUserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.service.impl; 2 | 3 | import com.cn.psychological.entity.PUser; 4 | import com.cn.psychological.entity.PUser; 5 | import com.cn.psychological.mapper.PUserMapper; 6 | import com.cn.psychological.service.PUserService; 7 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 8 | import com.cn.psychological.utils.page.PageResult; 9 | import com.github.pagehelper.PageHelper; 10 | import com.github.pagehelper.PageInfo; 11 | import org.springframework.stereotype.Service; 12 | 13 | import java.util.List; 14 | 15 | /** 16 | *

17 | * 用户信息表 服务实现类 18 | *

19 | */ 20 | @Service 21 | public class PUserServiceImpl extends ServiceImpl implements PUserService { 22 | 23 | @Override 24 | public PageResult pageQuery(int page, int limit, PUser data) { 25 | PageHelper.startPage(page, limit); 26 | List queryList = baseMapper.pageQuery(data); 27 | PageInfo pageInfo = new PageInfo<>(queryList); 28 | return new PageResult<>(pageInfo.getTotal(), queryList); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /web/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017-present PanJiaChen 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 | -------------------------------------------------------------------------------- /wx/images/icon_zhuce.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /wx/pages/answer/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 第{{index+1}}题 5 | 共20题 6 | 7 | 8 | 9 | 10 | {{questionList[index].question}} 11 | 12 | 13 | 14 | 15 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /wx/images/vajra_02.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /web/src/views/layout/mixin/ResizeHandler.js: -------------------------------------------------------------------------------- 1 | import store from '@/store' 2 | 3 | const { body } = document 4 | const WIDTH = 1024 5 | const RATIO = 3 6 | 7 | export default { 8 | watch: { 9 | $route(route) { 10 | if (this.device === 'mobile' && this.sidebar.opened) { 11 | store.dispatch('CloseSideBar', { withoutAnimation: false }) 12 | } 13 | } 14 | }, 15 | beforeMount() { 16 | window.addEventListener('resize', this.resizeHandler) 17 | }, 18 | mounted() { 19 | const isMobile = this.isMobile() 20 | if (isMobile) { 21 | store.dispatch('ToggleDevice', 'mobile') 22 | store.dispatch('CloseSideBar', { withoutAnimation: true }) 23 | } 24 | }, 25 | methods: { 26 | isMobile() { 27 | const rect = body.getBoundingClientRect() 28 | return rect.width - RATIO < WIDTH 29 | }, 30 | resizeHandler() { 31 | if (!document.hidden) { 32 | const isMobile = this.isMobile() 33 | store.dispatch('ToggleDevice', isMobile ? 'mobile' : 'desktop') 34 | 35 | if (isMobile) { 36 | store.dispatch('CloseSideBar', { withoutAnimation: true }) 37 | } 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /web/src/icons/svg/bm.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /wx/images/user_panel_07.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /wx/pages/index/index.js: -------------------------------------------------------------------------------- 1 | var call = require("../../utils/request.js") 2 | var help = require("../../utils/help.js") 3 | 4 | 5 | Page({ 6 | data: { 7 | // --- 轮播图 --- // 8 | bannerList: [ 9 | '/images/button2.png','/images/button1.png' 10 | ], 11 | // --- 通知 --- // 12 | noticeList: [], 13 | // --- 心理知识--- // 14 | knowledgeList: [] 15 | }, 16 | onLoad: function () { 17 | this.getHome(); 18 | this.getInit(); 19 | 20 | }, 21 | /** 22 | * 获取登录用户信息 23 | */ 24 | getInit() { 25 | let userId = wx.getStorageSync("token") 26 | // 用户信息不存在跳转登录页面 27 | if (userId == null || userId == undefined || userId == '') { 28 | // 跳转到登录页面 29 | wx.reLaunch({ 30 | url: '/pages/login/index' 31 | }) 32 | } 33 | }, 34 | // 获取班级列表 35 | getHome() { 36 | call.getData('wx/getHome', this.onSuccessclassAll, this.onFaiclassAll); 37 | }, 38 | onSuccessclassAll(res) { 39 | if (res.code == 20000) { 40 | this.setData({ 41 | noticeList: res.data.row.notices, 42 | knowledgeList: res.data.row.knowledges 43 | }) 44 | } 45 | }, 46 | onFaiclassAll() { 47 | help.show("网络请求失败"); 48 | }, 49 | 50 | 51 | 52 | 53 | }) 54 | -------------------------------------------------------------------------------- /web/src/store/modules/app.js: -------------------------------------------------------------------------------- 1 | import Cookies from 'js-cookie' 2 | 3 | const app = { 4 | state: { 5 | sidebar: { 6 | opened: !+Cookies.get('sidebarStatus'), 7 | withoutAnimation: false 8 | }, 9 | device: 'desktop' 10 | }, 11 | mutations: { 12 | TOGGLE_SIDEBAR: state => { 13 | if (state.sidebar.opened) { 14 | Cookies.set('sidebarStatus', 1) 15 | } else { 16 | Cookies.set('sidebarStatus', 0) 17 | } 18 | state.sidebar.opened = !state.sidebar.opened 19 | state.sidebar.withoutAnimation = false 20 | }, 21 | CLOSE_SIDEBAR: (state, withoutAnimation) => { 22 | Cookies.set('sidebarStatus', 1) 23 | state.sidebar.opened = false 24 | state.sidebar.withoutAnimation = withoutAnimation 25 | }, 26 | TOGGLE_DEVICE: (state, device) => { 27 | state.device = device 28 | } 29 | }, 30 | actions: { 31 | ToggleSideBar: ({ commit }) => { 32 | commit('TOGGLE_SIDEBAR') 33 | }, 34 | CloseSideBar({ commit }, { withoutAnimation }) { 35 | commit('CLOSE_SIDEBAR', withoutAnimation) 36 | }, 37 | ToggleDevice({ commit }, device) { 38 | commit('TOGGLE_DEVICE', device) 39 | } 40 | } 41 | } 42 | 43 | export default app 44 | -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/service/impl/PReplyServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.service.impl; 2 | 3 | import com.cn.psychological.entity.PReply; 4 | import com.cn.psychological.mapper.PReplyMapper; 5 | import com.cn.psychological.service.PReplyService; 6 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 7 | import com.cn.psychological.utils.page.PageResult; 8 | import com.github.pagehelper.PageHelper; 9 | import com.github.pagehelper.PageInfo; 10 | import org.springframework.stereotype.Service; 11 | 12 | import java.util.List; 13 | 14 | /** 15 | *

16 | * 咨询信息表 服务实现类 17 | *

18 | */ 19 | @Service 20 | public class PReplyServiceImpl extends ServiceImpl implements PReplyService { 21 | 22 | @Override 23 | public PageResult pageQuery(int page, int limit, PReply data) { 24 | PageHelper.startPage(page, limit); 25 | List queryList = baseMapper.pageQuery(data); 26 | PageInfo pageInfo = new PageInfo<>(queryList); 27 | return new PageResult<>(pageInfo.getTotal(), queryList); 28 | } 29 | 30 | @Override 31 | public List getList(PReply pReply) { 32 | return baseMapper.getList(pReply); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /wx/images/user_panel_04.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /wx/pages/counselor/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | {{item.title}} 10 | 11 | 姓名: {{item.name}} 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 没有更多内容 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/entity/PNotice.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.FieldFill; 4 | import com.baomidou.mybatisplus.annotation.IdType; 5 | import java.util.Date; 6 | 7 | import com.baomidou.mybatisplus.annotation.TableField; 8 | import com.baomidou.mybatisplus.annotation.TableId; 9 | import java.io.Serializable; 10 | import lombok.Data; 11 | import lombok.EqualsAndHashCode; 12 | import lombok.experimental.Accessors; 13 | 14 | /** 15 | *

16 | * 通知公告信息表 17 | *

18 | */ 19 | @Data 20 | @EqualsAndHashCode(callSuper = false) 21 | @Accessors(chain = true) 22 | public class PNotice implements Serializable { 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | /** 27 | * 主键 28 | */ 29 | @TableId(value = "id", type = IdType.ID_WORKER_STR) 30 | private String id; 31 | 32 | /** 33 | * 通知标题 34 | */ 35 | private String title; 36 | 37 | /** 38 | * 排序 39 | */ 40 | private Integer sort; 41 | 42 | /** 43 | * 通知内容 44 | */ 45 | private String content; 46 | 47 | /** 48 | * 创建时间 49 | */ 50 | @TableField(fill = FieldFill.INSERT) 51 | private Date createTime; 52 | 53 | 54 | } 55 | -------------------------------------------------------------------------------- /wx/images/user_type_02.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/service/impl/PFavoriteServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.service.impl; 2 | 3 | import com.cn.psychological.entity.PFavorite; 4 | import com.cn.psychological.mapper.PFavoriteMapper; 5 | import com.cn.psychological.service.PFavoriteService; 6 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 7 | import com.cn.psychological.utils.page.PageResult; 8 | import com.github.pagehelper.PageHelper; 9 | import com.github.pagehelper.PageInfo; 10 | import org.springframework.stereotype.Service; 11 | 12 | import java.util.List; 13 | 14 | /** 15 | *

16 | * 收藏信息表 服务实现类 17 | *

18 | */ 19 | @Service 20 | public class PFavoriteServiceImpl extends ServiceImpl implements PFavoriteService { 21 | 22 | @Override 23 | public PageResult pageQuery(int page, int limit, PFavorite data) { 24 | PageHelper.startPage(page, limit); 25 | List queryList = baseMapper.pageQuery(data); 26 | PageInfo pageInfo = new PageInfo<>(queryList); 27 | return new PageResult<>(pageInfo.getTotal(), queryList); 28 | } 29 | 30 | @Override 31 | public List favoriteListByUserId(String userId) { 32 | return baseMapper.favoriteListByUserId(userId); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /wx/images/mobile.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /wx/utils/request.js: -------------------------------------------------------------------------------- 1 | var app = getApp(); 2 | var host = app.globalData.baseURL; 3 | //GETs 4 | function getData(url, doSuccess, doFail) { 5 | console.log(host + url); 6 | wx.request({ 7 | url: host + url, 8 | header: { 9 | "content-type": "application/json;charset=UTF-8" 10 | }, 11 | method: 'GET', 12 | success: function (res) { 13 | doSuccess(res.data); 14 | }, 15 | fail: function () { 16 | doFail(); 17 | } 18 | }) 19 | } 20 | /** 21 | * POST请求, 22 | * URL:接口 23 | * postData:参数,json类型 24 | * doSuccess:成功的回调函数 25 | * doFail:失败的回调函数 26 | */ 27 | function request(url, postData, doSuccess, doFail) { 28 | wx.request({ 29 | //项目的真正接口,通过字符串拼接方式实现 30 | url: host + url, 31 | header: { 32 | "content-type": "application/json;charset=UTF-8" 33 | }, 34 | data: postData, 35 | method: 'POST', 36 | success: function (res) { 37 | //参数值为res.data,直接将返回的数据传入 38 | doSuccess(res.data); 39 | }, 40 | fail: function () { 41 | doFail(); 42 | } 43 | }) 44 | } 45 | /** 46 | * module.exports用来导出代码 47 | * js文件中通过var call = require("../util/request.js") 加载 48 | * 在引入引入文件的时候" "里面的内容通过../../../这种类型,小程序的编译器会自动提示,因为你可能 49 | * 项目目录不止一级,不同的js文件对应的工具类的位置不一样 50 | */ 51 | module.exports.request = request; 52 | module.exports.getData = getData; 53 | -------------------------------------------------------------------------------- /web/build/build.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | require('./check-versions')() 3 | 4 | process.env.NODE_ENV = 'production' 5 | 6 | const ora = require('ora') 7 | const rm = require('rimraf') 8 | const path = require('path') 9 | const chalk = require('chalk') 10 | const webpack = require('webpack') 11 | const config = require('../config') 12 | const webpackConfig = require('./webpack.prod.conf') 13 | 14 | const spinner = ora('building for production...') 15 | spinner.start() 16 | 17 | rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { 18 | if (err) throw err 19 | webpack(webpackConfig, (err, stats) => { 20 | spinner.stop() 21 | if (err) throw err 22 | process.stdout.write( 23 | stats.toString({ 24 | colors: true, 25 | modules: false, 26 | children: false, 27 | chunks: false, 28 | chunkModules: false 29 | }) + '\n\n' 30 | ) 31 | 32 | if (stats.hasErrors()) { 33 | console.log(chalk.red(' Build failed with errors.\n')) 34 | process.exit(1) 35 | } 36 | 37 | console.log(chalk.cyan(' Build complete.\n')) 38 | console.log( 39 | chalk.yellow( 40 | ' Tip: built files are meant to be served over an HTTP server.\n' + 41 | " Opening index.html over file:// won't work.\n" 42 | ) 43 | ) 44 | }) 45 | }) 46 | -------------------------------------------------------------------------------- /wx/pages/counselor_info/index.js: -------------------------------------------------------------------------------- 1 | var call = require("../../utils/request.js") 2 | var help = require("../../utils/help.js") 3 | var userId = ''; 4 | var counselorId = ''; 5 | Page({ 6 | 7 | /** 8 | * 页面的初始数据 9 | */ 10 | data: { 11 | itme: {}, 12 | }, 13 | 14 | onLoad: function (options) { 15 | const { id } = options; 16 | counselorId = id 17 | this.getInit(); 18 | 19 | }, 20 | /** 21 | * 获取登录用户信息 22 | */ 23 | getInit() { 24 | userId = wx.getStorageSync("token") 25 | // 用户信息不存在跳转登录页面 26 | if (userId == null || userId == undefined || userId == '') { 27 | // 跳转到登录页面 28 | wx.reLaunch({ 29 | url: '/pages/login/index' 30 | }) 31 | } else { 32 | this.getInfo(); 33 | } 34 | }, 35 | 36 | getInfo() { 37 | call.getData('wx/getCounselorById?id=' + counselorId + "&userId=" + userId, this.onSuccessclassAll, this.onFaiclassAll); 38 | }, 39 | onSuccessclassAll(res) { 40 | if (res.code == 20000) { 41 | this.setData({ 42 | item: res.data.row 43 | }) 44 | console.log(this.data.item); 45 | } 46 | }, 47 | onFaiclassAll() { 48 | help.show("网络请求失败"); 49 | }, 50 | 51 | // 跳转在线咨询 52 | onlineBtn(){ 53 | wx.navigateTo({ 54 | url: '/pages/consult/index?id='+counselorId, 55 | }) 56 | }, 57 | 58 | }) -------------------------------------------------------------------------------- /wx/pages/knowledge/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | {{item.title}} 10 | 11 | 发布咨询师: {{item.userName}} 12 | 13 | 14 | 发布时间: {{item.createTime}} 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 没有课程内容 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /wx/pages/favorite/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | {{item.knowledgeTitle}} 10 | 11 | 发布咨询师: {{item.userName}} 12 | 13 | 14 | 收藏时间: {{item.createTime}} 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 没有更多收藏 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /web/src/icons/svg/dr.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /wx/images/user_panel_02.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /wx/images/vajra_04.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/utils/response/R.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.utils.response; 2 | import lombok.Data; 3 | 4 | import java.util.HashMap; 5 | import java.util.Map; 6 | 7 | /** 8 | * 返回数据 9 | * 10 | * @author Mark sunlightcs@gmail.com 11 | */ 12 | @Data 13 | public class R { 14 | private static final long serialVersionUID = 1L; 15 | 16 | 17 | private Boolean success; 18 | 19 | private Integer code; 20 | 21 | private String message; 22 | 23 | private Map data = new HashMap(); 24 | 25 | private R(){} 26 | 27 | public static R ok(){ 28 | R r = new R(); 29 | r.setSuccess(true); 30 | r.setCode(20000); 31 | r.setMessage("成功"); 32 | return r; 33 | } 34 | 35 | public static R error(String mag){ 36 | R r = new R(); 37 | r.setSuccess(false); 38 | r.setCode(20001); 39 | r.setMessage(mag); 40 | return r; 41 | } 42 | 43 | public static R error(){ 44 | R r = new R(); 45 | r.setSuccess(false); 46 | r.setCode(20001); 47 | r.setMessage("失败"); 48 | return r; 49 | } 50 | 51 | 52 | public R data(String key, Object value){ 53 | this.data.put(key, value); 54 | return this; 55 | } 56 | 57 | public R data(Map map){ 58 | this.setData(map); 59 | return this; 60 | } 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/controller/PFavoriteController.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.controller; 2 | 3 | 4 | import com.cn.psychological.entity.PFavorite; 5 | import com.cn.psychological.service.PFavoriteService; 6 | import com.cn.psychological.utils.page.PageResult; 7 | import com.cn.psychological.utils.response.R; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.web.bind.annotation.*; 10 | 11 | /** 12 | *

13 | * 收藏信息表 前端控制器 14 | *

15 | */ 16 | @RestController 17 | @RequestMapping("/p-favorite") 18 | public class PFavoriteController { 19 | 20 | 21 | @Autowired 22 | private PFavoriteService service; 23 | 24 | /** 25 | * 分页条件查询 26 | * @param page 当前页码 27 | * @param limit 每页的大小 28 | * @param data 封装查询条件数据 29 | * @return 30 | */ 31 | @PostMapping("pageQuery/{page}/{limit}") 32 | public R getPageData( 33 | @PathVariable int page, 34 | @PathVariable int limit, 35 | @RequestBody PFavorite data){ 36 | PageResult pageResult = service.pageQuery(page, limit, data); 37 | return R.ok().data("rows",pageResult); 38 | } 39 | 40 | /** 41 | * 删除操作 42 | * @param id 43 | * @return 44 | */ 45 | @DeleteMapping("deleteById/{id}") 46 | public R deleteById(@PathVariable String id){ 47 | service.removeById(id); 48 | return R.ok(); 49 | } 50 | } 51 | 52 | -------------------------------------------------------------------------------- /wx/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages":[ 3 | "pages/login/index", 4 | "pages/index/index", 5 | "pages/answer_info/index", 6 | "pages/curve/index", 7 | "pages/answer_list/index", 8 | "pages/counselor_info/index", 9 | "pages/answer/index", 10 | "pages/consult/index", 11 | 12 | "pages/counselor/index", 13 | "pages/knowledge/index", 14 | "pages/knowledge_info/index", 15 | "pages/online_counsel/index", 16 | "pages/register/index", 17 | "pages/wode/wode", 18 | "pages/notice/index", 19 | "pages/notice_info/index", 20 | "pages/info/index", 21 | "pages/updatePassword/index", 22 | "pages/favorite/index" 23 | 24 | 25 | 26 | ], 27 | "window":{ 28 | "backgroundTextStyle":"light", 29 | "navigationBarBackgroundColor": "#fff", 30 | "navigationBarTitleText": "Weixin", 31 | "navigationBarTextStyle":"black" 32 | }, 33 | "style": "v2", 34 | "sitemapLocation": "sitemap.json", 35 | "tabBar": { 36 | "custom": true, 37 | "color": "#000000", 38 | "selectedColor": "#000000", 39 | "backgroundColor": "#000000", 40 | "list": [ 41 | { 42 | "pagePath": "pages/index/index", 43 | "text": "首页" 44 | }, 45 | { 46 | "pagePath": "pages/counselor/index", 47 | "text": "心理咨询" 48 | }, 49 | { 50 | "pagePath": "pages/wode/wode", 51 | "text": "我的" 52 | } 53 | ] 54 | }, 55 | "usingComponents": {} 56 | 57 | 58 | } 59 | -------------------------------------------------------------------------------- /wx/images/vajra_03.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /wx/pages/counselor_info/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | {{item.name}} 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | —— 30 | 咨询师介绍 31 | —— 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 选择咨询方式 48 | -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/utils/CrosACofig.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.utils; 2 | 3 | import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | import org.springframework.http.HttpHeaders; 7 | import org.springframework.web.servlet.config.annotation.CorsRegistry; 8 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 9 | 10 | /** 11 | * 拦截器解决 跨域问题解决 12 | */ 13 | @Configuration 14 | public class CrosACofig implements WebMvcConfigurer { 15 | 16 | @Bean 17 | public WebMvcConfigurer corsConfigurer() 18 | { 19 | return new WebMvcConfigurer() { 20 | @Override 21 | public void addCorsMappings(CorsRegistry registry) { 22 | registry.addMapping("/**"). 23 | allowedOrigins("*"). //允许跨域的域名,可以用*表示允许任何域名使用 24 | allowedMethods("*"). //允许任何方法(post、get等) 25 | allowedHeaders("*"). //允许任何请求头 26 | allowCredentials(true). //带上cookie信息 27 | exposedHeaders(HttpHeaders.SET_COOKIE).maxAge(3600L); //maxAge(3600)表明在3600秒内,不需要再发送预检验请求,可以缓存该结果 28 | } 29 | }; 30 | } 31 | 32 | /** 33 | * 添加分页插件 34 | */ 35 | @Bean 36 | public PaginationInterceptor paginationInterceptor() { 37 | return new PaginationInterceptor(); 38 | } 39 | 40 | 41 | 42 | 43 | } 44 | -------------------------------------------------------------------------------- /wx/images/icon_setup.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /wx/images/user_type_01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/entity/PFavorite.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.FieldFill; 4 | import com.baomidou.mybatisplus.annotation.IdType; 5 | import java.util.Date; 6 | 7 | import com.baomidou.mybatisplus.annotation.TableField; 8 | import com.baomidou.mybatisplus.annotation.TableId; 9 | import java.io.Serializable; 10 | import lombok.Data; 11 | import lombok.EqualsAndHashCode; 12 | import lombok.experimental.Accessors; 13 | 14 | /** 15 | *

16 | * 收藏信息表 17 | *

18 | */ 19 | @Data 20 | @EqualsAndHashCode(callSuper = false) 21 | @Accessors(chain = true) 22 | public class PFavorite implements Serializable { 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | /** 27 | * 主键 28 | */ 29 | @TableId(value = "id", type = IdType.ID_WORKER_STR) 30 | private String id; 31 | 32 | /** 33 | * 心理知识id 34 | */ 35 | private String knowledgeId; 36 | 37 | /** 38 | * 收藏用户id 39 | */ 40 | private String userId; 41 | 42 | /** 43 | * 收藏时间 44 | */ 45 | @TableField(fill = FieldFill.INSERT) 46 | private Date createTime; 47 | 48 | /** 49 | * 存放收藏用户姓名 50 | */ 51 | @TableField(exist = false) 52 | private String userName; 53 | 54 | /** 55 | * 心理知识标题 56 | */ 57 | @TableField(exist = false) 58 | private String knowledgeTitle; 59 | 60 | 61 | /** 62 | * 心理知识封面 63 | */ 64 | @TableField(exist = false) 65 | private String image; 66 | 67 | 68 | 69 | } 70 | -------------------------------------------------------------------------------- /web/src/icons/svg/gd.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /wx/images/vajra_01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /wx/pages/login/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 64 | 65 | -------------------------------------------------------------------------------- /wx/pages/consult/index.wxss: -------------------------------------------------------------------------------- 1 | /* --- logo --- */ 2 | .login_logo{height: 400rpx; font-size: 50rpx;} 3 | 4 | 5 | 6 | /* --- form --- */ 7 | .login_form{padding: 0 60rpx;} 8 | .login_form__item{height: 112rpx; border-bottom: 1rpx solid #efefef; } 9 | .login_form__label{position: relative; height: 112rpx;} 10 | .login_form__title{font-size: 25rpx; width: 20%; line-height: 112rpx; color: #999;} 11 | .login_form__box{width: 80%; height: 112rpx; position: relative; } 12 | 13 | /* input */ 14 | .login_form__input{height: 100%; font-size: 28rpx;} 15 | .login_form__input:active{border-bottom: 1rpx solid #ddd;} 16 | 17 | 18 | /* button */ 19 | .page_button{margin-top: 40rpx;} 20 | .page_button.weixin{background: linear-gradient(to bottom, #2AAE67 , #2DBC6F); } 21 | 22 | 23 | 24 | 25 | /* --- other --- */ 26 | .login_other{padding: 0 60rpx; text-align: center; font-size: 25rpx; color: #ccc; margin-top: 15%;} 27 | .login_other__column::before{content: "——"; margin-right: 32rpx; color: #ccc; } 28 | .login_other__column::after{content: "——"; margin-left: 32rpx; color: #ccc; } 29 | .login_other__icon{width: 80rpx; height: 80rpx; margin-top: 40rpx;} 30 | .login_other__text{color: #666;} 31 | .getcode{position: absolute; right: 0; top: 0; line-height: 112rpx; font-size: 25rpx; color: #558BFB; z-index: 999;} 32 | .login_other__mobile{padding: 0 32rpx;} 33 | 34 | 35 | 36 | 37 | /* --- agree --- */ 38 | .login_agree{padding: 0 60rpx; font-size: 28rpx; color: #666; margin-top: 32rpx; display: flex;} 39 | .login_agree__checkbox{transform: scale(0.8); } 40 | .login_agree__text{width: 90%;} 41 | .login_agree__text text{color:#558BFB ;} -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/service/impl/PKnowledgeServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.service.impl; 2 | 3 | import com.cn.psychological.entity.PKnowledge; 4 | import com.cn.psychological.entity.PUser; 5 | import com.cn.psychological.mapper.PKnowledgeMapper; 6 | import com.cn.psychological.mapper.PUserMapper; 7 | import com.cn.psychological.service.PKnowledgeService; 8 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 9 | import com.cn.psychological.service.PUserService; 10 | import com.cn.psychological.utils.page.PageResult; 11 | import com.github.pagehelper.PageHelper; 12 | import com.github.pagehelper.PageInfo; 13 | import org.springframework.beans.factory.annotation.Autowired; 14 | import org.springframework.stereotype.Service; 15 | 16 | import java.util.List; 17 | 18 | /** 19 | *

20 | * 心理知识信息表 服务实现类 21 | *

22 | */ 23 | @Service 24 | public class PKnowledgeServiceImpl extends ServiceImpl implements PKnowledgeService { 25 | 26 | @Override 27 | public PageResult pageQuery(int page, int limit, PKnowledge data) { 28 | PageHelper.startPage(page, limit); 29 | List queryList = baseMapper.pageQuery(data); 30 | PageInfo pageInfo = new PageInfo<>(queryList); 31 | return new PageResult<>(pageInfo.getTotal(), queryList); 32 | } 33 | 34 | @Override 35 | public List getList() { 36 | return baseMapper.getList(); 37 | } 38 | 39 | @Override 40 | public PKnowledge getOneById(String id) { 41 | return baseMapper.getOneById(id); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /web/build/check-versions.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const chalk = require('chalk') 3 | const semver = require('semver') 4 | const packageConfig = require('../package.json') 5 | const shell = require('shelljs') 6 | 7 | function exec(cmd) { 8 | return require('child_process') 9 | .execSync(cmd) 10 | .toString() 11 | .trim() 12 | } 13 | 14 | const versionRequirements = [ 15 | { 16 | name: 'node', 17 | currentVersion: semver.clean(process.version), 18 | versionRequirement: packageConfig.engines.node 19 | } 20 | ] 21 | 22 | if (shell.which('npm')) { 23 | versionRequirements.push({ 24 | name: 'npm', 25 | currentVersion: exec('npm --version'), 26 | versionRequirement: packageConfig.engines.npm 27 | }) 28 | } 29 | 30 | module.exports = function() { 31 | const warnings = [] 32 | 33 | for (let i = 0; i < versionRequirements.length; i++) { 34 | const mod = versionRequirements[i] 35 | 36 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { 37 | warnings.push( 38 | mod.name + 39 | ': ' + 40 | chalk.red(mod.currentVersion) + 41 | ' should be ' + 42 | chalk.green(mod.versionRequirement) 43 | ) 44 | } 45 | } 46 | 47 | if (warnings.length) { 48 | console.log('') 49 | console.log( 50 | chalk.yellow( 51 | 'To use this template, you must update following to modules:' 52 | ) 53 | ) 54 | console.log() 55 | 56 | for (let i = 0; i < warnings.length; i++) { 57 | const warning = warnings[i] 58 | console.log(' ' + warning) 59 | } 60 | 61 | console.log() 62 | process.exit(1) 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /web/src/icons/svg/pj.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/entity/PKnowledge.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.FieldFill; 4 | import com.baomidou.mybatisplus.annotation.IdType; 5 | import java.util.Date; 6 | 7 | import com.baomidou.mybatisplus.annotation.TableField; 8 | import com.baomidou.mybatisplus.annotation.TableId; 9 | import java.io.Serializable; 10 | import lombok.Data; 11 | import lombok.EqualsAndHashCode; 12 | import lombok.experimental.Accessors; 13 | 14 | /** 15 | *

16 | * 心理知识信息表 17 | *

18 | */ 19 | @Data 20 | @EqualsAndHashCode(callSuper = false) 21 | @Accessors(chain = true) 22 | public class PKnowledge implements Serializable { 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | /** 27 | * 主键 28 | */ 29 | @TableId(value = "id", type = IdType.ID_WORKER_STR) 30 | private String id; 31 | 32 | /** 33 | * 标题 34 | */ 35 | private String title; 36 | 37 | /** 38 | * 内容 39 | */ 40 | private String content; 41 | 42 | /** 43 | * 发布用户id 44 | */ 45 | private String userId; 46 | 47 | /** 48 | * 封面 49 | */ 50 | private String image; 51 | 52 | /** 53 | * 是否为推荐 (0是 1否) 54 | */ 55 | private String status; 56 | 57 | /** 58 | * 创建时间 59 | */ 60 | @TableField(fill = FieldFill.INSERT) 61 | private Date createTime; 62 | 63 | /** 64 | * 存放发布用户姓名 65 | */ 66 | @TableField(exist = false) 67 | private String userName; 68 | 69 | 70 | /** 71 | * 是否收藏了课程 72 | */ 73 | @TableField(exist = false) 74 | private boolean flag; 75 | 76 | 77 | } 78 | -------------------------------------------------------------------------------- /wx/images/user_panel_06.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /wx/images/user_panel_03.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/service/impl/PResultServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.service.impl; 2 | 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 4 | import com.cn.psychological.entity.PResult; 5 | import com.cn.psychological.mapper.PResultMapper; 6 | import com.cn.psychological.service.PResultService; 7 | import com.cn.psychological.utils.page.PageResult; 8 | import com.cn.psychological.utils.utils.AceUtils; 9 | import com.github.pagehelper.PageHelper; 10 | import com.github.pagehelper.PageInfo; 11 | import org.springframework.stereotype.Service; 12 | 13 | import java.util.List; 14 | import java.util.Map; 15 | 16 | /** 17 | *

18 | * 评测结果表 服务类 19 | *

20 | */ 21 | @Service 22 | public class PResultServiceImpl extends ServiceImpl implements PResultService { 23 | 24 | @Override 25 | public PageResult pageQuery(int page, int limit, PResult data) { 26 | PageHelper.startPage(page, limit); 27 | List queryList = baseMapper.pageQuery(data); 28 | PageInfo pageInfo = new PageInfo<>(queryList); 29 | return new PageResult<>(pageInfo.getTotal(), queryList); 30 | } 31 | 32 | @Override 33 | public List< Map> getThisMonthDay(String userId) { 34 | 35 | return baseMapper.getThisMonthDay(userId, AceUtils.getThisMonth()); 36 | } 37 | 38 | @Override 39 | public List> getTypeHistogram() { 40 | return baseMapper.getTypeHistogram(); 41 | } 42 | 43 | @Override 44 | public Integer getScoreLimit0(String userId) { 45 | Integer score = baseMapper.getScoreLimit0(userId); 46 | return score == null? 0 : score; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /web/src/views/system/updatePassword/index.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 61 | -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/entity/PReply.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.FieldFill; 4 | import com.baomidou.mybatisplus.annotation.IdType; 5 | import java.util.Date; 6 | 7 | import com.baomidou.mybatisplus.annotation.TableField; 8 | import com.baomidou.mybatisplus.annotation.TableId; 9 | import java.io.Serializable; 10 | import lombok.Data; 11 | import lombok.EqualsAndHashCode; 12 | import lombok.experimental.Accessors; 13 | 14 | /** 15 | *

16 | * 咨询信息表 17 | *

18 | */ 19 | @Data 20 | @EqualsAndHashCode(callSuper = false) 21 | @Accessors(chain = true) 22 | public class PReply implements Serializable { 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | /** 27 | * 主键 28 | */ 29 | @TableId(value = "id", type = IdType.ID_WORKER_STR) 30 | private String id; 31 | 32 | /** 33 | * 用户id 34 | */ 35 | private String userId; 36 | 37 | /** 38 | * 咨询师id 39 | */ 40 | private String counselorId; 41 | 42 | /** 43 | * 发送内容 44 | */ 45 | private String content; 46 | 47 | /** 48 | * 类型(0咨询 1回复) 49 | */ 50 | private String type; 51 | 52 | /** 53 | * 标识(0在线咨询 1匿名咨询) 54 | */ 55 | private String flag; 56 | 57 | /** 58 | * 创建时间 59 | */ 60 | @TableField(fill = FieldFill.INSERT) 61 | private Date createTime; 62 | 63 | 64 | @TableField(exist = false) 65 | private String studentAvatar; 66 | 67 | 68 | @TableField(exist = false) 69 | private String counselorAvatar; 70 | 71 | @TableField(exist = false) 72 | private String studentName; 73 | 74 | 75 | @TableField(exist = false) 76 | private String counselorName; 77 | 78 | } 79 | -------------------------------------------------------------------------------- /web/src/views/layout/Layout.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 47 | 48 | 70 | -------------------------------------------------------------------------------- /web/src/api/user.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | export function login(data) { 4 | return request({ 5 | url: '/p-user/login', 6 | method: 'post', 7 | data 8 | }) 9 | } 10 | 11 | export function getInfo(token) { 12 | return request({ 13 | url: '/p-user/info', 14 | method: 'get', 15 | params: { token } 16 | }) 17 | } 18 | 19 | export function logout(token) { 20 | return request({ 21 | url: '/p-user/logout', 22 | method: 'get', 23 | params: { token } 24 | }) 25 | } 26 | 27 | export function pageQuery(page, limit, data) { 28 | return request({ 29 | url: `/p-user/pageQuery/${page}/${limit}`, 30 | method: 'post', 31 | data: data 32 | }) 33 | } 34 | export function deleteById(id) { 35 | return request({ 36 | url: `/p-user/deleteById/${id}`, 37 | method: 'delete' 38 | }) 39 | } 40 | export function insert(data){ 41 | return request({ 42 | url: `/p-user/insert`, 43 | method: 'post', 44 | data: data 45 | }) 46 | } 47 | 48 | export function update(data){ 49 | return request({ 50 | url: `/p-user/update`, 51 | method: 'put', 52 | data: data 53 | }) 54 | } 55 | export function getUserAll(userType) { 56 | return request({ 57 | url: '/p-user/getUserAll?userType='+userType, 58 | method: 'get' 59 | }) 60 | } 61 | export function getHome() { 62 | return request({ 63 | url: '/p-user/getHome', 64 | method: 'get' 65 | }) 66 | } 67 | 68 | export function updatePassword(data){ 69 | return request({ 70 | url: `/p-user/updatePassword`, 71 | method: 'post', 72 | data: data 73 | }) 74 | } 75 | 76 | export function resetPassword(id){ 77 | return request({ 78 | url: `/p-user/resetPassword/`+id, 79 | method: 'post' 80 | }) 81 | } 82 | 83 | 84 | -------------------------------------------------------------------------------- /web/src/icons/svg/tree.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/src/store/modules/permission.js: -------------------------------------------------------------------------------- 1 | import { asyncRoutes, constantRoutes } from '@/router' 2 | 3 | // 筛选路由 4 | // 匹配权限 5 | function hasPermission(roles, route) { 6 | // 在路由上找的到 route.mate 和 route.mate.roles 7 | if (route.meta && route.meta.roles) { 8 | return roles.some(role => route.meta.roles.includes(role)) 9 | } else { 10 | return true 11 | } 12 | } 13 | 14 | // 通过递归过滤异步路由表 15 | 16 | export function filterAsyncRoutes(routes, roles) { 17 | // 装筛选出来的路由 18 | const res = [] 19 | 20 | routes.forEach(route => { 21 | const tmp = { ...route } 22 | if (hasPermission(roles, tmp)) { 23 | if (tmp.children) { 24 | tmp.children = filterAsyncRoutes(tmp.children, roles) 25 | } 26 | res.push(tmp) 27 | } 28 | }) 29 | 30 | return res 31 | } 32 | 33 | const state = { 34 | routes: [], 35 | addRoutes: [] 36 | } 37 | 38 | const mutations = { 39 | SET_ROUTES: (state, routes) => { 40 | state.addRoutes = routes 41 | state.routes = constantRoutes.concat(routes) // 将过滤的路由和国定的路由存起来 42 | console.log(state.routes) 43 | } 44 | } 45 | 46 | // 筛选 47 | const actions = { 48 | generateRoutes({ commit }, roles) { 49 | return new Promise(resolve => { 50 | let accessedRoutes 51 | // // 路由是否为 admin, 有直接全部显示 52 | // if (roles.includes('admin')) { 53 | // accessedRoutes = asyncRoutes || [] 54 | // } else { 55 | // // 过滤路由 56 | // accessedRoutes = filterAsyncRoutes(asyncRoutes, roles) 57 | // } 58 | // 过滤路由 59 | accessedRoutes = filterAsyncRoutes(asyncRoutes, roles) 60 | commit('SET_ROUTES', accessedRoutes) 61 | resolve(accessedRoutes) 62 | }) 63 | } 64 | } 65 | 66 | export default { 67 | namespaced: true, 68 | state, 69 | mutations, 70 | actions 71 | } 72 | 73 | -------------------------------------------------------------------------------- /wx/pages/knowledge_info/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | {{item.title}} 21 | 22 | 23 | 24 | 25 | 26 | 发布人: {{item.userName}} 27 | 发布时间 {{item.createTime}} 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | —— 42 | 心情知识详情 43 | —— 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 点击收藏 58 | 59 | 取消收藏 60 | -------------------------------------------------------------------------------- /wx/pages/register/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 注册 9 | Register 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 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | {{sexList[sex_Index].title}} 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 已有账号,立即登录 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /wx/pages/updatePassword/index.js: -------------------------------------------------------------------------------- 1 | var call = require("../../utils/request.js") 2 | var help = require("../../utils/help.js") 3 | var userId = ''; 4 | 5 | Page({ 6 | 7 | /** 8 | * 页面的初始数据 9 | */ 10 | data: { 11 | oldPassword:'', //旧密码 12 | password:'', //新密码 13 | }, 14 | 15 | 16 | onLoad: function () { 17 | this.getInit(); 18 | }, 19 | 20 | /** 21 | * 获取登录用户信息 22 | */ 23 | getInit() { 24 | userId = wx.getStorageSync("token") 25 | // 用户信息不存在跳转登录页面 26 | if (userId == null || userId == undefined || userId == '') { 27 | // 跳转到登录页面 28 | wx.reLaunch({ 29 | url: '/pages/login/index' 30 | }) 31 | } 32 | }, 33 | 34 | updateBtn(){ 35 | if(this.data.oldPassword == ""){ 36 | wx.showToast({ 37 | title: '旧密码不能为空', 38 | icon: 'none', 39 | duration: 1000 40 | }) 41 | return false; 42 | } 43 | if(this.data.password == ""){ 44 | wx.showToast({ 45 | title: '新密码不能为空', 46 | icon: 'none', 47 | duration: 1000 48 | }) 49 | return false; 50 | } 51 | wx.showLoading({ 52 | title: '修改中...' 53 | }); 54 | call.request('wx/updatePassword',{ 55 | oldPassword:this.data.oldPassword, 56 | password:this.data.password, 57 | id: userId 58 | }, this.onSuccess, this.onFail); 59 | }, 60 | 61 | onSuccess(res) { 62 | wx.hideLoading(); 63 | if(res.code == 20000){ 64 | help.show('修改成功') 65 | setTimeout(function () { // 下单成功跳转页面 66 | wx.reLaunch({ 67 | url: '/pages/wode/wode' 68 | }) 69 | }, 2000) 70 | }else{ 71 | help.show(res.message) 72 | } 73 | }, 74 | 75 | onFail() { 76 | wx.hideLoading(); 77 | help.show("网络请求超时,请稍后再试") 78 | }, 79 | 80 | }) -------------------------------------------------------------------------------- /wx/images/user_panel_01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /web/src/utils/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by jiachenpan on 16/11/18. 3 | */ 4 | 5 | export function parseTime(time, cFormat) { 6 | if (arguments.length === 0) { 7 | return null 8 | } 9 | const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}' 10 | let date 11 | if (typeof time === 'object') { 12 | date = time 13 | } else { 14 | if (('' + time).length === 10) time = parseInt(time) * 1000 15 | date = new Date(time) 16 | } 17 | const formatObj = { 18 | y: date.getFullYear(), 19 | m: date.getMonth() + 1, 20 | d: date.getDate(), 21 | h: date.getHours(), 22 | i: date.getMinutes(), 23 | s: date.getSeconds(), 24 | a: date.getDay() 25 | } 26 | const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => { 27 | let value = formatObj[key] 28 | // Note: getDay() returns 0 on Sunday 29 | if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value ] } 30 | if (result.length > 0 && value < 10) { 31 | value = '0' + value 32 | } 33 | return value || 0 34 | }) 35 | return time_str 36 | } 37 | 38 | export function formatTime(time, option) { 39 | time = +time * 1000 40 | const d = new Date(time) 41 | const now = Date.now() 42 | 43 | const diff = (now - d) / 1000 44 | 45 | if (diff < 30) { 46 | return '刚刚' 47 | } else if (diff < 3600) { 48 | // less 1 hour 49 | return Math.ceil(diff / 60) + '分钟前' 50 | } else if (diff < 3600 * 24) { 51 | return Math.ceil(diff / 3600) + '小时前' 52 | } else if (diff < 3600 * 24 * 2) { 53 | return '1天前' 54 | } 55 | if (option) { 56 | return parseTime(time, option) 57 | } else { 58 | return ( 59 | d.getMonth() + 60 | 1 + 61 | '月' + 62 | d.getDate() + 63 | '日' + 64 | d.getHours() + 65 | '时' + 66 | d.getMinutes() + 67 | '分' 68 | ) 69 | } 70 | } 71 | 72 | export function isExternal(path) { 73 | return /^(https?:|mailto:|tel:)/.test(path) 74 | } 75 | -------------------------------------------------------------------------------- /wx/pages/line/index.js: -------------------------------------------------------------------------------- 1 | import * as echarts from '../../ec-canvas/echarts'; 2 | 3 | const app = getApp(); 4 | 5 | function initChart(canvas, width, height, dpr) { 6 | const chart = echarts.init(canvas, null, { 7 | width: width, 8 | height: height, 9 | devicePixelRatio: dpr // new 10 | }); 11 | canvas.setChart(chart); 12 | 13 | var option = { 14 | title: { 15 | text: '测试下面legend的红色区域不应被裁剪', 16 | left: 'center' 17 | }, 18 | legend: { 19 | data: ['A', 'B', 'C'], 20 | top: 50, 21 | left: 'center', 22 | backgroundColor: 'red', 23 | z: 100 24 | }, 25 | grid: { 26 | containLabel: true 27 | }, 28 | tooltip: { 29 | show: true, 30 | trigger: 'axis' 31 | }, 32 | xAxis: { 33 | type: 'category', 34 | boundaryGap: false, 35 | data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'], 36 | // show: false 37 | }, 38 | yAxis: { 39 | x: 'center', 40 | type: 'value', 41 | splitLine: { 42 | lineStyle: { 43 | type: 'dashed' 44 | } 45 | } 46 | // show: false 47 | }, 48 | series: [{ 49 | name: 'A', 50 | type: 'line', 51 | smooth: true, 52 | data: [18, 36, 65, 30, 78, 40, 33] 53 | }, { 54 | name: 'B', 55 | type: 'line', 56 | smooth: true, 57 | data: [12, 50, 51, 35, 70, 30, 20] 58 | }, { 59 | name: 'C', 60 | type: 'line', 61 | smooth: true, 62 | data: [10, 30, 31, 50, 40, 20, 10] 63 | }] 64 | }; 65 | 66 | chart.setOption(option); 67 | return chart; 68 | } 69 | 70 | Page({ 71 | onShareAppMessage: function (res) { 72 | return { 73 | title: 'ECharts 可以在微信小程序中使用啦!', 74 | path: '/pages/index/index', 75 | success: function () { }, 76 | fail: function () { } 77 | } 78 | }, 79 | data: { 80 | ec: { 81 | onInit: initChart 82 | } 83 | }, 84 | 85 | onReady() { 86 | } 87 | }); 88 | -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/entity/PUser.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.FieldFill; 4 | import com.baomidou.mybatisplus.annotation.IdType; 5 | import java.util.Date; 6 | 7 | import com.baomidou.mybatisplus.annotation.TableField; 8 | import com.baomidou.mybatisplus.annotation.TableId; 9 | import java.io.Serializable; 10 | import lombok.Data; 11 | import lombok.EqualsAndHashCode; 12 | import lombok.experimental.Accessors; 13 | 14 | /** 15 | *

16 | * 用户信息表 17 | *

18 | */ 19 | @Data 20 | @EqualsAndHashCode(callSuper = false) 21 | @Accessors(chain = true) 22 | public class PUser implements Serializable { 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | @TableId(value = "id", type = IdType.ID_WORKER_STR) 27 | private String id; 28 | 29 | /** 30 | * 用户名 31 | */ 32 | private String username; 33 | 34 | /** 35 | * 密码(MD5加密) 36 | */ 37 | private String password; 38 | 39 | /** 40 | * 账号状态(1正常,2禁用) 41 | */ 42 | private String status; 43 | 44 | /** 45 | * 姓名 46 | */ 47 | private String name; 48 | 49 | /** 50 | * 权限(1代表管理员,2 代表心理咨询师 3代表用户) 51 | */ 52 | private String userType; 53 | 54 | /** 55 | * 头像 56 | */ 57 | private String avatar; 58 | 59 | /** 60 | * 性别 (0女·, 1男) 61 | */ 62 | private String sex; 63 | 64 | /** 65 | * 年龄 66 | */ 67 | private Integer age; 68 | 69 | /** 70 | * 联系电话 71 | */ 72 | private String phone; 73 | 74 | /** 75 | * 介绍 76 | */ 77 | private String content; 78 | /** 79 | * 创建时间 80 | */ 81 | @TableField(fill = FieldFill.INSERT) 82 | private Date createTime; 83 | 84 | 85 | /** 86 | * 接收原密码 87 | */ 88 | @TableField(exist = false) 89 | private String oldPassword; 90 | 91 | @TableField(exist = false) 92 | private String[] roles; 93 | 94 | 95 | } 96 | -------------------------------------------------------------------------------- /web/src/utils/request.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios' 2 | import { Message, MessageBox } from 'element-ui' 3 | import store from '../store' 4 | import { getToken } from '@/utils/auth' 5 | 6 | // 创建axios实例 7 | const service = axios.create({ 8 | baseURL: process.env.BASE_API, // api 的 base_url 9 | timeout: 5000 // 请求超时时间 10 | }) 11 | 12 | // request拦截器 13 | service.interceptors.request.use( 14 | config => { 15 | if (store.getters.token) { 16 | config.headers['X-Token'] = getToken() // 让每个请求携带自定义token 请根据实际情况自行修改 17 | } 18 | return config 19 | }, 20 | error => { 21 | // Do something with request error 22 | console.log(error) // for debug 23 | Promise.reject(error) 24 | } 25 | ) 26 | 27 | // response 拦截器 28 | service.interceptors.response.use( 29 | response => { 30 | /** 31 | * code为非20000是抛错 可结合自己业务进行修改 32 | */ 33 | const res = response.data 34 | if (res.code !== 20000) { 35 | Message({ 36 | message: res.message, 37 | type: 'error', 38 | duration: 5 * 1000 39 | }) 40 | 41 | // 50008:非法的token; 50012:其他客户端登录了; 50014:Token 过期了; 42 | if (res.code === 50008 || res.code === 50012 || res.code === 50014) { 43 | MessageBox.confirm( 44 | '你已被登出,可以取消继续留在该页面,或者重新登录', 45 | '确定登出', 46 | { 47 | confirmButtonText: '重新登录', 48 | cancelButtonText: '取消', 49 | type: 'warning' 50 | } 51 | ).then(() => { 52 | store.dispatch('FedLogOut').then(() => { 53 | location.reload() // 为了重新实例化vue-router对象 避免bug 54 | }) 55 | }) 56 | } 57 | return Promise.reject('error') 58 | } else { 59 | return response.data 60 | } 61 | }, 62 | error => { 63 | console.log('err' + error) // for debug 64 | Message({ 65 | message: error.message, 66 | type: 'error', 67 | duration: 5 * 1000 68 | }) 69 | return Promise.reject(error) 70 | } 71 | ) 72 | 73 | export default service 74 | -------------------------------------------------------------------------------- /wx/pages/info/index.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 | {{sexList[sex_Index].title}} 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 46 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 基于Java+Springboot+Vue大学生心理咨询小程序-毕业设计 2 | 3 | # 获取地址 4 | 5 | #### 作者QQ:3275035005 微信:xkbishe123 (支持修改、 部署调试、 代做接毕业设计和课程设计) 6 | 7 | #### 网站建设、小程序、H5、APP、各种系统、样式修改、10000套源码可选。 8 | 9 | #### 选题+开题报告+任务书+程序定制+安装调试+论文+答辩ppt 都可以做 10 | 11 | #### 问题包修改,包满意,有需求尽管甩过来!一条龙帮你安心过! 12 | 13 | #### 所有项目以及源代码本人均调试运行无问题 可支持远程调试运行 14 | 15 | # 项目介绍 16 | 基于基于SpringBoot大学生心理咨询小程序-毕业设计,本系统分微信小程序和管理后台两部分,项目采用前后端分离 17 | 18 | 可选题目:心理咨询小程序、校园心理咨询小程序、大学生心理咨询小程序、心理咨询平台 19 | 20 | ### 1. 用户 21 | 22 | ​ 用户登录,用户注册、查看通知、心理评测、查看心理知识、收藏心理知识、查看个人心理健康指数分析、查看咨询师、匿名咨询、在线咨询、评测记录、我的收藏、密码修改、密码修改、个人信息修改、退出登录 23 | 24 | ### 2. 管理员 25 | 26 | 管理员登录、首页统计、收藏信息管理、通知公告管理、心理知识管理、评测信息管理、学生画像分析、咨询管理、用户管理、密码修改、个人中心 27 | 28 | ### 3. 咨询师端 29 | 30 | 咨询师登录、首页统计、心理知识管理、评测信息管理、咨询信息管理、咨询在线沟通、密码修改、个人中心 31 | 32 | # 技术框架 33 | - 开发语言:Java 34 | - 数据库:Mysql 35 | - 系统环境:jdk8、maven、node 36 | - 后端框架:SpringBoot、MyBatisplus、MyBatis 37 | - 前端框架:Vue、Elementui、微信小程序 38 | - 工具:IDEA、Navicat、微信开发者工具 39 | - 技术架构:前后端分离、B/S架构、MVC架构 40 | # 项目截图 41 | 42 | ### 1. 微信端 43 | 44 | ![](image/A1.png) 45 | 46 | ![](image/A2.png) 47 | 48 | ![](image/A3.png) 49 | 50 | ![](image/A4.png) 51 | 52 | ![](image/A5.png) 53 | 54 | ![](image/A6.png) 55 | 56 | ![](image/A7.png) 57 | 58 | ![](image/A8.png) 59 | 60 | ![](image/A9.png) 61 | 62 | ![](image/A10.png) 63 | 64 | ![](image/A11.png) 65 | 66 | ![](image/A12.png) 67 | 68 | ![](image/A13.png) 69 | 70 | ![](image/A14.png) 71 | 72 | ![](image/A15.png) 73 | 74 | ![](image/A16.png) 75 | 76 | ![](image/A17.png) 77 | 78 | ![](image/A18.png) 79 | 80 | ![](image/A19.png) 81 | 82 | ### 2. 管理端 83 | 84 | ![](image/B1.png) 85 | 86 | ![](image/B2.png) 87 | 88 | ![](image/B3.png) 89 | 90 | ![](image/B4.png) 91 | 92 | ![](image/B5.png) 93 | 94 | ![](image/B6.png) 95 | 96 | ![](image/B7.png) 97 | 98 | ![](image/B8.png) 99 | 100 | ![](image/B9.png) 101 | 102 | ![](image/B10.png) 103 | 104 | ![](image/B11.png) 105 | 106 | ![](image/B12.png) 107 | -------------------------------------------------------------------------------- /wx/project.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", 3 | "packOptions": { 4 | "ignore": [ 5 | { 6 | "value": ".eslintrc.js", 7 | "type": "file" 8 | } 9 | ], 10 | "include": [] 11 | }, 12 | "setting": { 13 | "urlCheck": false, 14 | "es6": true, 15 | "enhance": true, 16 | "postcss": true, 17 | "preloadBackgroundData": false, 18 | "minified": true, 19 | "newFeature": false, 20 | "coverView": true, 21 | "nodeModules": false, 22 | "autoAudits": false, 23 | "showShadowRootInWxmlPanel": true, 24 | "scopeDataCheck": false, 25 | "uglifyFileName": false, 26 | "checkInvalidKey": true, 27 | "checkSiteMap": true, 28 | "uploadWithSourceMap": true, 29 | "compileHotReLoad": true, 30 | "lazyloadPlaceholderEnable": false, 31 | "useMultiFrameRuntime": true, 32 | "useApiHook": true, 33 | "useApiHostProcess": true, 34 | "babelSetting": { 35 | "ignore": [], 36 | "disablePlugins": [], 37 | "outputPath": "" 38 | }, 39 | "useIsolateContext": false, 40 | "userConfirmedBundleSwitch": false, 41 | "packNpmManually": false, 42 | "packNpmRelationList": [], 43 | "minifyWXSS": true, 44 | "disableUseStrict": false, 45 | "minifyWXML": true, 46 | "showES6CompileOption": false, 47 | "useCompilerPlugins": false, 48 | "ignoreUploadUnusedFiles": true, 49 | "useStaticServer": true 50 | }, 51 | "compileType": "miniprogram", 52 | "libVersion": "2.19.4", 53 | "appid": "wx797cf0041f2b9ad5", 54 | "projectname": "Q%20%E6%B1%BD%E8%BD%A6%E8%BF%94%E5%88%A901", 55 | "editorSetting": { 56 | "tabIndent": "insertSpaces", 57 | "tabSize": 4 58 | }, 59 | "condition": {} 60 | } -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/controller/PNoticeController.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.controller; 2 | 3 | 4 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 5 | import com.cn.psychological.entity.PNotice; 6 | import com.cn.psychological.service.PNoticeService; 7 | import com.cn.psychological.utils.page.PageResult; 8 | import com.cn.psychological.utils.response.R; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.web.bind.annotation.*; 11 | 12 | import java.util.List; 13 | 14 | /** 15 | *

16 | * 通知公告信息表 前端控制器 17 | *

18 | */ 19 | @RestController 20 | @RequestMapping("/p-notice") 21 | public class PNoticeController { 22 | 23 | @Autowired 24 | private PNoticeService service; 25 | 26 | /** 27 | * 分页条件查询 28 | * @param page 当前页码 29 | * @param limit 每页的大小 30 | * @param data 封装查询条件数据 31 | * @return 32 | */ 33 | @PostMapping("pageQuery/{page}/{limit}") 34 | public R getPageData( 35 | @PathVariable int page, 36 | @PathVariable int limit, 37 | @RequestBody PNotice data){ 38 | PageResult pageResult = service.pageQuery(page, limit, data); 39 | return R.ok().data("rows",pageResult); 40 | } 41 | /** 42 | * 修改操作 43 | * @param data 44 | * @return 45 | */ 46 | @PutMapping("update") 47 | public R update(@RequestBody PNotice data){ 48 | service.updateById(data); 49 | return R.ok(); 50 | } 51 | 52 | /** 53 | * 新增操作 54 | * @param data 55 | * @return 56 | */ 57 | @PostMapping("insert") 58 | public R insert(@RequestBody PNotice data){ 59 | service.save(data); 60 | return R.ok(); 61 | } 62 | 63 | /** 64 | * 删除操作 65 | * @param id 66 | * @return 67 | */ 68 | @DeleteMapping("deleteById/{id}") 69 | public R deleteById(@PathVariable String id){ 70 | service.removeById(id); 71 | return R.ok(); 72 | } 73 | } 74 | 75 | -------------------------------------------------------------------------------- /wx/pages/wode/wode.js: -------------------------------------------------------------------------------- 1 | var call = require("../../utils/request.js") 2 | var help = require("../../utils/help.js") 3 | 4 | var userId = ''; 5 | Page({ 6 | 7 | /** 8 | * 页面的初始数据 9 | */ 10 | data: { 11 | 12 | 13 | // --- 用户信息 --- // 14 | userInfo: {}, 15 | 16 | 17 | // --- 面板 --- // 18 | user_panel: [ 19 | { 20 | url: "/pages/answer_list/index", 21 | icon: "/images/user_panel_02.svg", 22 | title: "评测记录" 23 | }, { 24 | url: "/pages/favorite/index", 25 | icon: "/images/user_panel_02.svg", 26 | title: "我的收藏" 27 | }, { 28 | url: "/pages/updatePassword/index", 29 | icon: "/images/user_panel_04.svg", 30 | title: "密码修改" 31 | } 32 | ] 33 | }, 34 | 35 | onLoad: function () { 36 | this.getInit(); 37 | }, 38 | 39 | /** 40 | * 获取登录用户信息 41 | */ 42 | getInit() { 43 | userId = wx.getStorageSync("token") 44 | // 用户信息不存在跳转登录页面 45 | if (userId == null || userId == undefined || userId == '') { 46 | // 跳转到登录页面 47 | wx.reLaunch({ 48 | url: '/pages/login/index' 49 | }) 50 | } else { 51 | this.getInfo(); 52 | } 53 | }, 54 | 55 | getInfo() { 56 | call.getData('wx/getUserInfo?id=' + userId, this.onSuccessclassAll, this.onFaiclassAll); 57 | }, 58 | onSuccessclassAll(res) { 59 | if (res.code == 20000) { 60 | this.setData({ 61 | userInfo: res.data.row 62 | }) 63 | } 64 | }, 65 | onFaiclassAll() { 66 | help.show("网络请求失败"); 67 | }, 68 | 69 | 70 | // 退出登录 71 | out() { 72 | wx.showModal({ 73 | title: '是否退出登录', 74 | success(res) { 75 | if (res.confirm) { 76 | wx.removeStorageSync('token') 77 | help.okShow("退出成功"); 78 | setTimeout(function () { 79 | wx.reLaunch({ 80 | url: '/pages/login/index', 81 | }) 82 | }, 1000) 83 | } else if (res.cancel) { 84 | 85 | } 86 | } 87 | }) 88 | 89 | 90 | 91 | } 92 | 93 | 94 | 95 | }) -------------------------------------------------------------------------------- /wx/images/user_panel_05.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /wx/pages/login/index.js: -------------------------------------------------------------------------------- 1 | // pages/login/index.js 2 | const app = getApp(); 3 | var call = require("../../utils/request.js") 4 | var help = require("../../utils/help.js") 5 | var userInfo = null; 6 | Page({ 7 | /** 8 | * 页面的初始数据 9 | */ 10 | data: { 11 | username:'', 12 | password:'', 13 | version: app.globalData.version, 14 | }, 15 | onLoad:function(){ 16 | userInfo = wx.getStorageSync('token') 17 | console.log(userInfo) 18 | if(userInfo!=null&&userInfo!=''){ 19 | wx.reLaunch({ 20 | url: '/pages/index/index' 21 | }) 22 | } 23 | }, 24 | getUserValue:function(e){ 25 | this.setData({ 26 | username : e.detail.value 27 | }) 28 | }, 29 | 30 | getPasswordValue:function(e){ 31 | this.setData({ 32 | password : e.detail.value 33 | }) 34 | }, 35 | 36 | 37 | 38 | // 用户名登录 - 提交表单信息 39 | login_User_Button:function(){ 40 | if(this.data.username == ""){ 41 | wx.showToast({ 42 | title: '用户名不能为空', 43 | icon: 'none', 44 | duration: 1000 45 | }) 46 | return false; 47 | } 48 | if(this.data.password == ""){ 49 | wx.showToast({ 50 | title: '密码不能为空', 51 | icon: 'none', 52 | duration: 1000 53 | }) 54 | return false; 55 | } 56 | wx.showLoading({ 57 | title: '正在登录...' 58 | }); 59 | call.request('wx/login',{ 60 | username:this.data.username, 61 | password:this.data.password 62 | }, this.onSuccess, this.onFail); 63 | }, 64 | onSuccess(res) { 65 | wx.hideLoading(); 66 | if(res.success){ 67 | wx.setStorageSync('token', res.data.token) 68 | wx.reLaunch({ 69 | url: '/pages/index/index' 70 | }) 71 | }else{ 72 | help.show(res.message) 73 | } 74 | }, 75 | onFail() { 76 | wx.hideLoading(); 77 | help.show("网络请求超时,请稍后再试") 78 | }, 79 | 80 | toRegister(){ 81 | wx.navigateTo({ 82 | url: '/pages/register/index', 83 | }) 84 | } 85 | 86 | 87 | 88 | }) -------------------------------------------------------------------------------- /wx/pages/index/index.wxss: -------------------------------------------------------------------------------- 1 | /* --- banner --- */ 2 | .home_banner{position: relative; padding-bottom: 0;} 3 | .home_banner__box{box-shadow: 0 10rpx 20rpx rgba(255,255,255,0.16);} 4 | .home_banner__swiper{height: 244rpx;} 5 | .home_banner__image{width: 686rpx; height: 244rpx;} 6 | 7 | 8 | 9 | 10 | /* --- 通知 --- */ 11 | .home_notice{margin: 0 32rpx; border-bottom: 1rpx solid #efefef; height: 80rpx;} 12 | .home_notice__icon{width: 50rpx; height: 50rpx;} 13 | .home_notice__title{font-size: 24rpx; margin-left: 16rpx; opacity: .4; width: 10%;} 14 | .home_notice__content{width: 75%;} 15 | .home_notice__swiper{height: 80rpx;} 16 | .home_notice__item{line-height: 80rpx; font-size: 24rpx;} 17 | .home_notice__close{width: 32rpx; height: 32rpx; margin-left: auto;} 18 | 19 | 20 | 21 | 22 | /* --- 金刚区 --- */ 23 | .home_vajra{padding: 16rpx 0;} 24 | .home_vajra__item{text-align: center; width: 25%; text-align: center;} 25 | .home_vajra__icon{width: 80rpx; height: 80rpx;} 26 | .home_vajra__title{font-size: 24rpx;} 27 | 28 | 29 | 30 | 31 | /* --- 喜报 --- */ 32 | .home_good{margin: 20rpx 32rpx; padding: 0 20rpx; overflow: hidden; border-radius: 20rpx; overflow: hidden; margin-bottom: 40rpx;} 33 | .home_good__column{justify-content: space-between; height: 96rpx; color: #fff; padding: 0 16rpx;} 34 | .home_good__title{position: relative; z-index: 99;} 35 | .home_good__title::after{content: ""; left: 0; width: 100%; height: 3px; background: #fff; position: absolute; bottom: 0rpx; border-radius: 100rpx; opacity: .4;} 36 | .home_good__more{font-size: 24rpx;} 37 | 38 | /* list */ 39 | .home_good__swiper{height: 450rpx;} 40 | .home_good__list{background: #fff; border-radius: 20rpx; margin-bottom: 20rpx;} 41 | .home_good__item{ height: 150rpx;} 42 | .home_good__box{padding: 32rpx 0; display: flex; align-items: center; border-bottom: 1rpx solid #efefef;} 43 | .home_good__icon{width: 56rpx; height: 56rpx; margin: 0 32rpx;} 44 | .home_good__number{font-size: 40rpx; font-family: din; font-size: 32rpx; margin-bottom: 12rpx;} 45 | .home_good__dep{font-size: 24rpx; color: #999;} 46 | .home_good__item:last-child{border-bottom: none;} 47 | 48 | 49 | -------------------------------------------------------------------------------- /web/src/icons/svg/xt.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server/src/main/java/com/cn/psychological/controller/PKnowledgeController.java: -------------------------------------------------------------------------------- 1 | package com.cn.psychological.controller; 2 | 3 | 4 | import com.cn.psychological.entity.PKnowledge; 5 | import com.cn.psychological.service.PKnowledgeService; 6 | import com.cn.psychological.utils.page.PageResult; 7 | import com.cn.psychological.utils.response.R; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.web.bind.annotation.*; 10 | 11 | import java.util.List; 12 | 13 | /** 14 | *

15 | * 心理知识信息表 前端控制器 16 | *

17 | */ 18 | @RestController 19 | @RequestMapping("/p-knowledge") 20 | public class PKnowledgeController { 21 | 22 | @Autowired 23 | private PKnowledgeService service; 24 | 25 | /** 26 | * 分页条件查询 27 | * @param page 当前页码 28 | * @param limit 每页的大小 29 | * @param data 封装查询条件数据 30 | * @return 31 | */ 32 | @PostMapping("pageQuery/{page}/{limit}") 33 | public R getPageData( 34 | @PathVariable int page, 35 | @PathVariable int limit, 36 | @RequestBody PKnowledge data){ 37 | 38 | PageResult pageResult = service.pageQuery(page, limit, data); 39 | return R.ok().data("rows",pageResult); 40 | } 41 | /** 42 | * 修改操作 43 | * @param data 44 | * @return 45 | */ 46 | @PutMapping("update") 47 | public R update(@RequestBody PKnowledge data){ 48 | service.updateById(data); 49 | return R.ok(); 50 | } 51 | 52 | /** 53 | * 新增操作 54 | * @param data 55 | * @return 56 | */ 57 | @PostMapping("insert") 58 | public R insert(@RequestBody PKnowledge data){ 59 | service.save(data); 60 | return R.ok(); 61 | } 62 | 63 | /** 64 | * 删除操作 65 | * @param id 66 | * @return 67 | */ 68 | @DeleteMapping("deleteById/{id}") 69 | public R deleteById(@PathVariable String id){ 70 | service.removeById(id); 71 | return R.ok(); 72 | } 73 | 74 | /** 75 | * 查询所有 76 | * @return 77 | */ 78 | @GetMapping("getKnowledgeAll") 79 | public R getKnowledgeAll(){ 80 | List list = service.list(null); 81 | return R.ok().data("row", list); 82 | } 83 | } 84 | 85 | -------------------------------------------------------------------------------- /wx/pages/knowledge_info/index.js: -------------------------------------------------------------------------------- 1 | var call = require("../../utils/request.js") 2 | var help = require("../../utils/help.js") 3 | var userId = ''; 4 | var knowledgeId = ''; 5 | Page({ 6 | 7 | /** 8 | * 页面的初始数据 9 | */ 10 | data: { 11 | itme: {}, 12 | }, 13 | 14 | onLoad: function (options) { 15 | const { id } = options; 16 | knowledgeId = id 17 | this.getInit(); 18 | 19 | }, 20 | /** 21 | * 获取登录用户信息 22 | */ 23 | getInit() { 24 | userId = wx.getStorageSync("token") 25 | // 用户信息不存在跳转登录页面 26 | if (userId == null || userId == undefined || userId == '') { 27 | // 跳转到登录页面 28 | wx.reLaunch({ 29 | url: '/pages/login/index' 30 | }) 31 | } else { 32 | this.getInfo(); 33 | } 34 | }, 35 | 36 | getInfo() { 37 | call.getData('wx/getKnowledgeById?id=' + knowledgeId + "&userId=" + userId, this.onSuccessclassAll, this.onFaiclassAll); 38 | }, 39 | onSuccessclassAll(res) { 40 | if (res.code == 20000) { 41 | this.setData({ 42 | item: res.data.row 43 | }) 44 | } 45 | }, 46 | onFaiclassAll() { 47 | help.show("网络请求失败"); 48 | }, 49 | 50 | // 收藏 51 | appointmentFavoriteBtn() { 52 | call.request('wx/appointmentFavorite', { 53 | knowledgeId: this.data.item.id, 54 | userId: userId, 55 | }, this.onSuccessappointmentFavoriteBtn, this.onFaiappointmentFavoriteBtn); 56 | }, 57 | onSuccessappointmentFavoriteBtn(res) { 58 | if (res.code == 20000) { 59 | help.show("加入收藏成功"); 60 | this.getInfo(); 61 | } else { 62 | help.show(res.message); 63 | } 64 | }, 65 | onFaiappointmentFavoriteBtn() { 66 | help.show("网络请求失败"); 67 | }, 68 | 69 | //取消收藏 70 | cancelAppointmentFavoriteBtn() { 71 | call.request('wx/cancelAppointmentFavorite', { 72 | knowledgeId: this.data.item.id, 73 | userId: userId, 74 | }, this.onSuccesscancelAppointmentFavoriteBtn, this.onFaicancelAppointmentFavoriteBtn); 75 | }, 76 | onSuccesscancelAppointmentFavoriteBtn(res) { 77 | if (res.code == 20000) { 78 | help.show("取消收藏成功"); 79 | this.getInfo(); 80 | } else { 81 | help.show(res.message); 82 | } 83 | }, 84 | onFaicancelAppointmentFavoriteBtn() { 85 | help.show("网络请求失败"); 86 | }, 87 | }) -------------------------------------------------------------------------------- /wx/pages/counselor_info/index.wxss: -------------------------------------------------------------------------------- 1 | page{background: #F4F6FA;} 2 | 3 | 4 | /* --- banner --- */ 5 | .detailed_banner__swiper{height: 750rpx;} 6 | .detailed_banner__item{height: 750rpx;} 7 | .detailed_banner__image{width: 100%; height: 100%;} 8 | 9 | 10 | rich-text .wscnph{ 11 | max-width:100%;height:auto;display:block;margin:10px 0; 12 | } 13 | 14 | 15 | /* --- box --- */ 16 | .detailed_box{padding: 32rpx;} 17 | 18 | 19 | 20 | /* --- info --- */ 21 | .detailed_info{padding: 0 32rpx; background: #fff; border-radius: 16rpx; margin-bottom: 32rpx;} 22 | 23 | /* integral */ 24 | .detailed_integral{padding: 16rpx 0; padding-bottom: 8rpx;} 25 | .detailed_integral__number{font-size: 50rpx; font-family: din; color: #FF4C4C;} 26 | .detailed_integral__text{font-size: 25rpx; color: #999; margin-left: 16rpx;} 27 | 28 | /* title */ 29 | .detailed_title{font-size: 28rpx; font-weight: bolder; line-height: 1.5; margin-bottom: 16rpx;} 30 | 31 | /* dep */ 32 | .detailed_dep{font-size: 25rpx; color: #999; margin-bottom: 16rpx;} 33 | 34 | /* other */ 35 | .detailed_other{ border-top: 1rpx solid #efefef; height: 100%; font-size: 25rpx;} 36 | .detailed_other__item{margin-right: 32rpx; color:#999;} 37 | .detailed_other__item text{color: #FF4C4C; font-family: din;} 38 | 39 | 40 | 41 | /* --- rule --- */ 42 | .detailed_rule{background: #fff; border-radius: 16rpx; height: 112rpx; font-size: 25rpx; padding: 0 32rpx; padding-right: 20rpx;} 43 | .detailed_rule__content{color: #999; margin-left: auto;} 44 | .detailed_rule__more{width: 32rpx; height: 32rpx;} 45 | .detailed_rule__picker{height: 112rpx; display: flex; align-items: center; padding: 0 32rpx;} 46 | 47 | 48 | /* --- column --- */ 49 | .detailed_column{margin: 32rpx 0 32rpx 0; text-align: center;} 50 | .detailed_column text{padding: 0 20rpx; font-size: 25rpx; color: #999;} 51 | .detailed_column text.line{color: #ccc;} 52 | 53 | 54 | 55 | /* --- content --- */ 56 | .detailed_content{margin-bottom: 150rpx;} 57 | 58 | 59 | 60 | 61 | /* --- btn --- */ 62 | .detailed_btn{position: fixed; bottom: 0; left: 0; width: 100%; background: #fff; padding: 25rpx;} 63 | .page_button1{float: left; width: 95%; padding: 0; margin: 0;padding: 0; height: 96rpx; line-height: 96rpx;background: linear-gradient(to bottom, #4564FC , #5F7AFB); color: #fff; border-radius: 20rpx; height: 112rpx; line-height: 112rpx; padding: 0; font-weight: 400; font-size: 28rpx;} --------------------------------------------------------------------------------