feat(fittingRoom): 新增衣服长度选择功能在上传衣服页面增加分类和长度选择功能,支持用户选择衣服类型和具体长度部位。新增 pattern 常量定义各种长度选项,并在 store 中添加相应的状态管理。同时更新了相关样式和组件依赖。

fix(uploadClothes): 修复上传页面分类选择逻辑

调整上传衣服页面的分类选择逻辑,使用 uv-radio-group 实现单选功能,支持衣服类型和长度部位的选择。引入 fittingRoom store 中的 tabs 和 pattern 数据,优化用户交互体验。

chore(deps): 更新 uv-icon 和 uv-radio 组件版本更新 uv-icon 和 uv-radio 组件的 package.json 配置文件,设置版本号为1.0.13。更新 changelog 文档,记录组件的优化和 bug 修复历史。完善组件的平台兼容性配置和依赖关系。

style(components): 调整上传页面样式布局优化上传衣服页面的样式布局,新增 warp、title、container 等样式类,改善分类和长度选择区域的显示效果。调整单选框的间距和对齐方式,提升用户界面的美观性和可用性。
This commit is contained in:
guigongli
2025-09-27 16:42:34 +08:00
parent b42a66aa49
commit f0cd843f85
8 changed files with 285 additions and 243 deletions
+10 -2
View File
@@ -1,8 +1,8 @@
/**
* @Author: liguigong liguigong@shopline.com
* @Date: 2025-09-23 09:41:10
* @LastEditors: liguigong liguigong@shopline.com
* @LastEditTime: 2025-09-26 17:56:13
* @LastEditors:
* @LastEditTime: 2025-09-27 15:48:31
* @FilePath: sheep/api/fittingRoom/index.js
* @Description: 这是默认设置,可以在设置》工具》File Description中进行配置
*/
@@ -133,6 +133,14 @@ const FittingRoomApi = {
data: data,
});
},
//试穿
tryOnApi: (data) => {
return request({
url: '/digital/on-record/create',
method: 'POST',
data: data,
});
},
addHairApi: (data) => {
return request({
+26 -2
View File
@@ -1,6 +1,7 @@
import { defineStore } from 'pinia';
import app from './app';
import FittingRoomApi from '../api/fittingRoom';
import sheep from '@/sheep';
const _tabsMap = [undefined, 'topCloth', 'bottomCloth', 'dress', 'suit', 'hair'];
@@ -96,7 +97,28 @@ const fittingRoom = defineStore({
let modelList = (httpResponse.result || []).slice(0, 4);
this.modelList = modelList;
this.currentModel = modelList?.[0] ?? {};
this.getTestResults(modelList?.[0].id);
this.getTestResults(modelList?.[0]?.id);
},
// 试穿
async tryOn() {
if (!this.currentModel?.id) {
sheep.$helper.toast('请选择模特');
return
}
if (!this.currentClothes?.[0]?.fileUrl) {
sheep.$helper.toast('请选择衣服');
return
}
const httpResponse = await FittingRoomApi.tryOnApi({
"modelId": this.currentModel.id,
"modelImageUrl": this.currentModel.fileUrl,
"clothingImageUrl": this.currentClothes[0]?.fileUrl,
});
if (httpResponse.code !== 0) {
sheep.$helper.toast(httpResponse.msg);
return
}
this.getTestResults(this.currentModel.id)
},
// 切换模特
switchModels(item) {
@@ -139,7 +161,9 @@ const fittingRoom = defineStore({
this.getCloths();
},
// 点击衣服
changeClothes() {
changeClothes(data) {
console.log("🚀 ~ changeClothes ~ data: ", data);
this.currentClothes = [data];
console.log('切换衣服');
},
},