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
+22 -4
View File
@@ -1,19 +1,27 @@
<!--
* @Author: liguigong liguigong@shopline.com
* @Date: 2025-09-26 19:17:18
* @LastEditors: liguigong liguigong@shopline.com
* @LastEditTime: 2025-09-26 19:31:15
* @LastEditors:
* @LastEditTime: 2025-09-27 16:38:42
* @FilePath: pages/fittingRoom/components/Clothespic.vue
* @Description: 这是默认设置,可以在设置工具File Description中进行配置
-->
<template>
<view class="clothes-box">
<view></view>
<view v-for="item in fittingRoomStore.currentClothes" class="clothes-pic">
<image class="pic" :src="item.fileUrl" mode="aspectFill"></image>
</view>
<view class="btn" @click="tryItOn">试穿</view>
</view>
</template>
<script setup>
function tryItOn() {}
import sheep from '@/sheep';
const fittingRoomStore = sheep.$store('fittingRoom');
function tryItOn() {
fittingRoomStore.tryOn()
}
</script>
<style lang="scss" scoped>
.clothes-box {
@@ -29,6 +37,16 @@
align-items: center;
justify-content: center;
}
.clothes-pic {
width: 120rpx;
height: 180rpx;
overflow: hidden;
margin-bottom: 16rpx;
}
.pic {
width: 100%;
height: 100%;
}
.btn {
height: 48rpx;
background: #000;
@@ -1,8 +1,8 @@
<!--
* @Author: liguigong liguigong@shopline.com
* @Date: 2025-09-19 16:26:36
* @LastEditors: liguigong liguigong@shopline.com
* @LastEditTime: 2025-09-26 18:21:04
* @LastEditors:
* @LastEditTime: 2025-09-27 16:37:29
* @FilePath: pages/fittingRoom/components/s-grid-clothes.vue
* @Description: 这是默认设置,可以在设置工具File Description中进行配置
-->
@@ -12,10 +12,10 @@
<uni-grid-item
v-for="(item, index) in fittingRoomStore.clothes"
:key="index"
:index="index + 100"
:index="item"
>
<view class="grid-item-box" style="background-color: #fff">
<view v-if="index == 3" class="inUse">
<view v-if="fittingRoomStore.currentClothes.some(v => v.clothId === item.clothId)" class="inUse">
<view class="edit" @click="goEdit(item)">编辑</view>
</view>
@@ -71,7 +71,7 @@
}
function change(e) {
fittingRoomStore.changeClothes();
fittingRoomStore.changeClothes(e.detail.index);
console.log('🚀 ~ change 🐶63 ~ index: ', e.detail.index);
}
</script>
+3 -1
View File
@@ -40,7 +40,7 @@
import Clothespic from './components/Clothespic.vue'; // 隐藏原生tabBar
const fittingRoomStore = sheep.$store('fittingRoom');
uni.setStorageSync('token', '42be01f1a6c54ea591c991b5da0977c0');
sheep.$helper.toast('请选择是否同意协议');
// 隐藏原生tabBar
uni.hideTabBar({
@@ -110,6 +110,8 @@
}
// #endif
uni.setStorageSync('token', options?.token ?? 'e84526c0f7a3457da54e663fb4396beb');
console.log("🚀 ~ URL上的token ~ options?.token: ", options?.token);
// 预览模板
if (options.templateId) {
sheep.$store('app').init(options.templateId);
+1
View File
@@ -81,6 +81,7 @@
function deleteClothes() {
FittingRoomApi.deleteCloth({ id: clothesId.value }).then((res) => {
fittingRoomStore.currentClothes = []
sheep.$router.go('/pages/fittingRoom/index');
});
}