|
|
@@ -20,7 +20,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item class="loginItem">
|
|
|
<el-checkbox v-model="rememberUser" @change="rememberNow">记住账号</el-checkbox><br>
|
|
|
- <el-button class="loginButton" @click="loginNow" >登录</el-button>
|
|
|
+ <el-button class="loginButton" @click="loginNow">登录</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
@@ -65,8 +65,13 @@ export default {
|
|
|
if (this.form.username != '' && this.form.password != "") {
|
|
|
if (!this.userBlur && !this.passBlur) {
|
|
|
const wordType = this.encryptPassword(this.form.password)
|
|
|
+ // console.log(100);
|
|
|
let res = await login({ login_account: this.form.username, pwd: wordType })
|
|
|
- if (res.returncode === 200) {
|
|
|
+ // console.log(105);
|
|
|
+ // this.$router.push("/")
|
|
|
+ // localStorage.setItem('userInfo', JSON.stringify(res.data))
|
|
|
+ // this.rememberUser = false
|
|
|
+ if (res.returncode == 200) {
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
message: "登陆成功"
|
|
|
@@ -74,13 +79,13 @@ export default {
|
|
|
this.$router.push("/")
|
|
|
localStorage.setItem('userInfo', JSON.stringify(res.data))
|
|
|
this.rememberUser = false
|
|
|
- } else if(res.returncode === 500) {
|
|
|
+ } else if (res.returncode == 500) {
|
|
|
+ console.log(500);
|
|
|
this.$message({
|
|
|
- type:"error",
|
|
|
- message:res.msg
|
|
|
+ type: "error",
|
|
|
+ message: res.msg
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
} else {
|
|
|
this.$message({
|
|
|
message: '账号或密码错误',
|