fix(fittingRoom): 修复试衣间页面交互与样式问题

- 统一代码风格,修复缺少分号问题-优化试衣结果图片加载逻辑,添加默认loading图
- 修复上传衣物页面容器样式问题
- 调整模特切换逻辑,增加可见性控制- 更新README文档,添加试衣间相关链接
-优化上传衣物选择器样式与交互细节
This commit is contained in:
liguigong
2025-09-28 16:20:51 +08:00
parent 17dc7cf9c8
commit b9d19508ca
7 changed files with 31 additions and 18 deletions
+4
View File
@@ -37,3 +37,7 @@ Authorization94b8abbcb37c44f6aa74ec7678da8c2a
PC的老版本地址: https://puton.meidaojia.com/ PC的老版本地址: https://puton.meidaojia.com/
报告页: https://fitting-room.huimeimeta.com/pages/report/index
试衣间: https://fitting-room.huimeimeta.com/pages/fittingRoom/index
+5 -1
View File
@@ -15,7 +15,11 @@
> >
<template #default="{ item, index }"> <template #default="{ item, index }">
<view class="custom-item"> <view class="custom-item">
<image :src="item.tryOnResultUrl" class="swiper-image" mode="aspectFill" /> <image
:src="item.tryOnResultUrl || '/static/uploads/loading.gif'"
class="swiper-image"
mode="aspectFill"
/>
</view> </view>
</template> </template>
</hbxw-stack-carousel> </hbxw-stack-carousel>
+5 -5
View File
@@ -1,14 +1,14 @@
<!-- <!--
* @Author: * @Author:
* @Date: 2025-09-21 10:09:22 * @Date: 2025-09-21 10:09:22
* @LastEditors: * @LastEditors: liguigong liguigong@shopline.com
* @LastEditTime: 2025-09-21 21:20:33 * @LastEditTime: 2025-09-28 16:11:43
* @FilePath: pages/uploadClothes/SelectPic.vue * @FilePath: pages/uploadClothes/SelectPic.vue
* @Description: 这是默认设置,可以在设置工具File Description中进行配置 * @Description: 这是默认设置,可以在设置工具File Description中进行配置
--> -->
<template> <template>
<view class="pic"> <view class="pic">
<image class="image" src="/static/yangtu.png" mode="aspectFit" /> <image class="image" mode="aspectFit" src="/static/yangtu.png" />
</view> </view>
<view class="text"> <view class="text">
<text>单件衣服去掉衣架</text> <text>单件衣服去掉衣架</text>
@@ -61,13 +61,13 @@
text-align: center; text-align: center;
line-height: 80rpx; line-height: 80rpx;
font-weight: 700; font-weight: 700;
color: #FFFFFF; color: #ffffff;
letter-spacing: 10rpx; letter-spacing: 10rpx;
position: relative; position: relative;
} }
.pic { .pic {
padding-top: 150rpx; padding-top: 100rpx;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
+6 -2
View File
@@ -1,5 +1,5 @@
<template> <template>
<view v-if="template"> <view class="container-box">
<SelectPic v-if="!imageUrl" @onChange="onChange" /> <SelectPic v-if="!imageUrl" @onChange="onChange" />
<template v-if="imageUrl"> <template v-if="imageUrl">
<view class="clothes-box"> <view class="clothes-box">
@@ -81,7 +81,7 @@
function deleteClothes() { function deleteClothes() {
FittingRoomApi.deleteCloth({ id: clothesId.value }).then((res) => { FittingRoomApi.deleteCloth({ id: clothesId.value }).then((res) => {
fittingRoomStore.currentClothes = [] fittingRoomStore.currentClothes = [];
sheep.$router.go('/pages/fittingRoom/index'); sheep.$router.go('/pages/fittingRoom/index');
}); });
} }
@@ -147,11 +147,15 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.container-box {
padding-bottom: 200rpx;
}
.operating { .operating {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
margin-top: 200rpx; margin-top: 200rpx;
padding: 0 20rpx; padding: 0 20rpx;
margin-bottom: 200rpx;
} }
.delete { .delete {
width: 250rpx; width: 250rpx;
+1 -1
View File
@@ -16,7 +16,7 @@ page {
// font-family: OPPOSANS; // font-family: OPPOSANS;
word-break: break-all; //英文文本不换行 word-break: break-all; //英文文本不换行
white-space: normal; white-space: normal;
background-color: $bg-page; //background-color: $bg-page;
color: $dark-3; color: $dark-3;
} }
::-webkit-scrollbar { ::-webkit-scrollbar {
+9 -8
View File
@@ -103,22 +103,22 @@ const fittingRoom = defineStore({
async tryOn() { async tryOn() {
if (!this.currentModel?.id) { if (!this.currentModel?.id) {
sheep.$helper.toast('请选择模特'); sheep.$helper.toast('请选择模特');
return return;
} }
if (!this.currentClothes?.[0]?.fileUrl) { if (!this.currentClothes?.[0]?.fileUrl) {
sheep.$helper.toast('请选择衣服'); sheep.$helper.toast('请选择衣服');
return return;
} }
const httpResponse = await FittingRoomApi.tryOnApi({ const httpResponse = await FittingRoomApi.tryOnApi({
"modelId": this.currentModel.id, modelId: this.currentModel.id,
"modelImageUrl": this.currentModel.fileUrl, modelImageUrl: this.currentModel.fileUrl,
"clothingImageUrl": this.currentClothes[0]?.fileUrl, clothingImageUrl: this.currentClothes[0]?.fileUrl,
}); });
if (httpResponse.code !== 0) { if (httpResponse.code !== 0) {
sheep.$helper.toast(httpResponse.msg); sheep.$helper.toast(httpResponse.msg);
return return;
} }
this.getTestResults(this.currentModel.id) this.getTestResults(this.currentModel.id);
}, },
// 切换模特 // 切换模特
switchModels(item) { switchModels(item) {
@@ -127,6 +127,7 @@ const fittingRoom = defineStore({
} }
console.log('🚀 ~ switchModels 🐶106 ~ item: ', item); console.log('🚀 ~ switchModels 🐶106 ~ item: ', item);
this.currentModel = item; this.currentModel = item;
this.setVisable();
this.getTestResults(item.id); this.getTestResults(item.id);
}, },
async uploadAndEditCloth(data = {}) { async uploadAndEditCloth(data = {}) {
@@ -162,7 +163,7 @@ const fittingRoom = defineStore({
}, },
// 点击衣服 // 点击衣服
changeClothes(data) { changeClothes(data) {
console.log("🚀 ~ changeClothes ~ data: ", data); console.log('🚀 ~ changeClothes ~ data: ', data);
this.currentClothes = [data]; this.currentClothes = [data];
console.log('切换衣服'); console.log('切换衣服');
}, },
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB