Commit 04b0a228 authored by 郭志伟's avatar 郭志伟

fix: 登录弹框调整

parent f30ce811
<template> <template>
<modal <modal
v-model="isShowLogin" :value="isShowLogin"
title="您好<br />欢迎来到芒果保险" title="您好<br />欢迎来到芒果保险"
:closeable="true" :closeable="true"
cancel-btn cancel-btn
confirm-btn="确定" confirm-btn="确定"
@close="setLoginIsShow(false)" @close="setIsShowLogin(false)"
@confirm="$refs.loginForm.submit()" @confirm="$refs.loginForm.submit()"
> >
<cr-form <cr-form
...@@ -73,7 +73,7 @@ export default { ...@@ -73,7 +73,7 @@ export default {
...mapState(["isShowLogin"]) ...mapState(["isShowLogin"])
}, },
methods: { methods: {
...mapActions(["setLoginIsShow"]), ...mapActions(["setIsShowLogin"]),
onFormFailed(errorInfo) { onFormFailed(errorInfo) {
const { errors } = errorInfo; const { errors } = errorInfo;
this.$notify({ type: "warning", message: errors[0].message }); this.$notify({ type: "warning", message: errors[0].message });
...@@ -84,7 +84,7 @@ export default { ...@@ -84,7 +84,7 @@ export default {
const res = await loginByPhone(this.formData); const res = await loginByPhone(this.formData);
if (res.code === "0") { if (res.code === "0") {
this.$notify("登录成功"); this.$notify("登录成功");
this.setLoginIsShow(false); this.setIsShowLogin(false);
localStorage.setItem("mongoToken", res.data.token); localStorage.setItem("mongoToken", res.data.token);
} }
}, },
......
...@@ -17,7 +17,7 @@ export default new Vuex.Store({ ...@@ -17,7 +17,7 @@ export default new Vuex.Store({
state.isLoading = value; state.isLoading = value;
}, },
setIsShowLogin(state, value) { setIsShowLogin(state, value) {
state.showLogin = value; state.isShowLogin = value;
} }
}, },
actions: { actions: {
......
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