From 8d76a2ec058ed5e01baed63bf302234211b5a739 Mon Sep 17 00:00:00 2001 From: leiyun Date: Fri, 7 Aug 2026 00:41:08 +0800 Subject: [PATCH] fix: polish mini result and work detail actions --- pages/bill/bill.vue | 30 +++++++++++++++------------- pages/tool/id-photo-detail.vue | 35 ++++++++++++++++++++++++++++++++- pages/tool/name-result.vue | 16 +++++++++++++++ pages/tool/old-photo-detail.vue | 30 +++++++++++++++++++++++++++- pages/tool/portrait-detail.vue | 30 +++++++++++++++++++++++++++- 5 files changed, 124 insertions(+), 17 deletions(-) diff --git a/pages/bill/bill.vue b/pages/bill/bill.vue index 29b677a..fb836bf 100644 --- a/pages/bill/bill.vue +++ b/pages/bill/bill.vue @@ -322,13 +322,7 @@ function goRecharge() { } .wallet-card::after { - content: ''; - position: absolute; - left: 42rpx; - right: 42rpx; - bottom: 118rpx; - height: 1rpx; - background: rgba(255, 255, 255, 0.2); + display: none; } .wallet-copy, @@ -390,22 +384,30 @@ function goRecharge() { } .wallet-stats { - margin-top: 46rpx; + margin-top: 34rpx; + padding-top: 28rpx; + border-top: 1rpx solid rgba(255, 255, 255, 0.22); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); - gap: 12rpx; + gap: 0; } .stat-item { min-width: 0; + display: flex; + min-height: 76rpx; + flex-direction: column; + align-items: center; + justify-content: center; + text-align: center; } .stat-value { display: block; color: #ffffff; - font-size: 28rpx; + font-size: 30rpx; font-weight: 900; - line-height: 1; + line-height: 1.08; } .stat-value.consume { @@ -414,10 +416,10 @@ function goRecharge() { .stat-label { display: block; - margin-top: 10rpx; + margin-top: 8rpx; color: rgba(255, 255, 255, 0.68); - font-size: 21rpx; - line-height: 1; + font-size: 22rpx; + line-height: 1.15; } .filter-panel { diff --git a/pages/tool/id-photo-detail.vue b/pages/tool/id-photo-detail.vue index e3cecc4..efc99f2 100644 --- a/pages/tool/id-photo-detail.vue +++ b/pages/tool/id-photo-detail.vue @@ -56,6 +56,7 @@ + 删除 保存照片 @@ -172,6 +173,31 @@ function download() { }) } +function deleteRecord() { + if (!id.value) return + uni.showModal({ + title: '删除记录', + content: '删除后将不再展示该证件照记录,是否继续?', + confirmText: '删除', + confirmColor: '#f04438', + success: async (res) => { + if (!res.confirm) return + try { + await idPhotoApi.delete({ photo_open_id: id.value }) + toast('删除成功') + const pages = getCurrentPages() + if (pages.length > 1) { + uni.navigateBack() + } else { + uni.redirectTo({ url: '/pages/works/works' }) + } + } catch (e) { + toast((e && e.msg) || '删除失败') + } + } + }) +} + function createAgain() { const delta = getPageStackDelta('pages/tool/id-photo') if (delta > 0) { @@ -401,6 +427,7 @@ function getPageStackDelta(routeName) { } .save-btn, +.delete-btn, .main-btn { height: 82rpx; border-radius: 42rpx; @@ -411,8 +438,14 @@ function getPageStackDelta(routeName) { font-weight: 800; } +.delete-btn { + width: 150rpx; + color: #f04438; + background: #fff1f0; +} + .save-btn { - width: 240rpx; + width: 220rpx; gap: 10rpx; color: #1f8cff; background: #eef6ff; diff --git a/pages/tool/name-result.vue b/pages/tool/name-result.vue index 89c9115..36f531e 100644 --- a/pages/tool/name-result.vue +++ b/pages/tool/name-result.vue @@ -589,10 +589,26 @@ function continueName() { .bar-btn, .main-btn { height: 82rpx; + padding: 0; + border: 0; + outline: 0; border-radius: 42rpx; line-height: 82rpx; font-size: 29rpx; margin: 0; + display: flex; + align-items: center; + justify-content: center; + box-sizing: border-box; + overflow: hidden; + background-clip: padding-box; + -webkit-appearance: none; + appearance: none; +} + +.bar-btn::after, +.main-btn::after { + border: 0; } .bar-btn { diff --git a/pages/tool/old-photo-detail.vue b/pages/tool/old-photo-detail.vue index b47d2d6..eefba22 100644 --- a/pages/tool/old-photo-detail.vue +++ b/pages/tool/old-photo-detail.vue @@ -48,6 +48,7 @@ + 删除 保存 对比 再修一张 @@ -165,6 +166,31 @@ function download() { }) } +function deleteRecord() { + if (!id.value) return + uni.showModal({ + title: '删除记录', + content: '删除后将不再展示该老照片记录,是否继续?', + confirmText: '删除', + confirmColor: '#f04438', + success: async (res) => { + if (!res.confirm) return + try { + await oldPhotoApi.delete({ photo_open_id: id.value }) + toast('删除成功') + const pages = getCurrentPages() + if (pages.length > 1) { + uni.navigateBack() + } else { + uni.redirectTo({ url: '/pages/works/works' }) + } + } catch (e) { + toast((e && e.msg) || '删除失败') + } + } + }) +} + function openCompare() { if (!detail.value.result_url || !detail.value.source_url) return comparePercent.value = 50 @@ -296,6 +322,7 @@ function getPageStackDelta(routeName) { box-shadow: 0 -8rpx 24rpx rgba(35, 55, 90, 0.08); } .bar-btn, +.delete-btn, .main-btn { height: 82rpx; border-radius: 42rpx; @@ -304,7 +331,8 @@ function getPageStackDelta(routeName) { align-items: center; justify-content: center; } -.bar-btn { width: 150rpx; color: #0b8cff; background: #eef6ff; } +.bar-btn { width: 136rpx; color: #0b8cff; background: #eef6ff; } +.delete-btn { width: 136rpx; color: #f04438; background: #fff1f0; } .main-btn { flex: 1; color: #fff; background: #0b8cff; } /* 对比弹层:与动漫头像保持一致 */ diff --git a/pages/tool/portrait-detail.vue b/pages/tool/portrait-detail.vue index 427ae91..811d605 100644 --- a/pages/tool/portrait-detail.vue +++ b/pages/tool/portrait-detail.vue @@ -71,6 +71,7 @@ + 删除 保存 对比 再拍一组 @@ -220,6 +221,31 @@ function save() { }) } +function deleteRecord() { + if (!id.value) return + uni.showModal({ + title: '删除记录', + content: '删除后将不再展示该形象照记录,是否继续?', + confirmText: '删除', + confirmColor: '#f04438', + success: async (res) => { + if (!res.confirm) return + try { + await portraitApi.delete({ photo_open_id: id.value }) + toast('删除成功') + const pages = getCurrentPages() + if (pages.length > 1) { + uni.navigateBack() + } else { + uni.redirectTo({ url: '/pages/works/works' }) + } + } catch (e) { + toast((e && e.msg) || '删除失败') + } + } + }) +} + function openCompare() { if (!activeUrl.value || !detail.value.source_url) return comparePercent.value = 50 @@ -365,6 +391,7 @@ function getPageStackDelta(routeName) { box-shadow: 0 -8rpx 24rpx rgba(35, 55, 90, 0.08); } .bar-btn, +.delete-btn, .main-btn { height: 82rpx; border-radius: 42rpx; @@ -373,7 +400,8 @@ function getPageStackDelta(routeName) { align-items: center; justify-content: center; } -.bar-btn { width: 150rpx; color: #0b8cff; background: #eef6ff; } +.bar-btn { width: 136rpx; color: #0b8cff; background: #eef6ff; } +.delete-btn { width: 136rpx; color: #f04438; background: #fff1f0; } .main-btn { flex: 1; color: #fff; background: #0b8cff; } /* 对比弹层:与动漫头像保持一致 */