├── public ├── favicon.ico ├── assets │ └── social │ │ ├── jd.png │ │ ├── mi.png │ │ ├── qq.png │ │ ├── baidu.png │ │ ├── csdn.png │ │ ├── eleme.png │ │ ├── gitee.png │ │ ├── weibo.png │ │ ├── xmly.png │ │ ├── alipay.png │ │ ├── aliyun.png │ │ ├── amazon.png │ │ ├── coding.png │ │ ├── douyin.png │ │ ├── feishu.png │ │ ├── github.png │ │ ├── gitlab.png │ │ ├── google.png │ │ ├── huawei.png │ │ ├── kujiale.png │ │ ├── meituan.png │ │ ├── oschina.png │ │ ├── renren.png │ │ ├── taobao.png │ │ ├── toutiao.png │ │ ├── twitter.png │ │ ├── wechat.png │ │ ├── welink.png │ │ ├── dingtalk.png │ │ ├── facebook.png │ │ ├── linkedin.png │ │ ├── microsoft.png │ │ ├── pinterest.png │ │ ├── teambition.png │ │ ├── wechat_mp.png │ │ ├── tencentCloud.png │ │ ├── wechat_open.png │ │ ├── stack_overflow.png │ │ ├── wechat_enterprise.png │ │ ├── README.md │ │ ├── LICENSE │ │ └── wechat-enterprise.svg └── index.html ├── src ├── assets │ ├── app │ │ ├── 1.png │ │ ├── m.png │ │ ├── o.png │ │ ├── s.png │ │ ├── cas.png │ │ ├── hr.png │ │ ├── jwt.png │ │ ├── ss.png │ │ ├── ye.png │ │ ├── aliyun.png │ │ ├── dian.png │ │ ├── gitLab.png │ │ ├── jira.png │ │ ├── json.png │ │ ├── oauth2.png │ │ ├── youdao.png │ │ ├── sanjiao.png │ │ └── tencent.png │ ├── logo.jpg │ ├── svg │ │ ├── avatar.jpg │ │ ├── mobile.svg │ │ ├── arrow-right.svg │ │ ├── email.svg │ │ ├── user.svg │ │ ├── key.svg │ │ ├── quit.svg │ │ ├── eyes-open.svg │ │ ├── right.svg │ │ ├── lock.svg │ │ ├── 1.svg │ │ ├── logo.svg │ │ ├── 2.svg │ │ ├── C.svg │ │ ├── eyes-close.svg │ │ └── erweima.svg │ └── less │ │ ├── login.less │ │ └── forgot.less ├── components │ ├── NotFound.vue │ ├── Jwt-auth.vue │ ├── Logout.vue │ ├── Header.vue │ ├── Icon.vue │ ├── Footer.vue │ ├── AppList.vue │ ├── Home.vue │ ├── User.vue │ ├── Forgot.vue │ └── login.vue ├── shims-vue.d.ts ├── main.ts ├── App.vue ├── shared │ └── index.ts ├── router │ └── index.ts └── utils │ └── api.ts ├── auto-imports.d.ts ├── babel.config.js ├── babel.config.cjs ├── .gitignore ├── tsconfig.json ├── README.md ├── vue.config.cjs └── package.json /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /src/assets/app/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/src/assets/app/1.png -------------------------------------------------------------------------------- /src/assets/app/m.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/src/assets/app/m.png -------------------------------------------------------------------------------- /src/assets/app/o.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/src/assets/app/o.png -------------------------------------------------------------------------------- /src/assets/app/s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/src/assets/app/s.png -------------------------------------------------------------------------------- /src/assets/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/src/assets/logo.jpg -------------------------------------------------------------------------------- /src/assets/app/cas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/src/assets/app/cas.png -------------------------------------------------------------------------------- /src/assets/app/hr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/src/assets/app/hr.png -------------------------------------------------------------------------------- /src/assets/app/jwt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/src/assets/app/jwt.png -------------------------------------------------------------------------------- /src/assets/app/ss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/src/assets/app/ss.png -------------------------------------------------------------------------------- /src/assets/app/ye.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/src/assets/app/ye.png -------------------------------------------------------------------------------- /src/assets/app/aliyun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/src/assets/app/aliyun.png -------------------------------------------------------------------------------- /src/assets/app/dian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/src/assets/app/dian.png -------------------------------------------------------------------------------- /src/assets/app/gitLab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/src/assets/app/gitLab.png -------------------------------------------------------------------------------- /src/assets/app/jira.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/src/assets/app/jira.png -------------------------------------------------------------------------------- /src/assets/app/json.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/src/assets/app/json.png -------------------------------------------------------------------------------- /src/assets/app/oauth2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/src/assets/app/oauth2.png -------------------------------------------------------------------------------- /src/assets/app/youdao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/src/assets/app/youdao.png -------------------------------------------------------------------------------- /src/assets/svg/avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/src/assets/svg/avatar.jpg -------------------------------------------------------------------------------- /auto-imports.d.ts: -------------------------------------------------------------------------------- 1 | // Generated by 'unplugin-auto-import' 2 | export {} 3 | declare global { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /public/assets/social/jd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/jd.png -------------------------------------------------------------------------------- /public/assets/social/mi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/mi.png -------------------------------------------------------------------------------- /public/assets/social/qq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/qq.png -------------------------------------------------------------------------------- /src/assets/app/sanjiao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/src/assets/app/sanjiao.png -------------------------------------------------------------------------------- /src/assets/app/tencent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/src/assets/app/tencent.png -------------------------------------------------------------------------------- /babel.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /public/assets/social/baidu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/baidu.png -------------------------------------------------------------------------------- /public/assets/social/csdn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/csdn.png -------------------------------------------------------------------------------- /public/assets/social/eleme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/eleme.png -------------------------------------------------------------------------------- /public/assets/social/gitee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/gitee.png -------------------------------------------------------------------------------- /public/assets/social/weibo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/weibo.png -------------------------------------------------------------------------------- /public/assets/social/xmly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/xmly.png -------------------------------------------------------------------------------- /public/assets/social/alipay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/alipay.png -------------------------------------------------------------------------------- /public/assets/social/aliyun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/aliyun.png -------------------------------------------------------------------------------- /public/assets/social/amazon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/amazon.png -------------------------------------------------------------------------------- /public/assets/social/coding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/coding.png -------------------------------------------------------------------------------- /public/assets/social/douyin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/douyin.png -------------------------------------------------------------------------------- /public/assets/social/feishu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/feishu.png -------------------------------------------------------------------------------- /public/assets/social/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/github.png -------------------------------------------------------------------------------- /public/assets/social/gitlab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/gitlab.png -------------------------------------------------------------------------------- /public/assets/social/google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/google.png -------------------------------------------------------------------------------- /public/assets/social/huawei.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/huawei.png -------------------------------------------------------------------------------- /public/assets/social/kujiale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/kujiale.png -------------------------------------------------------------------------------- /public/assets/social/meituan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/meituan.png -------------------------------------------------------------------------------- /public/assets/social/oschina.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/oschina.png -------------------------------------------------------------------------------- /public/assets/social/renren.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/renren.png -------------------------------------------------------------------------------- /public/assets/social/taobao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/taobao.png -------------------------------------------------------------------------------- /public/assets/social/toutiao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/toutiao.png -------------------------------------------------------------------------------- /public/assets/social/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/twitter.png -------------------------------------------------------------------------------- /public/assets/social/wechat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/wechat.png -------------------------------------------------------------------------------- /public/assets/social/welink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/welink.png -------------------------------------------------------------------------------- /public/assets/social/dingtalk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/dingtalk.png -------------------------------------------------------------------------------- /public/assets/social/facebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/facebook.png -------------------------------------------------------------------------------- /public/assets/social/linkedin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/linkedin.png -------------------------------------------------------------------------------- /public/assets/social/microsoft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/microsoft.png -------------------------------------------------------------------------------- /public/assets/social/pinterest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/pinterest.png -------------------------------------------------------------------------------- /public/assets/social/teambition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/teambition.png -------------------------------------------------------------------------------- /public/assets/social/wechat_mp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/wechat_mp.png -------------------------------------------------------------------------------- /public/assets/social/tencentCloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/tencentCloud.png -------------------------------------------------------------------------------- /public/assets/social/wechat_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/wechat_open.png -------------------------------------------------------------------------------- /public/assets/social/stack_overflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/stack_overflow.png -------------------------------------------------------------------------------- /public/assets/social/wechat_enterprise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coloey/MaxKey-vue/HEAD/public/assets/social/wechat_enterprise.png -------------------------------------------------------------------------------- /src/components/NotFound.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /src/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | declare module '*.vue' { 3 | import type { DefineComponent } from 'vue' 4 | const component: DefineComponent<{}, {}, any> 5 | export default component 6 | } 7 | declare module '*.svg' { 8 | const content: string; 9 | export default content 10 | } 11 | declare module 'crypto-js' 12 | declare module "js-cookie" -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp} from 'vue' 2 | import App from './App.vue' 3 | import router from "./router" 4 | import Icon from '@/components/Icon.vue' 5 | const req = require.context("./assets/svg",false,/\.svg$/) 6 | const requireAll = (requireContext:__WebpackModuleApi.RequireContext) => requireContext.keys().map(requireContext) 7 | requireAll(req) 8 | //requireAll(req) 9 | createApp(App) 10 | .use(router) 11 | .component('Icon',Icon) 12 | .mount('#app') 13 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 13 | 14 | 23 | -------------------------------------------------------------------------------- /src/shared/index.ts: -------------------------------------------------------------------------------- 1 | interface consts{ 2 | INST: string, 3 | CONGRESS: string, 4 | ONLINE_TICKET: string, 5 | REDIRECT_URI: string, 6 | REMEMBER: string, 7 | PROVIDER: string, 8 | TOKEN: string, 9 | VERSION: string 10 | 11 | } 12 | const CONSTS:consts = { 13 | INST: 'inst', 14 | CONGRESS: 'congress', 15 | ONLINE_TICKET: 'online_ticket', 16 | REDIRECT_URI: 'redirect_uri', 17 | REMEMBER: 'remember_me', 18 | PROVIDER: 'provider', 19 | TOKEN: '_token', 20 | VERSION: 'v3.5.2 GA' 21 | } 22 | export default CONSTS -------------------------------------------------------------------------------- /src/components/Jwt-auth.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | -------------------------------------------------------------------------------- /public/assets/social/README.md: -------------------------------------------------------------------------------- 1 | # justauth-oauth-logo 2 | 3 | justauth配套的第三方平台logo 4 | 5 | # 使用方法 6 | 7 | 按照以下规则引用 8 | ```text 9 | https://cdn.jsdelivr.net/gh/justauth/justauth-oauth-logo@1.2/[platform].png 10 | ``` 11 | 12 | 其中的`[platform]`请替换为对应的平台名即可,比如: 13 | 14 | - github: [https://cdn.jsdelivr.net/gh/justauth/justauth-oauth-logo@1.2/github.png](https://cdn.jsdelivr.net/gh/justauth/justauth-oauth-logo@1.2/github.png) 15 | - gitee: [https://cdn.jsdelivr.net/gh/justauth/justauth-oauth-logo@1.2/gitee.png](https://cdn.jsdelivr.net/gh/justauth/justauth-oauth-logo@1.2/gitee.png) 16 | - qq: [https://cdn.jsdelivr.net/gh/justauth/justauth-oauth-logo@1.2/qq.png](https://cdn.jsdelivr.net/gh/justauth/justauth-oauth-logo@1.2/qq.png) 17 | -------------------------------------------------------------------------------- /src/components/Logout.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /src/components/Header.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 14 | 15 | -------------------------------------------------------------------------------- /src/components/Icon.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 28 | -------------------------------------------------------------------------------- /src/assets/svg/mobile.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2016", 4 | "module": "esnext", 5 | "strict": true, 6 | "jsx": "preserve", 7 | "importHelpers": true, 8 | "moduleResolution": "node", 9 | "experimentalDecorators": true, 10 | "skipLibCheck": true, 11 | "esModuleInterop": true, 12 | "allowSyntheticDefaultImports": true, 13 | "sourceMap": true, 14 | "baseUrl": ".", 15 | "types": [ 16 | "webpack-env" 17 | ], 18 | "paths": { 19 | "@/*": [ 20 | "src/*" 21 | ] 22 | }, 23 | "lib": [ 24 | "esnext", 25 | "dom", 26 | "dom.iterable", 27 | "scripthost" 28 | ] 29 | }, 30 | "include": [ 31 | "src/**/*.ts", 32 | "src/**/*.tsx", 33 | "src/**/*.vue", 34 | "tests/**/*.ts", 35 | "tests/**/*.tsx" 36 | , "../sso-system/jwt_verify.ts", "../sso-system/isAuthenticated.ts", "../sso-system/checkSSORedirect.ts" ], 37 | "exclude": [ 38 | "node_modules" 39 | ] 40 | } 41 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Maxkey-web-app(Vue3版本) 2 | 3 | # 界面 4 | 5 | 登录页面 6 | 7 | ![image](https://user-images.githubusercontent.com/71813516/187018831-999a18f5-8245-4cc7-a8b8-5feac8c89030.png) 8 | 9 | 10 | 用户列表页面 11 | 12 | ![image](https://user-images.githubusercontent.com/71813516/187018865-b0ebd84d-1221-4912-86aa-0e515cee2af0.png) 13 | 14 | 个人页面 15 | 16 | ![image](https://user-images.githubusercontent.com/71813516/187018879-2982140e-00e1-4a03-b05d-6a9fdd411617.png) 17 | 18 | 19 | 忘记密码页面: 20 | 21 | ![image](https://user-images.githubusercontent.com/71813516/187018890-f3f7edfc-2271-4fa3-a719-947085888006.png) 22 | 23 | 24 | # 📚使用指南 25 | 26 | ## Project setup 27 | 28 | ``` 29 | npm install 30 | ``` 31 | 32 | ### Compiles and hot-reloads for development 33 | ``` 34 | npm run serve 35 | ``` 36 | 37 | ### Compiles and minifies for production 38 | ``` 39 | npm run build 40 | ``` 41 | 42 | ### Lints and fixes files 43 | ``` 44 | npm run lint 45 | ``` 46 | 47 | ### Customize configuration 48 | See [Configuration Reference](https://cli.vuejs.org/config/). 49 | -------------------------------------------------------------------------------- /src/components/Footer.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 25 | 26 | -------------------------------------------------------------------------------- /src/assets/svg/arrow-right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/email.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/social/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 JustAuth 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/assets/svg/user.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vue.config.cjs: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | // const AutoImport = require("unplugin-auto-import/webpack") 3 | // const Components = require("unplugin-auto-import/webpack") 4 | const {ElementPlusResolver} = require("unplugin-vue-components/resolvers") 5 | module.exports = { 6 | lintOnSave: false, 7 | configureWebpack:{ 8 | plugins: [ 9 | // AutoImport({ 10 | // resolvers: [ElementPlusResolver()], 11 | // }), 12 | // Components({ 13 | // resolvers: [ElementPlusResolver()], 14 | // }), 15 | require('unplugin-element-plus/webpack')({}) 16 | ], 17 | // watchOptions:{ 18 | // poll:1000 19 | // } 20 | 21 | }, 22 | chainWebpack: config => { 23 | const dir = path.resolve(__dirname, 'src/assets/svg') // icon存放路径 24 | config.module 25 | .rule('svg-sprite') 26 | .test(/\.svg$/) //使用条件:.svg结尾的文件 27 | .include.add(dir).end() //包含icons目录 28 | .use('svg-sprite-loader') 29 | .loader('svg-sprite-loader') 30 | .options({extract: false,symbolId:'icon-[name]'}).end() //规定需要用svg-sprite-loader这个loader,extract: false表明,不要生成其他的文件 31 | 32 | config.plugin('svg-sprite').use(require('svg-sprite-loader/plugin'), [{plainSprite: true}]) 33 | config.module.rule('svg').exclude.add(dir) //其他目录的.svg文件,不需要用到以上规则 34 | }, 35 | 36 | }; -------------------------------------------------------------------------------- /src/assets/svg/key.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/quit.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/eyes-open.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/router/index.ts: -------------------------------------------------------------------------------- 1 | import {createRouter,createWebHashHistory} from "vue-router" 2 | export default createRouter({ 3 | history:createWebHashHistory(), 4 | routes:[ 5 | { 6 | path:"/", 7 | component:()=>Promise.resolve(import("../components/login.vue")) 8 | }, 9 | { 10 | path:'/passport/login', 11 | component:()=>Promise.resolve(import("../components/login.vue")), 12 | }, 13 | { 14 | path:'/passport/forgot', 15 | component:()=>Promise.resolve(import("../components/Forgot.vue")) 16 | }, 17 | { 18 | path:'/dashboard', 19 | component:()=>Promise.resolve(import("../components/Home.vue")), 20 | children:[ 21 | { 22 | path:'home', 23 | component:()=>Promise.resolve(import("../components/AppList.vue")) 24 | }, 25 | { 26 | path:'user', 27 | component:()=>Promise.resolve(import("../components/User.vue")) 28 | } 29 | ] 30 | }, 31 | { 32 | path:'/passport/logout', 33 | component: ()=>Promise.resolve(import("../components/Logout.vue")) 34 | 35 | }, 36 | { 37 | path:'/404', 38 | name:'NotFound', 39 | component:()=>Promise.resolve(import('@/components/NotFound.vue')) 40 | 41 | },{ 42 | path:'/:catchAll(.*)', 43 | redirect: '/404' 44 | } 45 | ] 46 | }) -------------------------------------------------------------------------------- /src/components/AppList.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 38 | 39 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hello-world", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "core-js": "^3.6.5", 12 | "crypto-js": "^4.1.1", 13 | "ejs-mate": "^4.0.0", 14 | "element-plus": "^2.2.9", 15 | "express": "^4.18.1", 16 | "express-session": "^1.17.3", 17 | "hashids": "^2.2.10", 18 | "js-cookie": "^3.0.1", 19 | "jsonwebtoken": "^8.5.1", 20 | "morgan": "^1.10.0", 21 | "qs": "^6.11.0", 22 | "svg-sprite-loader": "^6.0.11", 23 | "unplugin-element-plus": "^0.4.1", 24 | "uuid": "^8.3.2", 25 | "vue": "^3.0.0", 26 | "vue-class-component": "^8.0.0-0", 27 | "vue-router": "^4.1.2" 28 | }, 29 | "devDependencies": { 30 | "@types/crypto-js": "^4.1.1", 31 | "@types/js-cookie": "^3.0.2", 32 | "@typescript-eslint/eslint-plugin": "^4.18.0", 33 | "@typescript-eslint/parser": "^4.18.0", 34 | "@vue/cli-plugin-babel": "~4.5.15", 35 | "@vue/cli-plugin-eslint": "~4.5.15", 36 | "@vue/cli-plugin-typescript": "~4.5.15", 37 | "@vue/cli-service": "~4.5.15", 38 | "@vue/compiler-sfc": "^3.0.0", 39 | "@vue/eslint-config-typescript": "^7.0.0", 40 | "babel-eslint": "^10.1.0", 41 | "eslint": "^6.7.2", 42 | "eslint-plugin-vue": "^7.0.0", 43 | "less-loader": "^5.0.0", 44 | "typescript": "~4.1.5", 45 | "unplugin-auto-import": "^0.11.0", 46 | "unplugin-vue-components": "^0.22.0" 47 | }, 48 | "eslintConfig": { 49 | "root": true, 50 | "env": { 51 | "node": true 52 | }, 53 | "extends": [ 54 | "plugin:vue/vue3-essential", 55 | "@vue/typescript" 56 | ], 57 | "parserOptions": { 58 | "parser": "@typescript-eslint/parser" 59 | }, 60 | "rules": {} 61 | }, 62 | "browserslist": [ 63 | "> 1%", 64 | "last 2 versions", 65 | "not dead" 66 | ], 67 | "type": "module" 68 | } 69 | -------------------------------------------------------------------------------- /src/assets/svg/lock.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/1.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | ]> 6 | 10 | 11 | 12 | 15 | 21 | 25 | 26 | -------------------------------------------------------------------------------- /src/assets/svg/2.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/C.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/Home.vue: -------------------------------------------------------------------------------- 1 | 31 | 32 | 36 | 37 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | MaxKey单点登录认证系统 6 | 7 | 8 | MaxKey-业界领先的IAM身份管理和认证产品 9 | 10 | 11 | <%= htmlWebpackPlugin.options.title %> 12 | 94 | 95 | 96 | 99 |
100 |
101 |
102 |
103 | 104 | 105 | 106 | 107 | 108 | 109 |
110 |
111 |
112 | 113 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /src/assets/less/login.less: -------------------------------------------------------------------------------- 1 | @blue :#1890ff; 2 | @width: 370px; 3 | html, 4 | body { 5 | height: 100%; 6 | background-color: #fff; 7 | } 8 | 9 | div { 10 | .form-signin { 11 | display: flex; 12 | flex-direction: column; 13 | align-items: center; 14 | justify-content: center; 15 | width: 100%; 16 | max-width: @width; 17 | padding: 40px; 18 | margin: auto; 19 | h3 { 20 | padding-bottom: 40px; 21 | font-weight: 600; 22 | } 23 | .login-type { 24 | width: @width; 25 | font-size: 16px; 26 | display: flex; 27 | align-items: center; 28 | justify-content: space-around; 29 | span { 30 | border: 1px solid #e5e5e5; 31 | padding: 10px 0; 32 | padding-left: 44.57px; 33 | padding-right: 44px; 34 | i { 35 | padding: 5px; 36 | } 37 | &:hover{ 38 | color: @blue; 39 | cursor: pointer; 40 | .user,.erweima { 41 | fill: @blue 42 | } 43 | } 44 | } 45 | } 46 | .activeOne { 47 | &>span:nth-child(1) { 48 | border: 1px solid @blue; 49 | color: @blue; 50 | .user { 51 | fill: @blue 52 | } 53 | } 54 | } 55 | .activeTwo { 56 | &>span:nth-child(2) { 57 | border: 1px solid @blue; 58 | color: @blue; 59 | .erweima { 60 | fill:@blue 61 | } 62 | } 63 | } 64 | .form-control { 65 | width: @width; 66 | min-height: 40px; 67 | text-shadow: 0 1px 0 #fff; 68 | border: 1px solid #e5e5e5; 69 | position: relative; 70 | box-sizing: border-box; 71 | height: auto; 72 | padding: 10px; 73 | margin: 10px; 74 | font-size: 16px; 75 | padding-left: 25px; 76 | &::placeholder { 77 | color: rgb(191, 191, 191); 78 | font-weight: 550; 79 | 80 | } 81 | &:focus { 82 | outline: none; 83 | } 84 | &:hover{ 85 | border-color: #40a9ff; 86 | border-right-width: 1px !important; 87 | } 88 | } 89 | .label { 90 | position: absolute; 91 | top: 20px; 92 | z-index: 1; 93 | left: 15px; 94 | } 95 | .username { 96 | position:relative; 97 | } 98 | .password { 99 | position: relative; 100 | .eyes-img { 101 | position: absolute; 102 | right: 15px; 103 | top: 20px; 104 | } 105 | } 106 | .btn { 107 | width: @width; 108 | height: 40px; 109 | background: #2E9AFE; 110 | color: #fff; 111 | border: none; 112 | border-radius: 3px; 113 | font-size: 16px; 114 | } 115 | .check { 116 | position: relative; 117 | .code { 118 | position: absolute; 119 | top: 10px; 120 | right: 7px; 121 | img { 122 | width: 100px; 123 | height: 40px; 124 | 125 | } 126 | } 127 | } 128 | .remember { 129 | width: @width; 130 | font-size: 14px; 131 | position: relative; 132 | display: flex; 133 | justify-content: space-between; 134 | padding: 15px 0; 135 | label { 136 | padding-left: 4px; 137 | padding-right: 221px; 138 | } 139 | a { 140 | color: @blue; 141 | text-decoration: none; 142 | } 143 | } 144 | .otherLogin { 145 | width: @width; 146 | font-size: 14px; 147 | display: flex; 148 | align-items: center; 149 | justify-content: space-between; 150 | padding: 15px; 151 | img { 152 | width: 32px; 153 | height: 32px; 154 | } 155 | } 156 | } 157 | } 158 | 159 | -------------------------------------------------------------------------------- /src/assets/svg/eyes-close.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/less/forgot.less: -------------------------------------------------------------------------------- 1 | @blue :#1890ff; 2 | @width: 460px; 3 | html, 4 | body { 5 | height: 100%; 6 | background-color: #fff; 7 | } 8 | * { 9 | margin:0; 10 | padding: 0 11 | } 12 | 13 | .form-signin { 14 | display: flex; 15 | flex-direction: column; 16 | align-items: center; 17 | justify-content: center; 18 | width: 100%; 19 | max-width: 460px; 20 | padding: 40px; 21 | margin: auto; 22 | h3 { 23 | padding-bottom: 40px; 24 | } 25 | .identity { 26 | width: @width; 27 | display: flex; 28 | align-items: center; 29 | height: 44px; 30 | justify-content: center; 31 | padding: 20px; 32 | .icon { 33 | width: 32px; 34 | height: 32px; 35 | } 36 | span { 37 | display: flex; 38 | align-items: center; 39 | justify-content: center; 40 | width: 230px; 41 | padding: 20px; 42 | } 43 | } 44 | .activeOne { 45 | .oneSpan { 46 | border-bottom: 3px solid @blue; 47 | .icon { 48 | fill: @blue 49 | } 50 | } 51 | } 52 | .activeTwo { 53 | .twoSpan { 54 | border-bottom: 3px solid @blue; 55 | .icon { 56 | fill: @blue 57 | } 58 | } 59 | } 60 | .find-type { 61 | width: @width; 62 | font-size: 16px; 63 | display: flex; 64 | align-items: center; 65 | justify-content: space-around; 66 | padding: 20px; 67 | span { 68 | width: 230px; 69 | border: 1px solid #e5e5e5; 70 | padding: 10px 0; 71 | &:hover{ 72 | color: @blue; 73 | cursor: pointer; 74 | } 75 | &:active { 76 | border: 1px solid @blue; 77 | } 78 | } 79 | } 80 | .input { 81 | width: @width; 82 | min-height: 40px; 83 | text-shadow: 0 1px 0 #fff; 84 | border: 1px solid #e5e5e5; 85 | position: relative; 86 | box-sizing: border-box; 87 | height: auto; 88 | padding: 10px; 89 | margin: 10px; 90 | font-size: 16px; 91 | padding-left: 25px; 92 | &::placeholder { 93 | color: rgb(191, 191, 191); 94 | 95 | } 96 | &:focus { 97 | outline: none; 98 | } 99 | &:hover{ 100 | border-color: #40a9ff; 101 | border-right-width: 1px !important; 102 | } 103 | } 104 | .phone { 105 | position: relative; 106 | } 107 | .check { 108 | position: relative; 109 | &:hover { 110 | button { 111 | border-left: 1px solid @blue; 112 | } 113 | } 114 | button { 115 | width: 112px; 116 | height: 41px; 117 | background-color: #fff; 118 | border:1px solid #e5e5e5; 119 | display: flex; 120 | align-items: center; 121 | justify-content: center; 122 | position: absolute; 123 | top: 10px; 124 | right: 10px; 125 | &:hover { 126 | cursor: pointer; 127 | border: 1px solid @blue; 128 | color: @blue; 129 | } 130 | } 131 | } 132 | .label { 133 | position: absolute; 134 | top: 20px; 135 | z-index: 1; 136 | left: 15px; 137 | } 138 | .imageCode { 139 | position:relative; 140 | .code { 141 | position: absolute; 142 | top: 10px; 143 | right: 7px; 144 | } 145 | } 146 | .next { 147 | width: @width; 148 | font-size: 14px; 149 | display: flex; 150 | justify-content: space-between; 151 | padding: 15px 0; 152 | .btn { 153 | height: 40px; 154 | width: 80px; 155 | background: #2E9AFE; 156 | color: #fff; 157 | border: none; 158 | border-radius: 3px; 159 | font-size: 16px; 160 | } 161 | a { 162 | color: @blue; 163 | text-decoration: none; 164 | } 165 | } 166 | } -------------------------------------------------------------------------------- /src/assets/svg/erweima.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/User.vue: -------------------------------------------------------------------------------- 1 | 56 | 57 | 130 | 131 | -------------------------------------------------------------------------------- /src/utils/api.ts: -------------------------------------------------------------------------------- 1 | import {AxiosPromise} from 'axios' 2 | import axios from "axios" 3 | //import qs from "qs" 4 | import * as CryptoJS from "crypto-js" 5 | import CONSTS from "../shared/index" 6 | import Cookies from "js-cookie" 7 | export const baseUrl = 'http://127.0.0.1:9527/sign' 8 | axios.defaults.baseURL = baseUrl 9 | axios.defaults.headers.post['Content-Type'] = 'application/json'; 10 | export const api ={ 11 | redirect_uri:'', 12 | //授权 13 | login(data:any):AxiosPromise{ 14 | return axios.post('/login/signin?_allow_anonymous=true', 15 | {...data}, 16 | ) 17 | }, 18 | //获取登录信息 19 | get(params:any):AxiosPromise{ 20 | return axios.get('/login/get?_allow_anonymous=true', 21 | {params} 22 | ) 23 | }, 24 | //设置回调地址 25 | setRedirectUri(uri: string){ 26 | this.redirect_uri = CryptoJS.enc.Base64url.parse(uri).toString(CryptoJS.enc.Utf8) 27 | console.log(`uri:${this.redirect_uri}`) 28 | localStorage.setItem(CONSTS.REDIRECT_URI,this.redirect_uri) 29 | }, 30 | //使用复用信息 31 | congress(authParam:any):AxiosPromise{ 32 | return axios.post('/login/congress?_allow_anonymous=true', 33 | {...authParam} 34 | ) 35 | }, 36 | 37 | //验证 38 | auth(authJwt: any){ 39 | let user ={ 40 | name: `${authJwt.displayName}(${authJwt.username})`, 41 | displayName: authJwt.displayName, 42 | username: authJwt.username, 43 | userId: authJwt.id, 44 | avatar: './assets/svg/avatar.svg', 45 | email: authJwt.email, 46 | passwordSetType: authJwt.passwordSetType 47 | } 48 | let hostsnames = window.location.hostname.split('.') 49 | let subHostName = window.location.hostname 50 | if(hostsnames.length>=2){ 51 | subHostName=`${hostsnames[hostsnames.length-2]}.${hostsnames[hostsnames.length-1]}`; 52 | } 53 | Cookies.set(CONSTS.CONGRESS,authJwt.token,{path:'/'}) 54 | Cookies.set(CONSTS.ONLINE_TICKET,authJwt.ticket,{domain:subHostName,path:'/'}) 55 | if(authJwt.remeberMe){ 56 | localStorage.setItem(CONSTS.REMEMBER,authJwt.remeberMe) 57 | } 58 | localStorage.setItem('user',JSON.stringify(user)) 59 | localStorage.setItem('token',JSON.stringify(authJwt)) 60 | 61 | 62 | }, 63 | jwtAuth(authParam: any){ 64 | return axios.get(`/login/jwt/trust?_allow_anonymous=true`, authParam) 65 | }, 66 | //重定向地址 67 | navigate(authJwt:any){ 68 | if(localStorage.getItem(CONSTS.REDIRECT_URI) != null){ 69 | this.redirect_uri =`${localStorage.getItem(CONSTS.REDIRECT_URI)}` 70 | localStorage.removeItem(CONSTS.REDIRECT_URI) 71 | } 72 | if(this.redirect_uri != ''){ 73 | location.href=this.redirect_uri 74 | } 75 | 76 | }, 77 | //获取图片验证码 78 | getImageCaptcha(params:any){ 79 | return axios.get('/captcha?_allow_anonymous=true', 80 | {params} 81 | ) 82 | 83 | }, 84 | //获取用户列表 85 | appList(){ 86 | return axios.get('/appList', 87 | {headers:{ 88 | 'Authorization':`Bearer ${Cookies.get(CONSTS.CONGRESS)}`, 89 | 'token': Cookies.get(CONSTS.CONGRESS) as string | number | boolean 90 | } 91 | } 92 | ) 93 | }, 94 | //忘记密码时产生验证码 95 | produceOtp(params:any) { 96 | return axios.get('/forgotpassword/produceOtp?_allow_anonymous=true', {params}); 97 | }, 98 | //邮箱验证 99 | produceEmailOtp(params:any){ 100 | return axios.get('/forgotpassword/produceEmailOtp?_allow_anonymous=true',{params}); 101 | }, 102 | //修改密码 103 | setPassword(params:any){ 104 | return axios.get('/forgotpassword/setpassword?_allow_anonymous=true', {params}) 105 | }, 106 | 107 | //验证登录账号 108 | authorize(provider:string){ 109 | return axios.get(`/logon/oauth20/authorize/${provider}?_allow_anonymous=true`) 110 | }, 111 | scanqrcode(provider:string){ 112 | return axios.get(`/logon/oauth20/scanqrcode/${provider}?_allow_anonymous=true`) 113 | }, 114 | //获取个人信息 115 | getProfile(){ 116 | return axios.get('/config/profile/get', 117 | { 118 | headers:{ 119 | 'Authorization':`Bearer ${Cookies.get(CONSTS.CONGRESS)}`, 120 | 'token': Cookies.get(CONSTS.CONGRESS) as string | number | boolean 121 | } 122 | } 123 | ) 124 | }, 125 | //更新个人信息 126 | updateProfile(body:any){ 127 | return axios.put('/config/profile/update', 128 | {...body}, 129 | { 130 | headers:{ 131 | 'Authorization':`Bearer ${Cookies.get(CONSTS.CONGRESS)}`, 132 | 'token': Cookies.get(CONSTS.CONGRESS) as string | number | boolean 133 | } 134 | } 135 | ) 136 | }, 137 | logout(){ 138 | Cookies.remove(CONSTS.CONGRESS) 139 | return axios.get('/login/logout') 140 | 141 | }, 142 | //清除token 143 | clear(){ 144 | Cookies.set('token','') 145 | localStorage.setItem(CONSTS.REMEMBER,'') 146 | }, 147 | } -------------------------------------------------------------------------------- /public/assets/social/wechat-enterprise.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/components/Forgot.vue: -------------------------------------------------------------------------------- 1 | 123 | 124 | 333 | 334 | -------------------------------------------------------------------------------- /src/components/login.vue: -------------------------------------------------------------------------------- 1 | 90 | 91 | 330 | 331 | --------------------------------------------------------------------------------