11.04
This commit is contained in:
parent
3c909ab7a5
commit
d56c3f1df6
@ -2,10 +2,8 @@ import { createApp } from 'vue'
|
|||||||
// import './style.css'
|
// import './style.css'
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
import router from './/router'
|
import router from './/router'
|
||||||
import ElementPlus from 'element-plus';
|
|
||||||
import 'element-plus/dist/index.css'
|
import 'element-plus/dist/index.css'
|
||||||
|
|
||||||
const app= createApp(App)
|
const app= createApp(App)
|
||||||
app.use(router)
|
app.use(router)
|
||||||
app.use(ElementPlus);
|
|
||||||
app.mount('#app')
|
app.mount('#app')
|
||||||
|
|||||||
@ -53,6 +53,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { userLogin } from '../api/login'
|
import { userLogin } from '../api/login'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data () {
|
data () {
|
||||||
@ -96,14 +97,14 @@
|
|||||||
methods: {
|
methods: {
|
||||||
login () {
|
login () {
|
||||||
if (this.form.username === '' || this.form.password === '') {
|
if (this.form.username === '' || this.form.password === '') {
|
||||||
this.$message.error('账号或密码不能为空')
|
ElMessage.error('账号或密码不能为空')
|
||||||
} else {
|
} else {
|
||||||
// this.$router.push('/index')
|
// this.$router.push('/index')
|
||||||
this.query.account = this.form.username
|
this.query.account = this.form.username
|
||||||
this.query.password = this.form.password
|
this.query.password = this.form.password
|
||||||
userLogin(this.query).then(response => {
|
userLogin(this.query).then(response => {
|
||||||
console.log(response)
|
console.log(response)
|
||||||
this.$message({
|
ElMessage({
|
||||||
message: response.msg,
|
message: response.msg,
|
||||||
type: 'success'
|
type: 'success'
|
||||||
})
|
})
|
||||||
@ -119,7 +120,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
forgetpas () {
|
forgetpas () {
|
||||||
this.$message({
|
ElMessage({
|
||||||
message: '请联系管理员更改密码',
|
message: '请联系管理员更改密码',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user