Przeglądaj źródła

fix: polish mini result and work detail actions

main
leiyun 1 miesiąc temu
rodzic
commit
8d76a2ec05
5 zmienionych plików z 124 dodań i 17 usunięć
  1. +16
    -14
      pages/bill/bill.vue
  2. +34
    -1
      pages/tool/id-photo-detail.vue
  3. +16
    -0
      pages/tool/name-result.vue
  4. +29
    -1
      pages/tool/old-photo-detail.vue
  5. +29
    -1
      pages/tool/portrait-detail.vue

+ 16
- 14
pages/bill/bill.vue Wyświetl plik

@@ -322,13 +322,7 @@ function goRecharge() {
} }


.wallet-card::after { .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, .wallet-copy,
@@ -390,22 +384,30 @@ function goRecharge() {
} }


.wallet-stats { .wallet-stats {
margin-top: 46rpx;
margin-top: 34rpx;
padding-top: 28rpx;
border-top: 1rpx solid rgba(255, 255, 255, 0.22);
display: grid; display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 12rpx;
gap: 0;
} }


.stat-item { .stat-item {
min-width: 0; min-width: 0;
display: flex;
min-height: 76rpx;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
} }


.stat-value { .stat-value {
display: block; display: block;
color: #ffffff; color: #ffffff;
font-size: 28rpx;
font-size: 30rpx;
font-weight: 900; font-weight: 900;
line-height: 1;
line-height: 1.08;
} }


.stat-value.consume { .stat-value.consume {
@@ -414,10 +416,10 @@ function goRecharge() {


.stat-label { .stat-label {
display: block; display: block;
margin-top: 10rpx;
margin-top: 8rpx;
color: rgba(255, 255, 255, 0.68); color: rgba(255, 255, 255, 0.68);
font-size: 21rpx;
line-height: 1;
font-size: 22rpx;
line-height: 1.15;
} }


.filter-panel { .filter-panel {


+ 34
- 1
pages/tool/id-photo-detail.vue Wyświetl plik

@@ -56,6 +56,7 @@
</scroll-view> </scroll-view>


<view v-if="isSuccess" class="bottom-bar"> <view v-if="isSuccess" class="bottom-bar">
<view class="delete-btn" hover-class="button-pressed" @click="deleteRecord">删除</view>
<view class="save-btn" hover-class="button-pressed" @click="download"> <view class="save-btn" hover-class="button-pressed" @click="download">
<up-icon name="download" color="#1f8cff" size="18" /> <up-icon name="download" color="#1f8cff" size="18" />
<text>保存照片</text> <text>保存照片</text>
@@ -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() { function createAgain() {
const delta = getPageStackDelta('pages/tool/id-photo') const delta = getPageStackDelta('pages/tool/id-photo')
if (delta > 0) { if (delta > 0) {
@@ -401,6 +427,7 @@ function getPageStackDelta(routeName) {
} }


.save-btn, .save-btn,
.delete-btn,
.main-btn { .main-btn {
height: 82rpx; height: 82rpx;
border-radius: 42rpx; border-radius: 42rpx;
@@ -411,8 +438,14 @@ function getPageStackDelta(routeName) {
font-weight: 800; font-weight: 800;
} }


.delete-btn {
width: 150rpx;
color: #f04438;
background: #fff1f0;
}

.save-btn { .save-btn {
width: 240rpx;
width: 220rpx;
gap: 10rpx; gap: 10rpx;
color: #1f8cff; color: #1f8cff;
background: #eef6ff; background: #eef6ff;


+ 16
- 0
pages/tool/name-result.vue Wyświetl plik

@@ -589,10 +589,26 @@ function continueName() {
.bar-btn, .bar-btn,
.main-btn { .main-btn {
height: 82rpx; height: 82rpx;
padding: 0;
border: 0;
outline: 0;
border-radius: 42rpx; border-radius: 42rpx;
line-height: 82rpx; line-height: 82rpx;
font-size: 29rpx; font-size: 29rpx;
margin: 0; 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 { .bar-btn {


+ 29
- 1
pages/tool/old-photo-detail.vue Wyświetl plik

@@ -48,6 +48,7 @@
</scroll-view> </scroll-view>


<view v-if="!isLoadingState" class="bottom-bar"> <view v-if="!isLoadingState" class="bottom-bar">
<view class="delete-btn" @click="deleteRecord">删除</view>
<view class="bar-btn" @click="download">保存</view> <view class="bar-btn" @click="download">保存</view>
<view class="bar-btn" @click="openCompare">对比</view> <view class="bar-btn" @click="openCompare">对比</view>
<view class="main-btn" @click="createAgain">再修一张</view> <view class="main-btn" @click="createAgain">再修一张</view>
@@ -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() { function openCompare() {
if (!detail.value.result_url || !detail.value.source_url) return if (!detail.value.result_url || !detail.value.source_url) return
comparePercent.value = 50 comparePercent.value = 50
@@ -296,6 +322,7 @@ function getPageStackDelta(routeName) {
box-shadow: 0 -8rpx 24rpx rgba(35, 55, 90, 0.08); box-shadow: 0 -8rpx 24rpx rgba(35, 55, 90, 0.08);
} }
.bar-btn, .bar-btn,
.delete-btn,
.main-btn { .main-btn {
height: 82rpx; height: 82rpx;
border-radius: 42rpx; border-radius: 42rpx;
@@ -304,7 +331,8 @@ function getPageStackDelta(routeName) {
align-items: center; align-items: center;
justify-content: 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; } .main-btn { flex: 1; color: #fff; background: #0b8cff; }


/* 对比弹层:与动漫头像保持一致 */ /* 对比弹层:与动漫头像保持一致 */


+ 29
- 1
pages/tool/portrait-detail.vue Wyświetl plik

@@ -71,6 +71,7 @@
</scroll-view> </scroll-view>


<view v-if="isSuccess" class="bottom-bar"> <view v-if="isSuccess" class="bottom-bar">
<view class="delete-btn" @click="deleteRecord">删除</view>
<view class="bar-btn" @click="save">保存</view> <view class="bar-btn" @click="save">保存</view>
<view class="bar-btn" @click="openCompare">对比</view> <view class="bar-btn" @click="openCompare">对比</view>
<view class="main-btn" @click="createAgain">再拍一组</view> <view class="main-btn" @click="createAgain">再拍一组</view>
@@ -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() { function openCompare() {
if (!activeUrl.value || !detail.value.source_url) return if (!activeUrl.value || !detail.value.source_url) return
comparePercent.value = 50 comparePercent.value = 50
@@ -365,6 +391,7 @@ function getPageStackDelta(routeName) {
box-shadow: 0 -8rpx 24rpx rgba(35, 55, 90, 0.08); box-shadow: 0 -8rpx 24rpx rgba(35, 55, 90, 0.08);
} }
.bar-btn, .bar-btn,
.delete-btn,
.main-btn { .main-btn {
height: 82rpx; height: 82rpx;
border-radius: 42rpx; border-radius: 42rpx;
@@ -373,7 +400,8 @@ function getPageStackDelta(routeName) {
align-items: center; align-items: center;
justify-content: 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; } .main-btn { flex: 1; color: #fff; background: #0b8cff; }


/* 对比弹层:与动漫头像保持一致 */ /* 对比弹层:与动漫头像保持一致 */


Ładowanie…
Anuluj
Zapisz