style(report): 调整页面元素属性顺序和样式优化

- 统一HTML属性排序,将v-if指令置于class之前
- 优化图片标签属性顺序,提升代码可读性
- 调整内联样式位置,保持一致的编码风格
- 重新排列组件属性顺序,提高模板整洁度
- 更新CSS样式声明顺序,增强维护性
- 优化条件渲染逻辑的位置安排
- 统一标签闭合格式和属性书写规范
This commit is contained in:
liguigong
2025-11-24 17:56:29 +08:00
parent 50f6e8a4ba
commit 0ea0856670
+27 -25
View File
@@ -14,9 +14,9 @@
<!-- <Header v-if="!!userFaceInfo" :userFaceInfo="userFaceInfo" /> --> <!-- <Header v-if="!!userFaceInfo" :userFaceInfo="userFaceInfo" /> -->
<Header v-if="collect" :userFaceInfo="collect" /> <Header v-if="collect" :userFaceInfo="collect" />
<view class="download" @click="openEmailDialog" v-if="!isInPptr"> <view v-if="!isInPptr" class="download" @click="openEmailDialog">
<view class="download-left"> <view class="download-left">
<img src="/static/pdf-icon.png" class="pdf-icon" /> <img class="pdf-icon" src="/static/pdf-icon.png" />
</view> </view>
<view class="download-center">输入邮件地址获取PDF报告</view> <view class="download-center">输入邮件地址获取PDF报告</view>
@@ -30,24 +30,24 @@
</view> </view>
<view <view
style="display: block; background-color: white; position: relative; z-index: 2"
v-if="isInPptr" v-if="isInPptr"
style="display: block; background-color: white; position: relative; z-index: 2"
> >
<img src="/static/nav-1.png" style="width: 100%; display: block" /> <img src="/static/nav-1.png" style="width: 100%; display: block" />
<img src="/static/nav-2.png" style="width: 100%; display: block" /> <img src="/static/nav-2.png" style="width: 100%; display: block" />
</view> </view>
<view :class="classFixed" style="width: 100%" v-if="!isInPptr"> <view v-if="!isInPptr" :class="classFixed" style="width: 100%">
<Tabs :tabs="tabsList" :activeTab="activeTab" @update:activeTab="onTabChange"> </Tabs> <Tabs :activeTab="activeTab" :tabs="tabsList" @update:activeTab="onTabChange"> </Tabs>
</view> </view>
<view <view
class="content" v-if="collect"
:style="{ :style="{
paddingTop: (classFixed === '' ? 0 : 60) + 'px', paddingTop: (classFixed === '' ? 0 : 60) + 'px',
overflowY: 'hidden', overflowY: 'hidden',
}" }"
v-if="collect" class="content"
> >
<view v-if="isInPptr ? true : activeTab === 0"> <view v-if="isInPptr ? true : activeTab === 0">
<view class="style-type"> <view class="style-type">
@@ -82,28 +82,28 @@
<SkinColor :skinColor="collect?.complexion" /> <SkinColor :skinColor="collect?.complexion" />
<FacialColorLatitude <FacialColorLatitude
:hue="collect?.hue ?? 0"
:chroma="collect?.chroma ?? 0" :chroma="collect?.chroma ?? 0"
:hue="collect?.hue ?? 0"
:luminance="collect?.luminance ?? 0" :luminance="collect?.luminance ?? 0"
/> />
<!-- 轮廓类型--> <!-- 轮廓类型-->
<template v-if="customFigure"> <template v-if="customFigure">
<SensoryTypes <SensoryTypes
:type="collect.straight_total_score_t"
:ai-desc="customFigure?.contour?.desc" :ai-desc="customFigure?.contour?.desc"
:type="collect.straight_total_score_t"
/> />
<!-- 量感类型--> <!-- 量感类型-->
<TypeOfMass <TypeOfMass
:type="collect.total_sense_of_quantity_t"
:ai-desc="customFigure?.quantity?.desc" :ai-desc="customFigure?.quantity?.desc"
:type="collect.total_sense_of_quantity_t"
/> />
<!-- <h1>动静类型</h1> --> <!-- <h1>动静类型</h1> -->
<!-- 动静类型--> <!-- 动静类型-->
<Movementtype <Movementtype
:type="collect.dynamic_static_t"
:ai-desc="customFigure?.movement?.desc" :ai-desc="customFigure?.movement?.desc"
:type="collect.dynamic_static_t"
/> />
<!-- 体型--> <!-- 体型-->
<BodyType :body-type="collect?.somatotype" :gender="collect?.gender" /> <BodyType :body-type="collect?.somatotype" :gender="collect?.gender" />
@@ -138,16 +138,16 @@
<img :src="pngImgUrl + 'rightRe.png'" alt="" srcset="" /> <img :src="pngImgUrl + 'rightRe.png'" alt="" srcset="" />
</view> </view>
</view> </view>
<swiper class="swiper" @change="chageSwiper" :current="current"> <swiper :current="current" class="swiper" @change="chageSwiper">
<swiper-item v-for="(item, index) in newColorTypeList" :key="index"> <swiper-item v-for="(item, index) in newColorTypeList" :key="index">
<view class="swiper-item"> <view class="swiper-item">
<view class="img-box"> <view class="img-box">
<view style="width: 235px; height: 235px; position: absolute; z-index: 99"> <view style="width: 235px; height: 235px; position: absolute; z-index: 99">
<img <img
style="width: 235px; height: 235px"
:src="item.avatarFrameImgUrl" :src="item.avatarFrameImgUrl"
alt="" alt=""
srcset="" srcset=""
style="width: 235px; height: 235px"
/> />
</view> </view>
<view class="avatar"> <view class="avatar">
@@ -171,9 +171,9 @@
</view> </view>
<view class="padding-top20"> <view class="padding-top20">
<img <img
class="image"
:src="colorTypeText.colourDiscImgUrl" :src="colorTypeText.colourDiscImgUrl"
alt="" alt=""
class="image"
srcset="" srcset=""
@click="previewImage(colorTypeText.colourDiscImgUrl)" @click="previewImage(colorTypeText.colourDiscImgUrl)"
/> />
@@ -184,9 +184,9 @@
<view class="padding-top20"> <view class="padding-top20">
<img <img
class="image"
:src="colorTypeText.adviseImgUrl" :src="colorTypeText.adviseImgUrl"
alt="" alt=""
class="image"
srcset="" srcset=""
@click="previewImage(colorTypeText.adviseImgUrl)" @click="previewImage(colorTypeText.adviseImgUrl)"
/> />
@@ -196,9 +196,9 @@
</view> </view>
<view class="padding-top20"> <view class="padding-top20">
<img <img
class="image"
:src="colorTypeText.fashionNeutralsImgUrl" :src="colorTypeText.fashionNeutralsImgUrl"
alt="" alt=""
class="image"
srcset="" srcset=""
@click="previewImage(colorTypeText.fashionNeutralsImgUrl)" @click="previewImage(colorTypeText.fashionNeutralsImgUrl)"
/> />
@@ -213,7 +213,7 @@
<view v-if="collect?.gender === '女'" style="padding: 0 20px"> <view v-if="collect?.gender === '女'" style="padding: 0 20px">
<view class="reference-img-box"> <view class="reference-img-box">
<img class="reference-img1" :src="colorTypeInfo.useReferenceImgUrl" /> <img :src="colorTypeInfo.useReferenceImgUrl" class="reference-img1" />
</view> </view>
</view> </view>
<view style="padding-left: 20px"> 人工智能大模型在计算中可能存在0.5%的误差 </view> <view style="padding-left: 20px"> 人工智能大模型在计算中可能存在0.5%的误差 </view>
@@ -226,9 +226,9 @@
<view class="style-type"> <view class="style-type">
<view class="avatar-warp"> <view class="avatar-warp">
<view <view
:class="index === 1 ? 'avatar-main' : 'avatar-side'"
v-for="(item, index) in avatarList" v-for="(item, index) in avatarList"
:key="index" :key="index"
:class="index === 1 ? 'avatar-main' : 'avatar-side'"
> >
<img :src="item.url" alt="" srcset="" @click="previewImage(item.url)" /> <img :src="item.url" alt="" srcset="" @click="previewImage(item.url)" />
</view> </view>
@@ -242,12 +242,12 @@
}" }"
> --> > -->
<view <view
class="face-img-box"
:style="{ :style="{
height: collect?.gender === '男' ? '150px' : '328px', height: collect?.gender === '男' ? '150px' : '328px',
}" }"
class="face-img-box"
> >
<img style="object-fit: cover" :src="faceImgUrl" alt="" srcset="" /> <img :src="faceImgUrl" alt="" srcset="" style="object-fit: cover" />
</view> </view>
<rich-text :nodes="praiseTextList[1]"></rich-text> <rich-text :nodes="praiseTextList[1]"></rich-text>
<view class="more-hairstyle"> <view class="more-hairstyle">
@@ -256,13 +256,13 @@
</view> </view>
<view class="scroll-box"> <view class="scroll-box">
<view <view
class=""
@click="toHairstyleRoom(item)"
v-for="(item, index) in hairStyleList" v-for="(item, index) in hairStyleList"
:key="index" :key="index"
class=""
style="height: 103px; margin-right: 8px" style="height: 103px; margin-right: 8px"
@click="toHairstyleRoom(item)"
> >
<img style="width: 76px; height: 100%" :src="item.fileUrl" alt="" srcset="" /> <img :src="item.fileUrl" alt="" srcset="" style="width: 76px; height: 100%" />
</view> </view>
</view> </view>
</view> </view>
@@ -324,8 +324,8 @@
</view> </view>
<view> <view>
<img <img
src="https://llshop.zglvling.com/shop/img/png/h5/baseMap.png"
alt="" alt=""
src="https://llshop.zglvling.com/shop/img/png/h5/baseMap.png"
srcset="" srcset=""
/> />
</view> </view>
@@ -1466,7 +1466,7 @@
} }
</style> </style>
<style scoped lang="scss"> <style lang="scss" scoped>
.download { .download {
background-color: #d9d9d9; background-color: #d9d9d9;
height: 128rpx; height: 128rpx;
@@ -1477,6 +1477,8 @@
padding: 0 24rpx; padding: 0 24rpx;
.download-left { .download-left {
width: 102rpx;
height: 102rpx;
.pdf-icon { .pdf-icon {
width: 102rpx; width: 102rpx;
height: 102rpx; height: 102rpx;