feat:app改造

This commit is contained in:
2026-08-17 09:27:07 +08:00
parent aa20d121f7
commit 97d3e1cd36
11 changed files with 1923 additions and 271 deletions
+45 -4
View File
@@ -2,7 +2,7 @@
<view class="parity-product-item-wrap">
<!-- 样式 1 (图2样式) -->
<view class="parity-product-item type-1" @click.stop="onClick" v-if="type == 1 || type == '1'">
<image class="top-img-1" :src="obj.url" mode="aspectFill" lazy-load />
<image class="top-img-1" :src="obj.bargainMainGraph || obj.url" mode="aspectFill" lazy-load />
<view class="shop-bottom-panel-1">
<view class="title-box">
<text class="tag-badge" :style="{ backgroundColor: effectiveTagColor }" v-if="tagName || obj.tagName">
@@ -11,6 +11,13 @@
<text class="title-text">{{ obj.title }}</text>
</view>
<!-- 标签 sellingPoint -->
<view class="selling-point-box" v-if="sellingPointList && sellingPointList.length">
<text class="selling-point-item" v-for="(item, index) in sellingPointList" :key="index">
{{ item }}
</text>
</view>
<!-- 有优惠券/积分 -->
<view class="price-action-row" v-if="obj.buyDeductionValue">
<view class="price-left">
@@ -92,8 +99,8 @@ export default {
},
computed: {
getOrigPrice() {
if (this.obj && this.obj.aa !== undefined && this.obj.aa !== null && this.obj.aa !== '') {
return this.obj.aa;
if (this.obj && this.obj.adPrice !== undefined && this.obj.adPrice !== null && this.obj.adPrice !== '') {
return this.obj.adPrice;
}
return this.obj ? (this.obj.originalPrice || this.obj.marketPrice || this.obj.linePrice || this.obj.oldPrice || '') : '';
},
@@ -111,6 +118,18 @@ export default {
if (tag.includes('低价') || tag.includes('好物')) return '#FF9800';
if (tag.includes('品牌') || tag.includes('特卖')) return '#333333';
return '#7A35F6';
},
sellingPointList() {
if (!this.obj) return [];
const sp = this.obj.sellingPoint || this.obj.selling_point || this.obj.sellingPoints;
if (!sp) return [];
if (Array.isArray(sp)) {
return sp.map(item => String(item).trim()).filter(Boolean);
}
if (typeof sp === 'string') {
return sp.split(/[,,]/).map(item => item.trim()).filter(Boolean);
}
return [];
}
},
methods: {
@@ -150,7 +169,6 @@ export default {
.title-box {
font-size: 28rpx;
color: #1a1a1a;
max-height: 80rpx;
font-weight: bold;
overflow: hidden;
text-overflow: ellipsis;
@@ -173,6 +191,29 @@ export default {
vertical-align: middle;
}
.selling-point-box {
display: flex;
flex-wrap: wrap;
align-items: center;
margin-top: 12rpx;
}
.selling-point-item {
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 20rpx;
color: #34C79F;
background-color: #ECFAF7;
border: 1rpx solid #34C79F;
border-radius: 6rpx;
padding: 2rpx 10rpx;
margin-right: 10rpx;
margin-bottom: 6rpx;
white-space: nowrap;
box-sizing: border-box;
}
.price-action-row {
display: flex;
justify-content: space-between;