From 8fca9979b5bb3b4f23b895b26c22d9fad4380e64 Mon Sep 17 00:00:00 2001
From: guigongli <3328921305@qq.com>
Date: Sun, 12 Oct 2025 21:35:50 +0800
Subject: [PATCH 1/4] =?UTF-8?q?fix(report):=E4=BF=AE=E5=A4=8D=E5=9F=BA?=
=?UTF-8?q?=E5=9B=A0=E9=A3=8E=E6=A0=BC=E5=B1=95=E7=A4=BA=E9=80=BB=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 将基因风格相关属性从 styleType 切换为 collect 数据源
-修复性别字段绑定不一致的问题- 统一使用可选链操作符避免潜在的 undefined 错误
- 确保图片 URL 和风格类型正确传递给子组件
-修复底部图片组件中的性别属性绑定问题
---
pages/report/index.vue | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/pages/report/index.vue b/pages/report/index.vue
index 1494f3f..9ea6cf4 100644
--- a/pages/report/index.vue
+++ b/pages/report/index.vue
@@ -28,13 +28,13 @@
@@ -76,7 +76,7 @@
From 757b562aeeae6456e87a9d7a60a861d396ac35c3 Mon Sep 17 00:00:00 2001
From: liguigong
Date: Mon, 13 Oct 2025 15:21:47 +0800
Subject: [PATCH 2/4] =?UTF-8?q?feat(fittingRoom):=20=E6=96=B0=E5=A2=9E?=
=?UTF-8?q?=E5=8F=91=E5=9E=8B=E4=BC=98=E5=8C=96=E8=AF=95=E7=A9=BF=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD=E5=B9=B6-=E6=A8=A1=E5=9E=8B=E9=80=89=E6=8B=A9?=
=?UTF-8?q?=E9=80=BB=E8=BE=91Api=20=E5=9C=A8=20FittingRoom=20=E4=B8=AD?=
=?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8F=91=E5=9E=8B=E8=AF=95=E7=A9=BF=E6=8E=A5?=
=?UTF-8?q?=E5=8F=A3=20hairstyleTryOnApi=20-=20=E4=BF=AE=E6=94=B9=20getMod?=
=?UTF-8?q?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?q?=E5=9D=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 3 ++
.../fittingRoom/components/s-select-mote.vue | 6 +++-
pages/fittingRoom/index.vue | 33 ++++++++++-------
sheep/api/fittingRoom/index.js | 11 +++++-
sheep/store/fittingRoom.js | 35 ++++++++++++++-----
5 files changed, 64 insertions(+), 24 deletions(-)
diff --git a/README.md b/README.md
index 021aae3..c2e9166 100644
--- a/README.md
+++ b/README.md
@@ -52,3 +52,6 @@ https://docs.qq.com/sheet/DS0pybm5Yc1ViakNj
换发型: https://leops128e7.feishu.cn/docx/HVCHdCAV8ok4bkxcaXVc6q6enXb
+
+
+http://localhost:3000/pages/fittingRoom/index?modelId=1976890366293254145&id=1977565196601040912
diff --git a/pages/fittingRoom/components/s-select-mote.vue b/pages/fittingRoom/components/s-select-mote.vue
index 4201965..4baf89d 100644
--- a/pages/fittingRoom/components/s-select-mote.vue
+++ b/pages/fittingRoom/components/s-select-mote.vue
@@ -24,7 +24,11 @@
>选择
-
+
diff --git a/pages/fittingRoom/index.vue b/pages/fittingRoom/index.vue
index 97b6a8e..9b965b4 100644
--- a/pages/fittingRoom/index.vue
+++ b/pages/fittingRoom/index.vue
@@ -11,13 +11,13 @@
>
@@ -76,16 +76,7 @@
fittingRoomStore.swiperCurrentIndex = event.detail.current;
}
- onMounted(() => {
- fittingRoomStore.getCategory();
- fittingRoomStore.getCloths();
- fittingRoomStore.getModelList();
- timer = setInterval(() => {
- // TODO: 检测到还有没生成图的, 获取最新数据
- // fittingRoomStore.generatingLoading &&
- // fittingRoomStore.getTestResults(fittingRoomStore.currentModel?.id);
- }, 6000);
- });
+ onMounted(() => {});
onUnload(() => {
// 移除全局监听
clearInterval(timer);
@@ -112,8 +103,24 @@
// const template = computed(() => sheep.$store('app').template?.home);
onLoad((options) => {
- uni.setStorageSync('token', options?.token ?? '92d2805a85ca422e90dd7d50eef49a85');
+ uni.setStorageSync('token', options?.token ?? '86e0032580ac4ca8b1f4f5e9395d1cf8');
console.log('🚀 ~ URL上的token ~ options?.token: ', options?.token);
+ fittingRoomStore.getCategory();
+ fittingRoomStore.getCloths();
+ timer = setInterval(() => {
+ // TODO: 检测到还有没生成图的, 获取最新数据
+ // fittingRoomStore.generatingLoading &&
+ // fittingRoomStore.getTestResults(fittingRoomStore.currentModel?.id);
+ }, 6000);
+ if (options?.modelId && options?.id) {
+ fittingRoomStore.getModelList(options?.modelId);
+ fittingRoomStore.getTestResults(options?.modelId).then((res) => {
+ console.log('🚀 ~ index.vue ~ L118');
+ fittingRoomStore.swiperCurrentIndex = res.findIndex((res) => res.id === options?.id);
+ });
+ } else {
+ fittingRoomStore.getModelList();
+ }
});
// 下拉刷新
@@ -121,7 +128,7 @@
// sheep.$store('app').init();
if (fittingRoomStore.currentModel?.id) {
fittingRoomStore.getTestResults(fittingRoomStore.currentModel?.id).then(() => {
- console.log('➤➤➤ ~ index.vue ~ L124');
+ console.log('➤➤➤ ~ index.vue ~ L127');
uni.stopPullDownRefresh();
});
} else {
diff --git a/sheep/api/fittingRoom/index.js b/sheep/api/fittingRoom/index.js
index 3c8b0da..b22ec77 100644
--- a/sheep/api/fittingRoom/index.js
+++ b/sheep/api/fittingRoom/index.js
@@ -2,7 +2,7 @@
* @Author: liguigong liguigong@shopline.com
* @Date: 2025-09-23 09:41:10
* @LastEditors: liguigong liguigong@shopline.com
- * @LastEditTime: 2025-09-28 16:27:38
+ * @LastEditTime: 2025-10-13 14:30:53
* @FilePath: sheep/api/fittingRoom/index.js
* @Description: 这是默认设置,可以在设置》工具》File Description中进行配置
*/
@@ -148,6 +148,15 @@ const FittingRoomApi = {
});
},
+ //发型试穿
+ hairstyleTryOnApi: (data) => {
+ return request({
+ url: '/digital/on-record/exchange-hair',
+ method: 'POST',
+ data: data,
+ });
+ },
+
addHairApi: (data) => {
return request({
url: '/userinfo/add_hair_data',
diff --git a/sheep/store/fittingRoom.js b/sheep/store/fittingRoom.js
index 378aaae..f38612f 100644
--- a/sheep/store/fittingRoom.js
+++ b/sheep/store/fittingRoom.js
@@ -79,6 +79,7 @@ const fittingRoom = defineStore({
// "createTime": 1758857790000
});
this.testResults = result;
+ return result;
console.log('🚀 ~ getTestResults 🐶76 ~ httpResponse: ', httpResponse.data?.list);
},
@@ -95,12 +96,17 @@ const fittingRoom = defineStore({
: httpResponse.result || [];
},
// 获取模特数据查询
- async getModelList(templateId = null) {
+ async getModelList(modelId = undefined) {
const httpResponse = await FittingRoomApi.getModelList({
sex: this.sex,
});
- let modelList = (httpResponse.result || []).slice(0, 4);
+ let modelList = httpResponse.result || [];
this.modelList = modelList;
+ if (modelId) {
+ this.currentModel = modelList.find((item) => item.id === modelId);
+ // this.getTestResults(modelId);
+ return;
+ }
this.currentModel = modelList?.[0] ?? {};
this.getTestResults(modelList?.[0]?.id);
},
@@ -115,13 +121,24 @@ const fittingRoom = defineStore({
return;
}
// 那改成 clothUrl 和 kuziUrl 吧,当 kuziUrl 有值时,再传个 suit: true
- const httpResponse = await FittingRoomApi.tryOnApi({
- modelId: this.currentModel.id,
- modelImageUrl: this.currentModel.fileUrl,
- clothUrl: this.currentClothes[0]?.fileUrl,
- kuziUrl: this.currentClothes?.[1]?.fileUrl ? this.currentClothes[1]?.fileUrl : undefined,
- suit: this.currentClothes?.[1]?.fileUrl ? true : undefined,
- });
+ const httpResponse =
+ this.tab === 6
+ ? await FittingRoomApi.hairstyleTryOnApi({
+ modelId: this.currentModel.id,
+ files: this.currentModel.fileUrl,
+ isHr: true,
+ hairIds: this.currentClothes[0]?.clothId,
+ sex: 'female',
+ })
+ : await FittingRoomApi.tryOnApi({
+ modelId: this.currentModel.id,
+ modelImageUrl: this.currentModel.fileUrl,
+ clothUrl: this.currentClothes[0]?.fileUrl,
+ kuziUrl: this.currentClothes?.[1]?.fileUrl
+ ? this.currentClothes[1]?.fileUrl
+ : undefined,
+ suit: this.currentClothes?.[1]?.fileUrl ? true : undefined,
+ });
if (httpResponse.code !== 0) {
sheep.$helper.toast(httpResponse.msg);
return;
From 44b1ee7b988a30192ddee4bf48ae52d55618ebd8 Mon Sep 17 00:00:00 2001
From: liguigong
Date: Mon, 13 Oct 2025 15:24:35 +0800
Subject: [PATCH 3/4] =?UTF-8?q?fix(fittingRoom):=E4=BF=AE=E5=A4=8D?=
=?UTF-8?q?=E8=AF=95=E8=A1=A3=E9=97=B4=E8=A1=A3=E7=89=A9=E6=98=BE=E7=A4=BA?=
=?UTF-8?q?=E9=80=BB=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 更新文件最后编辑时间
- 优化当前衣物显示条件判断
- 增加 tab 状态对衣物展示的影响控制- 确保只有非 tab 6 状态下才显示正在使用的衣物标识- 维持编辑功能入口不变
---
pages/fittingRoom/components/s-grid-clothes.vue | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/pages/fittingRoom/components/s-grid-clothes.vue b/pages/fittingRoom/components/s-grid-clothes.vue
index 33c7155..8ce6c79 100644
--- a/pages/fittingRoom/components/s-grid-clothes.vue
+++ b/pages/fittingRoom/components/s-grid-clothes.vue
@@ -2,7 +2,7 @@
* @Author: liguigong liguigong@shopline.com
* @Date: 2025-09-19 16:26:36
* @LastEditors: liguigong liguigong@shopline.com
- * @LastEditTime: 2025-09-28 14:54:34
+ * @LastEditTime: 2025-10-13 15:22:56
* @FilePath: pages/fittingRoom/components/s-grid-clothes.vue
* @Description: 这是默认设置,可以在设置》工具》File Description中进行配置
-->
@@ -12,7 +12,10 @@
编辑
From a5c0109f85e872e64e80f0bbfd691bd9bf37171a Mon Sep 17 00:00:00 2001
From: liguigong
Date: Mon, 13 Oct 2025 15:36:46 +0800
Subject: [PATCH 4/4] =?UTF-8?q?fix(pages):=20=E6=B8=85=E7=A9=BA=E5=AF=BC?=
=?UTF-8?q?=E8=88=AA=E6=A0=8F=E6=A0=87=E9=A2=98=E6=96=87=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 将 pages/uploadClothes/index 页面的 navigationBarTitleText 从 "1234" 修改为空字符串
- 确保页面标题显示符合预期设计
- 避免无效或占位符标题影响用户体验
---
pages.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pages.json b/pages.json
index 92f4477..bd9960e 100644
--- a/pages.json
+++ b/pages.json
@@ -100,7 +100,7 @@
{
"path": "pages/uploadClothes/index",
"style": {
- "navigationBarTitleText": "1234",
+ "navigationBarTitleText": "",
"navigationStyle": "custom",
"titleNView": false,
"app-plus": {