From d5ff104a304b3d815178931f7a8e1e165addb1be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8A=9B?= Date: Mon, 11 Oct 2021 21:23:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=96=87=E4=BB=B6=EF=BC=8C?= =?UTF-8?q?=E8=A7=A3=E5=86=B3=E7=A7=98=E9=92=A5=E5=85=AC=E9=92=A5=E5=89=8D?= =?UTF-8?q?=E5=90=8E=E5=8F=B0=E8=A7=A3=E5=AF=86=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/styles/btn.scss | 92 +++++++++++++++++ src/assets/styles/eladmin.scss | 117 +++++++++++++++++++++ src/assets/styles/element-ui.scss | 78 ++++++++++++++ src/assets/styles/index.scss | 14 ++- src/assets/styles/transition.scss | 48 +++++++++ src/layout/index.js | 1 + src/layout/mixin/ResizeHandler.js | 10 +- src/main.js | 11 +- src/router/index.js | 3 +- src/router/routers.js | 30 ++++-- src/settings.js | 6 +- src/store/modules/app.js | 56 ++++++++++ src/store/modules/settings.js | 36 +++++++ src/store/modules/tagsView.js | 165 ++++++++++++++++++++++++++++++ src/store/modules/user.js | 93 +++++++++++++++++ src/utils/rsaEncrypt.js | 22 ++-- src/views/login.vue | 42 +++----- vue.config.js | 104 +++++++++---------- 18 files changed, 805 insertions(+), 123 deletions(-) create mode 100644 src/assets/styles/btn.scss create mode 100644 src/assets/styles/eladmin.scss create mode 100644 src/assets/styles/element-ui.scss create mode 100644 src/assets/styles/transition.scss create mode 100644 src/layout/index.js create mode 100644 src/store/modules/app.js create mode 100644 src/store/modules/settings.js create mode 100644 src/store/modules/tagsView.js create mode 100644 src/store/modules/user.js diff --git a/src/assets/styles/btn.scss b/src/assets/styles/btn.scss new file mode 100644 index 0000000..8aea589 --- /dev/null +++ b/src/assets/styles/btn.scss @@ -0,0 +1,92 @@ +@import 'variables'; +@mixin colorBtn($color) { + background: $color; + &:hover { + color: $color; + &:before, + &:after { + background: $color; + } + } +} + +.blue-btn { + @include colorBtn($blue) +} + +.light-blue-btn { + @include colorBtn($light-blue) +} + +.red-btn { + @include colorBtn($red) +} + +.pink-btn { + @include colorBtn($pink) +} + +.green-btn { + @include colorBtn($green) +} + +.tiffany-btn { + @include colorBtn($tiffany) +} + +.yellow-btn { + @include colorBtn($yellow) +} + +.pan-btn { + font-size: 14px; + color: #fff; + padding: 14px 36px; + border-radius: 8px; + border: none; + outline: none; + transition: 600ms ease all; + position: relative; + display: inline-block; + &:hover { + background: #fff; + &:before, + &:after { + width: 100%; + transition: 600ms ease all; + } + } + &:before, + &:after { + content: ''; + position: absolute; + top: 0; + right: 0; + height: 2px; + width: 0; + transition: 400ms ease all; + } + &::after { + right: inherit; + top: inherit; + left: 0; + bottom: 0; + } +} + +.custom-button { + display: inline-block; + line-height: 1; + white-space: nowrap; + cursor: pointer; + background: #fff; + color: #fff; + -webkit-appearance: none; + text-align: center; + box-sizing: border-box; + outline: 0; + margin: 0; + padding: 10px 15px; + font-size: 14px; + border-radius: 4px; +} \ No newline at end of file diff --git a/src/assets/styles/eladmin.scss b/src/assets/styles/eladmin.scss new file mode 100644 index 0000000..e1e0195 --- /dev/null +++ b/src/assets/styles/eladmin.scss @@ -0,0 +1,117 @@ +.head-container { + padding-bottom: 10px; + .filter-item { + display: inline-block; + vertical-align: middle; + margin: 0 3px 10px 0; + input { + height: 30.5px; + line-height: 30.5px; + } + } + .el-form-item-label { + margin: 0 3px 9px 0; + display: inline-block; + text-align: right; + vertical-align: middle; + font-size: 14px; + color: #606266; + line-height: 30.5px; + padding: 0 7px 0 7px; + } + .el-button+.el-button { + margin-left: 0 !important; + } + .el-select__caret.el-input__icon.el-icon-arrow-up{ + line-height: 30.5px; + } + .date-item { + display: inline-block; + vertical-align: middle; + margin-bottom: 10px; + height: 30.5px !important; + width: 230px !important; + } +} +.el-avatar { + display: inline-block; + text-align: center; + background: #ccc; + color: #fff; + white-space: nowrap; + position: relative; + overflow: hidden; + vertical-align: middle; + width: 32px; + height: 32px; + line-height: 32px; + border-radius: 16px; +} + +.logo-con{ + height: 60px; + padding: 13px 0 0; + img{ + height: 32px; + width: 135px; + display: block; + //margin: 0 auto; + } +} + +#el-login-footer { + height: 40px; + line-height: 40px; + position: fixed; + bottom: 0; + width: 100%; + text-align: center; + color: #fff; + font-family: Arial, serif; + font-size: 12px; + letter-spacing: 1px; +} + +#el-main-footer { + background: none repeat scroll 0 0 white; + border-top: 1px solid #e7eaec; + overflow: hidden; + padding: 10px 6px 0 6px; + height: 33px; + font-size: 0.7rem !important; + color: #7a8b9a; + letter-spacing: 0.8px; + font-family: Arial, sans-serif !important; + position: fixed; + bottom: 0; + z-index: 99; + width: 100%; +} +.eladmin-upload { + border: 1px dashed #c0ccda; + border-radius: 5px; + height: 45px; + line-height: 45px; + width: 368px; +} +.my-blockquote{ + margin: 0 0 10px; + padding: 15px; + line-height: 22px; + border-left: 5px solid #00437B; + border-radius: 0 2px 2px 0; + background-color: #f2f2f2; +} +.my-code{ + position: relative; + padding: 15px; + line-height: 20px; + border-left: 5px solid #ddd; + color: #333; + font-family: Courier New, serif; + font-size: 12px +} + +.el-tabs{ + margin-bottom: 25px; +} diff --git a/src/assets/styles/element-ui.scss b/src/assets/styles/element-ui.scss new file mode 100644 index 0000000..c882815 --- /dev/null +++ b/src/assets/styles/element-ui.scss @@ -0,0 +1,78 @@ + + +.el-breadcrumb__inner, +.el-breadcrumb__inner a { + font-weight: 400 !important; +} + +.el-upload { + input[type="file"] { + display: none !important; + } +} + +.el-upload__input { + display: none; +} + +.cell { + .el-tag { + margin-right: 0; + } +} + +.small-padding { + .cell { + padding-left: 5px; + padding-right: 5px; + } +} + +.fixed-width { + .el-button--mini { + padding: 7px 10px; + width: 60px; + } +} + +.status-col { + .cell { + padding: 0 10px; + text-align: center; + + .el-tag { + margin-right: 0; + } + } +} + +.el-dialog { + transform: none; + left: 0; + position: relative; + margin: 0 auto; +} + +// refine element ui upload +.upload-container { + .el-upload { + width: 100%; + + .el-upload-dragger { + width: 100%; + height: 200px; + } + } +} + +// dropdown +.el-dropdown-menu { + a { + display: block + } +} + +// fix date-picker ui bug in filter-item +.el-range-editor.el-input__inner { + display: inline-flex !important; +} diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index 5f1f6c6..bf9f180 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -1,6 +1,6 @@ @import 'variables'; @import 'mixin'; -//@import 'transition'; +@import 'transition'; @import 'element-ui'; @import 'sidebar'; @import 'btn'; @@ -148,13 +148,11 @@ aside { text-align: right; padding-right: 20px; transition: 600ms ease position; - background: linear-gradient( - 90deg, - rgba(32, 182, 249, 1) 0%, - rgba(32, 182, 249, 1) 0%, - rgba(33, 120, 241, 1) 100%, - rgba(33, 120, 241, 1) 100% - ); + background: linear-gradient(90deg, + rgba(32, 182, 249, 1) 0%, + rgba(32, 182, 249, 1) 0%, + rgba(33, 120, 241, 1) 100%, + rgba(33, 120, 241, 1) 100%); .subtitle { font-size: 20px; diff --git a/src/assets/styles/transition.scss b/src/assets/styles/transition.scss new file mode 100644 index 0000000..88ce0bf --- /dev/null +++ b/src/assets/styles/transition.scss @@ -0,0 +1,48 @@ + + +/* fade */ +.fade-enter-active, +.fade-leave-active { + transition: opacity 0.28s; +} + +.fade-enter, +.fade-leave-active { + opacity: 0; +} + +/* fade-transform */ +.fade-transform-leave-active, +.fade-transform-enter-active { + transition: all .5s; +} + +.fade-transform-enter { + opacity: 0; + transform: translateX(-30px); +} + +.fade-transform-leave-to { + opacity: 0; + transform: translateX(30px); +} + +/* breadcrumb transition */ +.breadcrumb-enter-active, +.breadcrumb-leave-active { + transition: all .5s; +} + +.breadcrumb-enter, +.breadcrumb-leave-active { + opacity: 0; + transform: translateX(20px); +} + +.breadcrumb-move { + transition: all .5s; +} + +.breadcrumb-leave-active { + position: absolute; +} diff --git a/src/layout/index.js b/src/layout/index.js new file mode 100644 index 0000000..dd12dcd --- /dev/null +++ b/src/layout/index.js @@ -0,0 +1 @@ +export { default as TopMenus } from './TopMenus.vue' diff --git a/src/layout/mixin/ResizeHandler.js b/src/layout/mixin/ResizeHandler.js index dd3ce64..3a24056 100644 --- a/src/layout/mixin/ResizeHandler.js +++ b/src/layout/mixin/ResizeHandler.js @@ -1,9 +1,9 @@ - import store from '@/store' +import store from '@/store' - const { body} =document - const WIDTH=992 +const { body } = document +const WIDTH = 992 - export default { +export default { watch: { $route(route) { if (this.device === 'mobile' && this.sidebar.opened) { @@ -41,4 +41,4 @@ } } } - } +} diff --git a/src/main.js b/src/main.js index 7b759b9..9ffa868 100644 --- a/src/main.js +++ b/src/main.js @@ -18,24 +18,25 @@ import permission from './components/Permission' import './assets/styles/element-variables.scss' // 全局CSS -// import './assets/styles/index.scss' +import './assets/styles/index.scss' // 代码高亮 import VueHighlightJS from 'vue-highlightjs' import 'highlight.js/styles/atom-one-dark.css' // icon -// import './assets/icons' +import './assets/icons' // 加载代码高亮 Vue.use(VueHighlightJS) +// 加载权限指令 +Vue.use(checkPer) +Vue.use(permission) // 加载elementui Vue.use(ElementUI, { // 设置element-ui默认大小 size: Cookies.get('size') || 'small' }) -// 加载权限指令 -Vue.use(checkPer) -Vue.use(permission) + Vue.config.productionTip = false new Vue({ diff --git a/src/router/index.js b/src/router/index.js index b31e465..a5b6b2b 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -63,7 +63,8 @@ router.beforeEach((to, from, next) => { next() } else { // 否则全部重定向到登录页面 - next(`/loginredirect=${to.fullPath}`) + // next(`/loginredirect=${to.fullPath}`) + next() NProgress.done() } } diff --git a/src/router/routers.js b/src/router/routers.js index 029fd4e..e2b48c4 100644 --- a/src/router/routers.js +++ b/src/router/routers.js @@ -6,22 +6,32 @@ Vue.use(Router) export const constantRouterMap = [ { - path: '/login', + path: '/', meta: { title: '登录', noCache: true }, component: (resolve) => require(['@/views/login'], resolve), hidden: true }, { - path: '/redirect', - component: Layout, - hidden: true, - children: [ - { - path: '/redirect/:path*', - component: (resolve) => require(['@/views/features/redirect'], resolve) - } - ] + path: '/404', + component: (resolve) => require(['@/views/features/404'], resolve), + hidden: true + }, + { + path: '/401', + component: (resolve) => require(['@/views/features/401'], resolve), + hidden: true } + // { + // path: '/redirect', + // component: Layout, + // hidden: true, + // children: [ + // { + // path: '/redirect/:path*', + // component: (resolve) => require(['@/views/features/redirect'], resolve) + // } + // ] + // } ] diff --git a/src/settings.js b/src/settings.js index d4462c4..0b67bfd 100644 --- a/src/settings.js +++ b/src/settings.js @@ -19,6 +19,8 @@ module.exports = { showFooter: true, // 底部文字,支持html语法 - footerTxt: - '© 2021 阅行后台集成管理系统' + footerTxt: '© 2021 阅行后台集成管理系统', + + // 备案号 + caseNumber: '鄂ICP备XXXX号' } diff --git a/src/store/modules/app.js b/src/store/modules/app.js new file mode 100644 index 0000000..a384479 --- /dev/null +++ b/src/store/modules/app.js @@ -0,0 +1,56 @@ +import Cookies from 'js-cookie' + +const state = { + sidebar: { + opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true, + withoutAnimation: false + }, + device: 'desktop', + size: Cookies.get('size') || 'small' +} + +const mutations = { + TOGGLE_SIDEBAR: state => { + state.sidebar.opened = !state.sidebar.opened + state.sidebar.withoutAnimation = false + if (state.sidebar.opened) { + Cookies.set('sidebarStatus', 1) + } else { + Cookies.set('sidebarStatus', 0) + } + }, + CLOSE_SIDEBAR: (state, withoutAnimation) => { + Cookies.set('sidebarStatus', 0) + state.sidebar.opened = false + state.sidebar.withoutAnimation = withoutAnimation + }, + TOGGLE_DEVICE: (state, device) => { + state.device = device + }, + SET_SIZE: (state, size) => { + state.size = size + Cookies.set('size', size) + } +} + +const actions = { + toggleSideBar({ commit }) { + commit('TOGGLE_SIDEBAR') + }, + closeSideBar({ commit }, { withoutAnimation }) { + commit('CLOSE_SIDEBAR', withoutAnimation) + }, + toggleDevice({ commit }, device) { + commit('TOGGLE_DEVICE', device) + }, + setSize({ commit }, size) { + commit('SET_SIZE', size) + } +} + +export default { + namespaced: true, + state, + mutations, + actions +} diff --git a/src/store/modules/settings.js b/src/store/modules/settings.js new file mode 100644 index 0000000..dbb23be --- /dev/null +++ b/src/store/modules/settings.js @@ -0,0 +1,36 @@ +import variables from '@/assets/styles/element-variables.scss' +import defaultSettings from '@/settings' +const { tagsView, fixedHeader, sidebarLogo, uniqueOpened, showFooter, footerTxt, caseNumber } = defaultSettings + +const state = { + theme: variables.theme, + showSettings: tagsView, + fixedHeader: fixedHeader, + sidebarLogo: sidebarLogo, + uniqueOpened: uniqueOpened, + showFooter: showFooter, + footerTxt: footerTxt, + caseNumber: caseNumber + +} + +const mutations = { + CHANGE_SETTING: (state, { key, value }) => { + if (state.hasOwnProperty(key)) { + state[key] = value + } + } +} + +const actions = { + changeSetting({ commit }, data) { + commit('CHANGE_SETTING', data) + } +} + +export default { + namespaced: true, + state, + mutations, + actions +} diff --git a/src/store/modules/tagsView.js b/src/store/modules/tagsView.js new file mode 100644 index 0000000..3e2c170 --- /dev/null +++ b/src/store/modules/tagsView.js @@ -0,0 +1,165 @@ +const state = { + visitedViews: [], + cachedViews: [] +} + +const mutations = { + ADD_VISITED_VIEW: (state, view) => { + if (state.visitedViews.some(v => v.path === view.path)) return + state.visitedViews.push( + Object.assign({}, view, { + title: view.meta.title || 'no-name' + }) + ) + }, + ADD_CACHED_VIEW: (state, view) => { + if (state.cachedViews.includes(view.name)) return + if (!view.meta.noCache) { + state.cachedViews.push(view.name) + } + }, + + DEL_VISITED_VIEW: (state, view) => { + for (const [i, v] of state.visitedViews.entries()) { + if (v.path === view.path) { + state.visitedViews.splice(i, 1) + break + } + } + }, + DEL_CACHED_VIEW: (state, view) => { + for (const i of state.cachedViews) { + if (i === view.name) { + const index = state.cachedViews.indexOf(i) + state.cachedViews.splice(index, 1) + break + } + } + }, + + DEL_OTHERS_VISITED_VIEWS: (state, view) => { + state.visitedViews = state.visitedViews.filter(v => { + return v.meta.affix || v.path === view.path + }) + }, + DEL_OTHERS_CACHED_VIEWS: (state, view) => { + for (const i of state.cachedViews) { + if (i === view.name) { + const index = state.cachedViews.indexOf(i) + state.cachedViews = state.cachedViews.slice(index, index + 1) + break + } + } + }, + + DEL_ALL_VISITED_VIEWS: state => { + // keep affix tags + const affixTags = state.visitedViews.filter(tag => tag.meta.affix) + state.visitedViews = affixTags + }, + DEL_ALL_CACHED_VIEWS: state => { + state.cachedViews = [] + }, + + UPDATE_VISITED_VIEW: (state, view) => { + for (let v of state.visitedViews) { + if (v.path === view.path) { + v = Object.assign(v, view) + break + } + } + } +} + +const actions = { + addView({ dispatch }, view) { + dispatch('addVisitedView', view) + dispatch('addCachedView', view) + }, + addVisitedView({ commit }, view) { + commit('ADD_VISITED_VIEW', view) + }, + addCachedView({ commit }, view) { + commit('ADD_CACHED_VIEW', view) + }, + + delView({ dispatch, state }, view) { + return new Promise(resolve => { + dispatch('delVisitedView', view) + dispatch('delCachedView', view) + resolve({ + visitedViews: [...state.visitedViews], + cachedViews: [...state.cachedViews] + }) + }) + }, + delVisitedView({ commit, state }, view) { + return new Promise(resolve => { + commit('DEL_VISITED_VIEW', view) + resolve([...state.visitedViews]) + }) + }, + delCachedView({ commit, state }, view) { + return new Promise(resolve => { + commit('DEL_CACHED_VIEW', view) + resolve([...state.cachedViews]) + }) + }, + + delOthersViews({ dispatch, state }, view) { + return new Promise(resolve => { + dispatch('delOthersVisitedViews', view) + dispatch('delOthersCachedViews', view) + resolve({ + visitedViews: [...state.visitedViews], + cachedViews: [...state.cachedViews] + }) + }) + }, + delOthersVisitedViews({ commit, state }, view) { + return new Promise(resolve => { + commit('DEL_OTHERS_VISITED_VIEWS', view) + resolve([...state.visitedViews]) + }) + }, + delOthersCachedViews({ commit, state }, view) { + return new Promise(resolve => { + commit('DEL_OTHERS_CACHED_VIEWS', view) + resolve([...state.cachedViews]) + }) + }, + + delAllViews({ dispatch, state }, view) { + return new Promise(resolve => { + dispatch('delAllVisitedViews', view) + dispatch('delAllCachedViews', view) + resolve({ + visitedViews: [...state.visitedViews], + cachedViews: [...state.cachedViews] + }) + }) + }, + delAllVisitedViews({ commit, state }) { + return new Promise(resolve => { + commit('DEL_ALL_VISITED_VIEWS') + resolve([...state.visitedViews]) + }) + }, + delAllCachedViews({ commit, state }) { + return new Promise(resolve => { + commit('DEL_ALL_CACHED_VIEWS') + resolve([...state.cachedViews]) + }) + }, + + updateVisitedView({ commit }, view) { + commit('UPDATE_VISITED_VIEW', view) + } +} + +export default { + namespaced: true, + state, + mutations, + actions +} diff --git a/src/store/modules/user.js b/src/store/modules/user.js new file mode 100644 index 0000000..66f0123 --- /dev/null +++ b/src/store/modules/user.js @@ -0,0 +1,93 @@ +import { login, getInfo, logout } from '@/api/login' +import { getToken, setToken, removeToken } from '@/utils/auth' + +const user = { + state: { + token: getToken(), + user: {}, + roles: [], + // 第一次加载菜单时用到 + loadMenus: false + }, + + mutations: { + SET_TOKEN: (state, token) => { + state.token = token + }, + SET_USER: (state, user) => { + state.user = user + }, + SET_ROLES: (state, roles) => { + state.roles = roles + }, + SET_LOAD_MENUS: (state, loadMenus) => { + state.loadMenus = loadMenus + } + }, + + actions: { + // 登录 + Login({ commit }, userInfo) { + const rememberMe = userInfo.rememberMe + return new Promise((resolve, reject) => { + login(userInfo.username, userInfo.password, userInfo.code, userInfo.uuid).then(res => { + setToken(res.token, rememberMe) + commit('SET_TOKEN', res.token) + setUserInfo(res.user, commit) + // 第一次加载菜单时用到, 具体见 src 目录下的 permission.js + commit('SET_LOAD_MENUS', true) + resolve() + }).catch(error => { + reject(error) + }) + }) + }, + + // 获取用户信息 + getInfo({ commit }) { + return new Promise((resolve, reject) => { + getInfo().then(res => { + setUserInfo(res, commit) + resolve(res) + }).catch(error => { + reject(error) + }) + }) + }, + // 登出 + LogOut({ commit }) { + return new Promise((resolve, reject) => { + logout().then(res => { + logOut(commit) + resolve() + }).catch(error => { + logOut(commit) + reject(error) + }) + }) + }, + + updateLoadMenus({ commit }) { + return new Promise((resolve, reject) => { + commit('SET_LOAD_MENUS', false) + }) + } + } +} + +export const logOut = (commit) => { + commit('SET_TOKEN', '') + commit('SET_ROLES', []) + removeToken() +} + +export const setUserInfo = (res, commit) => { + if (res.roles.length === 0) { + commit('SET_ROLES', ['ROLE_SYSTEM_DEFAULT']) + } else { + commit('SET_ROLES', res.roles) + } + commit('SET_USER', res.user) +} + +export default user diff --git a/src/utils/rsaEncrypt.js b/src/utils/rsaEncrypt.js index de23baf..b5e9410 100644 --- a/src/utils/rsaEncrypt.js +++ b/src/utils/rsaEncrypt.js @@ -2,18 +2,18 @@ import JSEncrypt from 'jsencrypt/bin/jsencrypt.min' // 密钥对生成:http://web.chacuo.net/netrsakeypair // 设置公钥 -const publicKey = 'MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMEOuFWzyferOY27HOOKkeNCexTXunvK\n' + - 'Bk62mavgNn6G6r9PB4gT71YdXkk/3JmnrUue3L/MPOIpAD5ZadAXdBcCAwEAAQ==' -// 设置私钥 -const privateKey = 'MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAwQ64VbPJ96s5jbsc\n' + - '44qR40J7FNe6e8oGTraZq+A2fobqv08HiBPvVh1eST/cmaetS57cv8w84ikAPllp\n' + - '0Bd0FwIDAQABAkBf3tB5dsPoIvZ8xJuu/2Q9KAl5KzwnNwb01cbwTHKjV7yORPaL\n' + - 'Y6rlCmIae8GCkvJMtaJRiLbViM14U2jIKEgxAiEA9jIJm34V4nGlqg3M3EZjnn/B\n' + - 'nDUrIp/FRsG4yEbDMukCIQDIvvDrMM9Ay3mbQjUOayjFguA5qlA8o8oj58WJnocO\n' + - '/wIgetNL579nu6lnNQfdhKe5W4HxXbVI5+U9zqcnQQPMrsECIQDDMte0+jstOC3B\n' + - 'SLmqkYyNsdsyd2eZ73IpQ7+TN/EAJQIgWmJh6+b5sw4Q/Emb9ypPAE3peP09QmhP\n' + - 'ZnAyYEuUiNY=' +const publicKey = 'MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANL378k3RiZHWx5AfJqdH9xRNBmD9wGD\n' + + '2iRe41HdTNF8RUhNnHit5NpMNtGL0NPTSSpPjjI1kJfVorRvaQerUgkCAwEAAQ==' + +const privateKey = 'MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEA0vfvyTdGJkdbHkB8\n' + + 'mp0f3FE0GYP3AYPaJF7jUd1M0XxFSE2ceK3k2kw20YvQ09NJKk+OMjWQl9WitG9p\n' + + 'B6tSCQIDAQABAkA2SimBrWC2/wvauBuYqjCFwLvYiRYqZKThUS3MZlebXJiLB+Ue\n' + + '/gUifAAKIg1avttUZsHBHrop4qfJCwAI0+YRAiEA+W3NK/RaXtnRqmoUUkb59zsZ\n' + + 'UBLpvZgQPfj1MhyHDz0CIQDYhsAhPJ3mgS64NbUZmGWuuNKp5coY2GIj/zYDMJp6\n' + + 'vQIgUueLFXv/eZ1ekgz2Oi67MNCk5jeTF2BurZqNLR3MSmUCIFT3Q6uHMtsB9Eha\n' + + '4u7hS31tj1UWE+D+ADzp59MGnoftAiBeHT7gDMuqeJHPL4b+kC+gzV4FGTfhR9q3\n' + + 'tTbklZkD2A==' // 输入加密 export function encrypt(txt) { diff --git a/src/views/login.vue b/src/views/login.vue index 2d671cc..8724488 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -1,7 +1,9 @@