fix(fittingRoom): 修复试衣间页面交互与样式问题
- 统一代码风格,修复缺少分号问题-优化试衣结果图片加载逻辑,添加默认loading图 - 修复上传衣物页面容器样式问题 - 调整模特切换逻辑,增加可见性控制- 更新README文档,添加试衣间相关链接 -优化上传衣物选择器样式与交互细节
This commit is contained in:
@@ -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('切换衣服');
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user