feat : 商品详情部分添加价格说明

This commit is contained in:
赵毅 2025-07-24 11:52:22 +08:00
parent 0770dd40fb
commit ad75a5142d
3 changed files with 41 additions and 13 deletions

View File

@ -1,13 +1,5 @@
<template> <template>
<view class="container"> <view class="container">
<!-- 商品图片区域 -->
<scroll-view class="goods-scroll" scroll-x>
<view class="goods-list">
<view class="goods-item" v-for="(item, index) in goods" :key="index">
<image :src="item.image" class="goods-img"></image>
</view>
</view>
</scroll-view>
<!-- 评分区域 --> <!-- 评分区域 -->
<view class="rating-section"> <view class="rating-section">

View File

@ -1,6 +1,6 @@
page { page {
background-color: #fff; background-color: #fff;
padding-bottom: 0; padding-bottom: 20rpx;
min-height: 100vh; min-height: 100vh;
} }
@ -28,9 +28,6 @@ image {
padding-left: 20rpx; padding-left: 20rpx;
} }
.swiper { .swiper {
height: 750rpx; height: 750rpx;
width: 750rpx; width: 750rpx;
@ -369,3 +366,25 @@ image {
background: #FF370B; background: #FF370B;
color: #fff; color: #fff;
} }
.priceInfo{
height: 450rpx;
padding: 20rpx;
}
.priceInfo-title{
font-size: 30rpx;
font-weight: bolder;
margin: 15rpx 0 20rpx 0;
}
.priceInfo-content{
font-size: 28rpx;
color: #9c9c9c;
line-height: 1.5;
}
.priceInfo-content-title{
font-size: 28rpx;
color: #333;
}

View File

@ -91,6 +91,20 @@
></image> ></image>
</div> </div>
<div class="priceInfo">
<div class="priceInfo-title">价格说明</div>
<div class="priceInfo-content">
<view>
<text class="priceInfo-content-title">划线价格</text>
指商品的厂商指导价正品零售价市面常见价或该商品曾经展示过的销售价等并非原价仅供参考
</view>
<view>
<text class="priceInfo-content-title">未划线价格</text>
指商品的实时价格不因表述的差异改变性质具体成交价格根据商品参加活动或使用优惠券等发生变化最终以订单结算价格为准
</view>
</div>
</div>
<!-- 底部购物车 --> <!-- 底部购物车 -->
<div class="Car"> <div class="Car">
<div class="car_left"> <div class="car_left">
@ -358,6 +372,7 @@ export default {
// //
changeGG(item, index) { changeGG(item, index) {
console.log("🚀 ~ changeGG ~ item-----------------:", item);
this.currentGG = item; this.currentGG = item;
this.currentGGIndex = index; this.currentGGIndex = index;
if (this.currentGG.cart_count) { if (this.currentGG.cart_count) {
@ -430,7 +445,8 @@ export default {
user_id: uni.getStorageSync("userId"), user_id: uni.getStorageSync("userId"),
goods_id_and_count: [ goods_id_and_count: [
{ {
goods_id: this.info.commodity_goods_info_list[this.currentGGIndex].id, goods_id:
this.info.commodity_goods_info_list[this.currentGGIndex].id,
count: newValue.value, count: newValue.value,
}, },
], ],
@ -447,6 +463,7 @@ export default {
}, },
onLoad(options) { onLoad(options) {
const itemObj = JSON.parse(decodeURIComponent(options.item)); const itemObj = JSON.parse(decodeURIComponent(options.item));
console.log("🚀 ~ onLoad ~ itemObj:", itemObj);
const meun = menuButtonInfo(); const meun = menuButtonInfo();
this.top = meun.top; this.top = meun.top;
this.localHeight = meun.height; this.localHeight = meun.height;