├── cms_data ├── .idea │ ├── .name │ ├── artifacts │ │ └── web_war.xml │ ├── encodings.xml │ ├── modules.xml │ ├── libraries │ │ ├── Maven__junit_junit_4_11.xml │ │ ├── Maven__antlr_antlr_2_7_7.xml │ │ ├── Maven__dom4j_dom4j_1_6_1.xml │ │ ├── Maven__com_mchange_c3p0_0_9_5_2.xml │ │ ├── Maven__redis_clients_jedis_2_7_1.xml │ │ ├── Maven__com_auth0_java_jwt_2_2_0.xml │ │ ├── Maven__org_mybatis_mybatis_3_4_1.xml │ │ ├── Maven__org_opensaml_opensaml_1_1.xml │ │ ├── Maven__xml_apis_xml_apis_1_0_b2.xml │ │ ├── Maven__org_slf4j_slf4j_api_1_7_19.xml │ │ ├── Maven__aopalliance_aopalliance_1_0.xml │ │ ├── Maven__com_alibaba_fastjson_1_2_10.xml │ │ ├── Maven__commons_io_commons_io_1_3_2.xml │ │ ├── Maven__org_aspectj_aspectjrt_1_8_4.xml │ │ ├── Maven__org_jboss_jandex_1_1_0_Final.xml │ │ ├── Maven__org_apache_santuario_xmlsec_1_4_0.xml │ │ ├── Maven__org_hamcrest_hamcrest_core_1_3.xml │ │ ├── Maven__commons_codec_commons_codec_1_9.xml │ │ ├── Maven__org_aspectj_aspectjweaver_1_8_4.xml │ │ ├── Maven__org_freemarker_freemarker_2_3_23.xml │ │ ├── Maven__ch_qos_logback_logback_core_1_1_7.xml │ │ ├── Maven__org_slf4j_jcl_over_slf4j_1_7_12.xml │ │ ├── Maven__org_javassist_javassist_3_18_1_GA.xml │ │ ├── Maven__org_mybatis_mybatis_spring_1_3_0.xml │ │ ├── Maven__org_springframework_spring_test_2_5.xml │ │ ├── Maven__commons_logging_commons_logging_1_2.xml │ │ ├── Maven__org_apache_commons_commons_pool2_2_3.xml │ │ ├── Maven__ch_qos_logback_logback_access_1_1_7.xml │ │ ├── Maven__ch_qos_logback_logback_classic_1_1_7.xml │ │ ├── Maven__org_apache_httpcomponents_httpclient_4_5.xml │ │ ├── Maven__org_apache_httpcomponents_httpcore_4_4_1.xml │ │ ├── Maven__mysql_mysql_connector_java_8_0_11.xml │ │ ├── Maven__com_google_protobuf_protobuf_java_2_6_0.xml │ │ ├── Maven__javax_servlet_javax_servlet_api_3_1_0.xml │ │ ├── Maven__org_jboss_logging_jboss_logging_3_1_3_GA.xml │ │ ├── Maven__com_fasterxml_jackson_core_jackson_core_2_7_4.xml │ │ ├── Maven__com_mchange_mchange_commons_java_0_2_15.xml │ │ ├── Maven__org_hibernate_hibernate_core_4_3_8_Final.xml │ │ ├── Maven__org_springframework_spring_tx_4_1_4_RELEASE.xml │ │ ├── Maven__org_springframework_spring_aop_4_1_4_RELEASE.xml │ │ ├── Maven__org_springframework_spring_orm_4_1_4_RELEASE.xml │ │ ├── Maven__org_springframework_spring_oxm_4_1_4_RELEASE.xml │ │ ├── Maven__org_springframework_spring_web_4_1_4_RELEASE.xml │ │ ├── Maven__org_springframework_spring_core_4_1_4_RELEASE.xml │ │ ├── Maven__org_springframework_spring_jdbc_4_1_4_RELEASE.xml │ │ ├── Maven__org_logback_extensions_logback_ext_spring_0_1_4.xml │ │ ├── Maven__org_springframework_spring_beans_4_1_4_RELEASE.xml │ │ ├── Maven__com_fasterxml_jackson_core_jackson_databind_2_7_4.xml │ │ ├── Maven__org_springframework_spring_webmvc_4_1_4_RELEASE.xml │ │ ├── Maven__org_springframework_spring_context_4_1_4_RELEASE.xml │ │ ├── Maven__com_fasterxml_jackson_core_jackson_annotations_2_7_0.xml │ │ ├── Maven__org_springframework_spring_expression_4_1_4_RELEASE.xml │ │ ├── Maven__org_hibernate_hibernate_entitymanager_4_3_8_Final.xml │ │ ├── Maven__org_jboss_logging_jboss_logging_annotations_1_2_0_Beta1.xml │ │ ├── Maven__org_springframework_spring_context_support_4_1_4_RELEASE.xml │ │ ├── Maven__org_hibernate_javax_persistence_hibernate_jpa_2_1_api_1_0_0_Final.xml │ │ ├── Maven__org_hibernate_common_hibernate_commons_annotations_4_0_5_Final.xml │ │ └── Maven__org_jboss_spec_javax_transaction_jboss_transaction_api_1_2_spec_1_0_0_Final.xml │ ├── compiler.xml │ └── misc.xml ├── web │ ├── src │ │ └── main │ │ │ ├── resources │ │ │ ├── config.properties │ │ │ ├── redis.properties │ │ │ ├── jetty-context.xml │ │ │ ├── jdbc.properties │ │ │ ├── dispatcher-servlet.xml │ │ │ ├── mybatis-config.xml │ │ │ ├── logback.xml │ │ │ └── mybatis │ │ │ │ └── RoleMapper.xml │ │ │ ├── filters │ │ │ ├── dev │ │ │ │ ├── config.properties │ │ │ │ ├── redis.properties │ │ │ │ ├── logback.properties │ │ │ │ └── jdbc.properties │ │ │ ├── local │ │ │ │ ├── config.properties │ │ │ │ ├── redis.properties │ │ │ │ ├── jdbc.properties │ │ │ │ └── logback.properties │ │ │ ├── prod │ │ │ │ ├── config.properties │ │ │ │ ├── redis.properties │ │ │ │ ├── jdbc.properties │ │ │ │ └── logback.properties │ │ │ ├── qa │ │ │ │ ├── config.properties │ │ │ │ ├── redis.properties │ │ │ │ ├── jdbc.properties │ │ │ │ └── logback.properties │ │ │ └── test │ │ │ │ ├── config.properties │ │ │ │ ├── redis.properties │ │ │ │ ├── jdbc.properties │ │ │ │ └── logback.properties │ │ │ ├── java │ │ │ └── com │ │ │ │ └── liyu │ │ │ │ └── cms │ │ │ │ └── data │ │ │ │ └── web │ │ │ │ ├── util │ │ │ │ ├── LoginInfo.java │ │ │ │ ├── ResponseData.java │ │ │ │ ├── RSAUtil.java │ │ │ │ └── JWT.java │ │ │ │ ├── controller │ │ │ │ └── IndexController.java │ │ │ │ └── filters │ │ │ │ └── ChainFilter.java │ │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── view │ │ │ └── test.ftl │ │ │ └── web.xml │ └── .DS_Store ├── .DS_Store └── core │ ├── .DS_Store │ └── src │ └── main │ └── java │ └── com │ └── liyu │ └── cms │ └── data │ └── core │ ├── service │ ├── ILoginService.java │ ├── IRegisterService.java │ ├── IUserService.java │ ├── IMenuService.java │ ├── IRoleService.java │ └── impl │ │ ├── RegisterService.java │ │ ├── UserService.java │ │ └── LoginService.java │ ├── domain │ ├── RolePrivilege.java │ ├── Role.java │ ├── MenuOne.java │ ├── MenuPage.java │ └── UserInfo.java │ ├── util │ └── StatusTypeUtil.java │ └── dao │ ├── UserDao.java │ ├── MenuDao.java │ └── RoleDao.java ├── cms_web ├── build │ ├── env.js │ ├── config.js │ ├── webpack.dev.config.js │ ├── webpack.prod.config.js │ └── webpack.base.config.js ├── src │ ├── views │ │ ├── privilege-mgr │ │ │ ├── role-privilege │ │ │ │ ├── role-privilege.less │ │ │ │ └── role-privilege.vue │ │ │ ├── menu-mgr │ │ │ │ └── menu-mgr.less │ │ │ ├── user-mgr │ │ │ │ └── user-mgr.less │ │ │ └── role-mgr │ │ │ │ └── role-mgr.less │ │ ├── main-components │ │ │ ├── shrinkable-menu │ │ │ │ ├── styles │ │ │ │ │ └── menu.less │ │ │ │ ├── components │ │ │ │ │ ├── sidebarMenu.vue │ │ │ │ │ └── sidebarMenuShrink.vue │ │ │ │ └── shrinkable-menu.vue │ │ │ ├── breadcrumb-nav.vue │ │ │ ├── message-tip.vue │ │ │ ├── lockscreen │ │ │ │ ├── components │ │ │ │ │ ├── locking-page.vue │ │ │ │ │ └── unlock.vue │ │ │ │ └── lockscreen.vue │ │ │ └── fullscreen.vue │ │ ├── test_menu │ │ │ └── test_page.vue │ │ ├── error-page │ │ │ ├── error-page.less │ │ │ ├── 404.vue │ │ │ ├── 403.vue │ │ │ ├── 404.less │ │ │ ├── 500.vue │ │ │ ├── 500.less │ │ │ ├── 403.less │ │ │ └── error-page.vue │ │ ├── common │ │ │ ├── return_code.js │ │ │ └── common_url.js │ │ ├── home │ │ │ ├── home.less │ │ │ └── home.vue │ │ ├── login │ │ │ └── login.less │ │ ├── own-space │ │ │ └── own-space.less │ │ ├── form │ │ │ └── article-publish │ │ │ │ └── preview.less │ │ ├── register │ │ │ └── register.less │ │ └── index.vue │ ├── images │ │ ├── logo.png │ │ ├── login_bg.jpg │ │ ├── logo-min.png │ │ ├── user_head.jpg │ │ └── cropper-test.png │ ├── styles │ │ ├── fonts │ │ │ ├── ionicons.eot │ │ │ ├── ionicons.ttf │ │ │ └── ionicons.woff │ │ ├── loading.less │ │ └── common.less │ ├── vendors │ │ ├── vendors.base.js │ │ └── vendors.exten.js │ ├── bus │ │ └── bus.js │ ├── store │ │ ├── index.js │ │ └── modules │ │ │ └── user.js │ ├── app.vue │ ├── locale │ │ ├── index.js │ │ └── locale.js │ ├── template │ │ └── index.ejs │ ├── main.js │ ├── route │ │ ├── index.js │ │ └── router.js │ └── libs │ │ └── safe_http.js ├── td_icon.ico ├── .travis.yml ├── .eslintignore ├── .babelrc ├── .gitignore ├── .editorconfig ├── .postcssrc.js ├── .eslintrc.json ├── index.html └── package.json ├── .DS_Store ├── imgs ├── 1.png ├── 2.png ├── 3.png ├── 4.png ├── 5.png ├── 6.png ├── 7.png ├── 8.png └── 9.png ├── .gitattributes ├── LICENSE └── README.md /cms_data/.idea/.name: -------------------------------------------------------------------------------- 1 | cms-data -------------------------------------------------------------------------------- /cms_data/web/src/main/resources/config.properties: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cms_web/build/env.js: -------------------------------------------------------------------------------- 1 | export default "development"; -------------------------------------------------------------------------------- /cms_data/web/src/main/filters/dev/config.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /cms_data/web/src/main/filters/local/config.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /cms_data/web/src/main/filters/prod/config.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /cms_data/web/src/main/filters/qa/config.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /cms_data/web/src/main/filters/test/config.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /cms_web/src/views/privilege-mgr/role-privilege/role-privilege.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrathLi/cms-vue-iView/HEAD/.DS_Store -------------------------------------------------------------------------------- /imgs/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrathLi/cms-vue-iView/HEAD/imgs/1.png -------------------------------------------------------------------------------- /imgs/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrathLi/cms-vue-iView/HEAD/imgs/2.png -------------------------------------------------------------------------------- /imgs/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrathLi/cms-vue-iView/HEAD/imgs/3.png -------------------------------------------------------------------------------- /imgs/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrathLi/cms-vue-iView/HEAD/imgs/4.png -------------------------------------------------------------------------------- /imgs/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrathLi/cms-vue-iView/HEAD/imgs/5.png -------------------------------------------------------------------------------- /imgs/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrathLi/cms-vue-iView/HEAD/imgs/6.png -------------------------------------------------------------------------------- /imgs/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrathLi/cms-vue-iView/HEAD/imgs/7.png -------------------------------------------------------------------------------- /imgs/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrathLi/cms-vue-iView/HEAD/imgs/8.png -------------------------------------------------------------------------------- /imgs/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrathLi/cms-vue-iView/HEAD/imgs/9.png -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /cms_data/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrathLi/cms-vue-iView/HEAD/cms_data/.DS_Store -------------------------------------------------------------------------------- /cms_web/td_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrathLi/cms-vue-iView/HEAD/cms_web/td_icon.ico -------------------------------------------------------------------------------- /cms_data/core/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrathLi/cms-vue-iView/HEAD/cms_data/core/.DS_Store -------------------------------------------------------------------------------- /cms_data/web/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrathLi/cms-vue-iView/HEAD/cms_data/web/.DS_Store -------------------------------------------------------------------------------- /cms_web/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "6" 4 | script: 5 | - npm run test 6 | -------------------------------------------------------------------------------- /cms_web/src/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrathLi/cms-vue-iView/HEAD/cms_web/src/images/logo.png -------------------------------------------------------------------------------- /cms_web/src/images/login_bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrathLi/cms-vue-iView/HEAD/cms_web/src/images/login_bg.jpg -------------------------------------------------------------------------------- /cms_web/src/images/logo-min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrathLi/cms-vue-iView/HEAD/cms_web/src/images/logo-min.png -------------------------------------------------------------------------------- /cms_web/src/images/user_head.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrathLi/cms-vue-iView/HEAD/cms_web/src/images/user_head.jpg -------------------------------------------------------------------------------- /cms_web/build/config.js: -------------------------------------------------------------------------------- 1 | import Env from './env'; 2 | 3 | let config = { 4 | env: Env 5 | }; 6 | export default config; 7 | -------------------------------------------------------------------------------- /cms_web/src/images/cropper-test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrathLi/cms-vue-iView/HEAD/cms_web/src/images/cropper-test.png -------------------------------------------------------------------------------- /cms_web/.eslintignore: -------------------------------------------------------------------------------- 1 | src/vendors 2 | src/libs/table2excel.js 3 | build 4 | router.js 5 | src/views/my-components/text-editor/tinymce -------------------------------------------------------------------------------- /cms_web/src/styles/fonts/ionicons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrathLi/cms-vue-iView/HEAD/cms_web/src/styles/fonts/ionicons.eot -------------------------------------------------------------------------------- /cms_web/src/styles/fonts/ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrathLi/cms-vue-iView/HEAD/cms_web/src/styles/fonts/ionicons.ttf -------------------------------------------------------------------------------- /cms_web/src/styles/fonts/ionicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrathLi/cms-vue-iView/HEAD/cms_web/src/styles/fonts/ionicons.woff -------------------------------------------------------------------------------- /cms_web/src/views/main-components/shrinkable-menu/styles/menu.less: -------------------------------------------------------------------------------- 1 | .ivu-shrinkable-menu{ 2 | height: 100%; 3 | width: 100%; 4 | } -------------------------------------------------------------------------------- /cms_web/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["stage-3", "env"], 3 | "plugins": ["transform-runtime", "syntax-dynamic-import"], 4 | "comments": false 5 | } 6 | -------------------------------------------------------------------------------- /cms_web/src/vendors/vendors.base.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import iView from 'iview'; 3 | import VueRouter from 'vue-router'; 4 | import Vuex from 'vuex'; 5 | -------------------------------------------------------------------------------- /cms_web/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .idea/ 3 | .DS_Store 4 | node_modules/ 5 | .project 6 | dist 7 | dist/* 8 | src/config/*.tmp 9 | src/config/env.js 10 | npm-debug.log -------------------------------------------------------------------------------- /cms_web/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | charset = utf-8 4 | indent_style = space 5 | indent_size = 4 6 | end_of_line = lf 7 | insert_final_newline = true 8 | trim_trailing_whitespace = true -------------------------------------------------------------------------------- /cms_web/.postcssrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "plugins": { 3 | // to edit target browsers: use "browserslist" field in package.json 4 | "autoprefixer": {} 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /cms_web/src/views/test_menu/test_page.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /cms_web/src/bus/bus.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | export default new Vue({ 3 | data() { 4 | return { 5 | 6 | }; 7 | }, 8 | computed: { 9 | 10 | }, 11 | methods: { 12 | 13 | } 14 | }); -------------------------------------------------------------------------------- /cms_data/web/src/main/filters/dev/redis.properties: -------------------------------------------------------------------------------- 1 | redis.resinfo.addr=192.168.7.54 2 | redis.resinfo.port=6379 3 | redis.resinfo.max-active=500 4 | redis.resinfo.max-idle=5 5 | redis.resinfo.max-wait=60000 6 | redis.resinfo.timeout=5000 7 | 8 | -------------------------------------------------------------------------------- /cms_data/web/src/main/filters/local/redis.properties: -------------------------------------------------------------------------------- 1 | redis.resinfo.addr=192.168.7.54 2 | redis.resinfo.port=6379 3 | redis.resinfo.max-active=500 4 | redis.resinfo.max-idle=5 5 | redis.resinfo.max-wait=60000 6 | redis.resinfo.timeout=5000 7 | 8 | -------------------------------------------------------------------------------- /cms_data/web/src/main/filters/prod/redis.properties: -------------------------------------------------------------------------------- 1 | redis.resinfo.addr=192.168.7.54 2 | redis.resinfo.port=6379 3 | redis.resinfo.max-active=500 4 | redis.resinfo.max-idle=5 5 | redis.resinfo.max-wait=60000 6 | redis.resinfo.timeout=5000 7 | 8 | -------------------------------------------------------------------------------- /cms_data/web/src/main/filters/qa/redis.properties: -------------------------------------------------------------------------------- 1 | redis.resinfo.addr=192.168.7.54 2 | redis.resinfo.port=6379 3 | redis.resinfo.max-active=500 4 | redis.resinfo.max-idle=5 5 | redis.resinfo.max-wait=60000 6 | redis.resinfo.timeout=5000 7 | 8 | -------------------------------------------------------------------------------- /cms_data/web/src/main/filters/test/redis.properties: -------------------------------------------------------------------------------- 1 | redis.resinfo.addr=192.168.7.54 2 | redis.resinfo.port=6379 3 | redis.resinfo.max-active=500 4 | redis.resinfo.max-idle=5 5 | redis.resinfo.max-wait=60000 6 | redis.resinfo.timeout=5000 7 | 8 | -------------------------------------------------------------------------------- /cms_web/src/views/privilege-mgr/role-privilege/role-privilege.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | 11 | -------------------------------------------------------------------------------- /cms_data/web/src/main/resources/redis.properties: -------------------------------------------------------------------------------- 1 | addr=${redis.resinfo.addr} 2 | port=${redis.resinfo.port} 3 | max-active=${redis.resinfo.max-active} 4 | max-idle=${redis.resinfo.max-idle} 5 | max-wait=${redis.resinfo.max-wait} 6 | timeout=${redis.resinfo.timeout} -------------------------------------------------------------------------------- /cms_web/src/styles/loading.less: -------------------------------------------------------------------------------- 1 | .demo-spin-icon-load{ 2 | animation: ani-demo-spin 1s linear infinite; 3 | } 4 | @keyframes ani-demo-spin { 5 | from { transform: rotate(0deg);} 6 | 50% { transform: rotate(180deg);} 7 | to { transform: rotate(360deg);} 8 | } -------------------------------------------------------------------------------- /cms_web/src/vendors/vendors.exten.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | import echarts from 'echarts'; 3 | import Cookies from 'js-cookie'; 4 | import clipboard from 'clipboard'; 5 | import html2canvas from 'html2canvas'; 6 | import rasterizehtml from 'rasterizehtml'; 7 | -------------------------------------------------------------------------------- /cms_data/.idea/artifacts/web_war.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | $PROJECT_DIR$/web/target 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /cms_data/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /cms_web/src/views/error-page/error-page.less: -------------------------------------------------------------------------------- 1 | .error-page{ 2 | &-show{ 3 | width: 100%; 4 | height: 180px; 5 | transform: scale(0.4); 6 | } 7 | &-cover{ 8 | position: absolute; 9 | width: 100%; 10 | height: 100%; 11 | left: 0; 12 | top: 0; 13 | } 14 | &-intro-con{ 15 | height: 180px; 16 | p{ 17 | display: block; 18 | width: 100%; 19 | text-align: center; 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /cms_web/src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import Vuex from 'vuex'; 3 | 4 | import app from './modules/app'; 5 | import user from './modules/user'; 6 | 7 | Vue.use(Vuex); 8 | 9 | const store = new Vuex.Store({ 10 | state: { 11 | // 12 | }, 13 | mutations: { 14 | // 15 | }, 16 | actions: { 17 | 18 | }, 19 | modules: { 20 | app, 21 | user 22 | } 23 | }); 24 | 25 | export default store; 26 | -------------------------------------------------------------------------------- /cms_data/web/src/main/resources/jetty-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | org.eclipse.jetty.server.webapp.WebInfIncludeJarPattern 6 | .*/.*jsp-api-[^/]\.jar$|./.*jsp-[^/]\.jar$|./.*taglibs[^/]*\.jar$ 7 | 8 | -------------------------------------------------------------------------------- /cms_data/core/src/main/java/com/liyu/cms/data/core/service/ILoginService.java: -------------------------------------------------------------------------------- 1 | package com.liyu.cms.data.core.service; 2 | 3 | import com.alibaba.fastjson.JSONArray; 4 | import com.alibaba.fastjson.JSONObject; 5 | import com.liyu.cms.data.core.domain.UserInfo; 6 | 7 | /** 8 | * Created by liyu on 2018/3/15. 9 | */ 10 | public interface ILoginService { 11 | 12 | //获取用户信息 13 | UserInfo getUserInfo(String userId); 14 | 15 | JSONArray getMenuByUser(UserInfo userInfo); 16 | 17 | 18 | } 19 | -------------------------------------------------------------------------------- /cms_data/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /cms_data/core/src/main/java/com/liyu/cms/data/core/service/IRegisterService.java: -------------------------------------------------------------------------------- 1 | package com.liyu.cms.data.core.service; 2 | 3 | import com.liyu.cms.data.core.domain.UserInfo; 4 | 5 | /** 6 | * Created by liyu on 2018/3/15. 7 | */ 8 | public interface IRegisterService { 9 | 10 | Integer registerUser(UserInfo userInfo); 11 | 12 | Integer editPersonInfo(UserInfo userInfo); 13 | 14 | Integer changePassword(Integer id, String pwd); 15 | 16 | UserInfo getUserByUserId(String userId); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__junit_junit_4_11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__antlr_antlr_2_7_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__dom4j_dom4j_1_6_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/core/src/main/java/com/liyu/cms/data/core/service/IUserService.java: -------------------------------------------------------------------------------- 1 | package com.liyu.cms.data.core.service; 2 | 3 | import com.liyu.cms.data.core.domain.UserInfo; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Created by liyu on 2018/3/22. 9 | */ 10 | public interface IUserService { 11 | 12 | Integer getUserTotalCount(String searchKey,Integer status); 13 | 14 | List getUserPage(String searchKey,Integer status,Integer pageIndex,Integer pageSize); 15 | 16 | Integer addUser(UserInfo item); 17 | 18 | Integer editUser(UserInfo item); 19 | 20 | Integer deleteUser(Integer id); 21 | } 22 | -------------------------------------------------------------------------------- /cms_data/web/src/main/java/com/liyu/cms/data/web/util/LoginInfo.java: -------------------------------------------------------------------------------- 1 | package com.liyu.cms.data.web.util; 2 | 3 | /** 4 | * Created by liyu on 2018/3/28. 5 | */ 6 | public class LoginInfo { 7 | 8 | private Integer loginId; 9 | 10 | private String username; 11 | 12 | public Integer getLoginId() { 13 | return loginId; 14 | } 15 | 16 | public void setLoginId(Integer loginId) { 17 | this.loginId = loginId; 18 | } 19 | 20 | public String getUsername() { 21 | return username; 22 | } 23 | 24 | public void setUsername(String username) { 25 | this.username = username; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__com_mchange_c3p0_0_9_5_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__redis_clients_jedis_2_7_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_web/src/views/common/return_code.js: -------------------------------------------------------------------------------- 1 | 2 | const ReturnCode = { 3 | PAGE_NOT_FUND_CODE: 403, 4 | PAGE_NOT_FUND_MSG: '页面不存在', 5 | LOGIN_SUCCEED_CODE: 1, 6 | LOGIN_SUCCEED_MSG: '登录成功', 7 | 8 | ERROR_LOGIN_UNKNOWN_CODE: -1, 9 | ERROR_LOGIN_UNKNOWN_MSG: '未知错误', 10 | ERROR_LOGIN_NOT_USER_CODE: -2, 11 | ERROR_LOGIN_NOT_USER_MSG: '用户不存在', 12 | ERROR_LOGIN_WRONG_PWD_CODE: -3, 13 | ERROR_LOGIN_WRONG_PWD_MSG: '密码错误', 14 | ERROR_LOGIN_USER_FREEZED_CODE: -4, 15 | ERROR_LOGIN_USER_FREEZED_MSG: '账号被冻结', 16 | 17 | REGISTER_SUCCEED_CODE: 1, 18 | REGISTER_SUCCEED_MSG: '' 19 | }; 20 | 21 | export default ReturnCode; 22 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__com_auth0_java_jwt_2_2_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_mybatis_mybatis_3_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_opensaml_opensaml_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/web/src/main/filters/prod/jdbc.properties: -------------------------------------------------------------------------------- 1 | admin-jdbc.driverClassName=com.mysql.jdbc.Driver 2 | admin-jdbc.url= 3 | admin-jdbc.user= 4 | admin-jdbc.pass= 5 | admin-hibernate.hbm2ddl.auto=update 6 | admin-hibernate.dialect=org.hibernate.dialect.MySQL5Dialect 7 | admin-hibernate.show_sql=true 8 | admin-hibernate.current_session_context_class=org.springframework.orm.hibernate4.SpringSessionContext 9 | 10 | #c3p0设置 11 | c3p0.minPoolSize=10 12 | c3p0.maxPoolSize=30 13 | c3p0.maxIdleTime=1800 14 | c3p0.acquireIncrement=3 15 | c3p0.initialPoolSize=10 16 | c3p0.idleConnectionTestPeriod=120 17 | c3p0.acquireRetryAttempts=30 18 | c3p0.testConnectionOnCheckout=false 19 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__xml_apis_xml_apis_1_0_b2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/web/src/main/filters/local/jdbc.properties: -------------------------------------------------------------------------------- 1 | admin-jdbc.driverClassName=com.mysql.jdbc.Driver 2 | 3 | admin-jdbc.url= 4 | admin-jdbc.user= 5 | admin-jdbc.pass= 6 | admin-hibernate.hbm2ddl.auto=update 7 | admin-hibernate.dialect=org.hibernate.dialect.MySQL5Dialect 8 | admin-hibernate.show_sql=true 9 | admin-hibernate.current_session_context_class=org.springframework.orm.hibernate4.SpringSessionContext 10 | 11 | #c3p0设置 12 | c3p0.minPoolSize=10 13 | c3p0.maxPoolSize=30 14 | c3p0.maxIdleTime=1800 15 | c3p0.acquireIncrement=3 16 | c3p0.initialPoolSize=10 17 | c3p0.idleConnectionTestPeriod=120 18 | c3p0.acquireRetryAttempts=30 19 | c3p0.testConnectionOnCheckout=false 20 | -------------------------------------------------------------------------------- /cms_data/web/src/main/filters/qa/jdbc.properties: -------------------------------------------------------------------------------- 1 | admin-jdbc.driverClassName=com.mysql.jdbc.Driver 2 | 3 | admin-jdbc.url= 4 | admin-jdbc.user= 5 | admin-jdbc.pass= 6 | admin-hibernate.hbm2ddl.auto=update 7 | admin-hibernate.dialect=org.hibernate.dialect.MySQL5Dialect 8 | admin-hibernate.show_sql=true 9 | admin-hibernate.current_session_context_class=org.springframework.orm.hibernate4.SpringSessionContext 10 | 11 | #c3p0设置 12 | c3p0.minPoolSize=10 13 | c3p0.maxPoolSize=30 14 | c3p0.maxIdleTime=1800 15 | c3p0.acquireIncrement=3 16 | c3p0.initialPoolSize=10 17 | c3p0.idleConnectionTestPeriod=120 18 | c3p0.acquireRetryAttempts=30 19 | c3p0.testConnectionOnCheckout=false 20 | -------------------------------------------------------------------------------- /cms_data/web/src/main/filters/test/jdbc.properties: -------------------------------------------------------------------------------- 1 | admin-jdbc.driverClassName=com.mysql.jdbc.Driver 2 | 3 | admin-jdbc.url= 4 | admin-jdbc.user= 5 | admin-jdbc.pass= 6 | admin-hibernate.hbm2ddl.auto=update 7 | admin-hibernate.dialect=org.hibernate.dialect.MySQL5Dialect 8 | admin-hibernate.show_sql=true 9 | admin-hibernate.current_session_context_class=org.springframework.orm.hibernate4.SpringSessionContext 10 | 11 | #c3p0设置 12 | c3p0.minPoolSize=10 13 | c3p0.maxPoolSize=30 14 | c3p0.maxIdleTime=1800 15 | c3p0.acquireIncrement=3 16 | c3p0.initialPoolSize=10 17 | c3p0.idleConnectionTestPeriod=120 18 | c3p0.acquireRetryAttempts=30 19 | c3p0.testConnectionOnCheckout=false 20 | -------------------------------------------------------------------------------- /cms_web/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "standard", 3 | "root": true, 4 | "parserOptions": { 5 | "ecmaVersion": 6, 6 | "sourceType": "module" 7 | }, 8 | "env": { 9 | "browser": true, 10 | "node": true 11 | }, 12 | "plugins": [ "html", "standard" ], 13 | "rules": { 14 | "indent": ["error", 4, { "SwitchCase": 1 }], 15 | "quotes": ["error", "single"], 16 | "semi": ["error", "always"], 17 | "no-console": ["error"], 18 | "no-empty": 2, 19 | "no-eq-null": 2, 20 | "no-new": 0, 21 | "no-fallthrough": 0, 22 | "no-unreachable": 0 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_19.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__aopalliance_aopalliance_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__com_alibaba_fastjson_1_2_10.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__commons_io_commons_io_1_3_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_aspectj_aspectjrt_1_8_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_jboss_jandex_1_1_0_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_apache_santuario_xmlsec_1_4_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__commons_codec_commons_codec_1_9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_aspectj_aspectjweaver_1_8_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_freemarker_freemarker_2_3_23.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__ch_qos_logback_logback_core_1_1_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_slf4j_jcl_over_slf4j_1_7_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_javassist_javassist_3_18_1_GA.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_mybatis_mybatis_spring_1_3_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_springframework_spring_test_2_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__commons_logging_commons_logging_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_apache_commons_commons_pool2_2_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 后台管理系统 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__ch_qos_logback_logback_access_1_1_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_1_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__mysql_mysql_connector_java_8_0_11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_web/src/app.vue: -------------------------------------------------------------------------------- 1 | 6 | 24 | 25 | 38 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__com_google_protobuf_protobuf_java_2_6_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__javax_servlet_javax_servlet_api_3_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_1_3_GA.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/core/src/main/java/com/liyu/cms/data/core/service/IMenuService.java: -------------------------------------------------------------------------------- 1 | package com.liyu.cms.data.core.service; 2 | 3 | import com.liyu.cms.data.core.domain.MenuOne; 4 | import com.liyu.cms.data.core.domain.MenuPage; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * Created by liyu on 2018/3/15. 10 | */ 11 | public interface IMenuService { 12 | 13 | List getMenuOneList(); 14 | 15 | List getMenuPageList(Integer oneId); 16 | 17 | Integer addMenuOne(MenuOne item); 18 | 19 | Integer editMenuOne(MenuOne item); 20 | 21 | Integer deleteMenuOne(Integer oneId); 22 | 23 | Integer addMenuPage(MenuPage item); 24 | 25 | Integer editMenuPage(MenuPage item); 26 | 27 | Integer deleteMenuPage(Integer pageId); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_7_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__com_mchange_mchange_commons_java_0_2_15.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_hibernate_hibernate_core_4_3_8_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_springframework_spring_tx_4_1_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_springframework_spring_aop_4_1_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_springframework_spring_orm_4_1_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_springframework_spring_oxm_4_1_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_springframework_spring_web_4_1_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_springframework_spring_core_4_1_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_springframework_spring_jdbc_4_1_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_logback_extensions_logback_ext_spring_0_1_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_springframework_spring_beans_4_1_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_7_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_web/src/views/main-components/breadcrumb-nav.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 28 | 29 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_springframework_spring_webmvc_4_1_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_springframework_spring_context_4_1_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_web/src/views/home/home.less: -------------------------------------------------------------------------------- 1 | .user-infor{ 2 | height: 135px; 3 | } 4 | .avator-img{ 5 | display: block; 6 | width: 80%; 7 | max-width: 100px; 8 | height: auto; 9 | } 10 | .card-user-infor-name{ 11 | font-size: 2em; 12 | color: #2d8cf0; 13 | } 14 | .card-title{ 15 | color: #abafbd; 16 | } 17 | .made-child-con-middle{ 18 | height: 100%; 19 | } 20 | .to-do-list-con{ 21 | height: 145px; 22 | overflow: auto; 23 | } 24 | .to-do-item{ 25 | padding: 2px; 26 | } 27 | .infor-card-con{ 28 | height: 100px; 29 | } 30 | .infor-card-icon-con{ 31 | height: 100%; 32 | color: white; 33 | border-radius: 3px 0 0 3px; 34 | } 35 | .map-con{ 36 | height: 305px; 37 | } 38 | .map-incon{ 39 | height: 100%; 40 | } 41 | .data-source-row{ 42 | height: 200px; 43 | } 44 | .line-chart-con{ 45 | height: 150px; 46 | } 47 | -------------------------------------------------------------------------------- /cms_web/src/views/login/login.less: -------------------------------------------------------------------------------- 1 | .login{ 2 | width: 100%; 3 | height: 100%; 4 | background-image: url('../../images/login_bg.jpg'); 5 | background-size: cover; 6 | background-position: center; 7 | position: relative; 8 | &-con{ 9 | position: absolute; 10 | right: 160px; 11 | top: 50%; 12 | transform: translateY(-60%); 13 | width: 300px; 14 | &-header{ 15 | font-size: 16px; 16 | font-weight: 300; 17 | text-align: center; 18 | padding: 30px 0; 19 | } 20 | .form-con{ 21 | padding: 10px 0 0; 22 | } 23 | .login-tip{ 24 | font-size: 10px; 25 | text-align: center; 26 | color: #c3c3c3; 27 | } 28 | } 29 | } 30 | 31 | .error_tip { 32 | font-size: 11px; 33 | color: red; 34 | } -------------------------------------------------------------------------------- /cms_data/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_7_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/core/src/main/java/com/liyu/cms/data/core/domain/RolePrivilege.java: -------------------------------------------------------------------------------- 1 | package com.liyu.cms.data.core.domain; 2 | 3 | /** 4 | * Created by liyu on 2018/3/15. 5 | */ 6 | public class RolePrivilege { 7 | 8 | private Integer id; 9 | 10 | private Integer roleId; 11 | 12 | private Integer pageId; 13 | 14 | public Integer getId() { 15 | return id; 16 | } 17 | 18 | public void setId(Integer id) { 19 | this.id = id; 20 | } 21 | 22 | public Integer getRoleId() { 23 | return roleId; 24 | } 25 | 26 | public void setRoleId(Integer roleId) { 27 | this.roleId = roleId; 28 | } 29 | 30 | public Integer getPageId() { 31 | return pageId; 32 | } 33 | 34 | public void setPageId(Integer pageId) { 35 | this.pageId = pageId; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /cms_web/src/locale/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import Locales from './locale'; 3 | import zhLocale from 'iview/src/locale/lang/zh-CN'; 4 | import enLocale from 'iview/src/locale/lang/en-US'; 5 | import zhTLocale from 'iview/src/locale/lang/zh-TW'; 6 | 7 | // 自动设置语言 8 | const navLang = navigator.language; 9 | const localLang = (navLang === 'zh-CN' || navLang === 'en-US') ? navLang : false; 10 | const lang = window.localStorage.lang || localLang || 'zh-CN'; 11 | 12 | Vue.config.lang = lang; 13 | 14 | // 多语言配置 15 | const locales = Locales; 16 | const mergeZH = Object.assign(zhLocale, locales['zh-CN']); 17 | const mergeEN = Object.assign(enLocale, locales['en-US']); 18 | const mergeTW = Object.assign(zhTLocale, locales['zh-TW']); 19 | Vue.locale('zh-CN', mergeZH); 20 | Vue.locale('en-US', mergeEN); 21 | Vue.locale('zh-TW', mergeTW); 22 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_springframework_spring_expression_4_1_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_hibernate_hibernate_entitymanager_4_3_8_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/web/src/main/java/com/liyu/cms/data/web/controller/IndexController.java: -------------------------------------------------------------------------------- 1 | package com.liyu.cms.data.web.controller; 2 | 3 | 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | import org.springframework.web.bind.annotation.RequestMethod; 6 | import org.springframework.web.bind.annotation.RestController; 7 | import org.springframework.web.servlet.ModelAndView; 8 | 9 | 10 | import javax.servlet.http.HttpServletRequest; 11 | import javax.servlet.http.HttpServletResponse; 12 | import javax.servlet.http.HttpSession; 13 | 14 | /** 15 | * Created by liyu on 17/9/27. 16 | */ 17 | 18 | @RestController 19 | @RequestMapping(value = "") 20 | public class IndexController { 21 | 22 | @RequestMapping(value = "/heart-beat", method = RequestMethod.GET) 23 | public String alive(){ 24 | return "alive"; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /cms_data/core/src/main/java/com/liyu/cms/data/core/service/IRoleService.java: -------------------------------------------------------------------------------- 1 | package com.liyu.cms.data.core.service; 2 | 3 | import com.liyu.cms.data.core.domain.MenuOne; 4 | import com.liyu.cms.data.core.domain.Role; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * Created by liyu on 2018/3/15. 10 | */ 11 | public interface IRoleService { 12 | 13 | Integer getRoleTotalCount(String searchKey); 14 | 15 | List getRolePage(String searchKey,Integer pageIndex,Integer pageSize); 16 | 17 | List getRoleAll(); 18 | 19 | Integer addRole(Role item); 20 | 21 | Integer editRole(Role item); 22 | 23 | Integer deleteRole(Integer id); 24 | 25 | List getMenuTree(); 26 | 27 | List getRolePrivilege(Integer roleId); 28 | 29 | Integer editPrivilege(Integer roleId,List pageList); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /cms_data/web/src/main/java/com/liyu/cms/data/web/filters/ChainFilter.java: -------------------------------------------------------------------------------- 1 | package com.liyu.cms.data.web.filters; 2 | 3 | import javax.servlet.*; 4 | import java.io.IOException; 5 | 6 | /** 7 | * Created by liyu on 2018/11/4. 8 | */ 9 | public class ChainFilter implements Filter { 10 | 11 | 12 | @Override 13 | public void init(FilterConfig filterConfig) throws ServletException { 14 | 15 | } 16 | 17 | @Override 18 | public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { 19 | 20 | System.out.println("begin filter"); 21 | 22 | filterChain.doFilter(servletRequest,servletResponse); 23 | 24 | System.out.println("end filter"); 25 | } 26 | 27 | @Override 28 | public void destroy() { 29 | 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /cms_web/src/template/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%= htmlWebpackPlugin.options.title %> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_jboss_logging_jboss_logging_annotations_1_2_0_Beta1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_springframework_spring_context_support_4_1_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_web/src/views/own-space/own-space.less: -------------------------------------------------------------------------------- 1 | .own-space{ 2 | &-btn-box{ 3 | margin-bottom: 10px; 4 | button{ 5 | padding-left: 0; 6 | span{ 7 | color: #2D8CF0; 8 | transition: all .2s; 9 | } 10 | span:hover{ 11 | color: #0C25F1; 12 | transition: all .2s; 13 | } 14 | } 15 | } 16 | &-tra{ 17 | width:10px; 18 | height:10px; 19 | transform:rotate(45deg); 20 | position:absolute; 21 | top:50%; 22 | margin-top:-6px; 23 | left:-3px; 24 | box-shadow:0 0 2px 3px rgba(0,0,0,.1); 25 | background-color:white;z-index:100; 26 | } 27 | &-input-identifycode-con{ 28 | position:absolute; 29 | width:200px; 30 | height:100px; 31 | right:-220px; 32 | top:50%; 33 | margin-top:-50px; 34 | border-radius:4px; 35 | box-shadow:0 0 2px 3px rgba(0,0,0,.1); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_hibernate_javax_persistence_hibernate_jpa_2_1_api_1_0_0_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_hibernate_common_hibernate_commons_annotations_4_0_5_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_data/web/src/main/resources/jdbc.properties: -------------------------------------------------------------------------------- 1 | admin.jdbc.driverClassName=${admin.jdbc.driverClassName} 2 | 3 | admin.jdbc.url=${admin.jdbc.url} 4 | 5 | admin.jdbc.user=${admin.jdbc.user} 6 | admin.jdbc.pass=${admin.jdbc.pass} 7 | admin.hibernate.hbm2ddl.auto=${admin.hibernate.hbm2ddl.auto} 8 | admin.hibernate.dialect=${admin.hibernate.dialect} 9 | admin.hibernate.show_sql=${admin.hibernate.show_sql} 10 | admin.hibernate.current_session_context_class=${admin.hibernate.current_session_context_class} 11 | 12 | #c3p0设置 13 | c3p0.minPoolSize=${c3p0.minPoolSize} 14 | c3p0.maxPoolSize=${c3p0.maxPoolSize} 15 | c3p0.maxIdleTime=${c3p0.maxIdleTime} 16 | c3p0.acquireIncrement=${c3p0.acquireIncrement} 17 | c3p0.initialPoolSize=${c3p0.initialPoolSize} 18 | c3p0.idleConnectionTestPeriod=${c3p0.idleConnectionTestPeriod} 19 | c3p0.acquireRetryAttempts=${c3p0.acquireRetryAttempts} 20 | c3p0.testConnectionOnCheckout=${c3p0.testConnectionOnCheckout} 21 | -------------------------------------------------------------------------------- /cms_web/src/views/main-components/message-tip.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 31 | -------------------------------------------------------------------------------- /cms_data/.idea/libraries/Maven__org_jboss_spec_javax_transaction_jboss_transaction_api_1_2_spec_1_0_0_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cms_web/src/store/modules/user.js: -------------------------------------------------------------------------------- 1 | import Cookies from 'js-cookie'; 2 | 3 | const user = { 4 | state: {}, 5 | mutations: { 6 | logout (state, vm) { 7 | Cookies.remove('user'); 8 | Cookies.remove('userId'); 9 | Cookies.remove('password'); 10 | Cookies.remove('access'); 11 | Cookies.remove('menu'); 12 | Cookies.remove('publicKey'); 13 | Cookies.remove('loginId'); 14 | Cookies.remove('token'); 15 | // 恢复默认样式 16 | let themeLink = document.querySelector('link[name="theme"]'); 17 | themeLink.setAttribute('href', ''); 18 | 19 | // 清空打开的页面等数据,但是保存主题数据 20 | let theme = ''; 21 | if (localStorage.theme) { 22 | theme = localStorage.theme; 23 | } 24 | localStorage.clear(); 25 | if (theme) { 26 | localStorage.theme = theme; 27 | } 28 | } 29 | } 30 | }; 31 | 32 | export default user; 33 | -------------------------------------------------------------------------------- /cms_data/core/src/main/java/com/liyu/cms/data/core/util/StatusTypeUtil.java: -------------------------------------------------------------------------------- 1 | package com.liyu.cms.data.core.util; 2 | 3 | /** 4 | * Created by liyu on 2018/3/15. 5 | */ 6 | public class StatusTypeUtil { 7 | 8 | //登录 9 | public static final Integer LOGIN_SUCCEED_CODE = 1; 10 | public static final String LOGIN_SUCCEED_MSG = "正常登录"; 11 | 12 | public static final Integer ERROR_LOGIN_UNKNOW_CODE = -1; 13 | public static final String ERROR_LOGIN_UNKNOW_MSG = "未知错误"; 14 | 15 | public static final Integer ERROR_LOGIN_NOT_USER_CODE = -2; 16 | public static final String ERROR_LOGIN_NOT_USER_MSG = "用户名不存在"; 17 | 18 | public static final Integer ERROR_LOGIN_WRONG_PWD_CODE = -3; 19 | public static final String ERROR_LOGIN_WRONG_PWD_MSG = "密码错误"; 20 | 21 | public static final Integer ERROR_LOGIN_USER_FREEZED_CODE = -4; 22 | public static final String ERROR_LOGIN_USER_FREEZED_MSG = "用户被冻结"; 23 | 24 | 25 | //注册 26 | public static final Integer NORMAL_REGISTER_CODE = 1; 27 | public static final String NORMAL_REGISTER_MSG = "正常注册"; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /cms_web/src/views/form/article-publish/preview.less: -------------------------------------------------------------------------------- 1 | .preview{ 2 | &-main{ 3 | width: 100%; 4 | height: 100%; 5 | background: #d7e1ed; 6 | } 7 | &-header{ 8 | padding-right: 20px; 9 | height: 60px; 10 | background: #4a5161; 11 | text-align: right; 12 | ul{ 13 | display: inline-block !important; 14 | } 15 | } 16 | &-placeholderCon{ 17 | height: 200px; 18 | } 19 | &-placeholder{ 20 | height: 40px; 21 | margin-bottom: 10px; 22 | background: #9fafd4; 23 | border-radius: 3px; 24 | } 25 | &-tags-con{ 26 | padding: 5px 0; 27 | margin: 10px 0; 28 | } 29 | &-tip{ 30 | font-size: 12px; 31 | color: #c3c3c3; 32 | } 33 | &-content-con{ 34 | border-top: 1px solid #edeff1; 35 | border-bottom: 1px solid #edeff1; 36 | padding: 12px 0 20px; 37 | margin-bottom: 20px; 38 | } 39 | &-classifition-con{ 40 | padding: 5px 0; 41 | } 42 | &-classifition-item{ 43 | margin-right: 8px; 44 | } 45 | &-publish-time{ 46 | font-size: 12px; 47 | color: gray; 48 | margin-top: 5px; 49 | } 50 | } -------------------------------------------------------------------------------- /cms_data/core/src/main/java/com/liyu/cms/data/core/dao/UserDao.java: -------------------------------------------------------------------------------- 1 | package com.liyu.cms.data.core.dao; 2 | 3 | import com.liyu.cms.data.core.domain.UserInfo; 4 | import org.apache.ibatis.annotations.Mapper; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Created by liyu on 2018/3/15. 11 | */ 12 | @Mapper 13 | public interface UserDao { 14 | 15 | Integer getUserTotalCount(@Param("searchKey")String searchKey,@Param("status")Integer status); 16 | 17 | List getUserPage(@Param("searchKey")String searchKey,@Param("status")Integer status,@Param("dataIndex")Integer dataIndex,@Param("pageSize")Integer pageSize); 18 | 19 | List getUserByUserId(@Param("userId")String userId); 20 | 21 | Integer userExist(@Param("userId")String userId); 22 | 23 | void addUser(UserInfo userInfo); 24 | 25 | void updateUser(UserInfo userInfo); 26 | 27 | void deleteUser(@Param("id")Integer id); 28 | 29 | void changePassword(@Param("id")Integer id,@Param("password")String password); 30 | 31 | void updateInfo(UserInfo userInfo); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 现场喷口水 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. -------------------------------------------------------------------------------- /cms_web/src/styles/common.less: -------------------------------------------------------------------------------- 1 | .margin-top-8{ 2 | margin-top: 8px; 3 | } 4 | .margin-top-10{ 5 | margin-top: 10px; 6 | } 7 | .margin-top-20{ 8 | margin-top: 20px; 9 | } 10 | .margin-left-10{ 11 | margin-left: 10px; 12 | } 13 | .margin-bottom-10{ 14 | margin-bottom: 10px; 15 | } 16 | .margin-bottom-100{ 17 | margin-bottom: 100px; 18 | } 19 | .margin-right-10{ 20 | margin-right: 10px; 21 | } 22 | .padding-left-6{ 23 | padding-left: 6px; 24 | } 25 | .padding-left-8{ 26 | padding-left: 5px; 27 | } 28 | .padding-left-10{ 29 | padding-left: 10px; 30 | } 31 | .padding-left-20{ 32 | padding-left: 20px; 33 | } 34 | .height-100{ 35 | height: 100%; 36 | } 37 | .height-120px{ 38 | height: 100px; 39 | } 40 | .height-200px{ 41 | height: 200px; 42 | } 43 | .height-492px{ 44 | height: 492px; 45 | } 46 | .height-460px{ 47 | height: 460px; 48 | } 49 | .line-gray{ 50 | height: 0; 51 | border-bottom: 2px solid #dcdcdc; 52 | } 53 | .notwrap{ 54 | word-break:keep-all; 55 | white-space:nowrap; 56 | overflow: hidden; 57 | text-overflow: ellipsis; 58 | } 59 | .padding-left-5{ 60 | padding-left: 10px; 61 | } 62 | [v-cloak]{ 63 | display: none; 64 | } 65 | -------------------------------------------------------------------------------- /cms_web/src/views/error-page/404.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 19 | 20 | 35 | -------------------------------------------------------------------------------- /cms_data/web/src/main/webapp/WEB-INF/view/test.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 30 | 31 | 32 | 34 | 37 |
39 |
40 | Logout 41 |
42 |
43 | 44 | -------------------------------------------------------------------------------- /cms_web/src/views/register/register.less: -------------------------------------------------------------------------------- 1 | 2 | .register{ 3 | position: absolute; 4 | top: 0px; 5 | left:0; 6 | right: 0; 7 | bottom: 0; 8 | overflow: auto; 9 | background-color: #F0F0F0; 10 | z-index: 1; 11 | transition: left .3s; 12 | } 13 | 14 | .main_card { 15 | margin-left:auto; 16 | margin-right:auto; 17 | margin-top:50px; 18 | width: 500px; 19 | border-radius: 5px; 20 | background-color: white; 21 | min-height:400px; 22 | &-title { 23 | width: 100%; 24 | height: 50px; 25 | text-align: center; 26 | font-size: 16px; 27 | } 28 | } 29 | 30 | .error_tip{ 31 | width:100%; 32 | height:30px; 33 | margin-top: 20px; 34 | text-align: center; 35 | font-size: 14px; 36 | color: red; 37 | } 38 | 39 | .bottom-panel { 40 | width: 100%; 41 | height: 70px; 42 | margin-top:20px; 43 | float: bottom; 44 | text-align: center; 45 | &-btn { 46 | width: 120px; 47 | font-size: 15px; 48 | } 49 | } 50 | 51 | .my_modal_tip_label { 52 | margin-top: 5px; 53 | text-align: left; 54 | font-size:16px; 55 | } 56 | 57 | .my_modal_input_large { 58 | width: 300px; 59 | } 60 | 61 | .my_modal_input_middle { 62 | width: 100px; 63 | } 64 | 65 | .register_success_modal{ 66 | .ivu-modal { 67 | top: 80px; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /cms_web/src/views/error-page/403.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 19 | 20 | 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CMS 完整能运行的后台管理系统,后台数据工程基于SpringMVC实现,前台界面工程基于Node.js+Vue.js+iView的架构实现。 2 | ## 工程结构介绍 3 | ``` 4 | cms/ 5 | * cms_data/ ---------- 后台数据工程 6 | * cms_web/ ---------- 前台界面工程 7 | * tb_menu_one.sql ---- 数据库初始化sql 8 | ``` 9 | ## 关键技术功能介绍 10 | ### 一. 登录账号密码采用RSA非对称加密方式 11 | 由后端工程下发公钥,前端工程使用公钥对账号密码进行加密再进行login操作,有效避免账号密码暴露。 12 | 如下图所示: 13 | 14 | ![foryou](https://github.com/WrathLi/cms/blob/master/imgs/7.png) 15 | 16 | ### 二. 左侧菜单栏动态下发 17 | 左侧菜单栏的显示根据不同用户分配的权限下发不同的菜单,采用二级菜单的结构,如图所示: 18 | ![foryou](https://github.com/WrathLi/cms/blob/master/imgs/1.png) 19 | 20 | ### 三. JWT做权限加密和超时管理 21 | ![foryou](https://github.com/WrathLi/cms/blob/master/imgs/8.png) 22 | ![foryou](https://github.com/WrathLi/cms/blob/master/imgs/9.png) 23 | 24 | ### 四. 菜单栏路径配置 25 | ![foryou](https://github.com/WrathLi/cms/blob/master/imgs/3.png) 26 | ![foryou](https://github.com/WrathLi/cms/blob/master/imgs/4.png) 27 | 28 | ### 五. 角色管理 29 | 可以创建不同角色,对角色分配菜单栏的界面权限 30 | ![foryou](https://github.com/WrathLi/cms/blob/master/imgs/5.png) 31 | 32 | ### 六. 用户管理 33 | 对用户进行编辑,冻结等操作,同时可以对不同用户分配角色,每个用户只能有一个角色。 34 | ![foryou](https://github.com/WrathLi/cms/blob/master/imgs/6.png) 35 | 36 | github网速过慢,下面是码云上的仓库地址: 37 | [https://gitee.com/WrathLi/cms-vue-iView/tree/master](https://gitee.com/WrathLi/cms-vue-iView/tree/master) 38 | -------------------------------------------------------------------------------- /cms_data/core/src/main/java/com/liyu/cms/data/core/domain/Role.java: -------------------------------------------------------------------------------- 1 | package com.liyu.cms.data.core.domain; 2 | 3 | import java.util.Date; 4 | 5 | /** 6 | * Created by liyu on 2018/3/15. 7 | */ 8 | public class Role { 9 | 10 | private Integer id; 11 | 12 | private String name; 13 | 14 | private Boolean beSuper; 15 | 16 | private String description; 17 | 18 | private Date createTime; 19 | 20 | public Integer getId() { 21 | return id; 22 | } 23 | 24 | public void setId(Integer id) { 25 | this.id = id; 26 | } 27 | 28 | public String getName() { 29 | return name; 30 | } 31 | 32 | public void setName(String name) { 33 | this.name = name; 34 | } 35 | 36 | public Boolean getBeSuper() { 37 | return beSuper; 38 | } 39 | 40 | public void setBeSuper(Boolean beSuper) { 41 | this.beSuper = beSuper; 42 | } 43 | 44 | public String getDescription() { 45 | return description; 46 | } 47 | 48 | public void setDescription(String description) { 49 | this.description = description; 50 | } 51 | 52 | public Date getCreateTime() { 53 | return createTime; 54 | } 55 | 56 | public void setCreateTime(Date createTime) { 57 | this.createTime = createTime; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /cms_web/src/views/error-page/404.less: -------------------------------------------------------------------------------- 1 | @keyframes error404animation { 2 | 0% { 3 | transform: rotateZ(0deg); 4 | } 5 | 20% { 6 | transform: rotateZ(-60deg); 7 | } 8 | 40% { 9 | transform: rotateZ(-10deg); 10 | } 11 | 60% { 12 | transform: rotateZ(50deg); 13 | } 14 | 80% { 15 | transform: rotateZ(-20deg); 16 | } 17 | 100% { 18 | transform: rotateZ(0deg); 19 | } 20 | } 21 | .error404{ 22 | &-body-con{ 23 | width: 700px; 24 | height: 500px; 25 | position: absolute; 26 | left: 50%; 27 | top: 50%; 28 | transform: translate(-50%,-50%); 29 | &-title{ 30 | text-align: center; 31 | font-size: 240px; 32 | font-weight: 700; 33 | color: #2d8cf0; 34 | height: 260px; 35 | line-height: 260px; 36 | margin-top: 40px; 37 | span{ 38 | display: inline-block; 39 | color: #19be6b; 40 | font-size: 230px; 41 | animation: error404animation 3s ease 0s infinite alternate; 42 | } 43 | } 44 | &-message{ 45 | display: block; 46 | text-align: center; 47 | font-size: 30px; 48 | font-weight: 500; 49 | letter-spacing: 12px; 50 | color: #dddde2; 51 | } 52 | } 53 | &-btn-con{ 54 | text-align: center; 55 | padding: 20px 0; 56 | margin-bottom: 40px; 57 | } 58 | } -------------------------------------------------------------------------------- /cms_web/src/views/error-page/500.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 21 | 22 | 37 | -------------------------------------------------------------------------------- /cms_data/core/src/main/java/com/liyu/cms/data/core/dao/MenuDao.java: -------------------------------------------------------------------------------- 1 | package com.liyu.cms.data.core.dao; 2 | 3 | import com.liyu.cms.data.core.domain.MenuOne; 4 | import com.liyu.cms.data.core.domain.MenuPage; 5 | import org.apache.ibatis.annotations.Mapper; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * Created by liyu on 2018/3/15. 12 | */ 13 | @Mapper 14 | public interface MenuDao { 15 | 16 | //获取全部menu菜单 17 | List getAllMenu(); 18 | 19 | //根据角色ID获取menu菜单 20 | List getRoleMenu(@Param("roleId")Integer roleId); 21 | 22 | List getMenuTree(); 23 | 24 | List getMenuOneList(); 25 | 26 | List getMenuPageList(@Param("oneId")Integer oneId); 27 | 28 | Integer menuOneExist(@Param("routeName")String routeName,@Param("oneId")Integer oneId); 29 | 30 | void addMenuOne(MenuOne item); 31 | 32 | void updateMenuOne(MenuOne item); 33 | 34 | void deleteMenuOne(@Param("oneId")Integer oneId); 35 | 36 | void deleteMenuPageInOne(@Param("oneId")Integer oneId); 37 | 38 | Integer menuPageExist(@Param("routeName")String routeName,@Param("pageId")Integer pageId); 39 | 40 | void addMenuPage(MenuPage item); 41 | 42 | void updateMenuPage(MenuPage item); 43 | 44 | void deleteMenuPage(@Param("pageId")Integer pageId); 45 | 46 | } 47 | -------------------------------------------------------------------------------- /cms_data/web/src/main/filters/dev/logback.properties: -------------------------------------------------------------------------------- 1 | # logback.properties 2 | # \u5B9A\u4E49\u65E5\u5FD7\u6587\u4EF6\u7684\u5B58\u50A8\u5730\u5740 \u52FF\u5728 LogBack \u7684\u914D\u7F6E\u4E2D\u4F7F\u7528\u76F8\u5BF9\u8DEF\u5F84 3 | logback.dir=log/game/game-user 4 | 5 | # logback.console 6 | # \u683C\u5F0F\u5316\u8F93\u51FA\uFF1A%d\u8868\u793A\u65E5\u671F\uFF0C%thread\u8868\u793A\u7EBF\u7A0B\u540D\uFF0C%-5level\uFF1A\u7EA7\u522B\u4ECE\u5DE6\u663E\u793A5\u4E2A\u5B57\u7B26\u5BBD\u5EA6%msg\uFF1A\u65E5\u5FD7\u6D88\u606F\uFF0C%n\u662F\u6362\u884C\u7B26 7 | logback.console.pattern=%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n 8 | 9 | # logback.file 10 | # \u65E5\u5FD7\u6587\u4EF6\u8F93\u51FA\u7684\u6587\u4EF6\u540D 11 | logback.file.fileNamePattern=${logback.dir}/log.%d{yyyy-MM-dd}.log 12 | # \u65E5\u5FD7\u6587\u4EF6\u4FDD\u7559\u5929\u6570 13 | logback.file.maxHistory=30 14 | # \u683C\u5F0F\u5316\u8F93\u51FA\uFF1A%d\u8868\u793A\u65E5\u671F\uFF0C%thread\u8868\u793A\u7EBF\u7A0B\u540D\uFF0C%-5level\uFF1A\u7EA7\u522B\u4ECE\u5DE6\u663E\u793A5\u4E2A\u5B57\u7B26\u5BBD\u5EA6%msg\uFF1A\u65E5\u5FD7\u6D88\u606F\uFF0C%n\u662F\u6362\u884C\u7B26 15 | logback.file.pattern=%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n 16 | # \u65E5\u5FD7\u6587\u4EF6\u6700\u5927\u7684\u5927\u5C0F 17 | logback.file.maxFileSize=10MB 18 | 19 | logback.file.totalSizeCap=2GB -------------------------------------------------------------------------------- /cms_data/web/src/main/filters/prod/logback.properties: -------------------------------------------------------------------------------- 1 | # logback.properties 2 | # \u5B9A\u4E49\u65E5\u5FD7\u6587\u4EF6\u7684\u5B58\u50A8\u5730\u5740 \u52FF\u5728 LogBack \u7684\u914D\u7F6E\u4E2D\u4F7F\u7528\u76F8\u5BF9\u8DEF\u5F84 3 | logback.dir=log/coop/coop-service 4 | 5 | # logback.console 6 | # \u683C\u5F0F\u5316\u8F93\u51FA\uFF1A%d\u8868\u793A\u65E5\u671F\uFF0C%thread\u8868\u793A\u7EBF\u7A0B\u540D\uFF0C%-5level\uFF1A\u7EA7\u522B\u4ECE\u5DE6\u663E\u793A5\u4E2A\u5B57\u7B26\u5BBD\u5EA6%msg\uFF1A\u65E5\u5FD7\u6D88\u606F\uFF0C%n\u662F\u6362\u884C\u7B26 7 | logback.console.pattern=%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n 8 | 9 | # logback.file 10 | # \u65E5\u5FD7\u6587\u4EF6\u8F93\u51FA\u7684\u6587\u4EF6\u540D 11 | logback.file.fileNamePattern=${logback.dir}/log.%d{yyyy-MM-dd}.log 12 | # \u65E5\u5FD7\u6587\u4EF6\u4FDD\u7559\u5929\u6570 13 | logback.file.maxHistory=30 14 | # \u683C\u5F0F\u5316\u8F93\u51FA\uFF1A%d\u8868\u793A\u65E5\u671F\uFF0C%thread\u8868\u793A\u7EBF\u7A0B\u540D\uFF0C%-5level\uFF1A\u7EA7\u522B\u4ECE\u5DE6\u663E\u793A5\u4E2A\u5B57\u7B26\u5BBD\u5EA6%msg\uFF1A\u65E5\u5FD7\u6D88\u606F\uFF0C%n\u662F\u6362\u884C\u7B26 15 | logback.file.pattern=%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n 16 | # \u65E5\u5FD7\u6587\u4EF6\u6700\u5927\u7684\u5927\u5C0F 17 | logback.file.maxFileSize=10MB 18 | 19 | logback.file.totalSizeCap=2GB -------------------------------------------------------------------------------- /cms_data/web/src/main/filters/qa/logback.properties: -------------------------------------------------------------------------------- 1 | # logback.properties 2 | # \u5B9A\u4E49\u65E5\u5FD7\u6587\u4EF6\u7684\u5B58\u50A8\u5730\u5740 \u52FF\u5728 LogBack \u7684\u914D\u7F6E\u4E2D\u4F7F\u7528\u76F8\u5BF9\u8DEF\u5F84 3 | logback.dir=log/coop/coop-service 4 | 5 | # logback.console 6 | # \u683C\u5F0F\u5316\u8F93\u51FA\uFF1A%d\u8868\u793A\u65E5\u671F\uFF0C%thread\u8868\u793A\u7EBF\u7A0B\u540D\uFF0C%-5level\uFF1A\u7EA7\u522B\u4ECE\u5DE6\u663E\u793A5\u4E2A\u5B57\u7B26\u5BBD\u5EA6%msg\uFF1A\u65E5\u5FD7\u6D88\u606F\uFF0C%n\u662F\u6362\u884C\u7B26 7 | logback.console.pattern=%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n 8 | 9 | # logback.file 10 | # \u65E5\u5FD7\u6587\u4EF6\u8F93\u51FA\u7684\u6587\u4EF6\u540D 11 | logback.file.fileNamePattern=${logback.dir}/log.%d{yyyy-MM-dd}.log 12 | # \u65E5\u5FD7\u6587\u4EF6\u4FDD\u7559\u5929\u6570 13 | logback.file.maxHistory=30 14 | # \u683C\u5F0F\u5316\u8F93\u51FA\uFF1A%d\u8868\u793A\u65E5\u671F\uFF0C%thread\u8868\u793A\u7EBF\u7A0B\u540D\uFF0C%-5level\uFF1A\u7EA7\u522B\u4ECE\u5DE6\u663E\u793A5\u4E2A\u5B57\u7B26\u5BBD\u5EA6%msg\uFF1A\u65E5\u5FD7\u6D88\u606F\uFF0C%n\u662F\u6362\u884C\u7B26 15 | logback.file.pattern=%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n 16 | # \u65E5\u5FD7\u6587\u4EF6\u6700\u5927\u7684\u5927\u5C0F 17 | logback.file.maxFileSize=10MB 18 | 19 | logback.file.totalSizeCap=2GB -------------------------------------------------------------------------------- /cms_data/web/src/main/filters/test/logback.properties: -------------------------------------------------------------------------------- 1 | # logback.properties 2 | # \u5B9A\u4E49\u65E5\u5FD7\u6587\u4EF6\u7684\u5B58\u50A8\u5730\u5740 \u52FF\u5728 LogBack \u7684\u914D\u7F6E\u4E2D\u4F7F\u7528\u76F8\u5BF9\u8DEF\u5F84 3 | logback.dir=log/coop/coop-service 4 | 5 | # logback.console 6 | # \u683C\u5F0F\u5316\u8F93\u51FA\uFF1A%d\u8868\u793A\u65E5\u671F\uFF0C%thread\u8868\u793A\u7EBF\u7A0B\u540D\uFF0C%-5level\uFF1A\u7EA7\u522B\u4ECE\u5DE6\u663E\u793A5\u4E2A\u5B57\u7B26\u5BBD\u5EA6%msg\uFF1A\u65E5\u5FD7\u6D88\u606F\uFF0C%n\u662F\u6362\u884C\u7B26 7 | logback.console.pattern=%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n 8 | 9 | # logback.file 10 | # \u65E5\u5FD7\u6587\u4EF6\u8F93\u51FA\u7684\u6587\u4EF6\u540D 11 | logback.file.fileNamePattern=${logback.dir}/log.%d{yyyy-MM-dd}.log 12 | # \u65E5\u5FD7\u6587\u4EF6\u4FDD\u7559\u5929\u6570 13 | logback.file.maxHistory=30 14 | # \u683C\u5F0F\u5316\u8F93\u51FA\uFF1A%d\u8868\u793A\u65E5\u671F\uFF0C%thread\u8868\u793A\u7EBF\u7A0B\u540D\uFF0C%-5level\uFF1A\u7EA7\u522B\u4ECE\u5DE6\u663E\u793A5\u4E2A\u5B57\u7B26\u5BBD\u5EA6%msg\uFF1A\u65E5\u5FD7\u6D88\u606F\uFF0C%n\u662F\u6362\u884C\u7B26 15 | logback.file.pattern=%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n 16 | # \u65E5\u5FD7\u6587\u4EF6\u6700\u5927\u7684\u5927\u5C0F 17 | logback.file.maxFileSize=10MB 18 | 19 | logback.file.totalSizeCap=2GB -------------------------------------------------------------------------------- /cms_web/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import iView from 'iview'; 3 | import {router} from './route/index'; 4 | import {appRouter} from './route/router'; 5 | import util from './libs/util'; 6 | import App from './app.vue'; 7 | import 'iview/dist/styles/iview.css'; 8 | import store from './store'; 9 | import VueI18n from 'vue-i18n'; 10 | import '@/locale'; 11 | // import Local from './locale/index'; 12 | 13 | Vue.use(VueI18n); 14 | Vue.use(iView); 15 | 16 | new Vue({ 17 | el: '#app', 18 | router: router, 19 | store: store, 20 | render: h => h(App), 21 | data: { 22 | currentPageName: '' 23 | }, 24 | mounted () { 25 | this.currentPageName = this.$route.name; 26 | // 显示打开的页面的列表 27 | this.$store.commit('setOpenedList'); 28 | this.$store.commit('initCachepage'); 29 | // 权限菜单过滤相关 30 | this.$store.commit('updateMenulist'); 31 | // iview-admin检查更新 32 | // util.checkUpdate(this); 33 | }, 34 | created () { 35 | let tagsList = []; 36 | appRouter.map((item) => { 37 | if (item.children.length <= 1) { 38 | tagsList.push(item.children[0]); 39 | } else { 40 | tagsList.push(...item.children); 41 | } 42 | }); 43 | this.$store.commit('setTagsList', tagsList); 44 | } 45 | }); 46 | -------------------------------------------------------------------------------- /cms_data/web/src/main/filters/local/logback.properties: -------------------------------------------------------------------------------- 1 | # logback.properties 2 | # \u5B9A\u4E49\u65E5\u5FD7\u6587\u4EF6\u7684\u5B58\u50A8\u5730\u5740 \u52FF\u5728 LogBack \u7684\u914D\u7F6E\u4E2D\u4F7F\u7528\u76F8\u5BF9\u8DEF\u5F84 3 | logback.dir=log/coop/coop-service 4 | 5 | # logback.console 6 | # \u683C\u5F0F\u5316\u8F93\u51FA\uFF1A%d\u8868\u793A\u65E5\u671F\uFF0C%thread\u8868\u793A\u7EBF\u7A0B\u540D\uFF0C%-5level\uFF1A\u7EA7\u522B\u4ECE\u5DE6\u663E\u793A5\u4E2A\u5B57\u7B26\u5BBD\u5EA6%msg\uFF1A\u65E5\u5FD7\u6D88\u606F\uFF0C%n\u662F\u6362\u884C\u7B26 7 | logback.console.pattern=%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n 8 | 9 | # logback.file 10 | # \u65E5\u5FD7\u6587\u4EF6\u8F93\u51FA\u7684\u6587\u4EF6\u540D 11 | logback.file.fileNamePattern=${logback.dir}/log.%d{yyyy-MM-dd}.log 12 | # \u65E5\u5FD7\u6587\u4EF6\u4FDD\u7559\u5929\u6570 13 | logback.file.maxHistory=30 14 | # \u683C\u5F0F\u5316\u8F93\u51FA\uFF1A%d\u8868\u793A\u65E5\u671F\uFF0C%thread\u8868\u793A\u7EBF\u7A0B\u540D\uFF0C%-5level\uFF1A\u7EA7\u522B\u4ECE\u5DE6\u663E\u793A5\u4E2A\u5B57\u7B26\u5BBD\u5EA6%msg\uFF1A\u65E5\u5FD7\u6D88\u606F\uFF0C%n\u662F\u6362\u884C\u7B26 15 | logback.file.pattern=%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n 16 | # \u65E5\u5FD7\u6587\u4EF6\u6700\u5927\u7684\u5927\u5C0F 17 | logback.file.maxFileSize=10MB 18 | 19 | logback.file.totalSizeCap=2GB -------------------------------------------------------------------------------- /cms_data/core/src/main/java/com/liyu/cms/data/core/dao/RoleDao.java: -------------------------------------------------------------------------------- 1 | package com.liyu.cms.data.core.dao; 2 | 3 | import com.liyu.cms.data.core.domain.Role; 4 | import com.liyu.cms.data.core.domain.RolePrivilege; 5 | import org.apache.ibatis.annotations.Mapper; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * Created by liyu on 2018/3/15. 12 | */ 13 | @Mapper 14 | public interface RoleDao { 15 | 16 | void deletePrivilegeMenuOne(@Param("oneId")Integer oneId); 17 | 18 | void deletePrivilegeMenuPage(@Param("pageId")Integer pageId); 19 | 20 | Integer getRoleTotalCount(@Param("searchKey")String searchKey); 21 | 22 | List getRolePage(@Param("searchKey")String searchKey,@Param("dataIndex")Integer dataIndex,@Param("pageSize")Integer pageSize); 23 | 24 | List getRoleAll(); 25 | 26 | Integer roleExist(@Param("name")String name,@Param("id")Integer id); 27 | 28 | void addRole(Role item); 29 | 30 | void updateRole(Role item); 31 | 32 | void deleteRole(@Param("id")Integer id); 33 | 34 | void deletePrivilegeRole(@Param("roleId")Integer roleId); 35 | 36 | List getRolePrivilege(@Param("roleId")Integer roleId); 37 | 38 | void deleteRolePrivilege(@Param("roleId")Integer roleId,@Param("pageList")List pageList); 39 | 40 | void addRolePrivilege(List pageList); 41 | } 42 | -------------------------------------------------------------------------------- /cms_data/web/src/main/filters/dev/jdbc.properties: -------------------------------------------------------------------------------- 1 | #admin.jdbc.driverClassName=com.mysql.jdbc.Driver 2 | admin.jdbc.driverClassName=com.mysql.cj.jdbc.Driver 3 | 4 | 5 | admin.jdbc.url=jdbc:mysql://192.168.1.4:3306/my_dev?useUnicode=true&useSSL=false&characterEncoding=UTF-8&zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=GMT%2B8 6 | #admin-jdbc.url=jdbc:mysql://192.168.1.4:3306/my_dev 7 | #admin.jdbc.url=jdbc:mysql://192.168.2.207:3306/my_test?useUnicode=true&useSSL=false&characterEncoding=UTF-8&zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=GMT%2B8 8 | 9 | #admin.jdbc.url=jdbc:mysql://192.168.2.225:3306/youke_vue?useUnicode=true&useSSL=false&characterEncoding=UTF-8&zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=GMT%2B8 10 | 11 | admin.jdbc.user=liyu 12 | admin.jdbc.pass=123456 13 | #admin.jdbc.user=youke 14 | #admin.jdbc.pass=Kn6EnDMq 15 | admin.hibernate.hbm2ddl.auto=update 16 | admin.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect 17 | admin.hibernate.show_sql=true 18 | admin.hibernate.current_session_context_class=org.springframework.orm.hibernate4.SpringSessionContext 19 | 20 | #c3p0设置 21 | c3p0.minPoolSize=10 22 | c3p0.maxPoolSize=30 23 | c3p0.maxIdleTime=1800 24 | c3p0.acquireIncrement=3 25 | c3p0.initialPoolSize=10 26 | c3p0.idleConnectionTestPeriod=120 27 | c3p0.acquireRetryAttempts=30 28 | c3p0.testConnectionOnCheckout=false 29 | -------------------------------------------------------------------------------- /cms_web/src/views/privilege-mgr/menu-mgr/menu-mgr.less: -------------------------------------------------------------------------------- 1 | .menu-mgr{ 2 | &-body-con { 3 | width: 100%; 4 | height: 100%; 5 | position: relative; 6 | } 7 | } 8 | 9 | .menu_btn_group{ 10 | margin-left: 20px; 11 | margin-top: 60px; 12 | 13 | } 14 | 15 | .edit_one_modal{ 16 | 17 | .ivu-modal { 18 | top: 80px; 19 | } 20 | } 21 | 22 | .edit_page_modal{ 23 | 24 | .ivu-modal { 25 | top: 80px; 26 | } 27 | } 28 | 29 | .edit_page_model_check{ 30 | margin-top: 6px; 31 | } 32 | 33 | .delete_one_modal{ 34 | display: flex; 35 | align-items: center; 36 | justify-content: center; 37 | 38 | .ivu-modal { 39 | top: 20px; 40 | } 41 | } 42 | 43 | .delete_modal_content_label{ 44 | text-align: center; 45 | color: red; 46 | font-size: 17px; 47 | } 48 | 49 | .delete_page_modal{ 50 | display: flex; 51 | align-items: center; 52 | justify-content: center; 53 | 54 | .ivu-modal { 55 | top: 20px; 56 | } 57 | } 58 | 59 | .my_error_tip { 60 | padding-left: 10px; 61 | padding-top: 6px; 62 | text-align: right; 63 | color:red; 64 | font-size: 13px; 65 | } 66 | 67 | .my_modal_btn { 68 | font-size: 13px; 69 | } 70 | 71 | .my_modal_tip_label { 72 | margin-top: 5px; 73 | text-align: left; 74 | font-size:16px; 75 | } 76 | 77 | .my_modal_input_large { 78 | width: 300px; 79 | } 80 | 81 | .my_modal_input_middle { 82 | width: 100px; 83 | } 84 | -------------------------------------------------------------------------------- /cms_web/src/views/privilege-mgr/user-mgr/user-mgr.less: -------------------------------------------------------------------------------- 1 | .user-mgr{ 2 | &-body-con { 3 | width: 100%; 4 | height: 100%; 5 | position: relative; 6 | } 7 | } 8 | 9 | .user_opt_panel{ 10 | width: 100%; 11 | height: 60px; 12 | background-color: white; 13 | border-radius: 5px; 14 | } 15 | 16 | .my_opt_wrapper{ 17 | display: table; 18 | height: 60px; 19 | &-cell{ 20 | height: 60px; 21 | display: table-cell; 22 | vertical-align: middle; 23 | } 24 | } 25 | 26 | .my_panel_label{ 27 | text-align: right; 28 | font-size: 16px; 29 | } 30 | 31 | .name_search_input{ 32 | width: 260px; 33 | } 34 | 35 | .table_page { 36 | float: right; 37 | } 38 | 39 | .opt_btn_text_size{ 40 | font-size: 14px; 41 | } 42 | 43 | .my_error_tip { 44 | padding-left: 10px; 45 | padding-top: 6px; 46 | text-align: right; 47 | color:red; 48 | font-size: 13px; 49 | } 50 | 51 | .my_modal_btn { 52 | font-size: 13px; 53 | } 54 | 55 | .my_modal_tip_label { 56 | margin-top: 5px; 57 | text-align: left; 58 | font-size:16px; 59 | } 60 | 61 | .my_modal_input_large { 62 | width: 300px; 63 | } 64 | 65 | .my_modal_input_middle { 66 | width: 100px; 67 | } 68 | 69 | 70 | .edit_user_modal{ 71 | .ivu-modal { 72 | top: 80px; 73 | } 74 | } 75 | 76 | .delete_user_modal{ 77 | .ivu-modal { 78 | top: 80px; 79 | } 80 | } 81 | 82 | .edit_page_model_check{ 83 | margin-top: 6px; 84 | } 85 | 86 | -------------------------------------------------------------------------------- /cms_web/src/views/index.vue: -------------------------------------------------------------------------------- 1 | 32 | 47 | -------------------------------------------------------------------------------- /cms_web/src/views/privilege-mgr/role-mgr/role-mgr.less: -------------------------------------------------------------------------------- 1 | .role-mgr{ 2 | &-body-con { 3 | width: 100%; 4 | height: 100%; 5 | position: relative; 6 | } 7 | } 8 | 9 | .role_opt_panel{ 10 | width: 100%; 11 | height: 60px; 12 | background-color: white; 13 | border-radius: 5px; 14 | } 15 | 16 | .role_table_con{ 17 | width: 100%; 18 | } 19 | 20 | .my_opt_wrapper{ 21 | display: table; 22 | height: 60px; 23 | &-cell{ 24 | height: 60px; 25 | display: table-cell; 26 | vertical-align: middle; 27 | } 28 | } 29 | 30 | .my_panel_label{ 31 | text-align: right; 32 | font-size: 16px; 33 | } 34 | 35 | .name_search_input{ 36 | width: 260px; 37 | } 38 | 39 | .table_page { 40 | float: right; 41 | } 42 | 43 | .opt_btn_text_size{ 44 | font-size: 14px; 45 | } 46 | 47 | .my_error_tip { 48 | padding-left: 10px; 49 | padding-top: 6px; 50 | text-align: right; 51 | color:red; 52 | font-size: 13px; 53 | } 54 | 55 | .my_modal_btn { 56 | font-size: 13px; 57 | } 58 | 59 | .my_modal_tip_label { 60 | margin-top: 5px; 61 | text-align: left; 62 | font-size:16px; 63 | } 64 | 65 | .my_modal_input_large { 66 | width: 300px; 67 | } 68 | 69 | .my_modal_input_middle { 70 | width: 100px; 71 | } 72 | 73 | 74 | .edit_role_modal{ 75 | .ivu-modal { 76 | top: 80px; 77 | } 78 | } 79 | 80 | .edit_privilege_modal{ 81 | .ivu-modal { 82 | top: 80px; 83 | } 84 | } 85 | 86 | 87 | .delete_modal_content_label{ 88 | text-align: center; 89 | color: red; 90 | font-size: 17px; 91 | } 92 | 93 | -------------------------------------------------------------------------------- /cms_data/core/src/main/java/com/liyu/cms/data/core/domain/MenuOne.java: -------------------------------------------------------------------------------- 1 | package com.liyu.cms.data.core.domain; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * Created by liyu on 2018/3/15. 7 | */ 8 | public class MenuOne { 9 | 10 | private Integer id; 11 | 12 | private String routeName; 13 | 14 | private String title; 15 | 16 | private String icon; 17 | 18 | private Integer sortIndex; 19 | 20 | private List pageList; 21 | 22 | public Integer getId() { 23 | return id; 24 | } 25 | 26 | public void setId(Integer id) { 27 | this.id = id; 28 | } 29 | 30 | public String getRouteName() { 31 | return routeName; 32 | } 33 | 34 | public void setRouteName(String routeName) { 35 | this.routeName = routeName; 36 | } 37 | 38 | public String getTitle() { 39 | return title; 40 | } 41 | 42 | public void setTitle(String title) { 43 | this.title = title; 44 | } 45 | 46 | public String getIcon() { 47 | return icon; 48 | } 49 | 50 | public void setIcon(String icon) { 51 | this.icon = icon; 52 | } 53 | 54 | public Integer getSortIndex() { 55 | return sortIndex; 56 | } 57 | 58 | public void setSortIndex(Integer sortIndex) { 59 | this.sortIndex = sortIndex; 60 | } 61 | 62 | public List getPageList() { 63 | return pageList; 64 | } 65 | 66 | public void setPageList(List pageList) { 67 | this.pageList = pageList; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /cms_web/src/views/main-components/lockscreen/components/locking-page.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 45 | -------------------------------------------------------------------------------- /cms_data/core/src/main/java/com/liyu/cms/data/core/domain/MenuPage.java: -------------------------------------------------------------------------------- 1 | package com.liyu.cms.data.core.domain; 2 | 3 | /** 4 | * Created by liyu on 2018/3/15. 5 | */ 6 | public class MenuPage { 7 | 8 | private Integer id; 9 | 10 | private Integer oneId; 11 | 12 | private String routeName; 13 | 14 | private String title; 15 | 16 | private String icon; 17 | 18 | private Integer sortIndex; 19 | 20 | private Boolean hidePage; 21 | 22 | public Integer getId() { 23 | return id; 24 | } 25 | 26 | public void setId(Integer id) { 27 | this.id = id; 28 | } 29 | 30 | public Integer getOneId() { 31 | return oneId; 32 | } 33 | 34 | public void setOneId(Integer oneId) { 35 | this.oneId = oneId; 36 | } 37 | 38 | public String getRouteName() { 39 | return routeName; 40 | } 41 | 42 | public void setRouteName(String routeName) { 43 | this.routeName = routeName; 44 | } 45 | 46 | public String getTitle() { 47 | return title; 48 | } 49 | 50 | public void setTitle(String title) { 51 | this.title = title; 52 | } 53 | 54 | public String getIcon() { 55 | return icon; 56 | } 57 | 58 | public void setIcon(String icon) { 59 | this.icon = icon; 60 | } 61 | 62 | public Integer getSortIndex() { 63 | return sortIndex; 64 | } 65 | 66 | public void setSortIndex(Integer sortIndex) { 67 | this.sortIndex = sortIndex; 68 | } 69 | 70 | public Boolean getHidePage() { 71 | return hidePage; 72 | } 73 | 74 | public void setHidePage(Boolean hidePage) { 75 | this.hidePage = hidePage; 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /cms_web/src/views/error-page/500.less: -------------------------------------------------------------------------------- 1 | @keyframes error500animation { 2 | 0% { 3 | transform: rotateZ(0deg); 4 | } 5 | 20% { 6 | transform: rotateZ(-10deg); 7 | } 8 | 40% { 9 | transform: rotateZ(5deg); 10 | } 11 | 60% { 12 | transform: rotateZ(-5deg); 13 | } 14 | 80% { 15 | transform: rotateZ(10deg); 16 | } 17 | 100% { 18 | transform: rotateZ(0deg); 19 | } 20 | } 21 | .error500{ 22 | &-body-con{ 23 | width: 700px; 24 | height: 500px; 25 | position: absolute; 26 | left: 50%; 27 | top: 50%; 28 | transform: translate(-50%,-50%); 29 | &-title{ 30 | text-align: center; 31 | font-size: 240px; 32 | font-weight: 700; 33 | color: #2d8cf0; 34 | height: 260px; 35 | line-height: 260px; 36 | margin-top: 40px; 37 | .error500-0-span{ 38 | display: inline-block; 39 | position: relative; 40 | width: 170px; 41 | height: 170px; 42 | border-radius: 50%; 43 | border: 20px solid #ed3f14; 44 | color: #ed3f14; 45 | margin-right: 10px; 46 | i{ 47 | display: inline-block; 48 | font-size: 120px; 49 | position: absolute; 50 | bottom: -10px; 51 | left: 10px; 52 | transform-origin: center bottom; 53 | animation: error500animation 3s ease 0s infinite alternate; 54 | } 55 | } 56 | } 57 | &-message{ 58 | display: block; 59 | text-align: center; 60 | font-size: 30px; 61 | font-weight: 500; 62 | letter-spacing: 4px; 63 | color: #dddde2; 64 | } 65 | } 66 | &-btn-con{ 67 | text-align: center; 68 | padding: 20px 0; 69 | margin-bottom: 40px; 70 | } 71 | } -------------------------------------------------------------------------------- /cms_data/web/src/main/java/com/liyu/cms/data/web/util/ResponseData.java: -------------------------------------------------------------------------------- 1 | package com.liyu.cms.data.web.util; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | /** 7 | * Created by liyu on 2018/3/28. 8 | */ 9 | public class ResponseData { 10 | 11 | private final String msg; 12 | private final int code; 13 | private final Map data = new HashMap(); 14 | 15 | public String getMsg() { 16 | return msg; 17 | } 18 | 19 | public int getCode() { 20 | return code; 21 | } 22 | 23 | public Map getData() { 24 | return data; 25 | } 26 | 27 | public ResponseData putDataValue(String key, Object value) { 28 | data.put(key, value); 29 | return this; 30 | } 31 | 32 | private ResponseData(int code, String msg) { 33 | this.code = code; 34 | this.msg = msg; 35 | } 36 | 37 | public static ResponseData ok() { 38 | return new ResponseData(200, "Ok"); 39 | } 40 | 41 | public static ResponseData notFound() { 42 | return new ResponseData(404, "Not Found"); 43 | } 44 | 45 | public static ResponseData badRequest() { 46 | return new ResponseData(400, "Bad Request"); 47 | } 48 | 49 | public static ResponseData forbidden() { 50 | return new ResponseData(403, "Forbidden"); 51 | } 52 | 53 | public static ResponseData unauthorized() { 54 | return new ResponseData(401, "unauthorized"); 55 | } 56 | 57 | public static ResponseData serverInternalError() { 58 | return new ResponseData(500, "Server Internal Error"); 59 | } 60 | 61 | public static ResponseData customerError() { 62 | return new ResponseData(1001, "customer Error"); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /cms_web/build/webpack.dev.config.js: -------------------------------------------------------------------------------- 1 | const webpack = require('webpack'); 2 | const HtmlWebpackPlugin = require('html-webpack-plugin'); 3 | const ExtractTextPlugin = require('extract-text-webpack-plugin'); 4 | const CopyWebpackPlugin = require('copy-webpack-plugin'); 5 | const merge = require('webpack-merge'); 6 | const webpackBaseConfig = require('./webpack.base.config.js'); 7 | const fs = require('fs'); 8 | const package = require('../package.json'); 9 | 10 | fs.open('./build/env.js', 'w', function(err, fd) { 11 | const buf = 'export default "development";'; 12 | fs.write(fd, buf, 0, buf.length, 0, function(err, written, buffer) {}); 13 | }); 14 | 15 | module.exports = merge(webpackBaseConfig, { 16 | devServer: { 17 | port: 8070 18 | }, 19 | devtool: '#source-map', 20 | output: { 21 | publicPath: '/dist/', 22 | filename: '[name].js', 23 | chunkFilename: '[name].chunk.js' 24 | }, 25 | plugins: [ 26 | new ExtractTextPlugin({ 27 | filename: '[name].css', 28 | allChunks: true 29 | }), 30 | new webpack.optimize.CommonsChunkPlugin({ 31 | name: ['vender-exten', 'vender-base'], 32 | minChunks: Infinity 33 | }), 34 | new HtmlWebpackPlugin({ 35 | title: '后台管理系统 v' + package.version, 36 | filename: '../index.html', 37 | inject: false 38 | }), 39 | new CopyWebpackPlugin([ 40 | { 41 | from: 'src/styles/fonts', 42 | to: 'fonts' 43 | }, 44 | { 45 | from: 'src/views/main-components/theme-switch/theme' 46 | } 47 | ], { 48 | ignore: [ 49 | 'text-editor.vue' 50 | ] 51 | }) 52 | ] 53 | }); 54 | -------------------------------------------------------------------------------- /cms_web/src/views/common/common_url.js: -------------------------------------------------------------------------------- 1 | 2 | const BASE_HOST = 'http://127.0.0.1:8090'; 3 | // const BASE_HOST = 'http://192.168.2.227:9090'; 4 | 5 | const CommonUrl = { 6 | PUBLIC_KEY: BASE_HOST + '/cms-data/public_key', 7 | LOGIN_URL: BASE_HOST + '/cms-data/login', 8 | MENU_MGR_MENU_ONE_LIST_URL: BASE_HOST + '/cms-data/menu/one_list', 9 | MENU_MGR_MENU_ONE_ADD_URL: BASE_HOST + '/cms-data/menu/add_one', 10 | MENU_MGR_MENU_ONE_EDIT_URL: BASE_HOST + '/cms-data/menu/edit_one', 11 | MENU_MGR_MENU_ONE_DELETE_URL: BASE_HOST + '/cms-data/menu/delete_one', 12 | MENU_MGR_MENU_PAGE_LIST_URL: BASE_HOST + '/cms-data/menu/page_list', 13 | MENU_MGR_MENU_PAGE_ADD_URL: BASE_HOST + '/cms-data/menu/add_page', 14 | MENU_MGR_MENU_PAGE_EDIT_URL: BASE_HOST + '/cms-data/menu/edit_page', 15 | MENU_MGR_MENU_PAGE_DELETE_URL: BASE_HOST + '/cms-data/menu/delete_page', 16 | ROLE_MGR_ROLE_LIST_URL: BASE_HOST + '/cms-data/role/role_list', 17 | ROLE_MGR_ROLE_ADD_URL: BASE_HOST + '/cms-data/role/add_role', 18 | ROLE_MGR_ROLE_EDIT_URL: BASE_HOST + '/cms-data/role/edit_role', 19 | ROLE_MGR_ROLE_DELETE_URL: BASE_HOST + '/cms-data/role/delete_role', 20 | ROLE_MGR_PRIVILEGE_TREE_URL: BASE_HOST + '/cms-data/role/privilege_tree', 21 | ROLE_MGR_ROLE_PRIVILEGE_URL: BASE_HOST + '/cms-data/role/role_privilege', 22 | ROLE_MGR_ROLE_PRIVILEGE_EDIT_URL: BASE_HOST + '/cms-data/role/edit_privilege', 23 | USER_MGR_ROLE_LIST_URL: BASE_HOST + '/cms-data/user/filter_role', 24 | USER_MGR_USER_LIST_URL: BASE_HOST + '/cms-data/user/user_list', 25 | USER_MGR_USER_ADD_URL: BASE_HOST + '/cms-data/user/add_user', 26 | USER_MGR_USER_EDIT_URL: BASE_HOST + '/cms-data/user/edit_user', 27 | USER_MGR_USER_DELETE_URL: BASE_HOST + '/cms-data/user/delete_user', 28 | REGISTER_URL: BASE_HOST + '/cms-data/register', 29 | PERSON_GET_INFO_URL: BASE_HOST + '/cms-data/person/user_info', 30 | PERSON_EDIT_INFO_URL: BASE_HOST + '/cms-data/person/edit_info', 31 | PERSON_CHANGE_PWD_URL: BASE_HOST + '/cms-data/person/change_pwd' 32 | }; 33 | 34 | export default CommonUrl; 35 | -------------------------------------------------------------------------------- /cms_data/web/src/main/resources/dispatcher-servlet.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 33 | 34 | 35 | 37 | 39 | 41 | 42 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /cms_web/src/route/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import iView from 'iview'; 3 | import Util from '../libs/util'; 4 | import VueRouter from 'vue-router'; 5 | import Cookies from 'js-cookie'; 6 | import {routers, otherRouter, appRouter} from './router'; 7 | 8 | Vue.use(VueRouter); 9 | 10 | // 路由配置 11 | const RouterConfig = { 12 | // mode: 'history', 13 | routes: routers 14 | }; 15 | 16 | export const router = new VueRouter(RouterConfig); 17 | 18 | router.beforeEach((to, from, next) => { 19 | iView.LoadingBar.start(); 20 | Util.title(to.meta.title); 21 | if (Cookies.get('locking') === '1' && to.name !== 'locking') { // 判断当前是否是锁定状态 22 | next({ 23 | replace: true, 24 | name: 'locking' 25 | }); 26 | } else if (Cookies.get('locking') === '0' && to.name === 'locking') { 27 | next(false); 28 | } else { 29 | if (!Cookies.get('user') && to.name !== 'login' && to.name !== 'register') { // 判断是否已经登录且前往的页面不是登录页 30 | next({ 31 | name: 'login' 32 | }); 33 | } else if (Cookies.get('user') && to.name === 'login') { // 判断是否已经登录且前往的是登录页 34 | Util.title(); 35 | next({ 36 | name: 'home_index' 37 | }); 38 | } else { 39 | const curRouterObj = Util.getRouterObjByName([otherRouter, ...appRouter], to.name); 40 | if (curRouterObj && curRouterObj.access !== undefined) { // 需要判断权限的路由 41 | if (curRouterObj.access === parseInt(Cookies.get('access'))) { 42 | Util.toDefaultPage([otherRouter, ...appRouter], to.name, router, next); // 如果在地址栏输入的是一级菜单则默认打开其第一个二级菜单的页面 43 | } else { 44 | next({ 45 | replace: true, 46 | name: 'error-403' 47 | }); 48 | } 49 | } else { // 没有配置权限的路由, 直接通过 50 | Util.toDefaultPage([...routers], to.name, router, next); 51 | } 52 | } 53 | } 54 | }); 55 | 56 | router.afterEach((to) => { 57 | Util.openNewPage(router.app, to.name, to.params, to.query); 58 | iView.LoadingBar.finish(); 59 | window.scrollTo(0, 0); 60 | }); 61 | -------------------------------------------------------------------------------- /cms_web/src/locale/locale.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 'zh-CN': { 3 | home: '首页', 4 | switchLangTitle: '切换语言', 5 | international: '多语言切换', 6 | iviewComponentTitle: 'iview组件多语言切换', 7 | tip: '注:iview-admin只是为了示范如何实现多语言切换,所以只对当前页做了翻译。', 8 | intro: 'iview目前支持15种语言,只要你看得到的iview组件出现iview内置文字的地方都会根据你设置的语言类型自动切换对应的语言。', 9 | placeholderText: '请输入文字...', 10 | placeholderDate: '选择日期', 11 | name: '姓名', 12 | company: '公司', 13 | btnText: '点击查看模态框', 14 | modalText: '在这里你可以看到iview模态框默认的确定和取消按钮会切换语言', 15 | poptip: '国际化的气泡提示', 16 | showPoptipText: '点击显示气泡提示' 17 | }, 18 | 'zh-TW': { 19 | home: '首頁', 20 | switchLangTitle: '切換語言', 21 | international: '多語言切換', 22 | iviewComponentTitle: 'iview組件多語言切換', 23 | tip: '注:iview-admin只是為了示範如何實現多語言切換,所以只對當前頁做了翻譯。', 24 | intro: 'iview目前支持15種語言,只要你看得到的iview組件出現iview內置文字的地方都會根據你設置的語言類型自動切換對應的語言。', 25 | placeholderText: '請輸入文字...', 26 | placeholderDate: '選擇日期', 27 | name: '姓名', 28 | company: '公司', 29 | btnText: '點擊查看模態框', 30 | modalText: '在這裡你可以看到iview模態框默認的確定和取消按鈕會切換語言', 31 | poptip: '國際化的氣泡提示', 32 | showPoptipText: '點擊顯示氣泡提示' 33 | }, 34 | 'en-US': { 35 | home: 'home', 36 | switchLangTitle: 'Switch Lang', 37 | international: 'Switch Lang', 38 | tip: 'Note: iview-admin just to demonstrate how to achieve multi-language switching, so only the current page to do the translation.', 39 | iviewComponentTitle: 'The effect on the iview', 40 | intro: 'iview currently supports 15 languages, as long as you see the iview component where the text will be based on your language type automatically set the corresponding language.', 41 | placeholderText: 'please enter text...', 42 | placeholderDate: 'Select Date', 43 | name: 'name', 44 | company: 'company', 45 | btnText: 'Click to show modal', 46 | modalText: 'Here you can see the iview modal box by default to the OK and Cancel buttons that will switch the language', 47 | poptip: 'international poptip', 48 | showPoptipText: 'Click to show poptip' 49 | } 50 | }; 51 | -------------------------------------------------------------------------------- /cms_data/web/src/main/java/com/liyu/cms/data/web/util/RSAUtil.java: -------------------------------------------------------------------------------- 1 | package com.liyu.cms.data.web.util; 2 | 3 | import org.apache.commons.codec.binary.Base64; 4 | 5 | import javax.crypto.Cipher; 6 | import java.security.*; 7 | import java.security.interfaces.RSAPublicKey; 8 | 9 | /** 10 | * Created by liyu on 2018/3/15. 11 | * RSA加解密,用户登录注册 12 | */ 13 | public class RSAUtil { 14 | 15 | //KeyPair is a simple holder for a key pair. 16 | private static final KeyPair keyPair = initKey(); 17 | /** 18 | * 初始化方法,产生key pair,提供provider和random 19 | * @return KeyPair instance 20 | */ 21 | private static KeyPair initKey() { 22 | 23 | try { 24 | KeyPairGenerator keyPairGenerator=KeyPairGenerator.getInstance("RSA"); 25 | keyPairGenerator.initialize(1024); 26 | return keyPairGenerator.generateKeyPair(); 27 | } catch(Exception e) { 28 | throw new RuntimeException(e); 29 | } 30 | } 31 | /** 32 | * 产生public key 33 | * @return public key字符串 34 | */ 35 | public static String generateBase64PublicKey() { 36 | PublicKey publicKey = (RSAPublicKey)keyPair.getPublic(); 37 | 38 | //encodeBase64(): Encodes binary data using the base64 39 | //algorithm but does not chunk the output. 40 | //getEncoded():返回key的原始编码形式 41 | return new String(Base64.encodeBase64(publicKey.getEncoded())); 42 | } 43 | /** 44 | * 解密数据 45 | * @param string 需要解密的字符串 46 | * @return 破解之后的字符串 47 | */ 48 | public static String decryptBase64(String string) { 49 | //decodeBase64():将Base64数据解码为"八位字节”数据 50 | return new String(decrypt(Base64.decodeBase64(string.getBytes()))); 51 | } 52 | 53 | private static byte[] decrypt(byte[] byteArray) { 54 | try { 55 | 56 | Cipher cipher = Cipher.getInstance("RSA"); 57 | PrivateKey privateKey = keyPair.getPrivate(); 58 | //初始化 59 | cipher.init(Cipher.DECRYPT_MODE, privateKey); 60 | //doFinal(): 加密或者解密数据 61 | byte[] plainText = cipher.doFinal(byteArray); 62 | return plainText; 63 | } catch(Exception e) { 64 | throw new RuntimeException(e); 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /cms_web/src/views/error-page/403.less: -------------------------------------------------------------------------------- 1 | @keyframes error403animation { 2 | 0% { 3 | transform: rotateZ(0deg); 4 | } 5 | 40% { 6 | transform: rotateZ(-20deg); 7 | } 8 | 45% { 9 | transform: rotateZ(-15deg); 10 | } 11 | 50% { 12 | transform: rotateZ(-20deg); 13 | } 14 | 55% { 15 | transform: rotateZ(-15deg); 16 | } 17 | 60% { 18 | transform: rotateZ(-20deg); 19 | } 20 | 100% { 21 | transform: rotateZ(0deg); 22 | } 23 | } 24 | .error403{ 25 | &-body-con{ 26 | width: 700px; 27 | height: 500px; 28 | position: absolute; 29 | left: 50%; 30 | top: 50%; 31 | transform: translate(-50%,-50%); 32 | &-title{ 33 | text-align: center; 34 | font-size: 240px; 35 | font-weight: 700; 36 | color: #2d8cf0; 37 | height: 260px; 38 | line-height: 260px; 39 | margin-top: 40px; 40 | .error403-0-span{ 41 | display: inline-block; 42 | position: relative; 43 | width: 170px; 44 | height: 170px; 45 | border-radius: 50%; 46 | border: 20px solid #ed3f14; 47 | color: #ed3f14; 48 | margin-right: 10px; 49 | i{ 50 | display: inline-block; 51 | font-size: 120px; 52 | position: absolute; 53 | left: 50%; 54 | top: 50%; 55 | transform: translate(-50%,-50%); 56 | } 57 | } 58 | .error403-key-span{ 59 | display: inline-block; 60 | position: relative; 61 | width: 100px; 62 | height: 190px; 63 | border-radius: 50%; 64 | margin-right: 10px; 65 | i{ 66 | display: inline-block; 67 | font-size: 190px; 68 | position: absolute; 69 | left: 20px; 70 | transform: translate(-50%,-60%); 71 | transform-origin: center bottom; 72 | animation: error403animation 2.8s ease 0s infinite; 73 | } 74 | } 75 | } 76 | &-message{ 77 | display: block; 78 | text-align: center; 79 | font-size: 30px; 80 | font-weight: 500; 81 | letter-spacing: 4px; 82 | color: #dddde2; 83 | } 84 | } 85 | &-btn-con{ 86 | text-align: center; 87 | padding: 20px 0; 88 | margin-bottom: 40px; 89 | } 90 | } -------------------------------------------------------------------------------- /cms_data/web/src/main/resources/mybatis-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 12 | 13 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /cms_data/web/src/main/java/com/liyu/cms/data/web/util/JWT.java: -------------------------------------------------------------------------------- 1 | package com.liyu.cms.data.web.util; 2 | 3 | import com.auth0.jwt.JWTSigner; 4 | import com.auth0.jwt.JWTVerifier; 5 | import com.auth0.jwt.internal.com.fasterxml.jackson.databind.ObjectMapper; 6 | 7 | import java.util.HashMap; 8 | import java.util.Map; 9 | 10 | /** 11 | * Created by liyu on 2018/3/28. 12 | */ 13 | public class JWT { 14 | 15 | private static final String SECRET = "zhiducom12344321"; 16 | 17 | private static final String EXP = "exp"; 18 | 19 | private static final String PAYLOAD = "payload"; 20 | 21 | public static final long expTime = 1000L * 3600L * 6L; 22 | 23 | /** 24 | * get jwt String of object 25 | * @param object 26 | * the POJO object 27 | * @param maxAge 28 | * the milliseconds of life time 29 | * @return the jwt token 30 | */ 31 | public static String sign(T object, long maxAge) { 32 | try { 33 | final JWTSigner signer = new JWTSigner(SECRET); 34 | final Map claims = new HashMap(); 35 | ObjectMapper mapper = new ObjectMapper(); 36 | String jsonString = mapper.writeValueAsString(object); 37 | claims.put(PAYLOAD, jsonString); 38 | claims.put(EXP, System.currentTimeMillis() + maxAge); 39 | return signer.sign(claims); 40 | } catch(Exception e) { 41 | return null; 42 | } 43 | } 44 | 45 | 46 | /** 47 | * get the object of jwt if not expired 48 | * @param jwt 49 | * @return POJO object 50 | */ 51 | public static T unsign(String jwt, Class classT) { 52 | final JWTVerifier verifier = new JWTVerifier(SECRET); 53 | try { 54 | final Map claims= verifier.verify(jwt); 55 | if (claims.containsKey(EXP) && claims.containsKey(PAYLOAD)) { 56 | long exp = (Long)claims.get(EXP); 57 | long currentTimeMillis = System.currentTimeMillis(); 58 | if (exp > currentTimeMillis) { 59 | String json = (String)claims.get(PAYLOAD); 60 | ObjectMapper objectMapper = new ObjectMapper(); 61 | return objectMapper.readValue(json, classT); 62 | } 63 | } 64 | return null; 65 | } catch (Exception e) { 66 | return null; 67 | } 68 | } 69 | 70 | } 71 | -------------------------------------------------------------------------------- /cms_data/web/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | ${logback.console.pattern} 11 | 12 | 13 | 14 | 15 | 16 | 17 | ${logback.file.fileNamePattern} 18 | ${logback.file.maxHistory} 19 | 20 | 21 | ${logback.file.pattern} 22 | 23 | 24 | ${logback.file.maxFileSize} 25 | 26 | 27 | 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 | -------------------------------------------------------------------------------- /cms_web/src/views/main-components/shrinkable-menu/components/sidebarMenu.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 28 | 29 | 68 | -------------------------------------------------------------------------------- /cms_web/src/views/main-components/shrinkable-menu/shrinkable-menu.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 24 | 25 | 84 | -------------------------------------------------------------------------------- /cms_data/core/src/main/java/com/liyu/cms/data/core/domain/UserInfo.java: -------------------------------------------------------------------------------- 1 | package com.liyu.cms.data.core.domain; 2 | 3 | import java.util.Date; 4 | 5 | /** 6 | * Created by liyu on 2018/3/15. 7 | */ 8 | public class UserInfo { 9 | 10 | private Integer id; 11 | 12 | private String userId; 13 | 14 | private Integer roleId; 15 | 16 | private String nickname; 17 | 18 | private String password; 19 | 20 | private String phoneNumber; 21 | 22 | private String email; 23 | 24 | private Date createTime; 25 | 26 | private Boolean freezed; 27 | 28 | private Boolean beSuper; 29 | 30 | private String roleName; 31 | 32 | public Integer getId() { 33 | return id; 34 | } 35 | 36 | public void setId(Integer id) { 37 | this.id = id; 38 | } 39 | 40 | public String getUserId() { 41 | return userId; 42 | } 43 | 44 | public void setUserId(String userId) { 45 | this.userId = userId; 46 | } 47 | 48 | public Integer getRoleId() { 49 | return roleId; 50 | } 51 | 52 | public void setRoleId(Integer roleId) { 53 | this.roleId = roleId; 54 | } 55 | 56 | public String getNickname() { 57 | return nickname; 58 | } 59 | 60 | public void setNickname(String nickname) { 61 | this.nickname = nickname; 62 | } 63 | 64 | public String getPassword() { 65 | return password; 66 | } 67 | 68 | public void setPassword(String password) { 69 | this.password = password; 70 | } 71 | 72 | public String getPhoneNumber() { 73 | return phoneNumber; 74 | } 75 | 76 | public void setPhoneNumber(String phoneNumber) { 77 | this.phoneNumber = phoneNumber; 78 | } 79 | 80 | public String getEmail() { 81 | return email; 82 | } 83 | 84 | public void setEmail(String email) { 85 | this.email = email; 86 | } 87 | 88 | public Date getCreateTime() { 89 | return createTime; 90 | } 91 | 92 | public void setCreateTime(Date createTime) { 93 | this.createTime = createTime; 94 | } 95 | 96 | public Boolean getFreezed() { 97 | return freezed; 98 | } 99 | 100 | public void setFreezed(Boolean freezed) { 101 | this.freezed = freezed; 102 | } 103 | 104 | public Boolean getBeSuper() { 105 | return beSuper; 106 | } 107 | 108 | public void setBeSuper(Boolean beSuper) { 109 | this.beSuper = beSuper; 110 | } 111 | 112 | public String getRoleName() { 113 | return roleName; 114 | } 115 | 116 | public void setRoleName(String roleName) { 117 | this.roleName = roleName; 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /cms_web/src/views/home/home.vue: -------------------------------------------------------------------------------- 1 | 5 | 43 | 44 | 75 | -------------------------------------------------------------------------------- /cms_web/src/views/main-components/lockscreen/lockscreen.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 66 | 67 | -------------------------------------------------------------------------------- /cms_web/src/views/main-components/shrinkable-menu/components/sidebarMenuShrink.vue: -------------------------------------------------------------------------------- 1 | 27 | 28 | 62 | -------------------------------------------------------------------------------- /cms_data/core/src/main/java/com/liyu/cms/data/core/service/impl/RegisterService.java: -------------------------------------------------------------------------------- 1 | package com.liyu.cms.data.core.service.impl; 2 | 3 | import com.liyu.cms.data.core.dao.UserDao; 4 | import com.liyu.cms.data.core.domain.UserInfo; 5 | import com.liyu.cms.data.core.service.IRegisterService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | import org.springframework.util.StringUtils; 9 | 10 | import java.util.Date; 11 | import java.util.List; 12 | 13 | /** 14 | * Created by liyu on 2018/3/15. 15 | */ 16 | @Service 17 | public class RegisterService implements IRegisterService { 18 | 19 | @Autowired 20 | private UserDao userDao; 21 | 22 | @Override 23 | public Integer registerUser(UserInfo userInfo) { 24 | if (null == userInfo) { 25 | return -1; 26 | } 27 | Integer ret = 0; 28 | try { 29 | String userId = userInfo.getUserId(); 30 | Integer exist = this.userDao.userExist(userId); 31 | if (exist > 0) { 32 | ret = -2; 33 | } else { 34 | userInfo.setPhoneNumber(""); 35 | userInfo.setEmail(""); 36 | userInfo.setCreateTime(new Date()); 37 | //游客 38 | userInfo.setRoleId(3); 39 | userInfo.setFreezed(false); 40 | this.userDao.addUser(userInfo); 41 | } 42 | } catch (Exception ex) { 43 | ex.printStackTrace(); 44 | ret = -1; 45 | } 46 | return ret; 47 | } 48 | 49 | @Override 50 | public Integer editPersonInfo(UserInfo userInfo) { 51 | if (null == userInfo) { 52 | return -1; 53 | } 54 | Integer ret = 0; 55 | try { 56 | this.userDao.updateInfo(userInfo); 57 | } catch (Exception ex) { 58 | ex.printStackTrace(); 59 | ret = -1; 60 | } 61 | return ret; 62 | } 63 | 64 | @Override 65 | public Integer changePassword(Integer id, String pwd) { 66 | if (StringUtils.isEmpty(pwd)) { 67 | return -1; 68 | } 69 | Integer ret = 0; 70 | try { 71 | this.userDao.changePassword(id, pwd); 72 | } catch (Exception ex) { 73 | ex.printStackTrace(); 74 | ret = -1; 75 | } 76 | return ret; 77 | } 78 | 79 | @Override 80 | public UserInfo getUserByUserId(String userId) { 81 | if (StringUtils.isEmpty(userId)) { 82 | return null; 83 | } 84 | UserInfo user = null; 85 | try { 86 | List list = this.userDao.getUserByUserId(userId); 87 | if (list.size() > 0) { 88 | user = list.get(0); 89 | } 90 | } catch (Exception ex) { 91 | ex.printStackTrace(); 92 | } 93 | return user; 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /cms_web/build/webpack.prod.config.js: -------------------------------------------------------------------------------- 1 | const webpack = require('webpack'); 2 | const HtmlWebpackPlugin = require('html-webpack-plugin'); 3 | const ExtractTextPlugin = require('extract-text-webpack-plugin'); 4 | const CopyWebpackPlugin = require('copy-webpack-plugin'); 5 | const cleanWebpackPlugin = require('clean-webpack-plugin'); 6 | const UglifyJsParallelPlugin = require('webpack-uglify-parallel'); 7 | const merge = require('webpack-merge'); 8 | const webpackBaseConfig = require('./webpack.base.config.js'); 9 | const os = require('os'); 10 | const fs = require('fs'); 11 | const path = require('path'); 12 | const package = require('../package.json'); 13 | 14 | fs.open('./build/env.js', 'w', function(err, fd) { 15 | const buf = 'export default "production";'; 16 | fs.write(fd, buf, 0, buf.length, 0, function(err, written, buffer) {}); 17 | }); 18 | 19 | module.exports = merge(webpackBaseConfig, { 20 | output: { 21 | publicPath: '/dist/', // 修改 https://iv...admin 这部分为你的服务器域名 22 | filename: '[name].[hash].js', 23 | chunkFilename: '[name].[hash].chunk.js' 24 | }, 25 | plugins: [ 26 | new cleanWebpackPlugin(['dist/*'], { 27 | root: path.resolve(__dirname, '../') 28 | }), 29 | new ExtractTextPlugin({ 30 | filename: '[name].[hash].css', 31 | allChunks: true 32 | }), 33 | new webpack.optimize.CommonsChunkPlugin({ 34 | // name: 'vendors', 35 | // filename: 'vendors.[hash].js' 36 | name: ['vender-exten', 'vender-base'], 37 | minChunks: Infinity 38 | }), 39 | new webpack.DefinePlugin({ 40 | 'process.env': { 41 | NODE_ENV: '"production"' 42 | } 43 | }), 44 | new webpack.optimize.UglifyJsPlugin({ 45 | compress: { 46 | warnings: false 47 | } 48 | }), 49 | // new UglifyJsParallelPlugin({ 50 | // workers: os.cpus().length, 51 | // mangle: true, 52 | // compressor: { 53 | // warnings: false, 54 | // drop_console: true, 55 | // drop_debugger: true 56 | // } 57 | // }), 58 | new CopyWebpackPlugin([ 59 | { 60 | from: 'td_icon.ico' 61 | }, 62 | { 63 | from: 'src/styles/fonts', 64 | to: 'fonts' 65 | }, 66 | { 67 | from: 'src/views/main-components/theme-switch/theme' 68 | } 69 | ], { 70 | ignore: [ 71 | 'text-editor.vue' 72 | ] 73 | }), 74 | new HtmlWebpackPlugin({ 75 | title: '后台管理系统 v' + package.version, 76 | favicon: './td_icon.ico', 77 | filename: '../index.html', 78 | template: '!!ejs-loader!./src/template/index.ejs', 79 | inject: false 80 | }) 81 | ] 82 | }); 83 | -------------------------------------------------------------------------------- /cms_web/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cms_web", 3 | "version": "1.0.0", 4 | "description": "后台管理系统", 5 | "main": "index.js", 6 | "scripts": { 7 | "init": "webpack --progress --config build/webpack.dev.config.js", 8 | "dev": "webpack-dev-server --content-base ./ --open --inline --hot --compress --config build/webpack.dev.config.js", 9 | "build": "webpack --progress --hide-modules --config build/webpack.prod.config.js", 10 | "lint": "eslint --fix --ext .js,.vue src" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "" 15 | }, 16 | "author": "", 17 | "license": "MIT", 18 | "dependencies": { 19 | "area-data": "^1.0.0", 20 | "axios": "^0.17.1", 21 | "clipboard": "^1.7.1", 22 | "countup": "^1.8.2", 23 | "cropperjs": "^1.2.2", 24 | "echarts": "^3.8.5", 25 | "html2canvas": "^0.5.0-beta4", 26 | "iview": "^2.11.0", 27 | "iview-area": "^1.5.16", 28 | "js-cookie": "^2.2.0", 29 | "rasterizehtml": "^1.2.4", 30 | "simplemde": "^1.11.2", 31 | "sortablejs": "^1.7.0", 32 | "tinymce": "^4.7.4", 33 | "vue": "^2.5.13", 34 | "vue-router": "^3.0.1", 35 | "vue-virtual-scroller": "^0.10.6", 36 | "vuex": "^3.0.1", 37 | "xlsx": "^0.11.17", 38 | "jsencrypt": "^3.0.0-beta.1", 39 | "jquery": "^3.3.1" 40 | }, 41 | "devDependencies": { 42 | "autoprefixer-loader": "^3.2.0", 43 | "babel": "^6.23.0", 44 | "babel-core": "^6.23.1", 45 | "babel-eslint": "^8.2.1", 46 | "babel-loader": "^7.1.2", 47 | "babel-plugin-syntax-dynamic-import": "^6.18.0", 48 | "babel-plugin-transform-runtime": "^6.12.0", 49 | "babel-preset-env": "^1.6.1", 50 | "babel-preset-es2015": "^6.9.0", 51 | "babel-preset-stage-3": "^6.24.1", 52 | "babel-runtime": "^6.11.6", 53 | "clean-webpack-plugin": "^0.1.17", 54 | "copy-webpack-plugin": "^4.3.1", 55 | "css-hot-loader": "^1.3.5", 56 | "css-loader": "^0.28.8", 57 | "ejs-loader": "^0.3.0", 58 | "eslint": "^4.15.0", 59 | "eslint-config-google": "^0.9.1", 60 | "eslint-config-standard": "^10.2.1", 61 | "eslint-plugin-html": "^4.0.1", 62 | "eslint-plugin-import": "^2.8.0", 63 | "eslint-plugin-node": "^5.2.1", 64 | "eslint-plugin-promise": "^3.6.0", 65 | "eslint-plugin-standard": "^3.0.1", 66 | "extract-text-webpack-plugin": "^3.0.2", 67 | "file-loader": "^1.1.6", 68 | "happypack": "^4.0.0", 69 | "html-loader": "^0.5.4", 70 | "html-webpack-plugin": "^2.28.0", 71 | "less": "^2.7.3", 72 | "less-loader": "^4.0.5", 73 | "semver": "^5.4.1", 74 | "style-loader": "^0.19.1", 75 | "unsupported": "^1.1.0", 76 | "url-loader": "^0.6.2", 77 | "vue-hot-reload-api": "^2.2.4", 78 | "vue-html-loader": "^1.2.3", 79 | "vue-i18n": "^5.0.3", 80 | "vue-loader": "^13.7.0", 81 | "vue-style-loader": "^3.0.3", 82 | "vue-template-compiler": "^2.5.13", 83 | "webpack": "^3.10.0", 84 | "webpack-dev-server": "^2.10.1", 85 | "webpack-merge": "^4.1.1", 86 | "webpack-uglify-parallel": "^0.1.4" 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /cms_web/build/webpack.base.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const os = require('os'); 3 | const webpack = require('webpack'); 4 | const ExtractTextPlugin = require('extract-text-webpack-plugin'); 5 | const HappyPack = require('happypack'); 6 | var happyThreadPool = HappyPack.ThreadPool({ size: os.cpus().length }); 7 | function resolve (dir) { 8 | return path.join(__dirname, dir); 9 | } 10 | module.exports = { 11 | entry: { 12 | main: '@/main', 13 | 'vender-base': '@/vendors/vendors.base.js', 14 | 'vender-exten': '@/vendors/vendors.exten.js' 15 | }, 16 | output: { 17 | path: path.resolve(__dirname, '../dist/dist') 18 | }, 19 | module: { 20 | rules: [ 21 | { 22 | test: /\.vue$/, 23 | loader: 'vue-loader', 24 | options: { 25 | loaders: { 26 | css: 'vue-style-loader!css-loader', 27 | less: 'vue-style-loader!css-loader!less-loader' 28 | }, 29 | postLoaders: { 30 | html: 'babel-loader' 31 | } 32 | } 33 | }, 34 | { 35 | test: /iview\/.*?js$/, 36 | loader: 'happypack/loader?id=happybabel', 37 | exclude: /node_modules/ 38 | }, 39 | { 40 | test: /\.js$/, 41 | loader: 'happypack/loader?id=happybabel', 42 | exclude: /node_modules/ 43 | }, 44 | { 45 | test: /\.js[x]?$/, 46 | include: [resolve('src')], 47 | exclude: /node_modules/, 48 | loader: 'happypack/loader?id=happybabel' 49 | }, 50 | { 51 | test: /\.css$/, 52 | use: ExtractTextPlugin.extract({ 53 | use: ['css-loader?minimize', 'autoprefixer-loader'], 54 | fallback: 'style-loader' 55 | }) 56 | }, 57 | { 58 | test: /\.less$/, 59 | use: ExtractTextPlugin.extract({ 60 | use: ['css-loader?minimize','autoprefixer-loader', 'less-loader'], 61 | fallback: 'style-loader' 62 | }), 63 | }, 64 | { 65 | test: /\.(gif|jpg|png|woff|svg|eot|ttf)\??.*$/, 66 | loader: 'url-loader?limit=1024' 67 | }, 68 | { 69 | test: /\.(html|tpl)$/, 70 | loader: 'html-loader' 71 | } 72 | ] 73 | }, 74 | plugins: [ 75 | new HappyPack({ 76 | id: 'happybabel', 77 | loaders: ['babel-loader'], 78 | threadPool: happyThreadPool, 79 | verbose: true 80 | }) 81 | ], 82 | resolve: { 83 | extensions: ['.js', '.vue'], 84 | alias: { 85 | 'vue': 'vue/dist/vue.esm.js', 86 | '@': resolve('../src'), 87 | } 88 | } 89 | }; -------------------------------------------------------------------------------- /cms_web/src/views/main-components/lockscreen/components/unlock.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 28 | 29 | 81 | -------------------------------------------------------------------------------- /cms_web/src/views/main-components/fullscreen.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 75 | -------------------------------------------------------------------------------- /cms_web/src/libs/safe_http.js: -------------------------------------------------------------------------------- 1 | import $ from 'jquery'; 2 | import Cookies from 'js-cookie'; 3 | 4 | let safeHttp = { 5 | 6 | }; 7 | 8 | safeHttp.get = function (url, param, callback) { 9 | if (param === undefined || param === null) { 10 | $.get(url, function (data, status) { 11 | if (callback !== undefined && callback !== null) { 12 | callback(data, status); 13 | } 14 | }); 15 | } else { 16 | $.get(url, param, function (data, status) { 17 | if (callback !== undefined && callback !== null) { 18 | callback(data, status); 19 | } 20 | }); 21 | } 22 | }; 23 | 24 | safeHttp.post = function (url, body, callback) { 25 | $.post({ 26 | 'url': url, 27 | 'type': 'post', 28 | 'data': JSON.stringify(body), 29 | 'cache': false, 30 | dataType: 'text', 31 | 'contentType': 'application/json; charset=utf-8', 32 | 'success': function (data, status) { 33 | if (callback !== undefined && callback !== null) { 34 | callback(data, status); 35 | } 36 | } 37 | }); 38 | }; 39 | 40 | safeHttp.jwtGet = function (url, param, callback, vm) { 41 | let loginId = Cookies.get('loginId'); 42 | let token = Cookies.get('token'); 43 | let jwtParam = { 44 | loginId: loginId, 45 | token: token 46 | }; 47 | if (param !== undefined && param !== null) { 48 | $.extend(jwtParam, param); 49 | } 50 | $.get(url, jwtParam, function (data, status) { 51 | if (data.code === 403) { 52 | if (vm !== undefined && vm !== null) { 53 | vm.$Message.error({ 54 | content: 'Token失效,请重新登录', 55 | duration: 4 56 | }); 57 | } 58 | } 59 | if (callback !== undefined && callback !== null) { 60 | callback(data, status); 61 | } 62 | }); 63 | }; 64 | 65 | safeHttp.jwtPost = function (url, body, callback, vm) { 66 | let loginId = Cookies.get('loginId'); 67 | let token = Cookies.get('token'); 68 | let finalUrl = ''; 69 | if (url.indexOf('?') !== -1) { 70 | finalUrl = url + '&loginId=' + loginId + '&token=' + token; 71 | } else { 72 | finalUrl = url + '?loginId=' + loginId + '&token=' + token; 73 | } 74 | $.post({ 75 | 'url': finalUrl, 76 | 'type': 'post', 77 | 'data': JSON.stringify(body), 78 | 'cache': false, 79 | dataType: 'text', 80 | 'contentType': 'application/json; charset=utf-8', 81 | 'success': function (data, status) { 82 | let jsonObj = JSON.parse(data); 83 | 84 | if (jsonObj.code === 403) { 85 | if (vm !== undefined && vm !== null) { 86 | vm.$Message.error({ 87 | content: 'Token失效,请重新登录', 88 | duration: 4 89 | }); 90 | } 91 | } 92 | if (callback !== undefined && callback !== null) { 93 | callback(data, status); 94 | } 95 | } 96 | }); 97 | }; 98 | 99 | export default safeHttp; 100 | -------------------------------------------------------------------------------- /cms_data/core/src/main/java/com/liyu/cms/data/core/service/impl/UserService.java: -------------------------------------------------------------------------------- 1 | package com.liyu.cms.data.core.service.impl; 2 | 3 | import com.liyu.cms.data.core.dao.UserDao; 4 | import com.liyu.cms.data.core.domain.UserInfo; 5 | import com.liyu.cms.data.core.service.IUserService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | import org.springframework.util.StringUtils; 9 | 10 | import java.util.ArrayList; 11 | import java.util.Date; 12 | import java.util.List; 13 | 14 | /** 15 | * Created by liyu on 2018/3/22. 16 | */ 17 | @Service 18 | public class UserService implements IUserService{ 19 | 20 | @Autowired 21 | private UserDao userDao; 22 | 23 | @Override 24 | public Integer getUserTotalCount(final String searchKey, final Integer status) { 25 | Integer total = 0; 26 | try { 27 | String tmpSearchKey = searchKey; 28 | if (StringUtils.isEmpty(tmpSearchKey)) { 29 | tmpSearchKey = null; 30 | } 31 | total = this.userDao.getUserTotalCount(tmpSearchKey, status); 32 | } catch (Exception ex) { 33 | ex.printStackTrace(); 34 | total = 0; 35 | } 36 | return total; 37 | } 38 | 39 | @Override 40 | public List getUserPage(final String searchKey, final Integer status, final Integer pageIndex, final Integer pageSize) { 41 | List list = null; 42 | try { 43 | String tmpSearchKey = searchKey; 44 | if (StringUtils.isEmpty(tmpSearchKey)) { 45 | tmpSearchKey = null; 46 | } 47 | Integer dataIndex = pageIndex * pageSize; 48 | list = this.userDao.getUserPage(tmpSearchKey,status,dataIndex,pageSize); 49 | } catch (Exception ex) { 50 | ex.printStackTrace(); 51 | list = new ArrayList<>(); 52 | } 53 | return list; 54 | } 55 | 56 | @Override 57 | public Integer addUser(UserInfo item) { 58 | if (null == item) { 59 | return -1; 60 | } 61 | Integer ret = 0; 62 | try { 63 | String userId = item.getUserId(); 64 | Integer exist = this.userDao.userExist(userId); 65 | if (exist > 0) { 66 | ret = -2; 67 | } else { 68 | item.setPassword("123456"); 69 | item.setCreateTime(new Date()); 70 | this.userDao.addUser(item); 71 | } 72 | } catch (Exception ex) { 73 | ex.printStackTrace(); 74 | ret = -1; 75 | } 76 | return ret; 77 | } 78 | 79 | @Override 80 | public Integer editUser(UserInfo item) { 81 | if (null == item) { 82 | return -1; 83 | } 84 | Integer ret = 0; 85 | try { 86 | this.userDao.updateUser(item); 87 | } catch (Exception ex) { 88 | ex.printStackTrace(); 89 | ret = -1; 90 | } 91 | return ret; 92 | } 93 | 94 | @Override 95 | public Integer deleteUser(Integer id) { 96 | Integer ret = 0; 97 | try { 98 | this.userDao.deleteUser(id); 99 | } catch (Exception ex) { 100 | ex.printStackTrace(); 101 | ret = -1; 102 | } 103 | return ret; 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /cms_data/core/src/main/java/com/liyu/cms/data/core/service/impl/LoginService.java: -------------------------------------------------------------------------------- 1 | package com.liyu.cms.data.core.service.impl; 2 | 3 | import com.alibaba.fastjson.JSONArray; 4 | import com.alibaba.fastjson.JSONObject; 5 | import com.liyu.cms.data.core.dao.MenuDao; 6 | import com.liyu.cms.data.core.dao.UserDao; 7 | import com.liyu.cms.data.core.domain.MenuOne; 8 | import com.liyu.cms.data.core.domain.MenuPage; 9 | import com.liyu.cms.data.core.domain.UserInfo; 10 | import com.liyu.cms.data.core.service.ILoginService; 11 | import org.springframework.beans.factory.annotation.Autowired; 12 | import org.springframework.stereotype.Service; 13 | 14 | import java.util.List; 15 | 16 | /** 17 | * Created by liyu on 2018/3/15. 18 | */ 19 | @Service 20 | public class LoginService implements ILoginService { 21 | 22 | @Autowired 23 | private UserDao userDao; 24 | 25 | @Autowired 26 | private MenuDao menuDao; 27 | 28 | @Override 29 | public UserInfo getUserInfo(String userId) { 30 | if (null == userId || userId.length() == 0) { 31 | return null; 32 | } 33 | UserInfo user = null; 34 | try { 35 | List list = this.userDao.getUserByUserId(userId); 36 | if (null != list && list.size() > 0) { 37 | user = list.get(0); 38 | } 39 | } catch (Exception ex) { 40 | ex.printStackTrace(); 41 | } 42 | return user; 43 | } 44 | 45 | @Override 46 | public JSONArray getMenuByUser(UserInfo userInfo) { 47 | if (null == userInfo) { 48 | return null; 49 | } 50 | JSONArray menuList = new JSONArray(); 51 | try { 52 | Boolean beSuper = userInfo.getBeSuper(); 53 | List dataList = null; 54 | if (beSuper.equals(true)) { 55 | //超管 56 | dataList = this.menuDao.getAllMenu(); 57 | } else { 58 | //普通用户 59 | Integer roleId = userInfo.getRoleId(); 60 | dataList = this.menuDao.getRoleMenu(roleId); 61 | } 62 | //组装menu 63 | for (int i = 0, maxI = dataList.size(); i < maxI; i++) { 64 | MenuOne oneItem = dataList.get(i); 65 | List pageDataList = oneItem.getPageList(); 66 | if (null != pageDataList && pageDataList.size() > 0) { 67 | JSONObject menuJson = new JSONObject(); 68 | JSONArray pageList = new JSONArray(); 69 | for (int j = 0, maxJ = pageDataList.size(); j < maxJ; j++) { 70 | MenuPage pageItem = pageDataList.get(j); 71 | JSONObject pageJson = new JSONObject(); 72 | pageJson.put("name",pageItem.getRouteName()); 73 | pageJson.put("title",pageItem.getTitle()); 74 | pageJson.put("icon",pageItem.getIcon()); 75 | pageList.add(pageJson); 76 | } 77 | menuJson.put("children",pageList); 78 | menuJson.put("name",oneItem.getRouteName()); 79 | menuJson.put("title",oneItem.getTitle()); 80 | menuJson.put("icon",oneItem.getIcon()); 81 | menuList.add(menuJson); 82 | } 83 | } 84 | } catch (Exception ex) { 85 | ex.printStackTrace(); 86 | } 87 | return menuList; 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /cms_data/web/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | Archetype Created Web Application 7 | 8 | 9 | 10 | spring.profiles.active 11 | ${profiles.activation} 12 | 13 | 14 | 15 | contextConfigLocation 16 | classpath:/spring-*.xml 17 | 18 | 19 | 20 | webAppRootKey 21 | liyu.cms.data.oss 22 | 23 | 24 | 25 | 26 | logbackConfigLocation 27 | classpath:logback.xml 28 | 29 | 30 | ch.qos.logback.ext.spring.web.LogbackConfigListener 31 | 32 | 33 | 34 | org.springframework.web.context.ContextLoaderListener 35 | 36 | 37 | 38 | 39 | encodingFilter 40 | org.springframework.web.filter.CharacterEncodingFilter 41 | 42 | encoding 43 | UTF-8 44 | 45 | 46 | forceEncoding 47 | true 48 | 49 | 50 | 51 | encodingFilter 52 | /* 53 | 54 | 55 | 56 | 57 | Dispatcher 58 | org.springframework.web.servlet.DispatcherServlet 59 | 60 | contextConfigLocation 61 | classpath:dispatcher-servlet.xml 62 | 63 | 1 64 | 65 | 66 | 67 | Dispatcher 68 | /* 69 | 70 | 71 | 72 | HiddenHttpMethodFilter 73 | org.springframework.web.filter.HiddenHttpMethodFilter 74 | 75 | 76 | HiddenHttpMethodFilter 77 | /* 78 | 79 | 80 | 81 | 82 | domainFilter 83 | com.liyu.cms.data.web.filters.DomainFilter 84 | 85 | ExcludePaths 86 | /heart-beat;/public_key;/login;/register 87 | 88 | 89 | 90 | domainFilter 91 | /* 92 | 93 | 94 | 95 | chainFilter 96 | com.liyu.cms.data.web.filters.ChainFilter 97 | 98 | 99 | 100 | chainFilter 101 | /* 102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /cms_web/src/views/error-page/error-page.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 85 | 86 | 98 | -------------------------------------------------------------------------------- /cms_web/src/route/router.js: -------------------------------------------------------------------------------- 1 | import Main from '@/views/main/Main.vue'; 2 | 3 | // 不作为Main组件的子页面展示的页面单独写,如下 4 | export const loginRouter = { 5 | path: '/login', 6 | name: 'login', 7 | meta: { 8 | title: 'Login - 登录' 9 | }, 10 | component: () => import('@/views/login/login.vue') 11 | }; 12 | 13 | export const registerRouter = { 14 | path: '/register', 15 | name: 'register', 16 | meta: { 17 | title: 'Register - 注册' 18 | }, 19 | component: () => import('@/views/register/register.vue') 20 | }; 21 | 22 | export const page404 = { 23 | path: '/*', 24 | name: 'error-404', 25 | meta: { 26 | title: '404-页面不存在' 27 | }, 28 | component: () => import('@/views/error-page/404.vue') 29 | }; 30 | 31 | export const page403 = { 32 | path: '/403', 33 | meta: { 34 | title: '403-权限不足' 35 | }, 36 | name: 'error-403', 37 | component: () => import('@//views/error-page/403.vue') 38 | }; 39 | 40 | export const page500 = { 41 | path: '/500', 42 | meta: { 43 | title: '500-服务端错误' 44 | }, 45 | name: 'error-500', 46 | component: () => import('@/views/error-page/500.vue') 47 | }; 48 | 49 | export const preview = { 50 | path: '/preview', 51 | name: 'preview', 52 | component: () => import('@/views/form/article-publish/preview.vue') 53 | }; 54 | 55 | export const locking = { 56 | path: '/locking', 57 | name: 'locking', 58 | component: () => import('@/views/main-components/lockscreen/components/locking-page.vue') 59 | }; 60 | 61 | // 作为Main组件的子页面展示但是不在左侧菜单显示的路由写在otherRouter里 62 | export const otherRouter = { 63 | path: '/', 64 | name: 'otherRouter', 65 | redirect: '/home', 66 | component: Main, 67 | children: [ 68 | { path: 'home', title: {i18n: 'home'}, name: 'home_index', component: () => import('@/views/home/home.vue') }, 69 | { path: 'ownspace', title: '个人中心', name: 'ownspace_index', component: () => import('@/views/own-space/own-space.vue') } 70 | // { path: 'message', title: '消息中心', name: 'message_index', component: () => import('@/views/message/message.vue') } 71 | ] 72 | }; 73 | 74 | // 作为Main组件的子页面展示并且在左侧菜单显示的路由写在appRouter里 75 | export const appRouter = [ 76 | { 77 | path: '/privilege-mgr', 78 | name: 'privilege-mgr', 79 | title: '权限管理', 80 | component: Main, 81 | children: [ 82 | { 83 | path: 'menu-mgr', 84 | name: 'menu-mgr', 85 | title: '菜单页面', 86 | component: () => import('@/views/privilege-mgr/menu-mgr/menu-mgr.vue') 87 | }, 88 | { 89 | path: 'role-mgr', 90 | name: 'role-mgr', 91 | title: '角色管理', 92 | component: () => import('@/views/privilege-mgr/role-mgr/role-mgr.vue') 93 | }, 94 | { 95 | path: 'role-privilege', 96 | name: 'role-privilege', 97 | title: '角色权限', 98 | component: () => import('@/views/privilege-mgr/role-privilege/role-privilege.vue') 99 | }, 100 | { 101 | path: 'user-mgr', 102 | name: 'user-mgr', 103 | title: '用户管理', 104 | component: () => import('@/views/privilege-mgr/user-mgr/user-mgr.vue') 105 | } 106 | ] 107 | }, 108 | { 109 | path: '/test_menu', 110 | name: 'test_menu', 111 | title: '测试目录', 112 | component: Main, 113 | children: [ 114 | { 115 | path: 'test_page_1', 116 | name: 'test_page_1', 117 | title: '测试明细页', 118 | component: () => import('@/views/test_menu/test_page.vue') 119 | } 120 | ] 121 | } 122 | ]; 123 | 124 | // 所有上面定义的路由都要写在下面的routers里 125 | export const routers = [ 126 | loginRouter, 127 | otherRouter, 128 | preview, 129 | locking, 130 | ...appRouter, 131 | page500, 132 | page403, 133 | page404, 134 | registerRouter 135 | ]; 136 | 137 | -------------------------------------------------------------------------------- /cms_data/.idea/misc.xml: -------------------------------------------------------------------------------- 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 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 64 | 65 | 66 | 67 | 68 | 69 | 1.8 70 | 71 | 76 | 77 | 78 | 79 | 80 | 81 | 1.8 82 | 83 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 99 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /cms_data/web/src/main/resources/mybatis/RoleMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | update tb_menu_page page,tb_role_privilege role 22 | SET role.deleted = 1 23 | WHERE page.id = role.page_id and page.one_id = #{oneId} 24 | 25 | 26 | 27 | update tb_role_privilege SET deleted = 1 28 | WHERE page_id = #{pageId} 29 | 30 | 31 | 42 | 43 | 55 | 56 | 62 | 63 | 73 | 74 | 76 | insert into tb_role(name,is_super,description,create_time) 77 | VALUES (#{name},#{beSuper},#{description},#{createTime}) 78 | 79 | 80 | 81 | update tb_role SET name = #{name},description = #{description} 82 | WHERE id = #{id} 83 | 84 | 85 | 86 | update tb_role SET deleted = 1 87 | WHERE id = #{id} 88 | 89 | 90 | 91 | update tb_role_privilege SET deleted = 1 92 | WHERE role_id = #{roleId} 93 | 94 | 95 | 100 | 101 | 102 | update tb_role_privilege SET deleted = 1 103 | 104 | role_id = #{roleId} and page_id IN 105 | #{item} 106 | 107 | 108 | 109 | 110 | INSERT INTO tb_role_privilege(role_id,page_id) 111 | VALUES 112 | 113 | (#{item.roleId},#{item.pageId}) 114 | 115 | 116 | 117 | --------------------------------------------------------------------------------