Skip to content

Commit 252616c

Browse files
vanoneanggongjs
authored andcommitted
fix(token): remove token expire (#142)
1 parent f3166fe commit 252616c

7 files changed

Lines changed: 14 additions & 14 deletions

File tree

src/components/base/table/lin-table.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
ref="linTable"
55
v-loading="loading"
66
stripe
7+
row-key="id"
78
:border="border"
89
:data="currentData"
910
:highlight-current-row="highlightCurrentRow ? true : false"

src/config/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const Config = {
2-
baseUrl: 'http://localhost:5000/',
2+
baseUrl: 'http://dev.koa.7yue.pro/',
33
stagnateTime: 1 * 60 * 60 * 1000, // 无操作停滞时间 默认1小时
44
openAutoJumpOut: true, // 是否开启无操作跳出
55
notLoginRoute: ['login'], // 无需登录即可访问的路由 name,

src/lin/utils/cookie.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
11
import cookies from 'js-cookie'
2-
import { getDateAfterHours, getDateAfterDays } from './date'
3-
// const after = new Date(now.setHours(now.getHours() + 3));
42
/**
53
* 存储tokens
64
* @param {string} accessToken
75
* @param {string} refreshToken
86
*/
97
export function saveTokens(accessToken, refreshToken) {
108
// 存储tokens tokens只进入cookies,不进入vuex全局管理
11-
cookies.set('access_token', `Bearer ${accessToken}`, {
12-
expires: getDateAfterHours(2),
13-
})
14-
cookies.set('refresh_token', `Bearer ${refreshToken}`, {
15-
expires: getDateAfterDays(30),
16-
})
9+
cookies.set('access_token', `Bearer ${accessToken}`)
10+
cookies.set('refresh_token', `Bearer ${refreshToken}`)
1711
}
1812

1913
/**

src/lin/utils/exception.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export async function handleException(res) {
4242
await User.getRefreshToken()
4343
const result = await refreshRequest(store.state.refreshOptions)
4444
resolve(result)
45+
return
4546
}
4647
}
4748

src/views/about/About.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,11 @@
242242
}
243243
244244
p {
245-
height: 20xp;
245+
height: 20px;
246246
line-height: 20px;
247247
margin-top: 10px;
248248
font-size: 14px;
249-
font-weight: 400px;
249+
font-weight: 400;
250250
color: #45526B;
251251
}
252252
}

src/views/book/BookEdit.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<i class="iconfont icon-fanhui"></i> 返回
77
</span>
88
</div>
9-
<lin-1px></lin-1px>
9+
<el-divider></el-divider>
1010
<div class="wrap">
1111
<el-row>
1212
<el-col
@@ -96,6 +96,10 @@ export default {
9696

9797
<style lang="scss" scoped>
9898
99+
.el-divider--horizontal {
100+
margin: 0
101+
}
102+
99103
.container {
100104
.title {
101105
height: 59px;

src/views/login/Login.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ export default {
4242
throttleLogin: null, // 节流登录
4343
form: {
4444
nickname: 'super',
45-
password: 'lin123456',
46-
confirm_password: 'lin123456',
45+
password: '123456',
46+
confirm_password: '123456',
4747
email: '2285901508@qq.com',
4848
},
4949
}

0 commit comments

Comments
 (0)