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