diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000000000000000000000000000000000000..48d1d17cef5dccae17449526f068804f061cf46f --- /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 fec16197c725f4dc709bb9cbbad20ffd3bc00bc0..ba2dad46fbead7e9cc53073139e91e79d358ba01 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 04106a1168837061dd18393e2a9b95cde06ee4ca..095645cd3283f065e42a494b77aecf760747f14e 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/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 @@ diff --git a/src/pages.json b/src/pages.json index 5a442d81275ddd3717305d9793d629753b3f9443..097498da631d4e561ab4ecd111449cf66b4f3ad8 100644 --- a/src/pages.json +++ b/src/pages.json @@ -82,13 +82,35 @@ "navigationBarTitleText": "通讯录" } }, + { + "path": "pages/login/forget", + "type": "page", + "style": { + "navigationBarTitleText": "忘记密码" + } + }, { "path": "pages/login/index", "type": "page", "style": { + "navigationStyle": "custom", "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 new file mode 100644 index 0000000000000000000000000000000000000000..36d83cb719e7b7f8d57803e3956177eeb77f499c --- /dev/null +++ b/src/pages/login/components/Banner.vue @@ -0,0 +1,23 @@ + + + + diff --git a/src/pages/login/components/Copyright.vue b/src/pages/login/components/Copyright.vue new file mode 100644 index 0000000000000000000000000000000000000000..f47ab9c7fab1cac3261c9a132de08f0ffbd1a66c --- /dev/null +++ b/src/pages/login/components/Copyright.vue @@ -0,0 +1,30 @@ + + + + diff --git a/src/pages/login/components/LoginForm.vue b/src/pages/login/components/LoginForm.vue index b449cbb129f3a2575bb08ab9b24c9e7124ac14a9..6ac059542fbed61aa28a3dc5f3cbc7229a164584 100644 --- a/src/pages/login/components/LoginForm.vue +++ b/src/pages/login/components/LoginForm.vue @@ -1,146 +1,141 @@ diff --git a/src/pages/login/components/MoreLoginWays.vue b/src/pages/login/components/MoreLoginWays.vue new file mode 100644 index 0000000000000000000000000000000000000000..e99d9ada09206ea821ef33c7d73ab3ead6473b61 --- /dev/null +++ b/src/pages/login/components/MoreLoginWays.vue @@ -0,0 +1,14 @@ + + + + diff --git a/src/pages/login/components/PhoneLogin.vue b/src/pages/login/components/PhoneLogin.vue new file mode 100644 index 0000000000000000000000000000000000000000..0cc9174a07f6b37b13e08fc8e5f670ae2ec71233 --- /dev/null +++ b/src/pages/login/components/PhoneLogin.vue @@ -0,0 +1,36 @@ + + + + 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 9479b3b234f9272b67a23b3a3be2210266d57ace..e1b503de93c017c852f2f603af7b7d8535744724 100644 --- a/src/pages/login/index.vue +++ b/src/pages/login/index.vue @@ -1,74 +1,65 @@ { style: { - navigationBarTitleText: '登录页面', - }, + navigationStyle: 'custom', + navigationBarTitleText: '登录页面' + } } 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: '' + } +} + + + + + + + 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: '获取验证码' + } +} + + + + + + + diff --git a/src/pages/my-info/components/PasswordEdit.vue b/src/pages/my-info/components/PasswordEdit.vue new file mode 100644 index 0000000000000000000000000000000000000000..d8d68a73eed0a4ddfbc1af9e9ecf60fab811425a --- /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 new file mode 100644 index 0000000000000000000000000000000000000000..02721b82f6341d66efe952d958645393157b596e --- /dev/null +++ b/src/pages/my-info/index.vue @@ -0,0 +1,468 @@ + +{ + layout: 'default', + style: { + navigationBarTitleText: '用户信息' + } +} + + + + + + diff --git a/src/service/my-info/MyInfoAPI.ts b/src/service/my-info/MyInfoAPI.ts new file mode 100644 index 0000000000000000000000000000000000000000..29c2bc184201df7c38995940802abeaff8eebf88 --- /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 + }) +} diff --git a/src/style/iconfont.css b/src/style/iconfont.css index 35da86c69d0f0d8eeb0a21366d43301850e13e95..b6dd1178787bdffac85d6d777ed0a7b3aa51f191 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 4a9f82c86784b66614dc325661b07c36a609b2a6..bdb75539c39e617c3050af1d7a1259d7876d542a 100644 --- a/src/style/index.scss +++ b/src/style/index.scss @@ -10,6 +10,8 @@ :root, page { + --wot-color-primary: #4f79f9; + --wot-color-secondary: #727d7c; // 修改按主题色 // --wot-color-theme: #37c2bc; diff --git a/src/types/auto-import.d.ts b/src/types/auto-import.d.ts index 635121282d144f41c0a68bc4c01ec089bd452f55..117a03d634d9d3d963cd9d4b6a1dd12f593b7f6f 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/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"; } diff --git a/uno.config.ts b/uno.config.ts index 1c15aad197ceb767abf8a6331edfb8d7416dc821..b2793507aced6d962e7801aba6982ee1d55214f5 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)' }] + ] }) /**