mirror of
https://github.com/chillzhuang/Saber.git
synced 2024-12-22 09:09:26 +08:00
🎉 3.6.0.RELEASE vue3版前端正式发布
This commit is contained in:
parent
0ef26588f9
commit
d1ccdf99fb
10
README.md
10
README.md
@ -1,9 +1,9 @@
|
||||
<p align="center">
|
||||
<img src="https://img.shields.io/badge/Release-V3.4.1-green.svg" alt="Downloads">
|
||||
<img src="https://img.shields.io/badge/Release-V3.6.0-green.svg" alt="Downloads">
|
||||
<img src="https://img.shields.io/badge/JDK-1.8+-green.svg" alt="Build Status">
|
||||
<img src="https://img.shields.io/badge/license-Apache%202-blue.svg" alt="Build Status">
|
||||
<img src="https://img.shields.io/badge/Spring%20Cloud-2021-blue.svg" alt="Coverage Status">
|
||||
<img src="https://img.shields.io/badge/Spring%20Boot-2.7.1-blue.svg" alt="Downloads">
|
||||
<img src="https://img.shields.io/badge/Spring%20Boot-2.7.10-blue.svg" alt="Downloads">
|
||||
<a target="_blank" href="https://bladex.vip">
|
||||
<img src="https://img.shields.io/badge/Author-Small%20Chill-ff69b4.svg" alt="Downloads">
|
||||
</a>
|
||||
@ -45,12 +45,13 @@
|
||||
* Sword-基于React:[https://sword.bladex.vip](https://sword.bladex.vip)
|
||||
|
||||
## 数据大屏
|
||||
* Caster-数据大屏展示系统:[https://caster.bladex.vip](https://caster.bladex.vip)
|
||||
* 数据大屏展示系统:[https://data.bladex.vip](https://data.bladex.vip)
|
||||
|
||||
## 技术文档
|
||||
* [SpringBlade开发手册一览](https://gitee.com/smallc/SpringBlade/wikis/SpringBlade开发手册)
|
||||
* [SpringBlade常见问题集锦](https://sns.bladex.vip/article-14966.html)
|
||||
* [SpringBlade基于Kuboard部署K8S](https://kuboard.cn/learning/k8s-practice/spring-blade/)
|
||||
* [SpringBlade基于Rainbond部署](https://www.rainbond.com/docs/micro-service/example/blade)
|
||||
|
||||
## 项目地址
|
||||
* 核心框架项目地址:[https://gitee.com/smallc/blade-tool](https://gitee.com/smallc/blade-tool)
|
||||
@ -58,7 +59,8 @@
|
||||
* 后端Github地址:[https://github.com/chillzhuang/SpringBlade](https://github.com/chillzhuang/SpringBlade)
|
||||
* 后端SpringBoot版:[https://gitee.com/smallc/SpringBlade/tree/boot/](https://gitee.com/smallc/SpringBlade/tree/boot/)
|
||||
* 前端框架Sword(基于React):[https://gitee.com/smallc/Sword](https://gitee.com/smallc/Sword)
|
||||
* 前端框架Saber(基于Vue):[https://gitee.com/smallc/Saber](https://gitee.com/smallc/Saber)
|
||||
* 前端框架Saber(基于Vue2):[https://gitee.com/smallc/Saber](https://gitee.com/smallc/Saber)
|
||||
* 前端框架Saber3(基于Vue3):[https://gitee.com/smallc/Saber3](https://gitee.com/smallc/Saber/tree/3.x/)
|
||||
|
||||
# 开源协议
|
||||
Apache Licence 2.0 ([英文原文](http://www.apache.org/licenses/LICENSE-2.0.html))
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "saber-admin",
|
||||
"version": "3.5.0",
|
||||
"version": "3.6.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
|
9
public/cdn/avue/2.10.10/avue.min.js
vendored
Normal file
9
public/cdn/avue/2.10.10/avue.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/cdn/avue/2.10.10/index.css
Executable file
1
public/cdn/avue/2.10.10/index.css
Executable file
File diff suppressed because one or more lines are too long
9
public/cdn/avue/2.9.5/avue.min.js
vendored
9
public/cdn/avue/2.9.5/avue.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -12,7 +12,7 @@
|
||||
<link rel="stylesheet" href="<%= BASE_URL %>cdn/element-ui/2.15.6/theme-chalk/index.css">
|
||||
<link rel="stylesheet" href="<%= BASE_URL %>cdn/animate/3.5.2/animate.css">
|
||||
<link rel="stylesheet" href="<%= BASE_URL %>cdn/iconfont/1.0.0/index.css">
|
||||
<link rel="stylesheet" href="<%= BASE_URL %>cdn/avue/2.9.5/index.css">
|
||||
<link rel="stylesheet" href="<%= BASE_URL %>cdn/avue/2.10.10/index.css">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.png">
|
||||
<title>Saber企业级开发平台</title>
|
||||
<style>
|
||||
@ -103,7 +103,7 @@
|
||||
<script src="<%= BASE_URL %>cdn/vue-router/3.0.1/vue-router.min.js" charset="utf-8"></script>
|
||||
<script src="<%= BASE_URL %>cdn/axios/1.0.0/axios.min.js" charset="utf-8"></script>
|
||||
<script src="<%= BASE_URL %>cdn/element-ui/2.15.6/index.js" charset="utf-8"></script>
|
||||
<script src="<%= BASE_URL %>cdn/avue/2.9.5/avue.min.js" charset="utf-8"></script>
|
||||
<script src="<%= BASE_URL %>cdn/avue/2.10.10/avue.min.js" charset="utf-8"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@ -1,5 +1,4 @@
|
||||
import request from '@/router/axios';
|
||||
import {baseUrl} from '@/config/env';
|
||||
import website from "@/config/website";
|
||||
|
||||
export const loginByUsername = (tenantId, account, password, type, key, code) => request({
|
||||
@ -40,13 +39,18 @@ export const getButtons = () => request({
|
||||
});
|
||||
|
||||
export const getUserInfo = () => request({
|
||||
url: baseUrl + '/user/getUserInfo',
|
||||
url: '/user/getUserInfo',
|
||||
method: 'get'
|
||||
});
|
||||
|
||||
export const refreshToken = () => request({
|
||||
url: baseUrl + '/user/refesh',
|
||||
method: 'post'
|
||||
export const refreshToken = (refreshToken) => request({
|
||||
url: '/api/blade-auth/token',
|
||||
method: 'post',
|
||||
params: {
|
||||
refreshToken,
|
||||
grantType: "refresh_token",
|
||||
scope: "all",
|
||||
}
|
||||
})
|
||||
|
||||
export const registerGuest = (form, oauthId) => request({
|
||||
@ -72,17 +76,17 @@ export const getCaptcha = () => request({
|
||||
});
|
||||
|
||||
export const getTopMenu = () => request({
|
||||
url: baseUrl + '/user/getTopMenu',
|
||||
url: '/user/getTopMenu',
|
||||
method: 'get'
|
||||
});
|
||||
|
||||
export const sendLogs = (list) => request({
|
||||
url: baseUrl + '/user/logout',
|
||||
url: '/user/send-logs',
|
||||
method: 'post',
|
||||
data: list
|
||||
})
|
||||
|
||||
export const logout = () => request({
|
||||
url: baseUrl + '/user/logout',
|
||||
method: 'get'
|
||||
url: '/blade-auth/logout',
|
||||
method: 'post'
|
||||
})
|
||||
|
@ -11,7 +11,7 @@ export default {
|
||||
logo: "S",
|
||||
key: 'saber',//配置主键,目前用于存储
|
||||
lockPage: '/lock',
|
||||
tokenTime: 6000,
|
||||
tokenTime: 100,
|
||||
//http的status默认放行不才用统一处理的,
|
||||
statusWhiteList: [],
|
||||
//配置首页不可关闭
|
||||
|
135
src/lang/en.js
135
src/lang/en.js
@ -1,70 +1,84 @@
|
||||
export default {
|
||||
title: 'Avue is a framework',
|
||||
tip: 'tip',
|
||||
title: 'Saber Admin',
|
||||
logoutTip: 'Exit the system, do you want to continue?',
|
||||
submitText: 'submit',
|
||||
cancelText: 'cancel',
|
||||
search: 'Please input search content',
|
||||
menuTip: 'none menu list',
|
||||
wel: {
|
||||
info: 'Good morning, Smallwei, Avuex is a framework',
|
||||
dept: 'a certain technology department',
|
||||
team: 'Team ranking',
|
||||
project: 'Project access',
|
||||
count: 'Item number',
|
||||
data: {
|
||||
subtitle: 'real time',
|
||||
column1: 'Classified statistics',
|
||||
column2: 'Annex statistics',
|
||||
column3: 'Article statistics',
|
||||
key1: 'C',
|
||||
key2: 'A',
|
||||
key3: 'A',
|
||||
text1: 'Total Record Number of Classifications',
|
||||
text2: 'Number of attachments Uploaded',
|
||||
text3: 'Comment frequency'
|
||||
},
|
||||
data2: {
|
||||
column1: 'Registration today',
|
||||
column2: 'Login today',
|
||||
column3: 'Subscription today',
|
||||
column4: 'Todays review'
|
||||
},
|
||||
data3: {
|
||||
column1: 'Conversion rate(Day 28%)',
|
||||
column2: 'Attendance rate(Day 11%)',
|
||||
column3: 'Attendance rate(Day 33%)'
|
||||
},
|
||||
data4: {
|
||||
column1: 'Error log',
|
||||
column2: 'Data display',
|
||||
column3: 'Privilege management',
|
||||
column4: 'user management'
|
||||
},
|
||||
table: {
|
||||
rw: 'Work Tasks',
|
||||
nr: 'Work content',
|
||||
sj: 'Working hours',
|
||||
}
|
||||
common: {
|
||||
condition: 'condition',
|
||||
display: 'display',
|
||||
hide: 'hide'
|
||||
},
|
||||
route: {
|
||||
info: 'info',
|
||||
website: 'website',
|
||||
dashboard: 'dashboard',
|
||||
tags: 'tags',
|
||||
store: 'store',
|
||||
permission: 'permission',
|
||||
api: 'api',
|
||||
logs: 'logs',
|
||||
table: 'table',
|
||||
form: 'form',
|
||||
data: 'data',
|
||||
error: 'error',
|
||||
test: 'test'
|
||||
tip: {
|
||||
select: 'Please select',
|
||||
input: 'Please input'
|
||||
},
|
||||
upload: {
|
||||
upload: 'upload',
|
||||
tip: 'Drag files here,/'
|
||||
},
|
||||
date: {
|
||||
start: 'Start date',
|
||||
end: 'End date',
|
||||
t: 'today',
|
||||
y: 'yesterday',
|
||||
n: 'nearly 7',
|
||||
a: 'whole'
|
||||
},
|
||||
form: {
|
||||
printBtn: 'print',
|
||||
mockBtn: 'mock',
|
||||
submitBtn: 'submit',
|
||||
emptyBtn: 'empty'
|
||||
},
|
||||
crud: {
|
||||
filter: {
|
||||
addBtn: 'add',
|
||||
clearBtn: 'clear',
|
||||
resetBtn: 'reset',
|
||||
cancelBtn: 'cancel',
|
||||
submitBtn: 'submit'
|
||||
},
|
||||
column: {
|
||||
name: 'name',
|
||||
hide: 'hide',
|
||||
fixed: 'fixed',
|
||||
filters: 'filters',
|
||||
sortable: 'sortable',
|
||||
index: 'index',
|
||||
width: 'width'
|
||||
},
|
||||
tipStartTitle: 'Currently selected',
|
||||
tipEndTitle: 'items',
|
||||
editTitle: 'edit',
|
||||
copyTitle: 'copy',
|
||||
addTitle: 'add',
|
||||
viewTitle: 'view',
|
||||
filterTitle: 'filter',
|
||||
showTitle: 'showTitle',
|
||||
menu: 'menu',
|
||||
addBtn: 'add',
|
||||
show: 'show',
|
||||
hide: 'hide',
|
||||
open: 'open',
|
||||
shrink: 'shrink',
|
||||
printBtn: 'print',
|
||||
excelBtn: 'excel',
|
||||
updateBtn: 'update',
|
||||
cancelBtn: 'cancel',
|
||||
searchBtn: 'search',
|
||||
emptyBtn: 'empty',
|
||||
menuBtn: 'menu',
|
||||
saveBtn: 'save',
|
||||
viewBtn: 'view',
|
||||
editBtn: 'edit',
|
||||
copyBtn: 'copy',
|
||||
delBtn: 'delete'
|
||||
},
|
||||
login: {
|
||||
title: 'Login ',
|
||||
info: 'Enterprise Development Platform',
|
||||
info: 'BladeX Development Platform',
|
||||
tenantId: 'Please input tenantId',
|
||||
username: 'Please input username',
|
||||
password: 'Please input a password',
|
||||
@ -78,6 +92,7 @@ export default {
|
||||
userLogin: 'userLogin',
|
||||
phoneLogin: 'phoneLogin',
|
||||
thirdLogin: 'thirdLogin',
|
||||
ssoLogin: 'ssoLogin',
|
||||
msgText: 'send code',
|
||||
msgSuccess: 'reissued code',
|
||||
},
|
||||
@ -85,6 +100,7 @@ export default {
|
||||
info: 'info',
|
||||
logOut: 'logout',
|
||||
userinfo: 'userinfo',
|
||||
switchDept : 'switch dept',
|
||||
dashboard: 'dashboard',
|
||||
lock: 'lock',
|
||||
bug: 'none bug',
|
||||
@ -92,12 +108,15 @@ export default {
|
||||
screenfullF: 'exit screenfull',
|
||||
screenfull: 'screenfull',
|
||||
language: 'language',
|
||||
notice: 'notice',
|
||||
theme: 'theme',
|
||||
color: 'color'
|
||||
},
|
||||
tagsView: {
|
||||
search: 'Search',
|
||||
menu: 'menu',
|
||||
clearCache: 'Clear Cache',
|
||||
closeOthers: 'Close Others',
|
||||
closeAll: 'Close All'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
139
src/lang/zh.js
139
src/lang/zh.js
@ -1,70 +1,84 @@
|
||||
export default {
|
||||
tip: '提示',
|
||||
title: 'Saber企业级开发平台',
|
||||
title: 'Saber企业管理平台',
|
||||
logoutTip: '退出系统, 是否继续?',
|
||||
submitText: '确定',
|
||||
cancelText: '取消',
|
||||
search: '请输入搜索内容',
|
||||
menuTip: '没有发现菜单',
|
||||
wel: {
|
||||
info: '早安,Smallwei,Avuex一款超乎你想象的框架!',
|
||||
dept: '我是avue团队下的一个部门-哈皮部门-哈皮职位',
|
||||
team: '团队内排名',
|
||||
project: '项目访问',
|
||||
count: '项目数',
|
||||
data: {
|
||||
subtitle: '实时',
|
||||
column1: '分类统计',
|
||||
column2: '附件统计',
|
||||
column3: '文章统计',
|
||||
key1: '分',
|
||||
key2: '附',
|
||||
key3: '评',
|
||||
text1: '当前分类总记录数',
|
||||
text2: '当前上传的附件数',
|
||||
text3: '评论次数'
|
||||
},
|
||||
data2: {
|
||||
column1: '今日注册',
|
||||
column2: '今日登录',
|
||||
column3: '今日订阅',
|
||||
column4: '今日评论'
|
||||
},
|
||||
data3: {
|
||||
column1: '转化率(日同比 28%)',
|
||||
column2: '签到率(日同比 11%)',
|
||||
column3: '签到率(日同比 11%)'
|
||||
},
|
||||
data4: {
|
||||
column1: '错误日志',
|
||||
column2: '数据展示',
|
||||
column3: '权限管理',
|
||||
column4: '用户管理'
|
||||
},
|
||||
table: {
|
||||
rw: '工作任务',
|
||||
nr: '工作内容',
|
||||
sj: '工作时间'
|
||||
}
|
||||
common: {
|
||||
condition: '条件',
|
||||
display: '显示',
|
||||
hide: '隐藏'
|
||||
},
|
||||
route: {
|
||||
info: '个人信息',
|
||||
website: 'bladex官网',
|
||||
dashboard: '首页',
|
||||
tags: '标签',
|
||||
store: '本地存储',
|
||||
api: '全局函数',
|
||||
logs: '日志监控',
|
||||
table: '表格',
|
||||
form: '表单',
|
||||
data: '数据展示',
|
||||
permission: '权限',
|
||||
error: '异常页面',
|
||||
test: '测试页面'
|
||||
tip: {
|
||||
select: '请选择',
|
||||
input: '请输入'
|
||||
},
|
||||
upload: {
|
||||
upload: '点击上传',
|
||||
tip: '将文件拖到此处,或'
|
||||
},
|
||||
date: {
|
||||
start: '开始日期',
|
||||
end: '结束日期',
|
||||
t: '今日',
|
||||
y: '昨日',
|
||||
n: '近7天',
|
||||
a: '全部'
|
||||
},
|
||||
form: {
|
||||
printBtn: '打 印',
|
||||
mockBtn: '模 拟',
|
||||
submitBtn: '提 交',
|
||||
emptyBtn: '清 空'
|
||||
},
|
||||
crud: {
|
||||
filter: {
|
||||
addBtn: '新增条件',
|
||||
clearBtn: '清空数据',
|
||||
resetBtn: '清空条件',
|
||||
cancelBtn: '取 消',
|
||||
submitBtn: '确 定'
|
||||
},
|
||||
column: {
|
||||
name: '列名',
|
||||
hide: '隐藏',
|
||||
fixed: '冻结',
|
||||
filters: '过滤',
|
||||
sortable: '排序',
|
||||
index: '顺序',
|
||||
width: '宽度'
|
||||
},
|
||||
tipStartTitle: '当前表格已选择',
|
||||
tipEndTitle: '项',
|
||||
editTitle: '编 辑',
|
||||
copyTitle: '复 制',
|
||||
addTitle: '新 增',
|
||||
viewTitle: '查 看',
|
||||
filterTitle: '过滤条件',
|
||||
showTitle: '列显隐',
|
||||
menu: '操作',
|
||||
addBtn: '新 增',
|
||||
show: '显 示',
|
||||
hide: '隐 藏',
|
||||
open: '展 开',
|
||||
shrink: '收 缩',
|
||||
printBtn: '打 印',
|
||||
excelBtn: '导 出',
|
||||
updateBtn: '修 改',
|
||||
cancelBtn: '取 消',
|
||||
searchBtn: '搜 索',
|
||||
emptyBtn: '清 空',
|
||||
menuBtn: '功 能',
|
||||
saveBtn: '保 存',
|
||||
viewBtn: '查 看',
|
||||
editBtn: '编 辑',
|
||||
copyBtn: '复 制',
|
||||
delBtn: '删 除'
|
||||
},
|
||||
login: {
|
||||
title: '登录 ',
|
||||
info: '企业级开发平台',
|
||||
info: 'BladeX 企业级开发平台',
|
||||
tenantId: '请输入租户ID',
|
||||
username: '请输入账号',
|
||||
password: '请输入密码',
|
||||
@ -75,15 +89,17 @@ export default {
|
||||
phone: '请输入手机号',
|
||||
code: '请输入验证码',
|
||||
submit: '登录',
|
||||
userLogin: '账号密码',
|
||||
userLogin: '账号密码登录',
|
||||
phoneLogin: '手机号登录',
|
||||
thirdLogin: '第三方登录',
|
||||
thirdLogin: '第三方系统登录',
|
||||
ssoLogin: '单点系统登录',
|
||||
msgText: '发送验证码',
|
||||
msgSuccess: '秒后重发',
|
||||
},
|
||||
navbar: {
|
||||
logOut: '退出登录',
|
||||
userinfo: '个人信息',
|
||||
switchDept : '部门切换',
|
||||
dashboard: '首页',
|
||||
lock: '锁屏',
|
||||
bug: '没有错误日志',
|
||||
@ -91,12 +107,15 @@ export default {
|
||||
screenfullF: '退出全屏',
|
||||
screenfull: '全屏',
|
||||
language: '中英文',
|
||||
notice: '消息通知',
|
||||
theme: '主题',
|
||||
color: '换色'
|
||||
},
|
||||
tagsView: {
|
||||
search: '搜索',
|
||||
menu: '更多',
|
||||
clearCache: '清除缓存',
|
||||
closeOthers: '关闭其它',
|
||||
closeAll: '关闭所有'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -9,15 +9,6 @@ const top = [{
|
||||
},
|
||||
parentId: 0
|
||||
},
|
||||
{
|
||||
label: "bladex官网",
|
||||
icon: 'el-icon-document',
|
||||
meta: {
|
||||
i18n: 'website',
|
||||
},
|
||||
path: "https://bladex.vip/#/",
|
||||
parentId: 1
|
||||
},
|
||||
{
|
||||
label: "测试",
|
||||
icon: 'el-icon-document',
|
||||
|
@ -43,9 +43,9 @@ import tags from "./tags";
|
||||
import top from "./top/";
|
||||
import sidebar from "./sidebar/";
|
||||
import admin from "@/util/admin";
|
||||
// import { validatenull } from "@/util/validate";
|
||||
// import { calcDate } from "@/util/date.js";
|
||||
// import { getStore } from "@/util/store.js";
|
||||
import {validatenull} from "@/util/validate";
|
||||
import {calcDate} from "@/util/date.js";
|
||||
import {getStore} from "@/util/store.js";
|
||||
export default {
|
||||
components: {
|
||||
top,
|
||||
@ -83,16 +83,16 @@ export default {
|
||||
}, 0);
|
||||
};
|
||||
},
|
||||
// 10分钟检测一次token
|
||||
// 定时检测一次token
|
||||
refreshToken() {
|
||||
/*this.refreshTime = setInterval(() => {
|
||||
this.refreshTime = setInterval(() => {
|
||||
const token = getStore({
|
||||
name: "token",
|
||||
debug: true
|
||||
});
|
||||
}) || {};
|
||||
const date = calcDate(token.datetime, new Date().getTime());
|
||||
if (validatenull(date)) return;
|
||||
if (!(date.seconds >= this.website.tokenTime) && !this.refreshLock) {
|
||||
if (date.seconds >= this.website.tokenTime && !this.refreshLock) {
|
||||
this.refreshLock = true;
|
||||
this.$store
|
||||
.dispatch("RefreshToken")
|
||||
@ -103,7 +103,7 @@ export default {
|
||||
this.refreshLock = false;
|
||||
});
|
||||
}
|
||||
}, 10000);*/
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -1,14 +1,14 @@
|
||||
import {setToken, removeToken} from '@/util/auth'
|
||||
import { setToken, setRefreshToken, removeToken, removeRefreshToken } from '@/util/auth';
|
||||
import {setStore, getStore} from '@/util/store'
|
||||
import {isURL, validatenull} from '@/util/validate'
|
||||
import {deepClone} from '@/util/util'
|
||||
import webiste from '@/config/website'
|
||||
import website from '@/config/website'
|
||||
import {Message} from 'element-ui'
|
||||
import {loginByUsername, loginBySocial, getUserInfo, getMenu, getTopMenu, logout, refreshToken, getButtons} from '@/api/user'
|
||||
|
||||
|
||||
function addPath(ele, first) {
|
||||
const menu = webiste.menu;
|
||||
const menu = website.menu;
|
||||
const propsConfig = menu.props;
|
||||
const propsDefault = {
|
||||
label: propsConfig.label || 'name',
|
||||
@ -38,15 +38,17 @@ const user = {
|
||||
menu: getStore({name: 'menu'}) || [],
|
||||
menuAll: [],
|
||||
token: getStore({name: 'token'}) || '',
|
||||
refreshToken: getStore({ name: 'refreshToken' }) || '',
|
||||
},
|
||||
actions: {
|
||||
//根据用户名登录
|
||||
LoginByUsername({commit}, userInfo) {
|
||||
return new Promise((resolve, reject) => {
|
||||
loginByUsername(userInfo.tenantId, userInfo.username, userInfo.password, userInfo.type, userInfo.key, userInfo.code).then(res => {
|
||||
const data = res.data.data;
|
||||
commit('SET_TOKEN', data.accessToken);
|
||||
commit('SET_USER_INFO', data);
|
||||
const data = res.data;
|
||||
commit('SET_TOKEN', data.data.accessToken);
|
||||
commit('SET_REFRESH_TOKEN', data.data.refreshToken);
|
||||
commit('SET_USER_INFO', data.data);
|
||||
commit('DEL_ALL_TAG');
|
||||
commit('CLEAR_LOCK');
|
||||
resolve();
|
||||
@ -103,8 +105,10 @@ const user = {
|
||||
RefreshToken({state, commit}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
refreshToken(state.refreshToken).then(res => {
|
||||
const data = res.data.data;
|
||||
commit('SET_TOKEN', data);
|
||||
const data = res.data;
|
||||
commit('SET_TOKEN', data.data.accessToken);
|
||||
commit('SET_REFRESH_TOKEN', data.data.refreshToken);
|
||||
commit('SET_USER_INFO', data.data);
|
||||
resolve(data);
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
@ -116,12 +120,14 @@ const user = {
|
||||
return new Promise((resolve, reject) => {
|
||||
logout().then(() => {
|
||||
commit('SET_TOKEN', '');
|
||||
commit('SET_REFRESH_TOKEN', '');
|
||||
commit('SET_MENU', [])
|
||||
commit('SET_MENU_ALL', []);
|
||||
commit('SET_ROLES', []);
|
||||
commit('DEL_ALL_TAG');
|
||||
commit('CLEAR_LOCK');
|
||||
removeToken()
|
||||
removeRefreshToken()
|
||||
resolve()
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
@ -132,12 +138,14 @@ const user = {
|
||||
FedLogOut({commit}) {
|
||||
return new Promise(resolve => {
|
||||
commit('SET_TOKEN', '');
|
||||
commit('SET_REFRESH_TOKEN', '');
|
||||
commit('SET_MENU', []);
|
||||
commit('SET_MENU_ALL', []);
|
||||
commit('SET_ROLES', []);
|
||||
commit('DEL_ALL_TAG');
|
||||
commit('CLEAR_LOCK');
|
||||
removeToken()
|
||||
removeRefreshToken()
|
||||
resolve()
|
||||
})
|
||||
},
|
||||
@ -181,6 +189,11 @@ const user = {
|
||||
state.token = token;
|
||||
setStore({name: 'token', content: state.token, type: 'session'})
|
||||
},
|
||||
SET_REFRESH_TOKEN: (state, refreshToken) => {
|
||||
setRefreshToken(refreshToken);
|
||||
state.refreshToken = refreshToken;
|
||||
setStore({ name: 'refreshToken', content: state.refreshToken })
|
||||
},
|
||||
SET_USER_INFO: (state, userInfo) => {
|
||||
state.userInfo = userInfo;
|
||||
setStore({name: 'userInfo', content: state.userInfo})
|
||||
|
@ -1,14 +1,27 @@
|
||||
import Cookies from 'js-cookie'
|
||||
const TokenKey = 'x-access-token'
|
||||
var inFifteenMinutes = new Date(new Date().getTime() + 120 * 60 * 1000);
|
||||
const TokenKey = 'saber-access-token'
|
||||
const RefreshTokenKey = 'saber-refresh-token'
|
||||
export function getToken() {
|
||||
return Cookies.get(TokenKey)
|
||||
return Cookies.get(TokenKey)
|
||||
}
|
||||
|
||||
export function setToken(token) {
|
||||
return Cookies.set(TokenKey, token, { expires: inFifteenMinutes })
|
||||
return Cookies.set(TokenKey, token)
|
||||
}
|
||||
|
||||
export function getRefreshToken() {
|
||||
return Cookies.get(RefreshTokenKey)
|
||||
}
|
||||
|
||||
export function setRefreshToken(token) {
|
||||
return Cookies.set(RefreshTokenKey, token)
|
||||
}
|
||||
|
||||
export function removeToken() {
|
||||
return Cookies.remove(TokenKey)
|
||||
}
|
||||
return Cookies.remove(TokenKey)
|
||||
}
|
||||
|
||||
export function removeRefreshToken() {
|
||||
return Cookies.remove(RefreshTokenKey)
|
||||
}
|
||||
|
||||
|
@ -3,10 +3,10 @@
|
||||
<basic-container>
|
||||
<third-register></third-register>
|
||||
<p style="text-align: center;">
|
||||
<img src="https://img.shields.io/badge/Release-V3.5.0-green.svg" alt="Downloads"/>
|
||||
<img src="https://img.shields.io/badge/Release-V3.6.0-green.svg" alt="Downloads"/>
|
||||
<img src="https://img.shields.io/badge/JDK-1.8+-green.svg" alt="Build Status"/>
|
||||
<img src="https://img.shields.io/badge/Spring%20Cloud-2021-blue.svg" alt="Coverage Status"/>
|
||||
<img src="https://img.shields.io/badge/Spring%20Boot-2.7.1.RELEASE-blue.svg" alt="Downloads"/>
|
||||
<img src="https://img.shields.io/badge/Spring%20Boot-2.7.10.RELEASE-blue.svg" alt="Downloads"/>
|
||||
<a target="_blank" href="https://bladex.vip">
|
||||
<img src="https://img.shields.io/badge/Saber%20Author-Small%20Chill-ff69b4.svg" alt="Downloads"/>
|
||||
</a>
|
||||
@ -125,6 +125,24 @@
|
||||
<el-row>
|
||||
<basic-container>
|
||||
<el-collapse v-model="logActiveNames" @change="handleChange">
|
||||
<el-collapse-item title="3.6.0发布 基于vue3的前端架构正式发布" name="33">
|
||||
<div>1.升级 SpringCloud 至 2021.0.6</div>
|
||||
<div>2.升级 SpringBoot 至 2.7.10</div>
|
||||
<div>3.升级 SpringBootAdmin 至 2.7.10</div>
|
||||
<div>4.升级 AlibabaCloud 至 2021.0.5.0</div>
|
||||
<div>5.升级 Mybatis-Plus 至 3.5.3.1</div>
|
||||
<div>6.升级 Mybatis-Plus-Generator 至 3.5.3.1</div>
|
||||
<div>7.升级 Nacos 至 2.1.2</div>
|
||||
<div>8.升级 Seata 至 1.6.1</div>
|
||||
<div>9.升级 Knife4j 至 4.1.0</div>
|
||||
<div>10.升级 Log4j 至 2.20.0</div>
|
||||
<div>11.升级 Avue2 至 2.10.10</div>
|
||||
<div>12.升级 Avue3 至 3.2.13</div>
|
||||
<div>13.新增 基于Vue3与Element-Plus版本的Saber正式发布</div>
|
||||
<div>14.新增 关闭Token默认签名,用户需自行设置后启动服务</div>
|
||||
<div>15.新增 Vue3版代码生成</div>
|
||||
<div>16.优化 pom依赖机制</div>
|
||||
</el-collapse-item>
|
||||
<el-collapse-item title="3.5.0发布 新增报文加密 令牌签名校验提示" name="32">
|
||||
<div>1.新增 报文加密功能</div>
|
||||
<div>2.新增 日志开关功能</div>
|
||||
@ -466,7 +484,7 @@
|
||||
data() {
|
||||
return {
|
||||
activeNames: ['1', '2', '3', '5'],
|
||||
logActiveNames: ['32']
|
||||
logActiveNames: ['33']
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
Loading…
Reference in New Issue
Block a user