consumer模块完成95%,在和商家端对接聊天购物闭环

This commit is contained in:
2026-02-06 17:10:31 +08:00
parent 06b7369494
commit e2f1dfb097
1454 changed files with 5425 additions and 210555 deletions

View File

@@ -3,9 +3,10 @@
<view class="footprint-page">
<!-- 顶部栏 -->
<view class="footprint-header">
<view class="header-title">
<!-- Title hidden as requested -->
<!-- <view class="header-title">
<text class="title-text">我的足迹</text>
</view>
</view> -->
<view v-if="footprints.length > 0" class="header-actions">
<text class="action-btn" @click="toggleEditMode">{{ isEditMode ? '完成' : '编辑' }}</text>
<text class="action-btn" @click="clearAll">清空</text>
@@ -39,17 +40,19 @@
</view>
</view>
<view class="item-content" @click="viewProduct(item)">
<image class="product-image" :src="item.image" />
<image class="product-image" :src="item.image" mode="aspectFill" />
<view class="product-info">
<text class="product-name">{{ item.name }}</text>
<view class="product-price-row">
<text class="current-price">¥{{ item.price }}</text>
<text v-if="item.original_price && item.original_price > item.price"
class="original-price">¥{{ item.original_price }}</text>
</view>
<view class="product-meta">
<text class="sales-text">已售{{ item.sales }}</text>
<text class="time-text">{{ formatTime(item.viewTime) }}</text>
<view class="product-bottom">
<view class="product-price-row">
<text class="current-price">¥{{ item.price }}</text>
<!-- <text v-if="item.original_price && item.original_price > item.price"
class="original-price">¥{{ item.original_price }}</text> -->
</view>
<!-- <view class="product-meta">
<text class="sales-text">已售{{ item.sales }}</text>
<text class="time-text">{{ formatTime(item.viewTime) }}</text>
</view> -->
</view>
</view>
</view>
@@ -415,7 +418,8 @@ const goShopping = () => {
}
.header-title {
flex: 1;
/* margin-left: 15px; */ /* Removed */
display: none;
}
.title-text {
@@ -426,13 +430,19 @@ const goShopping = () => {
.header-actions {
display: flex;
flex-direction: row;
gap: 20px;
flex: 1;
justify-content: flex-end; /* Align Edit/Clear to the right */
align-items: center;
padding-right: 0;
}
.action-btn {
color: #007aff;
font-size: 14px;
padding: 5px;
margin-left: 20px;
}
.footprint-content {
@@ -477,12 +487,12 @@ const goShopping = () => {
.date-group {
background-color: #ffffff;
margin-bottom: 10px;
padding: 0 15px;
padding: 0 10px;
}
.group-header {
padding: 15px 0;
border-bottom: 1px solid #f5f5f5;
padding: 15px 5px;
/* border-bottom: 1px solid #f5f5f5; */
display: flex;
align-items: center;
justify-content: space-between;
@@ -500,21 +510,41 @@ const goShopping = () => {
}
.group-items {
padding: 10px 0;
padding: 0;
display: flex;
flex-direction: row;
flex-wrap: wrap;
gap: 10px;
}
.footprint-item {
display: flex;
padding: 15px 0;
border-bottom: 1px solid #f5f5f5;
flex-direction: column; /* 垂直排列内容 */
/* padding: 15px 0; */ /* Grid layout uses gap */
margin-bottom: 10px;
border-bottom: none;
width: calc(50% - 5px); /* Mobile: 2 items per row */
background-color: #fff;
/* border-radius: 8px; */ /* Optional card style */
/* overflow: hidden; */
position: relative; /* For absolute positioning of selector */
}
/*
.footprint-item:last-child {
border-bottom: none;
}
}
*/
.item-selector {
width: 50px;
position: absolute;
top: 5px;
right: 5px;
z-index: 10;
width: 30px;
height: 30px;
/* background-color: rgba(255,255,255,0.8); */
border-radius: 15px;
display: flex;
align-items: center;
justify-content: center;
@@ -525,6 +555,7 @@ const goShopping = () => {
height: 20px;
border: 1px solid #cccccc;
border-radius: 10px;
background-color: rgba(255,255,255,0.5);
display: flex;
align-items: center;
justify-content: center;
@@ -543,13 +574,16 @@ const goShopping = () => {
.item-content {
flex: 1;
display: flex;
flex-direction: column; /* 垂直堆叠 */
}
.product-image {
width: 80px;
height: 80px;
width: 100%;
height: 170px; /* Adjust height based on aspect ratio preference */
border-radius: 5px;
margin-right: 15px;
margin-right: 0;
margin-bottom: 8px;
background-color: #f5f5f5;
}
.product-info {
@@ -557,30 +591,57 @@ const goShopping = () => {
display: flex;
flex-direction: column;
justify-content: space-between;
padding: 0 4px;
}
.product-name {
font-size: 14px;
color: #333333;
line-height: 1.4;
margin-bottom: 10px;
margin-bottom: 6px;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
height: 40px;
}
.product-bottom {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.product-price-row {
display: flex;
align-items: baseline;
margin-bottom: 10px;
margin-bottom: 0;
}
.current-price {
font-size: 16px;
color: #ff4757;
font-weight: bold;
margin-right: 10px;
margin-right: 0;
}
/* PC/Tablet Responsive */
@media (min-width: 768px) {
.footprint-item {
width: calc(33.33% - 7px) !important; /* Tablet: 3 items */
}
}
@media (min-width: 1024px) {
.footprint-item {
width: calc(16.66% - 9px) !important; /* PC: 6 items */
}
.footprint-content, .footprint-header {
max-width: 1200px;
margin: 0 auto;
}
}
.original-price {