Commit 7c77730d by zhangjie

登录

parent 30bbe18b
......@@ -43,7 +43,7 @@
<el-form-item prop="email">
<el-input
prefix-icon="el-icon-message"
style="background:#fff"
style="background: #fff"
v-model="ruleForm.email"
placeholder="Email"></el-input>
</el-form-item>
......@@ -51,7 +51,7 @@
<el-input
:type="showPwd ? 'text' : 'password'"
prefix-icon="el-icon-lock"
style="background:#fff"
style="background: #fff"
v-model="ruleForm.password"
placeholder="Password"
@keyup.enter.native="submitForm('ruleForm')">
......@@ -430,8 +430,11 @@ export default {
submitForm() {
this.$refs.ruleForm.validate((valid) => {
if (valid) {
let url = `user/login?email=${this.ruleForm.email}&password=${this.ruleForm.password}`
post(url).then((res) => {
let url = `user/login`
post(url, {
email: this.ruleForm.email,
password: this.ruleForm.password,
}).then((res) => {
this.$message.success(res.message)
if (res.message == '操作成功') {
this.ruleForm = {}
......@@ -468,7 +471,7 @@ export default {
}
.login_content {
padding: 18px;
background: rgba(255, 255, 255, 0.4);;
background: rgba(255, 255, 255, 0.4);
position: absolute;
top: 50%;
left: 80%;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment