Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7295955

Browse files
committed
login优化
1 parent e18fcca commit 7295955

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

‎src/style/index.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,10 @@ body {
129129
font-size: 18px;
130130
}
131131
}
132+
.el-notification {
133+
.el-icon-s-opportunity {
134+
color: #ffc107;
135+
font-size: 22px;
136+
margin-top: 2px;
137+
}
138+
}

‎src/views/login/index.vue

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,12 @@ import SlideVerify from '@/components/SlideVerify'
5959
export default {
6060
data() {
6161
return {
62+
notifyObj: null,
6263
text: '向右滑动',
6364
showSlide: false,
6465
ruleForm: {
65-
user: '',
66-
password: ''
66+
user: 'admin',
67+
password: '123456'
6768
},
6869
rules: {
6970
user: [
@@ -74,6 +75,9 @@ export default {
7475
}
7576
}
7677
},
78+
mounted() {
79+
this.shopTip()
80+
},
7781
methods: {
7882
onSuccess() {
7983
this.showSlide = false
@@ -102,12 +106,25 @@ export default {
102106
this.refresh()
103107
} else {
104108
this.$router.push(this.$route.query.redirect)
109+
if (this.notifyObj) {
110+
this.notifyObj.close()
111+
}
112+
this.notifyObj = null
105113
}
106114
})
107115
.catch(error => {
108116
this.refresh()
109117
this.$message.error(error)
110118
})
119+
},
120+
shopTip() {
121+
this.notifyObj = this.$notify({
122+
title: '提示',
123+
message:
124+
'目前有两个登陆角色,管理员和普通用户,账号分别为:admin、user,密码都为:123456',
125+
duration: 0,
126+
iconClass: 'el-icon-s-opportunity'
127+
})
111128
}
112129
},
113130
components: {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /