不是很懂你要的东西,不过vue-admin-template是个页面吗?更改登录接口:那就叫后端给新接口,替换登录接口不就好了;数据库拿取用户密码:这个前端怎么拿,肯定是让用户自己输入自己的账号密码,然后去匹配后端数据库啊。验证登录:这个也是后端去验证的,前端只要传账户密码,其他判断都靠后端,成功返回200,然后前端跳转路由
src/store/modules/user.js 这里面有调用的login的接口,,,,然后接口引入是在 import { login, logout, getInfo } from '@/api/user' 在src/api/user.js 这里面应该有你要的
handleLogin() { this.$refs.loginForm.validate(valid => { if (valid) { this.loading = true this.$store.dispatch('user/login', this.loginForm).then(() => { this.$router.push({ path: this.redirect || '/' }) this.loading = false }).catch(() => { this.loading = false }) } else { console.log('error submit!!') return false } }) } 这个方法里面不就是调接口的吗,这个只是他自己的接口,你要换成你自己的接口,user/login是这个项目自己的接口。。。
61,112
社区成员
60,730
社区内容
加载中
试试用AI创作助手写篇文章吧