This commit is contained in:
username 2024-04-20 11:04:07 +08:00
parent 3c909ab7a5
commit d56c3f1df6
2 changed files with 4 additions and 5 deletions

View File

@ -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')

View File

@ -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'
})