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