From eb86810a775549a9251e066f5c4ede0025b421af Mon Sep 17 00:00:00 2001 From: xiangsilian Date: Tue, 15 Sep 2026 00:03:13 +0800 Subject: [PATCH] =?UTF-8?q?fix(tryon):=20=E5=86=8D=E6=9D=A5=E4=B8=80?= =?UTF-8?q?=E6=AC=A1=E5=9B=9E=E5=88=B0=E5=88=9D=E5=A7=8B=E8=BF=9B=E5=85=A5?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E2=80=94=E2=80=94resetResult=20=E6=BC=8F?= =?UTF-8?q?=E6=B8=85=20resultSrc=20=E5=AF=BC=E8=87=B4=E6=95=88=E6=9E=9C?= =?UTF-8?q?=E5=9B=BE=E6=AE=8B=E7=95=99=E9=A2=84=E8=A7=88=E5=8C=BA=EF=BC=9B?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=20resetToEntry=20=E8=BF=9E=E6=9C=AC=E4=BA=BA?= =?UTF-8?q?=E7=85=A7=E4=B8=80=E8=B5=B7=E6=B8=85=EF=BC=88=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E8=A1=8C=E4=B8=8E=E5=85=A8=E5=B1=8F=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E5=99=A8=E4=B8=A4=E4=B8=AA=E5=85=A5=E5=8F=A3=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/entry/src/main/ets/pages/FittingRoomPage.ets | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/app/entry/src/main/ets/pages/FittingRoomPage.ets b/app/entry/src/main/ets/pages/FittingRoomPage.ets index c3f487f..2af94f1 100644 --- a/app/entry/src/main/ets/pages/FittingRoomPage.ets +++ b/app/entry/src/main/ets/pages/FittingRoomPage.ets @@ -453,14 +453,21 @@ struct FittingRoomPage { return false } - /** 回到选人台:清掉上一轮生成/保存的残留。 */ + /** 清掉上一轮生成/保存的残留(resultSrc 必须一起清,否则效果图仍挂在预览区)。 */ private resetResult(): void { this.resultUrl = '' this.resultLocalPath = '' + this.resultSrc = '' this.showOriginal = false this.statusText = '' } + /** 「再来一次」:连本人照一起清,回到初始进入界面(可重新拍照/相册选图)。 */ + private resetToEntry(): void { + this.humanUri = '' + this.resetResult() + } + /** * 生成成功即转存本机:下载结果到 filesDir/results/tryon_last.jpg。 * 下载前先清旧文件——request.downloadFile 不能覆盖已存在文件(TryonPage #21 同款坑)。 @@ -1206,7 +1213,7 @@ struct FittingRoomPage { .fontSize(13) .fontColor(COLOR_PRIMARY) .onClick(() => { - this.resetResult() + this.resetToEntry() }) } .width('100%') @@ -1317,7 +1324,7 @@ struct FittingRoomPage { }, onRetry: (): void => { this.viewerOpen = false - this.resetResult() + this.resetToEntry() }, onClose: (): void => { this.viewerOpen = false