From b46174545bd6da43b18ab22dc23910e59f69e36d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=93=E6=B3=A2?= <>
Date: Thu, 17 Oct 2024 00:36:38 +0800
Subject: [PATCH 1/4] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E7=94=A8?=
=?UTF-8?q?=E6=88=B7=E4=BF=A1=E6=81=AF=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/my-info/index.vue | 176 ++++++++++++++++++++++++++++++++++++
1 file changed, 176 insertions(+)
create mode 100644 src/pages/my-info/index.vue
diff --git a/src/pages/my-info/index.vue b/src/pages/my-info/index.vue
new file mode 100644
index 0000000..2787c16
--- /dev/null
+++ b/src/pages/my-info/index.vue
@@ -0,0 +1,176 @@
+
+{
+ layout: 'default',
+ style: {
+ navigationBarTitleText: '用户信息',
+ },
+}
+
+
+
+
+
+
+
+
+
+
+
+ 修改
+
+
+
+
+
+
+
+
+
+
+ 男
+ 女
+
+
+
+
+
+
+ 132****3456
+
+
+ 修改密码
+
+
+
+ 保持
+
+
+
+
+
+
+
+
--
Gitee
From 6b6be343e2a4bb4a861b335c6d168b4c472a8b73 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=B4=AB=E6=98=9F?= <1315228475@qq.com>
Date: Wed, 16 Oct 2024 17:22:32 +0800
Subject: [PATCH 2/4] =?UTF-8?q?feat:=20=E8=B0=83=E6=95=B4=E7=99=BB?=
=?UTF-8?q?=E5=BD=95=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.prettierrc | 6 +
.vscode/settings.json | 5 +
package.json | 1 +
src/pages.json | 1 +
src/pages/login/components/Banner.vue | 19 ++
src/pages/login/components/Copyright.vue | 15 ++
src/pages/login/components/LoginForm.vue | 248 +++++++++----------
src/pages/login/components/MoreLoginWays.vue | 16 ++
src/pages/login/components/PhoneLogin.vue | 40 +++
src/pages/login/index.vue | 84 +++----
src/style/iconfont.css | 6 +-
src/style/index.scss | 1 +
src/types/auto-import.d.ts | 93 +------
uno.config.ts | 28 ++-
14 files changed, 292 insertions(+), 271 deletions(-)
create mode 100644 .prettierrc
create mode 100644 src/pages/login/components/Banner.vue
create mode 100644 src/pages/login/components/Copyright.vue
create mode 100644 src/pages/login/components/MoreLoginWays.vue
create mode 100644 src/pages/login/components/PhoneLogin.vue
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 0000000..48d1d17
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,6 @@
+{
+ "semi": false,
+ "singleQuote": true,
+ "trailingComma": "none",
+ "vueIndentScriptAndStyle": true
+}
diff --git a/.vscode/settings.json b/.vscode/settings.json
index fec1619..ba2dad4 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -59,5 +59,10 @@
"CHANGELOG.md": "CHANGELOG*",
"package.json": "pnpm-lock.yaml,pnpm-workspace.yaml,LICENSE,.gitattributes,.gitignore,.gitpod.yml,CNAME,.npmrc,.browserslistrc",
".eslintrc.cjs": ".eslintignore,.prettierignore,.stylelintignore,.commitlintrc.*,.prettierrc.*,.stylelintrc.*,.eslintrc-auto-import.json,.editorconfig,.commitlint.cjs"
+ },
+ "editor.quickSuggestions": {
+ "other": "on",
+ "comments": "on",
+ "strings": "on"
}
}
diff --git a/package.json b/package.json
index 04106a1..095645c 100644
--- a/package.json
+++ b/package.json
@@ -88,6 +88,7 @@
"@dcloudio/uni-components": "3.0.0-alpha-4010520240507001",
"@dcloudio/uni-h5": "3.0.0-alpha-4010520240507001",
"@dcloudio/uni-mp-weixin": "3.0.0-alpha-4010520240507001",
+ "@iconify/json": "^2.2.260",
"dayjs": "1.11.10",
"pinia": "2.0.36",
"pinia-plugin-persistedstate": "3.2.1",
diff --git a/src/pages.json b/src/pages.json
index 5a442d8..51c1986 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -86,6 +86,7 @@
"path": "pages/login/index",
"type": "page",
"style": {
+ "navigationStyle": "custom",
"navigationBarTitleText": "登录页面"
}
},
diff --git a/src/pages/login/components/Banner.vue b/src/pages/login/components/Banner.vue
new file mode 100644
index 0000000..37d3cd1
--- /dev/null
+++ b/src/pages/login/components/Banner.vue
@@ -0,0 +1,19 @@
+
+
+
+
+
+ 你好
+
+
+ 欢迎登录芋道快速开发平台
+
+
+
+
+
+
+
+
diff --git a/src/pages/login/components/Copyright.vue b/src/pages/login/components/Copyright.vue
new file mode 100644
index 0000000..d9b9bd7
--- /dev/null
+++ b/src/pages/login/components/Copyright.vue
@@ -0,0 +1,15 @@
+
+
+
+
+ 已阅读并同意
+ 《用户协议》
+ 和
+ 《隐私政策》
+
+
+
+
diff --git a/src/pages/login/components/LoginForm.vue b/src/pages/login/components/LoginForm.vue
index b449cbb..5ada5cc 100644
--- a/src/pages/login/components/LoginForm.vue
+++ b/src/pages/login/components/LoginForm.vue
@@ -1,146 +1,140 @@
-
-
-
-
-
- handleInputFocus('tenantName')"
- />
-
-
-
- handleInputFocus('username')"
- />
-
-
-
- handleInputFocus('password')"
- />
-
-
-
-
-
-
- 登录
-
+
+
+
+
+
+
+
+ 记住
+
+
+
+ 登录
+
+
+
+ 本机号登录
+
+
-
+
diff --git a/src/pages/login/components/MoreLoginWays.vue b/src/pages/login/components/MoreLoginWays.vue
new file mode 100644
index 0000000..e770769
--- /dev/null
+++ b/src/pages/login/components/MoreLoginWays.vue
@@ -0,0 +1,16 @@
+
+
+
+ 更多登录方式
+
+
+
+
+
+
+
+
diff --git a/src/pages/login/components/PhoneLogin.vue b/src/pages/login/components/PhoneLogin.vue
new file mode 100644
index 0000000..670ca39
--- /dev/null
+++ b/src/pages/login/components/PhoneLogin.vue
@@ -0,0 +1,40 @@
+
+
+
+ handleInputFocus('tenantName')"
+ />
+
+ 还没有账号?
+
+
+
+
+ 下一步
+
+
+
+
+
diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue
index 9479b3b..583bd34 100644
--- a/src/pages/login/index.vue
+++ b/src/pages/login/index.vue
@@ -1,74 +1,66 @@
{
style: {
- navigationBarTitleText: '登录页面',
- },
+ navigationStyle: 'custom',
+ navigationBarTitleText: '登录页面'
+ }
}
-
+
-
-
- 你好
- 欢迎登录芋道快速开发平台
-
-
-
-
+
+
-
+
-
- 手机号登录
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
- 已阅读并同意
- 《用户协议》
- 和
- 《隐私政策》
-
+
diff --git a/src/style/iconfont.css b/src/style/iconfont.css
index 35da86c..b6dd117 100644
--- a/src/style/iconfont.css
+++ b/src/style/iconfont.css
@@ -3,8 +3,10 @@
src:
url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAOwAAsAAAAAB9AAAANjAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACDHAqDBIJqATYCJAMQCwoABCAFhGcHPRvnBsgusG3kMyE15/44PsBX09waBHv0REDt97oHAQDFrOIyPirRiULQ+TJcXV0hCYTuVFcBC915/2vX/32Q80hkZ5PZGZ9snvwruVLloidKqYN6iKC53bOtbKwVLSIi3W6zCWZbs3VbER3j9JpGX3ySYcc94IQRTK5s4epS/jSqIgvg37qlY2/jwQN7D9ADpfRCmIknQByTscVZPTBr+hnnCKg2o4bjakvXEPjuY65DJGeJNtBUhn1JxOBuB2UZmUpBOXdsFp4oxOv4GHgs3h/+wRDcicqSZJG1q9kK1z/Af9NpqxjpC2QaAdpHlCFh4spcYXs5sMWpSk5wUj31G2dLQKVKkZ/w7f/8/i/A3JVUSZK9f7xIKJeU14IFpBI/Qfkkz46GT/CuaGREfCtKJUougWeQWHvVC5Lcz2BGS+SePR99vj3yjJx7h574tp7uWcOh4yfaTjS/245TT/vkQrN+a7RLkK8+Vd+bz+FSGh+9srDQKPeJ2s29z7ah4+efdoxefRbbGwfy7ht+SuIWukzsu1b6ePP+6kN1aamb47qsPim1Ia3xdEpDcl1dckPKGYnneI23+57r2W1Mmkqs6ajrChRCs5qyQ66rTVWhgZaG7toOeHm5cxn0sSQuNDEgcUTdNTSupKI1JRZih/JssAUKezPeOJJzbNozF6zWJuuVavVU5Tgtkop/SDzHa7ytvnCTq0PhkEfi4xLLtb0PuwyOAYqmrYQApFJyoJjTnfz+ve94vvv2f/yWgxl8Jd8Di2DRDPuob59mU/+VfDCROQyR8xSnmP9fXm7liagmN39OlmbvjqG0sMsJKrU0EFXogaRSH5bNY1CmxhyUq7QC1cY1T67RwuQk5CoM2RUQNLoEUb03kDS6h2XzcyjT7iOUa/QXqq1Hn6/GUBAaGcGcWJFlGUmCoVOp8kLvABHnVczGYiOE2SVEUH5OXj/TSnTCDjHAviAWcE4RZYaGWszNiKoayGSGTASeY+PcrMjNpVMvyREMDRoxBMYRVojFMkQiMOhohubdzxtAiOapMMbERpKMnQT9SL4ceQysVdJZVa9kEbsFogIcRyEUE2kN0mL7CDVIGhBzupWMEHA5bDvipgq5hKJcKef8ivbx1kC15KgcYkghhzLxYNntxoKCReJ82jAHAAA=')
format('woff2'),
- url('//at.alicdn.com/t/c/font_4543091_njpo5b95nl.woff?t=1715485842402') format('woff'),
- url('//at.alicdn.com/t/c/font_4543091_njpo5b95nl.ttf?t=1715485842402') format('truetype');
+ url('//at.alicdn.com/t/c/font_4543091_njpo5b95nl.woff?t=1715485842402')
+ format('woff'),
+ url('//at.alicdn.com/t/c/font_4543091_njpo5b95nl.ttf?t=1715485842402')
+ format('truetype');
}
.iconfont {
diff --git a/src/style/index.scss b/src/style/index.scss
index 4a9f82c..97a0a2b 100644
--- a/src/style/index.scss
+++ b/src/style/index.scss
@@ -10,6 +10,7 @@
:root,
page {
+ --wot-color-primary: #4f79f9;
// 修改按主题色
// --wot-color-theme: #37c2bc;
diff --git a/src/types/auto-import.d.ts b/src/types/auto-import.d.ts
index 6351212..117a03d 100644
--- a/src/types/auto-import.d.ts
+++ b/src/types/auto-import.d.ts
@@ -59,6 +59,7 @@ declare global {
const onUnload: typeof import('@dcloudio/uni-app')['onUnload']
const onUnmounted: typeof import('vue')['onUnmounted']
const onUpdated: typeof import('vue')['onUpdated']
+ const onWatcherCleanup: typeof import('vue')['onWatcherCleanup']
const provide: typeof import('vue')['provide']
const reactive: typeof import('vue')['reactive']
const readonly: typeof import('vue')['readonly']
@@ -76,9 +77,12 @@ declare global {
const useAttrs: typeof import('vue')['useAttrs']
const useCssModule: typeof import('vue')['useCssModule']
const useCssVars: typeof import('vue')['useCssVars']
+ const useId: typeof import('vue')['useId']
+ const useModel: typeof import('vue')['useModel']
const useNavbarWeixin: (typeof import('../hooks/useNavbarWeixin'))['default']
const useRequest: typeof import('../hooks/useRequest')['default']
const useSlots: typeof import('vue')['useSlots']
+ const useTemplateRef: typeof import('vue')['useTemplateRef']
const useUpload: typeof import('../hooks/useUpload')['default']
const useUpload2: typeof import('../hooks/useUpload2')['default']
const watch: typeof import('vue')['watch']
@@ -89,7 +93,7 @@ declare global {
// for type re-export
declare global {
// @ts-ignore
- export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
+ export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
import('vue')
}
// for vue template auto import
@@ -151,6 +155,7 @@ declare module 'vue' {
readonly onUnload: UnwrapRef
readonly onUnmounted: UnwrapRef
readonly onUpdated: UnwrapRef
+ readonly onWatcherCleanup: UnwrapRef
readonly provide: UnwrapRef
readonly reactive: UnwrapRef
readonly readonly: UnwrapRef
@@ -168,91 +173,11 @@ declare module 'vue' {
readonly useAttrs: UnwrapRef
readonly useCssModule: UnwrapRef
readonly useCssVars: UnwrapRef
+ readonly useId: UnwrapRef
+ readonly useModel: UnwrapRef
readonly useRequest: UnwrapRef
readonly useSlots: UnwrapRef
- readonly useUpload: UnwrapRef
- readonly watch: UnwrapRef
- readonly watchEffect: UnwrapRef
- readonly watchPostEffect: UnwrapRef
- readonly watchSyncEffect: UnwrapRef
- }
-}
-declare module '@vue/runtime-core' {
- interface GlobalComponents {}
- interface ComponentCustomProperties {
- readonly EffectScope: UnwrapRef
- readonly computed: UnwrapRef
- readonly createApp: UnwrapRef
- readonly customRef: UnwrapRef
- readonly defineAsyncComponent: UnwrapRef
- readonly defineComponent: UnwrapRef
- readonly effectScope: UnwrapRef
- readonly getCurrentInstance: UnwrapRef
- readonly getCurrentScope: UnwrapRef
- readonly h: UnwrapRef
- readonly inject: UnwrapRef
- readonly isProxy: UnwrapRef
- readonly isReactive: UnwrapRef
- readonly isReadonly: UnwrapRef
- readonly isRef: UnwrapRef
- readonly markRaw: UnwrapRef
- readonly nextTick: UnwrapRef
- readonly onActivated: UnwrapRef
- readonly onAddToFavorites: UnwrapRef
- readonly onBackPress: UnwrapRef
- readonly onBeforeMount: UnwrapRef
- readonly onBeforeUnmount: UnwrapRef
- readonly onBeforeUpdate: UnwrapRef
- readonly onDeactivated: UnwrapRef
- readonly onError: UnwrapRef
- readonly onErrorCaptured: UnwrapRef
- readonly onHide: UnwrapRef
- readonly onLaunch: UnwrapRef
- readonly onLoad: UnwrapRef
- readonly onMounted: UnwrapRef
- readonly onNavigationBarButtonTap: UnwrapRef
- readonly onNavigationBarSearchInputChanged: UnwrapRef
- readonly onNavigationBarSearchInputClicked: UnwrapRef
- readonly onNavigationBarSearchInputConfirmed: UnwrapRef
- readonly onNavigationBarSearchInputFocusChanged: UnwrapRef
- readonly onPageNotFound: UnwrapRef
- readonly onPageScroll: UnwrapRef
- readonly onPullDownRefresh: UnwrapRef
- readonly onReachBottom: UnwrapRef
- readonly onReady: UnwrapRef
- readonly onRenderTracked: UnwrapRef
- readonly onRenderTriggered: UnwrapRef
- readonly onResize: UnwrapRef
- readonly onScopeDispose: UnwrapRef
- readonly onServerPrefetch: UnwrapRef
- readonly onShareAppMessage: UnwrapRef
- readonly onShareTimeline: UnwrapRef
- readonly onShow: UnwrapRef
- readonly onTabItemTap: UnwrapRef
- readonly onThemeChange: UnwrapRef
- readonly onUnhandledRejection: UnwrapRef
- readonly onUnload: UnwrapRef
- readonly onUnmounted: UnwrapRef
- readonly onUpdated: UnwrapRef
- readonly provide: UnwrapRef
- readonly reactive: UnwrapRef
- readonly readonly: UnwrapRef
- readonly ref: UnwrapRef
- readonly resolveComponent: UnwrapRef
- readonly shallowReactive: UnwrapRef
- readonly shallowReadonly: UnwrapRef
- readonly shallowRef: UnwrapRef
- readonly toRaw: UnwrapRef
- readonly toRef: UnwrapRef
- readonly toRefs: UnwrapRef
- readonly toValue: UnwrapRef
- readonly triggerRef: UnwrapRef
- readonly unref: UnwrapRef
- readonly useAttrs: UnwrapRef
- readonly useCssModule: UnwrapRef
- readonly useCssVars: UnwrapRef
- readonly useRequest: UnwrapRef
- readonly useSlots: UnwrapRef
+ readonly useTemplateRef: UnwrapRef
readonly useUpload: UnwrapRef
readonly watch: UnwrapRef
readonly watchEffect: UnwrapRef
diff --git a/uno.config.ts b/uno.config.ts
index 1c15aad..b279350 100644
--- a/uno.config.ts
+++ b/uno.config.ts
@@ -6,10 +6,14 @@ import {
presetAttributify,
presetIcons,
transformerDirectives,
- transformerVariantGroup,
+ transformerVariantGroup
} from 'unocss'
-import { presetApplet, presetRemRpx, transformerAttributify } from 'unocss-applet'
+import {
+ presetApplet,
+ presetRemRpx,
+ transformerAttributify
+} from 'unocss-applet'
// @see https://unocss.dev/presets/legacy-compat
// import { presetLegacyCompat } from '@unocss/preset-legacy-compat'
@@ -25,7 +29,7 @@ if (isMp) {
// 非小程序用官方预设
presetUno(),
// 支持css class属性化
- presetAttributify(),
+ presetAttributify()
)
}
export default defineConfig({
@@ -37,9 +41,9 @@ export default defineConfig({
warn: true,
extraProperties: {
display: 'inline-block',
- 'vertical-align': 'middle',
- },
- }),
+ 'vertical-align': 'middle'
+ }
+ })
// 将颜色函数 (rgb()和hsl()) 从空格分隔转换为逗号分隔,更好的兼容性app端,example:
// `rgb(255 0 0)` -> `rgb(255, 0, 0)`
// `rgba(255 0 0 / 0.5)` -> `rgba(255, 0, 0, 0.5)`
@@ -63,20 +67,20 @@ export default defineConfig({
transformerAttributify({
// 解决与第三方框架样式冲突问题
prefixedOnly: true,
- prefix: 'fg',
- }),
+ prefix: 'fg'
+ })
],
rules: [
[
'p-safe',
{
padding:
- 'env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)',
- },
+ 'env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)'
+ }
],
['pt-safe', { 'padding-top': 'env(safe-area-inset-top)' }],
- ['pb-safe', { 'padding-bottom': 'env(safe-area-inset-bottom)' }],
- ],
+ ['pb-safe', { 'padding-bottom': 'env(safe-area-inset-bottom)' }]
+ ]
})
/**
--
Gitee
From 9a7adcf3388b68c29e09898e5756a22b40b33898 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=B4=AB=E6=98=9F?= <1315228475@qq.com>
Date: Thu, 17 Oct 2024 17:22:00 +0800
Subject: [PATCH 3/4] =?UTF-8?q?feat:=20=E8=B0=83=E6=95=B4=E9=A6=96?=
=?UTF-8?q?=E9=A1=B5=E6=A0=B7=E5=BC=8F=EF=BC=8C=E6=96=B0=E5=A2=9E=E4=B8=80?=
=?UTF-8?q?=E4=BA=9B=E7=99=BB=E5=BD=95=E7=9B=B8=E5=85=B3=E7=9A=84=E4=BA=A4?=
=?UTF-8?q?=E4=BA=92=E5=AD=90=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/App.vue | 126 ++++++++++---------
src/layouts/default.vue | 14 +--
src/pages.json | 21 ++++
src/pages/login/components/Banner.vue | 16 ++-
src/pages/login/components/Copyright.vue | 21 +++-
src/pages/login/components/LoginForm.vue | 81 ++++++------
src/pages/login/components/MoreLoginWays.vue | 8 +-
src/pages/login/components/PhoneLogin.vue | 14 +--
src/pages/login/forget.vue | 52 ++++++++
src/pages/login/index.vue | 17 ++-
src/pages/login/phone-index.vue | 38 ++++++
src/pages/login/registerCode.vue | 53 ++++++++
src/style/index.scss | 1 +
src/types/uni-pages.d.ts | 3 +
14 files changed, 329 insertions(+), 136 deletions(-)
create mode 100644 src/pages/login/forget.vue
create mode 100644 src/pages/login/phone-index.vue
create mode 100644 src/pages/login/registerCode.vue
diff --git a/src/App.vue b/src/App.vue
index 21c41bb..f4fa074 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 768d875..4d0b0da 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 51c1986..097498d 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 37d3cd1..36d83cb 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 d9b9bd7..f47ab9c 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 5ada5cc..6ac0595 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 e770769..e99d9ad 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 670ca39..0cc9174 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 0000000..7b643f6
--- /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 583bd34..e1b503d 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 0000000..2f7f99d
--- /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 0000000..d275f8e
--- /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 97a0a2b..bdb7553 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 b2589ec..e495193 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";
}
--
Gitee
From 233d5335ad0c3e8f290f93bb84d63d0884849c44 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=93=E6=B3=A2?= <>
Date: Sat, 19 Oct 2024 00:20:10 +0800
Subject: [PATCH 4/4] =?UTF-8?q?fix:=20=E5=AE=8C=E5=96=84=E7=94=A8=E6=88=B7?=
=?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=A1=B5=E9=9D=A2=EF=BC=9A=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E5=A4=B4=E5=83=8F=E3=80=81=E4=BF=AE=E6=94=B9=E4=BF=A1=E6=81=AF?=
=?UTF-8?q?=E3=80=81=E4=BF=AE=E6=94=B9=E5=AF=86=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/my-info/components/PasswordEdit.vue | 118 ++++
src/pages/my-info/index.vue | 516 ++++++++++++++----
src/service/my-info/MyInfoAPI.ts | 28 +
3 files changed, 550 insertions(+), 112 deletions(-)
create mode 100644 src/pages/my-info/components/PasswordEdit.vue
create mode 100644 src/service/my-info/MyInfoAPI.ts
diff --git a/src/pages/my-info/components/PasswordEdit.vue b/src/pages/my-info/components/PasswordEdit.vue
new file mode 100644
index 0000000..d8d68a7
--- /dev/null
+++ b/src/pages/my-info/components/PasswordEdit.vue
@@ -0,0 +1,118 @@
+
+
+
+
+
+ 修改密码
+
+
+
+
+
+
+ 取消
+ 确认
+
+
+
+
+
+
diff --git a/src/pages/my-info/index.vue b/src/pages/my-info/index.vue
index 2787c16..02721b8 100644
--- a/src/pages/my-info/index.vue
+++ b/src/pages/my-info/index.vue
@@ -2,175 +2,467 @@
{
layout: 'default',
style: {
- navigationBarTitleText: '用户信息',
- },
+ navigationBarTitleText: '用户信息'
+ }
}
-
-
-
+
+
diff --git a/src/service/my-info/MyInfoAPI.ts b/src/service/my-info/MyInfoAPI.ts
new file mode 100644
index 0000000..29c2bc1
--- /dev/null
+++ b/src/service/my-info/MyInfoAPI.ts
@@ -0,0 +1,28 @@
+import { http, httpGet, httpPost } from '@/utils/http'
+
+/**
+ * 获取用户信息
+ */
+export const getUserProfile = () => {
+ return httpGet('/system/user/profile/get')
+}
+/**
+ * 修改用户个人信息
+ */
+export const userProfileUpdate = (data) => {
+ return http({
+ url: '/system/user/profile/update',
+ method: 'PUT',
+ data
+ })
+}
+/**
+ * 修改用户个人密码
+ */
+export const userProfileUpdatePassword = (data) => {
+ return http({
+ url: '/system/user/profile/update-password',
+ method: 'PUT',
+ data
+ })
+}
--
Gitee