From 8efb1241a1809ecab2f3f6e379755b54b55b4807 Mon Sep 17 00:00:00 2001
From: j1ack <1209452658@qq.com>
Date: Thu, 25 Aug 2022 16:06:25 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=99=BB=E5=BD=95=E9=80=BB?=
=?UTF-8?q?=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages.json | 15 +-
pages/login/forget.vue | 76 +++++-
pages/login/index.vue | 314 ++++++++++++----------
pages/login/register.vue | 557 +++++++++++++++++++++++----------------
utils/language/en_US.js | 7 +
5 files changed, 579 insertions(+), 390 deletions(-)
diff --git a/pages.json b/pages.json
index 440e954..c061971 100644
--- a/pages.json
+++ b/pages.json
@@ -3,34 +3,35 @@
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
},
"pages": [ //pages数组中第一项表示应用启动页
- // 首页部分
+ // 登陆部分
{
- "path": "pages/home/index",
+ "path": "pages/login/index",
"style": {
"navigationStyle": "custom"
}
},
- // 登陆部分
{
- "path": "pages/login/index",
+ "path": "pages/login/forget",
"style": {
"navigationStyle": "custom"
}
},
{
- "path": "pages/login/forget",
+ "path": "pages/login/register",
"style": {
"navigationStyle": "custom"
}
},
+ // 首页部分
{
- "path": "pages/login/register",
+ "path": "pages/home/index",
"style": {
"navigationStyle": "custom"
}
},
+
// markets
{
"path": "pages/markets/index",
@@ -232,4 +233,4 @@
}
},
"uniIdRouter": {}
-}
\ No newline at end of file
+}
diff --git a/pages/login/forget.vue b/pages/login/forget.vue
index cac1eea..a9d5030 100644
--- a/pages/login/forget.vue
+++ b/pages/login/forget.vue
@@ -13,15 +13,18 @@
-
-
-
-
- Get code
-
+
+
+
+
+
+
+ {{tips}}
+
{
+ if (res.code === 200) {
+ uni.hideLoading();
+ // 这里此提示会被this.start()方法中的提示覆盖
+ uni.$u.toast(this.$t("login.CodeHasSent"));
+ // 通知验证码组件内部开始倒计时
+ this.$refs.uCode.start();
+ } else {
+ uni.$u.toast(res.msg)
+ }
+ })
+ } else {
+ uni.$u.toast(this.$t("login.SendAfter"));
+ }
+ },
+ },
components: { UButton }
}
diff --git a/pages/login/index.vue b/pages/login/index.vue
index ad5a05c..7b74ce0 100644
--- a/pages/login/index.vue
+++ b/pages/login/index.vue
@@ -1,154 +1,176 @@
-
- {{ i18n.welcomeText }}
- {{ i18n.signInText }}
-
-
-
-
-
-
-
-
-
-
-
-
- {{ i18n.forgotText }}
- {{ i18n.Login }}
- {{ i18n.notAccountText }}{{ i18n.SignUp }}
-
-
-
-
+
+ {{ i18n.welcomeText }}
+ {{ i18n.signInText }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ i18n.forgotText }}
+ {{ i18n.Login }}
+ {{ i18n.notAccountText }}
+ {{ i18n.SignUp }}
+
+
+
+
diff --git a/pages/login/register.vue b/pages/login/register.vue
index f8478c5..96d173d 100644
--- a/pages/login/register.vue
+++ b/pages/login/register.vue
@@ -1,238 +1,343 @@
-
- {{ i18n.SignUp }}
-
- {{ i18n.registerWelcomeText }}
- {{ i18n.registerCreate }}
-
-
-
-
-
-
-
-
-
-
-
-
- Get code
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ i18n.agreeText }}{{ i18n.Terms }}{{ i18n.and }}{{
+
+ {{ i18n.SignUp }}
+
+ {{ i18n.registerWelcomeText }}
+ {{ i18n.registerCreate }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{tips}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ i18n.agreeText }}{{ i18n.Terms }}{{ i18n.and }}{{
i18n.Conditions
}}
-
- {{ i18n.SignUp }}
-
- {{ i18n.haveAccount }}{{ i18n.Login }}
-
-
-
+
+
+ {{ i18n.SignUp }}
+
+ {{ i18n.haveAccount }}
+ {{ i18n.Login }}
+
+
+
-
+
diff --git a/utils/language/en_US.js b/utils/language/en_US.js
index d5a5503..ff80a54 100644
--- a/utils/language/en_US.js
+++ b/utils/language/en_US.js
@@ -27,6 +27,13 @@ export default {
checkTheTermsOfService: 'Please review and agree to the terms of service',
// register
+ loginSuccess:"Login successful",
+ resSuccess:"Registration success",
+ Emailempty:"E-mail can not be empty",
+ Emailincorrect:"Email is incorrect",
+ GettingVerificationCode:"Getting verification code",
+ CodeHasSent:"Verification code has been sent",
+ SendAfter:"Send after the countdown is over",
registerWelcomeText: "Getting Started",
registerCreate: "Create an account to continue!",
verificationCodeText: 'Verification Code',