From 35e27753b8675c283c5fb1d3576acb63f13b0ffe Mon Sep 17 00:00:00 2001 From: chenghuan Date: Tue, 2 Dec 2025 11:46:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=EF=BC=9A=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=BF=81=E7=A7=BB=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/modules/user.ts | 15 +++ locale/en.json | 22 ++++- locale/zh-Hans.json | 23 ++++- pages.json | 6 ++ pages/user/index.vue | 42 +++----- pages/user/migrate/index.vue | 184 +++++++++++++++++++++++++++++++++++ style/tailwind.css | 45 +++++++++ 7 files changed, 296 insertions(+), 41 deletions(-) create mode 100644 pages/user/migrate/index.vue diff --git a/api/modules/user.ts b/api/modules/user.ts index 75d9628..f30c907 100644 --- a/api/modules/user.ts +++ b/api/modules/user.ts @@ -299,4 +299,19 @@ export async function getPointsData(current : number, limit : number, userId : s data: { current, limit, userId, } }) return res +} + +/** + * 迁移用户数据 + * @param tel 旧账号 + * @param code 迁移验证码 + * @return + */ +export async function migrateUserData(data: { tel: string, code: string }) { + const res = await mainClient.request({ + url: 'common/user/migrationWumenData', + method: 'POST', + data + }) + return res } \ No newline at end of file diff --git a/locale/en.json b/locale/en.json index 9a4a8e6..aed6d55 100644 --- a/locale/en.json +++ b/locale/en.json @@ -194,10 +194,6 @@ "pleaseInputOrderSn": "Please enter order number", "uploadImageFailed": "Image upload failed", "maxImagesCount": "Maximum 4 images", - "permissionDenied": "Permission Denied", - "cameraPermission": "Camera permission required", - "storagePermission": "Storage permission required", - "phonePermission": "Phone permission required", "sendCodeSuccess": "Verification code sent", "sendCodeFailed": "Failed to send code", "countdown": "s to resend", @@ -214,7 +210,23 @@ "selectPackage": "Please select a package", "consumptionRecord": "Consumption record", "returnMine": "I'm about to return to my page", - "pointsRecord": "Points consumption record" + "dataMigrate": "Data Migration", + "pointsRecord": "Points consumption record", + "migrateSubtitle": "Migrate data from Chinese account to current account", + "oldAccount": "Chinese Account", + "migrateCode": "Migration Code", + "confirmMigrate": "Confirm Migration", + "migrateSuccess": "Migration Successful", + "migrateFailed": "Migration failed, please check if the information is correct", + "pleaseCompleteInfo": "Please complete all information", + "oldAccountPlaceholder": "The chinese account to migrate", + "migrateCodePlaceholder": "The code obtained from chinese account", + "migrateWarning": "Migration is irreversible, please proceed with caution!", + "migrateInstructions": "Migration Instructions", + "instruction1": "Please obtain the migration code from your chinese account, get it by going to 【我的】-【数据迁移】-【获取迁移验证码】.", + "instruction2": "After data migration is complete, the chinese account data will be cleared, and all purchased Tianyi coins, points, courses, VIP and other data will be transferred to the current account", + "instruction3": "The migration process may take a few minutes, please be patient.", + "instruction4": "If you encounter any issues, please contact customer service for assistance." }, "book": { diff --git a/locale/zh-Hans.json b/locale/zh-Hans.json index ab4ca29..bcb4960 100644 --- a/locale/zh-Hans.json +++ b/locale/zh-Hans.json @@ -195,10 +195,6 @@ "pleaseInputOrderSn": "请输入订单编号", "uploadImageFailed": "图片上传失败", "maxImagesCount": "最多上传4张图片", - "permissionDenied": "权限被拒绝", - "cameraPermission": "需要相机权限", - "storagePermission": "需要存储权限", - "phonePermission": "需要电话权限", "sendCodeSuccess": "验证码发送成功", "sendCodeFailed": "验证码发送失败", "countdown": "秒后重新发送", @@ -214,7 +210,24 @@ "days": "天", "selectPackage": "请选择套餐", "consumptionRecord": "消费记录", - "returnMine": "即将返回我的页面" + "returnMine": "即将返回我的页面", + "pointsRecord": "积分记录", + "dataMigrate": "数据迁移", + "migrateSubtitle": "迁移国内账号数据到本账号", + "oldAccount": "国内版账号", + "migrateCode": "迁移验证码", + "confirmMigrate": "确定迁移", + "migrateSuccess": "迁移成功", + "migrateFailed": "迁移失败,请检查信息是否正确", + "pleaseCompleteInfo": "请填写完整信息", + "oldAccountPlaceholder": "需要迁移的国内版账号", + "migrateCodePlaceholder": "国内版账号获取的迁移验证码", + "migrateWarning": "迁移后不可恢复,请谨慎操作!", + "migrateInstructions": "迁移说明", + "instruction1": "请在吴门医述APP中获取迁移验证码,获取方式【我的】-【数据迁移】-【获取迁移验证码】。", + "instruction2": "数据迁移完成后,旧账号数据将被清空,已购买的天医币、积分、课程、VIP等数据将转移到当前账号。", + "instruction3": "迁移过程可能需要几分钟时间,请耐心等待。", + "instruction4": "如遇到问题,请联系客服获取帮助。" }, "book": { "title": "我的书单", diff --git a/pages.json b/pages.json index fa4f305..62e8d4f 100644 --- a/pages.json +++ b/pages.json @@ -199,6 +199,12 @@ "navigationStyle": "custom", "navigationBarTitleText": "新闻详情" } + }, { + "path": "pages/user/migrate/index", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "数据迁移" + } }, { "path": "uni_modules/uni-upgrade-center-app/pages/upgrade-popup", "style": { diff --git a/pages/user/index.vue b/pages/user/index.vue index ecbdd6e..30eecf2 100644 --- a/pages/user/index.vue +++ b/pages/user/index.vue @@ -64,12 +64,9 @@ - - - {{ item.name }} - - - + + + @@ -135,6 +132,13 @@ name: t('user.feedback'), url: '/pages/user/feedback/index', type: 'pageJump' + }, + { + id: 6, + name: t('user.dataMigrate'), + url: '/pages/user/migrate/index', + desc: t('user.migrateSubtitle'), + type: 'pageJump' } ]) @@ -382,7 +386,7 @@ } .menu-section { - padding: 20rpx 20rpx 0; + padding: 20rpx 20rpx; } .menu-list { @@ -392,30 +396,6 @@ box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05); } - .menu-item { - display: flex; - align-items: center; - justify-content: space-between; - padding: 30rpx; - border-bottom: 1px solid #e0e0e0; - - &:last-child { - border-bottom: none; - } - - &:active { - background-color: #f5f5f5; - } - - .menu-text { - font-size: 30rpx; - color: #333; - line-height: 40rpx; - } - } - - - .chong_btn { font-size: 26rpx; display: block; diff --git a/pages/user/migrate/index.vue b/pages/user/migrate/index.vue new file mode 100644 index 0000000..c54cf2e --- /dev/null +++ b/pages/user/migrate/index.vue @@ -0,0 +1,184 @@ + + + + + \ No newline at end of file diff --git a/style/tailwind.css b/style/tailwind.css index 4566267..b81ef1c 100644 --- a/style/tailwind.css +++ b/style/tailwind.css @@ -211,12 +211,27 @@ max-width: 96rem; } } + .mb-2 { + margin-bottom: calc(var(--spacing) * 2); + } .mb-2\! { margin-bottom: calc(var(--spacing) * 2) !important; } + .mb-\[20rpx\] { + margin-bottom: 20rpx; + } + .mb-\[20rpx\]\! { + margin-bottom: 20rpx !important; + } + .ml-1 { + margin-left: calc(var(--spacing) * 1); + } .ml-1\! { margin-left: calc(var(--spacing) * 1) !important; } + .ml-2 { + margin-left: calc(var(--spacing) * 2); + } .ml-2\.5\! { margin-left: calc(var(--spacing) * 2.5) !important; } @@ -253,6 +268,9 @@ .flex-shrink { flex-shrink: 1; } + .border-collapse { + border-collapse: collapse; + } .transform { transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,); } @@ -266,18 +284,39 @@ border-style: var(--tw-border-style); border-width: 1px; } + .p-0 { + padding: calc(var(--spacing) * 0); + } .p-0\! { padding: calc(var(--spacing) * 0) !important; } + .p-\[10rpx\] { + padding: 10rpx; + } + .p-\[30rpx\] { + padding: 30rpx; + } .pt-1 { padding-top: calc(var(--spacing) * 1); } .pt-10 { padding-top: calc(var(--spacing) * 10); } + .pt-\[10rpx\] { + padding-top: 10rpx; + } + .pt-\[20rpx\] { + padding-top: 20rpx; + } + .pb-0 { + padding-bottom: calc(var(--spacing) * 0); + } .pb-0\! { padding-bottom: calc(var(--spacing) * 0) !important; } + .pb-\[20rpx\] { + padding-bottom: 20rpx; + } .text-center { text-align: center; } @@ -303,6 +342,9 @@ .text-\[\#7dc1f0\] { color: #7dc1f0; } + .text-\[14rpx\] { + color: 14rpx; + } .text-\[cadetblue\] { color: cadetblue; } @@ -322,6 +364,9 @@ --tw-ordinal: ordinal; font-variant-numeric: var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,); } + .underline { + text-decoration-line: underline; + } .ring { --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor); box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);