From f15ad3456b47e43646234b9c91c3ddd77ab2cd02 Mon Sep 17 00:00:00 2001
From: dcc <dcc@163.com>
Date: Wed, 05 Jun 2024 10:05:13 +0800
Subject: [PATCH] 123
---
src/page/login/register.vue | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/page/login/register.vue b/src/page/login/register.vue
index a09c944..2f3595e 100644
--- a/src/page/login/register.vue
+++ b/src/page/login/register.vue
@@ -65,7 +65,7 @@
>{{ $t("立即注册") }}</van-button
>
- <div class="register">
+ <div class="register" @click="$router.push('/login')">
{{ $t("已有賬號?")
}}<span style="color: rgb(5, 106, 239)">{{ $t("馬上登錄") }}</span>
</div>
@@ -80,6 +80,7 @@
import { isNull, isPhone, pwdReg } from "@/utils/utils";
import * as api from "@/axios/api";
import { Notify } from "vant";
+import { mapMutations } from "vuex";
export default {
components: {
@@ -128,11 +129,7 @@
} else if (isNull(this.rePassword)) {
Notify({ type: "warning", message: this.$t("hj31") });
} else {
- if (!/(^[1-9]\d*$)/.test(this.phone)) {
- Notify({ type: "warning", message: this.$t("hj28") });
- } else if (this.phone.toString().length != 10) {
- Notify({ type: "warning", message: this.$t("hj28") });
- } else if (this.userPassword !== this.rePassword) {
+ if (this.userPassword !== this.rePassword) {
this.password = 0;
this.password2 = 0;
Notify({ type: "warning", message: this.$t("hj32") });
@@ -150,6 +147,7 @@
};
let data = await api.register(opts);
if (data.status === 0) {
+ Notify({ type: "success", message: data.msg });
setTimeout(() => {
this.$router.push("/login");
}, 1000);
--
Gitblit v1.9.3