feat(fittingRoom): 实现试穿结果展示与衣服上传编辑功能
- 新增试穿结果获取与展示逻辑,支持模特切换 - 实现衣服上传和编辑功能,包括分类和长度选择 - 优化上传页面UI布局,增加确认和删除操作按钮- 调整轮播组件数据源,使用试穿结果列表 - 修复上传接口调用逻辑,支持文件上传与数据提交 - 更新请求超时时间,提升接口稳定性 - 优化分类标签显示逻辑,修复索引映射问题 - 支持从衣橱进入编辑模式,传递文件URL和ID参数 - 移除旧版图片选择器,统一使用新上传逻辑 - 修复组件间数据传递与事件绑定问题
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @Author: liguigong liguigong@shopline.com
|
||||
* @Date: 2025-09-19 16:26:36
|
||||
* @LastEditors: liguigong liguigong@shopline.com
|
||||
* @LastEditTime: 2025-09-22 19:35:35
|
||||
* @LastEditTime: 2025-09-26 18:21:04
|
||||
* @FilePath: pages/fittingRoom/components/s-grid-clothes.vue
|
||||
* @Description: 这是默认设置,可以在设置》工具》File Description中进行配置
|
||||
-->
|
||||
@@ -16,7 +16,7 @@
|
||||
>
|
||||
<view class="grid-item-box" style="background-color: #fff">
|
||||
<view v-if="index == 3" class="inUse">
|
||||
<view class="edit" @click="goEdit">编辑</view>
|
||||
<view class="edit" @click="goEdit(item)">编辑</view>
|
||||
</view>
|
||||
|
||||
<template v-if="fittingRoomStore.canUpload && index === 0">
|
||||
@@ -26,20 +26,8 @@
|
||||
src="/static/uploads/1.png"
|
||||
@click="uploadFile"
|
||||
></image>
|
||||
<uni-file-picker
|
||||
:auto-upload="false"
|
||||
:del-icon="false"
|
||||
:disable-preview="true"
|
||||
:image-styles="imageStyle"
|
||||
:sizeType="sizeType"
|
||||
class="upload"
|
||||
limit="1"
|
||||
mode="grid"
|
||||
@select="selectPic"
|
||||
>选择
|
||||
</uni-file-picker>
|
||||
</template>
|
||||
<image v-else class="clothes" mode="aspectFill" src="/static/yifu1.png"></image>
|
||||
<image v-else :src="item.thumbnailFileUrl" class="clothes" mode="aspectFill"></image>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
</uni-grid>
|
||||
@@ -47,15 +35,18 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import sheep from '@/sheep';
|
||||
import { pattern } from '../../../sheep/store/fittingRoom';
|
||||
|
||||
const fittingRoomStore = sheep.$store('fittingRoom');
|
||||
|
||||
function selectPic(...data) {
|
||||
console.log(fittingRoomStore.tab);
|
||||
console.log('🚀 ~ selectPic 🐶47 ~ data: ', data);
|
||||
console.log('🚀 ~ selectPic 🐶43 ~ data: ', data);
|
||||
}
|
||||
|
||||
function uploadFile() {}
|
||||
function uploadFile() {
|
||||
sheep.$router.go('/pages/uploadClothes/index', {});
|
||||
}
|
||||
|
||||
const sizeType = ['original'];
|
||||
const imageStyle = {
|
||||
@@ -63,13 +54,25 @@
|
||||
height: 200,
|
||||
};
|
||||
|
||||
function goEdit() {
|
||||
sheep.$router.go('/pages/report/index', {});
|
||||
function goEdit(item) {
|
||||
console.log('🚀 ~ goEdit 🐶57 ~ item: ', item);
|
||||
fittingRoomStore.selectClothesType = fittingRoomStore.tabsMap.includes(Number(item.clothType))
|
||||
? Number(item.clothType)
|
||||
: fittingRoomStore.selectClothesType;
|
||||
fittingRoomStore.selectPattern = pattern.some((v) => {
|
||||
v.value === item.len;
|
||||
})
|
||||
? item.len
|
||||
: fittingRoomStore.selectPattern;
|
||||
sheep.$router.go('/pages/uploadClothes/index', {
|
||||
fileUrl: item.fileUrl,
|
||||
clothId: item.clothId,
|
||||
});
|
||||
}
|
||||
|
||||
function change(e) {
|
||||
fittingRoomStore.changeClothes();
|
||||
console.log('🚀 ~ change 🐶25 ~ index: ', e.detail.index);
|
||||
console.log('🚀 ~ change 🐶63 ~ index: ', e.detail.index);
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user