From 03d1d54bc10bc2198048a322e1dcdcd32eac7ad8 Mon Sep 17 00:00:00 2001 From: Mickey wu Date: Sun, 24 May 2026 11:27:50 +0800 Subject: [PATCH 1/3] =?UTF-8?q?chore:=20=E5=BF=BD=E7=95=A5=20TypeScript=20?= =?UTF-8?q?6.0=20=E5=BC=83=E7=94=A8=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index 3ebffa5..e841100 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,7 +8,7 @@ "strict": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, - + "ignoreDeprecations": "6.0", "sourceMap": true, "baseUrl": ".", "paths": { From 6be3f411612e4f948d32da8666035b3dc517aaca Mon Sep 17 00:00:00 2001 From: Mickey wu Date: Sun, 24 May 2026 11:28:16 +0800 Subject: [PATCH 2/3] =?UTF-8?q?refactor:=20=E6=9B=B4=E6=96=B0=20useDialog?= =?UTF-8?q?=20=E8=B0=83=E7=94=A8=E6=96=B9=E5=BC=8F=E5=B9=B6=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/mine/account/index.vue | 466 +++++++--------- src/pages/mine/index.vue | 6 +- src/pages/mine/profile/complete-profile.vue | 569 +++++++++----------- src/pages/mine/settings/theme/index.vue | 4 +- 4 files changed, 458 insertions(+), 587 deletions(-) diff --git a/src/pages/mine/account/index.vue b/src/pages/mine/account/index.vue index 84902d1..b7376ae 100644 --- a/src/pages/mine/account/index.vue +++ b/src/pages/mine/account/index.vue @@ -2,27 +2,10 @@ - - - + + + @@ -30,84 +13,28 @@ - - + + - - - + + + 提交 - + - - + + @@ -117,37 +44,14 @@ 提交 - + - - + + @@ -161,172 +65,172 @@ diff --git a/src/pages/mine/index.vue b/src/pages/mine/index.vue index 38ac1a0..7e0b1ae 100644 --- a/src/pages/mine/index.vue +++ b/src/pages/mine/index.vue @@ -212,7 +212,7 @@ import { getAccessToken } from "@/utils/auth"; import { formatBytes } from "@/utils/format"; const toast = useToast(); -const { messageBox } = useDialog(); + const { confirm } = useDialog(); const userStore = useUserStore(); const themeStore = useThemeStore(); @@ -391,10 +391,10 @@ const handleClearCache = async () => { const handleLogout = async () => { try { - await messageBox({ + await confirm({ title: "提示", msg: "确定要退出登录吗?", - type: "warning", + headerImage: "warning", }); userStore.logout(); toast.success("已退出登录"); diff --git a/src/pages/mine/profile/complete-profile.vue b/src/pages/mine/profile/complete-profile.vue index e6d2369..6cc24be 100644 --- a/src/pages/mine/profile/complete-profile.vue +++ b/src/pages/mine/profile/complete-profile.vue @@ -15,27 +15,21 @@ - - + @@ -45,22 +39,11 @@ * - + - + @@ -79,27 +62,15 @@ 手机号 * - + - + 完成 @@ -108,301 +79,297 @@ - + diff --git a/src/pages/mine/settings/theme/index.vue b/src/pages/mine/settings/theme/index.vue index 7bb6747..5988eb9 100644 --- a/src/pages/mine/settings/theme/index.vue +++ b/src/pages/mine/settings/theme/index.vue @@ -122,7 +122,7 @@ import { useToast, useDialog } from "@wot-ui/ui"; const { isDark, themeVars, themeColorOptions, toggleTheme, setThemeColor } = useTheme(); const toast = useToast(); -const { messageBox } = useDialog(); + const { confirm } = useDialog(); // 创建响应式的计算属性 const isDarkMode = computed(() => isDark.value); @@ -195,7 +195,7 @@ const applyCustomColor = () => { // 重置为默认主题 const handleResetTheme = async () => { try { - await messageBox({ title: "确认重置", msg: "确定要重置为默认主题吗?", type: "warning" }); + await confirm({ title: "确认重置", msg: "确定要重置为默认主题吗?", headerImage: "warning" }); setThemeColor(themeColorOptions[0]); customColor.value = themeColorOptions[0].primary; toast.success("已重置为默认主题"); From 705182de678f0bb2bb6ee9fe1583da3eba52a5dd Mon Sep 17 00:00:00 2001 From: Mickey wu Date: Sun, 24 May 2026 11:59:45 +0800 Subject: [PATCH 3/3] =?UTF-8?q?refactor:=20=E6=9B=B4=E6=96=B0=20useDialog?= =?UTF-8?q?=20=E8=B0=83=E7=94=A8=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/mine/account/index.vue | 6 +++--- src/pages/mine/index.vue | 6 +++--- src/pages/mine/profile/complete-profile.vue | 4 ++-- src/pages/mine/settings/theme/index.vue | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/pages/mine/account/index.vue b/src/pages/mine/account/index.vue index 84902d1..0db3226 100644 --- a/src/pages/mine/account/index.vue +++ b/src/pages/mine/account/index.vue @@ -172,7 +172,7 @@ import UserAPI, { } from "@/api/user"; const toast = useToast(); -const { messageBox } = useDialog(); + const { confirm } = useDialog(); const validatorConfirmPassword = (value: string) => { if (!value) { @@ -225,10 +225,10 @@ const { countdown: emailCountdown, start: startEmailCountdown } = useCountdown(6 const handleUnbindWechat = async () => { try { - await messageBox({ + await confirm({ title: "提示", msg: "确定要解绑微信吗?解绑后将无法使用微信小程序登录", - type: "warning", + headerImage: "warning", }); await UserAPI.unbindSocial("WECHAT_MINI"); toast.success("解绑成功"); diff --git a/src/pages/mine/index.vue b/src/pages/mine/index.vue index 38ac1a0..7e0b1ae 100644 --- a/src/pages/mine/index.vue +++ b/src/pages/mine/index.vue @@ -212,7 +212,7 @@ import { getAccessToken } from "@/utils/auth"; import { formatBytes } from "@/utils/format"; const toast = useToast(); -const { messageBox } = useDialog(); + const { confirm } = useDialog(); const userStore = useUserStore(); const themeStore = useThemeStore(); @@ -391,10 +391,10 @@ const handleClearCache = async () => { const handleLogout = async () => { try { - await messageBox({ + await confirm({ title: "提示", msg: "确定要退出登录吗?", - type: "warning", + headerImage: "warning", }); userStore.logout(); toast.success("已退出登录"); diff --git a/src/pages/mine/profile/complete-profile.vue b/src/pages/mine/profile/complete-profile.vue index e6d2369..7008108 100644 --- a/src/pages/mine/profile/complete-profile.vue +++ b/src/pages/mine/profile/complete-profile.vue @@ -126,7 +126,7 @@ import UserAPI, { type UserProfileForm } from "@/api/user"; import FileAPI, { type FileInfo } from "@/api/file"; const toast = useToast(); -const { messageBox } = useDialog(); + const { confirm } = useDialog(); const userStore = useUserStore(); const redirect = ref("/pages/index/index"); @@ -258,7 +258,7 @@ const handleComplete = async () => { const handleSkip = async () => { try { - await messageBox({ title: "提示", msg: "跳过信息完善可能会影响部分功能使用,确定要跳过吗?", type: "warning" }); + await confirm({ title: "提示", msg: "跳过信息完善可能会影响部分功能使用,确定要跳过吗?", headerImage: "warning" }); uni.reLaunch({ url: redirect.value }); } catch { // 用户取消 diff --git a/src/pages/mine/settings/theme/index.vue b/src/pages/mine/settings/theme/index.vue index 7bb6747..5988eb9 100644 --- a/src/pages/mine/settings/theme/index.vue +++ b/src/pages/mine/settings/theme/index.vue @@ -122,7 +122,7 @@ import { useToast, useDialog } from "@wot-ui/ui"; const { isDark, themeVars, themeColorOptions, toggleTheme, setThemeColor } = useTheme(); const toast = useToast(); -const { messageBox } = useDialog(); + const { confirm } = useDialog(); // 创建响应式的计算属性 const isDarkMode = computed(() => isDark.value); @@ -195,7 +195,7 @@ const applyCustomColor = () => { // 重置为默认主题 const handleResetTheme = async () => { try { - await messageBox({ title: "确认重置", msg: "确定要重置为默认主题吗?", type: "warning" }); + await confirm({ title: "确认重置", msg: "确定要重置为默认主题吗?", headerImage: "warning" }); setThemeColor(themeColorOptions[0]); customColor.value = themeColorOptions[0].primary; toast.success("已重置为默认主题");