diff --git a/src/App.vue b/src/App.vue
index 21c41bbdf60122843e6e2446914adfbe535db153..f4fa07434758552f6bbf7c902160e6eae4d69470 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,62 +1,74 @@
diff --git a/src/layouts/default.vue b/src/layouts/default.vue
index 768d87501f8d6f885aeca4697685b1f028edb05e..4d0b0dadc08354d672439131e43b085b9737543b 100644
--- a/src/layouts/default.vue
+++ b/src/layouts/default.vue
@@ -1,5 +1,5 @@
-
+
@@ -7,11 +7,11 @@
diff --git a/src/pages.json b/src/pages.json
index 51c19862a1867b6bfad93c189845fc4e231aaa6f..097498da631d4e561ab4ecd111449cf66b4f3ad8 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -82,6 +82,13 @@
"navigationBarTitleText": "通讯录"
}
},
+ {
+ "path": "pages/login/forget",
+ "type": "page",
+ "style": {
+ "navigationBarTitleText": "忘记密码"
+ }
+ },
{
"path": "pages/login/index",
"type": "page",
@@ -90,6 +97,20 @@
"navigationBarTitleText": "登录页面"
}
},
+ {
+ "path": "pages/login/phone-index",
+ "type": "page",
+ "style": {
+ "navigationBarTitleText": ""
+ }
+ },
+ {
+ "path": "pages/login/registerCode",
+ "type": "page",
+ "style": {
+ "navigationBarTitleText": "获取验证码"
+ }
+ },
{
"path": "pages/message/index",
"type": "page",
diff --git a/src/pages/login/components/Banner.vue b/src/pages/login/components/Banner.vue
index 37d3cd106779597e52faecd46f12437749a699b0..36d83cb719e7b7f8d57803e3956177eeb77f499c 100644
--- a/src/pages/login/components/Banner.vue
+++ b/src/pages/login/components/Banner.vue
@@ -1,16 +1,20 @@
-
-
+
+
- 你好
+ 你好
-
- 欢迎登录芋道快速开发平台
+
+ 欢迎登录芋道快速开发平台
-
+
diff --git a/src/pages/login/components/Copyright.vue b/src/pages/login/components/Copyright.vue
index d9b9bd73e7401c5f0c7c8b02858224d02dfac93b..f47ab9c7fab1cac3261c9a132de08f0ffbd1a66c 100644
--- a/src/pages/login/components/Copyright.vue
+++ b/src/pages/login/components/Copyright.vue
@@ -1,7 +1,7 @@
-
-
+
+
已阅读并同意
《用户协议》
和
@@ -11,5 +11,20 @@
diff --git a/src/pages/login/components/LoginForm.vue b/src/pages/login/components/LoginForm.vue
index 5ada5ccdfaf23a22e57a8e050854556e1f62ce48..6ac059542fbed61aa28a3dc5f3cbc7229a164584 100644
--- a/src/pages/login/components/LoginForm.vue
+++ b/src/pages/login/components/LoginForm.vue
@@ -1,6 +1,6 @@
-
+
-
+
记住
-
+
+ 忘记密码
+
登录
@@ -47,8 +45,8 @@
:round="false"
:plain="true"
type="info"
- class="mt-20rpx"
- @click="handleLogin"
+ class="mt-4"
+ @click="handleLogin('phoneIndex')"
>
本机号登录
@@ -65,14 +63,6 @@
import { useUserStore } from '@/store'
import * as authUtil from '@/utils/auth'
- // 提示组件 TODO @ Qiksy 讨论:// 提示组件 这种,我们要不放在 useToast(),作为尾注释,简洁一点。
- const toast = useToast()
-
- const focusInput = ref('')
- const handleInputFocus = (type: string) => {
- focusInput.value = type
- }
-
const props = defineProps({
agree: {
type: Boolean,
@@ -81,6 +71,14 @@
}
})
+ // 提示组件 TODO @ Qiksy 讨论:// 提示组件 这种,我们要不放在 useToast(),作为尾注释,简洁一点。
+ const toast = useToast()
+
+ const focusInput = ref('')
+ const handleInputFocus = (type: string) => {
+ focusInput.value = type
+ }
+
const loginData = reactive({
isShowPassword: false,
captchaEnable: import.meta.env.VITE_APP_CAPTCHA_ENABLE,
@@ -104,37 +102,40 @@
}
}
- const handleLogin = async () => {
- console.log('账号密码登录')
- focusInput.value = ''
+ const handleLogin = async (type: string) => {
if (!props.agree) {
toast.warning('请阅读并同意《用户协议》和《隐私政策》')
return
}
+ if (type === 'userinfo') {
+ focusInput.value = ''
- // 1. 先根据租户名,获取 tenantId
- await getTenantId()
+ // 1. 先根据租户名,获取 tenantId
+ await getTenantId()
- // todo 校验form数据
- const res = await login(loginData.loginForm)
- if (!res) {
- return
- }
+ // todo 校验form数据
+ const res = await login(loginData.loginForm)
+ if (!res) {
+ return
+ }
- authUtil.setToken(res)
+ authUtil.setToken(res)
- // 获取用户信息,保存到 store
- const userStore = useUserStore()
- await userStore.setUserInfoAction()
+ // 获取用户信息,保存到 store
+ const userStore = useUserStore()
+ await userStore.setUserInfoAction()
- // 暂时先跳到首页
- uni.switchTab({
- url: '/pages/work/index'
- })
- console.log('登录成功')
+ // 暂时先跳到首页
+ uni.switchTab({
+ url: '/pages/work/index'
+ })
+ console.log('登录成功')
- // todo 判断重定向
+ // todo 判断重定向
- // todo 处理页面loading展示
+ // todo 处理页面loading展示
+ } else {
+ uni.navigateTo({ url: '/pages/login/phone-index' })
+ }
}
diff --git a/src/pages/login/components/MoreLoginWays.vue b/src/pages/login/components/MoreLoginWays.vue
index e770769cb09b349436dbe961ce18089b4b23417b..e99d9ada09206ea821ef33c7d73ab3ead6473b61 100644
--- a/src/pages/login/components/MoreLoginWays.vue
+++ b/src/pages/login/components/MoreLoginWays.vue
@@ -1,12 +1,10 @@
- 更多登录方式
+ 更多登录方式
-
-
+
+
diff --git a/src/pages/login/components/PhoneLogin.vue b/src/pages/login/components/PhoneLogin.vue
index 670ca3935fb452db0786349a9c8b5e54cae6926f..0cc9174a07f6b37b13e08fc8e5f670ae2ec71233 100644
--- a/src/pages/login/components/PhoneLogin.vue
+++ b/src/pages/login/components/PhoneLogin.vue
@@ -4,21 +4,17 @@
handleInputFocus('tenantName')"
/>
-
+
还没有账号?
-
+
+ 注册账号
+
-
+
下一步
diff --git a/src/pages/login/forget.vue b/src/pages/login/forget.vue
new file mode 100644
index 0000000000000000000000000000000000000000..7b643f65b303d2e924c4778fc99e34a77e614cf5
--- /dev/null
+++ b/src/pages/login/forget.vue
@@ -0,0 +1,52 @@
+
+{
+ style: {
+ navigationBarTitleText: '忘记密码'
+ }
+}
+
+
+
+
+ 忘记密码
+
+
+
+
+ 获取验证码
+
+
+
+
+
+
+
+
diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue
index 583bd34387a5b0976fcbb9500f49ab1d422de43a..e1b503de93c017c852f2f603af7b7d8535744724 100644
--- a/src/pages/login/index.vue
+++ b/src/pages/login/index.vue
@@ -8,17 +8,14 @@
-
+
-
-
+
-
+
@@ -26,12 +23,14 @@
+
+
-
+
-
+
@@ -48,7 +47,7 @@
// 用户名登录
import LoginForm from '@/pages/login/components/LoginForm.vue'
- const tab = ref(1) // tabs的索引
+ const tab = ref(0) // tabs的索引
const agree = ref(false) // 是否同意协议
onLoad(() => {
diff --git a/src/pages/login/phone-index.vue b/src/pages/login/phone-index.vue
new file mode 100644
index 0000000000000000000000000000000000000000..2f7f99d08bd0d3e6ef6275df11e52143a41fe4ab
--- /dev/null
+++ b/src/pages/login/phone-index.vue
@@ -0,0 +1,38 @@
+
+{
+ style: {
+ navigationBarTitleText: ''
+ }
+}
+
+
+
+
+ {{ phoneNo }}
+
+ 认证服务由中国移动提供
+
+
+ 本机号一键登录
+
+
+ 其他登录方式
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/login/registerCode.vue b/src/pages/login/registerCode.vue
new file mode 100644
index 0000000000000000000000000000000000000000..d275f8ec1a7027937a2bc9add216e3a9fd6df414
--- /dev/null
+++ b/src/pages/login/registerCode.vue
@@ -0,0 +1,53 @@
+
+{
+ style: {
+ navigationBarTitleText: '获取验证码'
+ }
+}
+
+
+
+
+ 验证手机号
+
+ 请输入发送至
+ {{ phoneNo }}
+ 的6位验证码,有效期10分钟。如未收到,请重新获取验证码
+
+
+
+
+
+
+
+ {{ loadTime }}秒后可重新获取验证码
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/style/index.scss b/src/style/index.scss
index 97a0a2b8d58a1c73b3920313006f3d720b34b57f..bdb75539c39e617c3050af1d7a1259d7876d542a 100644
--- a/src/style/index.scss
+++ b/src/style/index.scss
@@ -11,6 +11,7 @@
:root,
page {
--wot-color-primary: #4f79f9;
+ --wot-color-secondary: #727d7c;
// 修改按主题色
// --wot-color-theme: #37c2bc;
diff --git a/src/types/uni-pages.d.ts b/src/types/uni-pages.d.ts
index b2589ec0f85507fa8e3f888d7f2e6e18a4da3f10..e495193c56de8fe0f53d314fa19156d1ba519df3 100644
--- a/src/types/uni-pages.d.ts
+++ b/src/types/uni-pages.d.ts
@@ -7,7 +7,10 @@ interface NavigateToOptions {
url: "/pages/work/index" |
"/pages/colab/index" |
"/pages/contacts/index" |
+ "/pages/login/forget" |
"/pages/login/index" |
+ "/pages/login/phone-index" |
+ "/pages/login/registerCode" |
"/pages/message/index" |
"/pages/my/index";
}