File tree 7 files changed +24
-7
lines changed
7 files changed +24
-7
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ module.exports = {
7
7
index : path . resolve ( __dirname , '../dist/index.html' ) ,
8
8
assetsRoot : path . resolve ( __dirname , '../dist' ) ,
9
9
assetsSubDirectory : 'static' ,
10
- assetsPublicPath : '/ ' ,
10
+ assetsPublicPath : '' ,
11
11
productionSourceMap : false ,
12
12
// Gzip off by default as many popular static hosts such as
13
13
// Surge or Netlify already gzip all static assets for you.
Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ export default {
111
111
if (res .success ){
112
112
this .$router .go (0 )
113
113
}else {
114
-
114
+ console . log ( ' 回复失败! ' );
115
115
}
116
116
})
117
117
},
@@ -120,7 +120,6 @@ export default {
120
120
accesstoken: this .getToken ,
121
121
topic_id: this .$route .query .id
122
122
}
123
- console .log (dataObj)
124
123
if (type === ' collect' ){
125
124
api .topicCollect (dataObj).then (res => {
126
125
if (res .success ){
Original file line number Diff line number Diff line change @@ -51,6 +51,8 @@ export default {
51
51
api .getTopicsList ({page: this .page ,tab: this .$route .query .tab }).then (res => {
52
52
if (res .success ){
53
53
this .listData = res .data ;
54
+ }else {
55
+ console .log (' 获取数据失败!' );
54
56
}
55
57
})
56
58
},
Original file line number Diff line number Diff line change 24
24
25
25
<script >
26
26
import * as api from " @/api/api" ;
27
- import { mapMutations } from ' vuex' ;
27
+ import { mapMutations , mapGetters } from ' vuex' ;
28
28
29
29
export default {
30
30
data (){
31
31
return {
32
32
accesstoken: ' '
33
33
}
34
34
},
35
+ created (){
36
+ this .setRightName (this .getLoginUser );
37
+ },
38
+ computed: {
39
+ ... mapGetters ([
40
+ ' getLoginUser'
41
+ ])
42
+ },
35
43
methods: {
36
44
... mapMutations ({
37
45
userLogin: ' COM_USER_LOGIN' ,
@@ -50,7 +58,7 @@ export default {
50
58
if (! url) url= ' /' ;
51
59
this .$router .push ({ path: url });
52
60
}else {
53
-
61
+ console . log ( ' 登录失败 ' );
54
62
}
55
63
})
56
64
}
@@ -60,16 +68,18 @@ export default {
60
68
61
69
<style lang="less" scoped>
62
70
.login-box {
63
- padding : 50px 10px ;
71
+ padding : 50px 0 ;
72
+ margin : 0 auto ;
73
+ width : 500px ;
64
74
.control-group {
65
75
padding : 20px 0 ;
66
76
}
67
77
.control-label {
68
78
color : #999 ;
69
- width :300px ;
70
79
padding-right : 30px ;
71
80
text-align : right ;
72
81
display : inline-block ;
82
+ width : 180px ;
73
83
}
74
84
.control-input .input-box {
75
85
height : 20px ;
Original file line number Diff line number Diff line change @@ -48,6 +48,8 @@ export default {
48
48
api .getMsgData ({ " accesstoken" : this .getToken }).then (res => {
49
49
if (res .success ){
50
50
this .msgData = res .data ;
51
+ }else {
52
+ console .log (' 数据获取失败!' );
51
53
}
52
54
})
53
55
}
Original file line number Diff line number Diff line change @@ -70,6 +70,8 @@ export default {
70
70
api .createTopic (this .CreateData ).then ( res => {
71
71
if (res .success ){
72
72
this .$router .push ({path: ' /topic' ,query: { id: res .topic_id }});
73
+ }else {
74
+ console .log (' 创建失败!' );
73
75
}
74
76
})
75
77
}
Original file line number Diff line number Diff line change @@ -56,6 +56,8 @@ export default {
56
56
if (res .success ){
57
57
this .UserData = res .data ;
58
58
this .setRightName (res .data .loginname );
59
+ }else {
60
+ console .log (' 数据获取失败!' );
59
61
}
60
62
})
61
63
}
You can’t perform that action at this time.
0 commit comments