fix(fittingRoom):优化试衣间页面逻辑与组件交互
- 移除未使用的点击事件和相关函数 - 调整轮播图获取结果的定时器间隔从2秒至6秒 - 更新下拉刷新逻辑,仅在存在模型ID时请求数据 - 修改页面卸载钩子为onUnload并清理定时器- 禁用服饰上传页的下拉刷新功能 -优化网格组件中衣物切换判断条件 - 更新文件最后编辑时间和作者信息- 调整试衣间页面结构与样式高度单位统一为rpx- 注释掉部分冗余或调试用途的代码逻辑 - 全局函数updateToken语法规范化并移除初始化调用
This commit is contained in:
@@ -1,29 +1,28 @@
|
||||
<!--
|
||||
* @Author: liguigong liguigong@shopline.com
|
||||
* @Date: 2025-09-19 16:26:36
|
||||
* @LastEditors:
|
||||
* @LastEditTime: 2025-09-27 16:37:29
|
||||
* @LastEditors: liguigong liguigong@shopline.com
|
||||
* @LastEditTime: 2025-09-28 14:54:34
|
||||
* @FilePath: pages/fittingRoom/components/s-grid-clothes.vue
|
||||
* @Description: 这是默认设置,可以在设置》工具》File Description中进行配置
|
||||
-->
|
||||
<template>
|
||||
<view class="tabContainer">
|
||||
<uni-grid :column="4" :highlight="true" :square="false" borderColor="#000" @change="change">
|
||||
<uni-grid-item
|
||||
v-for="(item, index) in fittingRoomStore.clothes"
|
||||
:key="index"
|
||||
:index="item"
|
||||
>
|
||||
<uni-grid-item v-for="(item, index) in fittingRoomStore.clothes" :key="index" :index="item">
|
||||
<view class="grid-item-box" style="background-color: #fff">
|
||||
<view v-if="fittingRoomStore.currentClothes.some(v => v.clothId === item.clothId)" class="inUse">
|
||||
<view
|
||||
v-if="fittingRoomStore.currentClothes.some((v) => v.clothId === item.clothId)"
|
||||
class="inUse"
|
||||
>
|
||||
<view class="edit" @click="goEdit(item)">编辑</view>
|
||||
</view>
|
||||
|
||||
<template v-if="fittingRoomStore.canUpload && index === 0">
|
||||
<image
|
||||
:src="`/static/uploads/${fittingRoomStore.tab}.png`"
|
||||
class="clothes"
|
||||
mode="aspectFill"
|
||||
src="/static/uploads/1.png"
|
||||
@click="uploadFile"
|
||||
></image>
|
||||
</template>
|
||||
@@ -71,8 +70,10 @@
|
||||
}
|
||||
|
||||
function change(e) {
|
||||
fittingRoomStore.changeClothes(e.detail.index);
|
||||
console.log('🚀 ~ change 🐶63 ~ index: ', e.detail.index);
|
||||
if (e.detail.index?.clothId) {
|
||||
fittingRoomStore.changeClothes(e.detail.index);
|
||||
console.log('🚀 ~ change 🐶63 ~ index: ', e.detail.index);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user