From 3003b7486ddeffd169f2b2f564fc0ff8c2c58bb3 Mon Sep 17 00:00:00 2001
From: PC-20250623MANY\Administrator <344137771@qq.com>
Date: Tue, 22 Jul 2025 09:56:04 +0800
Subject: [PATCH] 1
---
src/page/login/login.vue | 45 +++++++++++++++++++++++++++++----------------
1 files changed, 29 insertions(+), 16 deletions(-)
diff --git a/src/page/login/login.vue b/src/page/login/login.vue
index 8d3c048..adfb805 100644
--- a/src/page/login/login.vue
+++ b/src/page/login/login.vue
@@ -10,7 +10,6 @@
<el-input
:placeholder="$t('hj9')"
:size="medium"
- maxlength="11"
v-model="userName"
clearable
>
@@ -51,7 +50,7 @@
}}<span
@click="$router.push('/register')"
data-v-8cc76a7b=""
- style="color: rgb(5, 106, 239)"
+ style="color:#c4d600"
>{{ $t("免費註冊") }}</span
>
</div>
@@ -62,7 +61,7 @@
import headers from "./components/header.vue";
import * as api from "@/axios/api";
import { Notify } from "vant";
-import { mapMutations } from "vuex";
+import { mapActions, mapMutations } from "vuex";
export default {
name: "newLogin",
@@ -75,11 +74,11 @@
userPassword: "",
userName: "",
btnClass: false,
- medium: "medium",
+ medium: "medium"
};
},
components: {
- headers,
+ headers
},
mounted() {
const ret = window.localStorage.getItem("login_admin");
@@ -92,6 +91,7 @@
},
methods: {
+ ...mapActions(["setUseInfo"]),
...mapMutations(["undataToken"]),
checkboxChange(e) {
window.localStorage.setItem("login_checked", e);
@@ -111,17 +111,18 @@
async loginIN() {
let opts = {
phone: this.userName,
- userPwd: this.userPassword,
+ userPwd: this.userPassword
};
let data = await api.login(opts);
if (data.status === 0) {
+ this.setUseInfo();
if (this.checked) {
window.localStorage.setItem(
"login_admin",
JSON.stringify({
phone: this.userName,
- userPassword: this.userPassword,
+ userPassword: this.userPassword
})
);
} else {
@@ -134,7 +135,8 @@
Notify({ type: "success", message: this.$t("hj36") });
setTimeout(() => {
- this.$router.push("/home");
+ // this.$router.push("/home");
+ this.$router.push("/home_index");
}, 1000);
} else {
Notify({ type: "warning", message: data.msg });
@@ -143,14 +145,15 @@
// 支持
navigator.vibrate([55]);
}
- },
+ }
},
beforeDestroy() {},
- created() {},
+ created() {}
};
</script>
<style scoped lang="less">
+@green: #c4d600;
.password-operate {
display: flex;
justify-content: space-between;
@@ -164,13 +167,21 @@
}
}
+/deep/ .van-checkbox__icon--checked .van-icon {
+ background: @green;
+ border-color: @green;
+}
+
.register {
font-style: normal;
font-weight: 400;
font-size: 0.37333rem;
color: #8c9fad;
- margin: 0 auto;
+ margin: 0.4rem auto;
padding: 0.34667rem 0.4rem;
+ width: 100%;
+ height: 6rem;
+ text-align: center;
span {
color: rgb(5, 106, 239);
}
@@ -232,7 +243,7 @@
.password {
width: 100%;
height: 50px;
- background: rgb(246, 246, 247);
+ background: #fff;
// background: #1e1e1e;
border-radius: 0.3564rem;
@@ -248,11 +259,11 @@
/deep/.el-input__inner {
width: 100%;
height: 70px;
- background-color: rgb(246, 246, 247) !important;
+ background-color: #fff !important;
// background: #1e1e1e;
border-radius: 8px;
font-size: 0.45rem !important;
- border: none;
+ border: #ddd solid 1px;
}
.bottom_btns {
@@ -264,13 +275,15 @@
margin-top: 40px;
height: 60px;
border-radius: 8px;
+ background: @green;
+ border: none;
}
.top_btn {
border: none;
width: 100%;
height: 1.25rem;
border-radius: 8px;
- background: #0066ed;
+ background: @green;
color: #fff;
display: flex;
align-items: center;
@@ -418,7 +431,7 @@
}
.on .top_btn {
- background: #2d8cf0 !important;
+ background: @green !important;
}
/deep/.el-icon-circle-close::before {
--
Gitblit v1.9.3