feat(fittingRoom): 新增试衣间功能

- 添加 fittingRoom 存储模块,用于管理试衣间状态和数据
- 实现试衣间页面布局和基础功能,包括轮播图、标签页、衣服网格等组件
- 开发选择模特和上传衣服功能
- 优化页面样式和交互
This commit is contained in:
liguigong
2025-09-19 19:27:22 +08:00
parent cb434a532c
commit 4ea873c1bd
74 changed files with 7963 additions and 321 deletions
+37 -32
View File
@@ -1,30 +1,42 @@
<!-- 首页支持店铺装修 -->
<template>
<view v-if="template">
<uni-swiper-dot :info="state.info" :current="state.current" field="content" :mode="'default'">
<uni-swiper-dot :current="state.current" :info="state.info" :mode="'default'" field="content">
<view class="uni-margin-wrap">
<swiper
class="swiper"
circular
:autoplay="true"
:interval="2000"
:duration="500"
:interval="5000"
circular
class="swiper"
@change="swiperChange"
>
<swiper-item v-for="(item, index) in state.info" :key="index">
<view class="swiper-item uni-bg-red">{{ item.content }}</view>
<view class="swiper-item uni-bg-red">
<image class="swiper-image" mode="heightFix" src="/static/mote.png"></image>
</view>
</swiper-item>
</swiper>
<s-select-mote />
</view>
</uni-swiper-dot>
<uv-sticky :customNavHeight="0" :offset-top="0">
<s-tabs />
</uv-sticky>
<s-grid-clothes />
<view class="height1"></view>
</view>
</template>
<script setup>
import { computed, reactive } from 'vue';
import { computed, reactive, ref } from 'vue';
import { onLoad, onPageScroll, onPullDownRefresh } from '@dcloudio/uni-app';
import sheep from '@/sheep';
import $share from '@/sheep/platform/share';
import SSelectMote from './components/s-select-mote.vue';
import STabs from './components/STabs.vue';
import SGridClothes from './components/s-grid-clothes.vue'; // 隐藏原生tabBar
const fittingRoom = sheep.$store('fittingRoom');
sheep.$helper.toast('请选择是否同意协议');
// 隐藏原生tabBar
uni.hideTabBar({
fail: () => {},
@@ -45,32 +57,10 @@
current: 0,
});
const swiperChange = (e) => {
console.log('🚀 ~ swiperChange 🐶40 ~ e: ', e);
state.current = e.detail.current;
};
const template = computed(() => sheep.$store('app').template?.home);
// 在此处拦截改变一下首页轮播图 此处先写死后期复活 放到启动函数里
// (async function() {
// console.log('原代码首页定制化数据',template)
// let {
// data
// } = await index2Api.decorate();
// console.log('首页导航配置化过高无法兼容',JSON.parse(data[1].value))
// 改变首页底部数据 但是没有通过数组id获取商品数据接口
// let {
// data: datas
// } = await index2Api.spids();
// template.value.data[9].data.goodsIds = datas.list.map(item => item.id);
// template.value.data[0].data.list = JSON.parse(data[0].value).map(item => {
// return {
// src: item.picUrl,
// url: item.url,
// title: item.name,
// type: "image"
// }
// })
// }())
onLoad((options) => {
// #ifdef MP
@@ -109,32 +99,47 @@
onPageScroll(() => {});
</script>
<style>
<style lang="scss" scoped>
.uni-margin-wrap {
width: 100%;
}
.swiper {
height: 680rpx;
}
.swiper-item {
display: block;
height: 680rpx;
line-height: 300rpx;
text-align: center;
background: green;
background: #ffffff;
}
.swiper-image {
width: 100%;
height: 100%;
}
.height1 {
height: 2000px;
}
.swiper-list {
margin-top: 40rpx;
margin-bottom: 0;
}
.uni-common-mt {
margin-top: 60rpx;
position: relative;
}
.info {
position: absolute;
right: 20rpx;
}
.uni-padding-wrap {
width: 550rpx;
padding: 0 100rpx;