File tree 22 files changed +52
-254
lines changed
22 files changed +52
-254
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,12 @@ QQ群搜索:林间有风 或 643205479
97
97
98
98
## 版本日志
99
99
100
- 最新版本 ` 0.3.3 `
100
+ 最新版本 ` 0.3.4 `
101
+
102
+ ### 0.3.4
103
+
104
+ 1 . ` U ` 优化变量命名,升级 ` element-ui ` 版本,
105
+ 2 . ` F ` ` Home ` 组件改为异步加载
101
106
102
107
### 0.3.3
103
108
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " lin-cms" ,
3
- "version" : " 0.3.3 " ,
3
+ "version" : " 0.3.4 " ,
4
4
"private" : true ,
5
5
"scripts" : {
6
6
"serve" : " node script/plugin-get-config.js && vue-cli-service serve" ,
17
17
"@babel/polyfill" : " ^7.4.4" ,
18
18
"@tinymce/tinymce-vue" : " ^2.0.0" ,
19
19
"axios" : " ~0.18.0" ,
20
- "element-ui" : " ^2.10.1 " ,
20
+ "element-ui" : " ^2.13.0 " ,
21
21
"event-source-polyfill" : " ^1.0.7" ,
22
22
"fastscan" : " ^1.0.4" ,
23
23
"good-storage" : " ^1.1.0" ,
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 23
23
}
24
24
.loader-logo {
25
25
width : 60px ;
26
- height : 98 px ;
26
+ height : 91 px ;
27
27
position : fixed;
28
28
left : 20% ;
29
29
top : 43% ;
Original file line number Diff line number Diff line change @@ -277,7 +277,7 @@ export default {
277
277
})
278
278
.then (putRes => {
279
279
// eslint-disable-line
280
- if (putRes .code < window .SUCCESS_CODE ) {
280
+ if (putRes .code < window .MAX_SUCCESS_CODE ) {
281
281
this .$message ({
282
282
type: ' success' ,
283
283
message: ' 更新头像成功' ,
@@ -315,7 +315,7 @@ export default {
315
315
showBackend: true ,
316
316
})
317
317
.then (res => {
318
- if (res .code < window .SUCCESS_CODE ) {
318
+ if (res .code < window .MAX_SUCCESS_CODE ) {
319
319
this .$message ({
320
320
type: ' success' ,
321
321
message: ' 更新昵称成功' ,
@@ -364,7 +364,7 @@ export default {
364
364
// eslint-disable-line
365
365
if (valid) {
366
366
const res = await User .updatePassword (this .form )
367
- if (res .code < window .SUCCESS_CODE ) {
367
+ if (res .code < window .MAX_SUCCESS_CODE ) {
368
368
this .$message .success (` ${ res .message } ` )
369
369
this .resetForm (formName)
370
370
this .dialogFormVisible = false
Original file line number Diff line number Diff line change 1
- window . SUCCESS_CODE = 9999
1
+ window . MAX_MAX_SUCCESS_CODE = 9998
Original file line number Diff line number Diff line change @@ -9,22 +9,22 @@ export default class Admin {
9
9
this . gCount = gCount
10
10
}
11
11
12
- async increseUpage ( ) {
12
+ async increaseUPage ( ) {
13
13
this . uPage += 1
14
14
}
15
15
16
- async increseGpage ( ) {
16
+ async increaseGPage ( ) {
17
17
this . lPage += 1
18
18
}
19
19
20
- async decreseUpage ( ) {
20
+ async decreaseUPage ( ) {
21
21
this . uPage -= 1
22
22
if ( this . uPage < 0 ) {
23
23
this . uPage = 0
24
24
}
25
25
}
26
26
27
- async decreseGpage ( ) {
27
+ async decreaseGPage ( ) {
28
28
this . lPage -= 1
29
29
if ( this . lPage < 0 ) {
30
30
this . lPage = 0
@@ -53,12 +53,12 @@ export default class Admin {
53
53
}
54
54
55
55
async nextUsersPage ( ) {
56
- await this . increseUpage ( )
56
+ await this . increaseUPage ( )
57
57
return this . getAdminUsers ( { } )
58
58
}
59
59
60
60
async preUsersPage ( ) {
61
- await this . decreseUpage ( )
61
+ await this . decreaseUPage ( )
62
62
return this . getAdminUsers ( { } )
63
63
}
64
64
@@ -71,12 +71,12 @@ export default class Admin {
71
71
}
72
72
73
73
async nextGroupsPage ( ) {
74
- await this . increseGpage ( )
74
+ await this . increaseGPage ( )
75
75
return this . getGroupsWithPermissions ( { } )
76
76
}
77
77
78
78
async preGroupsPage ( ) {
79
- await this . decreseGpage ( )
79
+ await this . decreaseGPage ( )
80
80
return this . getGroupsWithPermissions ( { } )
81
81
}
82
82
Original file line number Diff line number Diff line change @@ -41,15 +41,15 @@ class Log {
41
41
// lCount && this.lCount = lCount
42
42
}
43
43
44
- async increseUpage ( ) {
44
+ async increaseUpage ( ) {
45
45
this . uPage += 1
46
46
}
47
47
48
- async increseLpage ( ) {
48
+ async increaseLpage ( ) {
49
49
this . lPage += 1
50
50
}
51
51
52
- increseSpage ( ) {
52
+ increaseSpage ( ) {
53
53
this . sPage += 1
54
54
}
55
55
@@ -149,17 +149,17 @@ class Log {
149
149
}
150
150
151
151
async moreUserPage ( ) {
152
- await this . increseUpage ( )
152
+ await this . increaseUpage ( )
153
153
return this . getLoggedUsers ( { } )
154
154
}
155
155
156
156
async moreLogPage ( ) {
157
- await this . increseLpage ( )
157
+ await this . increaseLpage ( )
158
158
return this . getLogs ( { next : true } )
159
159
}
160
160
161
161
async moreSearchPage ( ) {
162
- this . increseSpage ( )
162
+ this . increaseSpage ( )
163
163
return this . searchLogs ( { next : true } )
164
164
}
165
165
}
Original file line number Diff line number Diff line change 1
- import Home from '@/views/home/Home'
2
1
import homeRouter from './home-router'
3
2
4
3
const routes = [
5
4
{
6
5
path : '/' ,
7
6
name : 'Home' ,
8
7
redirect : '/about' ,
9
- component : Home ,
8
+ component : ( ) => import ( '@/views/home/ Home' ) ,
10
9
children : [ ...homeRouter ] ,
11
10
} ,
12
11
{
Original file line number Diff line number Diff line change 1
1
import Vue from 'vue'
2
2
import Vuex from 'vuex'
3
+ import createLogger from 'vuex/dist/logger'
3
4
import VuexPersistence from 'vuex-persist'
4
5
import mutations from './mutations'
5
6
import state from './state'
@@ -18,11 +19,13 @@ const vuexLocal = new VuexPersistence({
18
19
} ) ,
19
20
} )
20
21
22
+ const debug = process . env . NODE_ENV !== 'production'
23
+
21
24
export default new Vuex . Store ( {
22
25
state,
23
26
getters,
24
27
mutations,
25
28
actions,
26
- plugins : [ vuexLocal . plugin ] ,
27
- strict : process . env . NODE_ENV !== 'production' ,
29
+ plugins : debug ? [ vuexLocal . plugin , createLogger ( ) ] : [ vuexLocal . plugin ] ,
30
+ strict : debug ,
28
31
} )
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ export default {
91
91
this .loading = false
92
92
console .log (e)
93
93
}
94
- if (res .code < window .SUCCESS_CODE ) {
94
+ if (res .code < window .MAX_SUCCESS_CODE ) {
95
95
this .loading = false
96
96
this .$message .success (` ${ res .message } ` )
97
97
this .eventBus .$emit (' addGroup' , true )
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ export default {
124
124
if (this .cacheForm .name !== this .form .name || this .cacheForm .info !== this .form .info ) {
125
125
// eslint-disable-line
126
126
const res = await Admin .updateOneGroup (this .form .name , this .form .info , this .id )
127
- if (res .code < window .SUCCESS_CODE ) {
127
+ if (res .code < window .MAX_SUCCESS_CODE ) {
128
128
this .$message .success (` ${ res .message } ` )
129
129
this .getAllGroups ()
130
130
}
@@ -150,7 +150,7 @@ export default {
150
150
if (deletePermissions .length > 0 ) {
151
151
delRes = await Admin .removePermissions (this .id , deletePermissions)
152
152
}
153
- if (addRes .code < window .SUCCESS_CODE || delRes .code < window .SUCCESS_CODE ) {
153
+ if (addRes .code < window .MAX_SUCCESS_CODE || delRes .code < window .MAX_SUCCESS_CODE ) {
154
154
this .$message .success (' 权限修改成功' )
155
155
}
156
156
}
@@ -191,7 +191,7 @@ export default {
191
191
this .loading = false
192
192
console .log (e)
193
193
}
194
- if (res .code < window .SUCCESS_CODE ) {
194
+ if (res .code < window .MAX_SUCCESS_CODE ) {
195
195
await this .getAllGroups ()
196
196
this .$message ({
197
197
type: ' success' ,
Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ export default {
167
167
try {
168
168
this .loading = true
169
169
res = await User .register (this .form )
170
- if (res .code < window .SUCCESS_CODE ) {
170
+ if (res .code < window .MAX_SUCCESS_CODE ) {
171
171
this .loading = false
172
172
this .$message .success (` ${ res .message } ` )
173
173
this .eventBus .$emit (' addUser' , true )
@@ -198,7 +198,7 @@ export default {
198
198
this .loading = false
199
199
console .log (e)
200
200
}
201
- if (res .code < window .SUCCESS_CODE ) {
201
+ if (res .code < window .MAX_SUCCESS_CODE ) {
202
202
this .loading = false
203
203
this .$message .success (` ${ res .message } ` )
204
204
this .$emit (' handleInfoResult' , true )
Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ export default {
170
170
this .loading = false
171
171
console .log (e)
172
172
}
173
- if (res .code < window .SUCCESS_CODE ) {
173
+ if (res .code < window .MAX_SUCCESS_CODE ) {
174
174
this .loading = false
175
175
if (this .total_nums % this .pageCount === 1 && this .currentPage !== 1 ) {
176
176
// 判断删除的是不是每一页的最后一条数据
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ export default {
81
81
this .loading = false
82
82
console .log (e)
83
83
}
84
- if (res .code < window .SUCCESS_CODE ) {
84
+ if (res .code < window .MAX_SUCCESS_CODE ) {
85
85
this .loading = false
86
86
this .$message .success (` ${ res .message } ` )
87
87
this .resetForm (formName)
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ export default {
54
54
async submitForm (formName ) {
55
55
try {
56
56
const res = await book .addBook (this .form )
57
- if (res .code < window .SUCCESS_CODE ) {
57
+ if (res .code < window .MAX_SUCCESS_CODE ) {
58
58
this .$message .success (` ${ res .message } ` )
59
59
this .resetForm (formName)
60
60
}
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ export default {
60
60
methods: {
61
61
async submitForm () {
62
62
const res = await book .editBook (this .editBookID , this .form )
63
- if (res .code < window .SUCCESS_CODE ) {
63
+ if (res .code < window .MAX_SUCCESS_CODE ) {
64
64
this .$message .success (` ${ res .message } ` )
65
65
this .$emit (' editClose' )
66
66
}
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ export default {
76
76
type: ' warning' ,
77
77
}).then (async () => {
78
78
const res = await book .delectBook (val .row .id )
79
- if (res .code < window .SUCCESS_CODE ) {
79
+ if (res .code < window .MAX_SUCCESS_CODE ) {
80
80
this .getBooks ()
81
81
this .$message ({
82
82
type: ' success' ,
Original file line number Diff line number Diff line change @@ -266,7 +266,7 @@ export default {
266
266
})
267
267
.then (putRes => {
268
268
// eslint-disable-line
269
- if (putRes .code < window .SUCCESS_CODE ) {
269
+ if (putRes .code < window .MAX_SUCCESS_CODE ) {
270
270
this .$message ({
271
271
type: ' success' ,
272
272
message: ' 更新头像成功' ,
@@ -298,7 +298,7 @@ export default {
298
298
showBackend: true ,
299
299
})
300
300
.then (res => {
301
- if (res .code < window .SUCCESS_CODE ) {
301
+ if (res .code < window .MAX_SUCCESS_CODE ) {
302
302
this .$message ({
303
303
type: ' success' ,
304
304
message: ' 更新昵称成功' ,
@@ -336,7 +336,7 @@ export default {
336
336
// eslint-disable-line
337
337
if (valid) {
338
338
const res = await User .updatePassword (this .form )
339
- if (res .code < window .SUCCESS_CODE ) {
339
+ if (res .code < window .MAX_SUCCESS_CODE ) {
340
340
this .$message .success (` ${ res .message } ` )
341
341
this .resetForm (formName)
342
342
this .dialogFormVisible = false
Original file line number Diff line number Diff line change 46
46
<aside >
47
47
<p class =" things" v-html =" log.message" ></p >
48
48
<p class =" brief" >
49
- <span class =" text-yellow" >{{ log.user_name }}</span > {{ log.time | dateTimeFormatter }}
49
+ <span class =" text-yellow" >{{ log.username }}</span > {{ log.time | dateTimeFormatter }}
50
50
</p >
51
51
</aside >
52
52
</section >
You can’t perform that action at this time.
0 commit comments