接入商品评论数据

This commit is contained in:
2026-03-20 17:30:30 +08:00
parent 620ae742df
commit 13811ae87d
14 changed files with 535 additions and 1753 deletions

View File

@@ -1,8 +1,4 @@
<<<<<<< HEAD
<!-- 商家端 - 商品管理列表页面 -->
=======
<!-- 商家端 - 商品管理列表页面 -->
>>>>>>> local-backup-root-cyj
<template>
<view class="products-page">
<!-- 搜索栏 -->
@@ -88,20 +84,12 @@
</text>
</view>
<text class="product-subtitle">{{ product.subtitle || '暂无描述' }}</text>
<<<<<<< HEAD
<view class="product-tags" v-if="product.tags">
<text v-if="product.is_hot" class="tag hot">热</text>
<text v-if="product.is_new" class="tag new">新</text>
<text v-if="product.is_featured" class="tag recommend">荐</text>
</view>
=======
<view class="product-tags">
<text v-if="product.is_hot" class="tag hot">热</text>
<text v-if="product.is_new" class="tag new">新</text>
<text v-if="product.is_featured" class="tag recommend">荐</text>
<text v-if="product.is_vip_discount" class="tag vip">VIP</text>
</view>
>>>>>>> local-backup-root-cyj
<view class="product-stats">
<view class="price-row">
<text class="current-price">¥{{ product.base_price }}</text>
@@ -235,11 +223,7 @@
if (this.currentFilter === 'onsale') {
query = query.eq('status', 1)
} else if (this.currentFilter === 'offsale') {
<<<<<<< HEAD
query = query.eq('status', 0)
=======
query = query.eq('status', 2)
>>>>>>> local-backup-root-cyj
} else if (this.currentFilter === 'low_stock') {
query = query.lte('total_stock', this.lowStockThreshold).gte('total_stock', 0)
}
@@ -276,11 +260,7 @@
market_price: prodObj.getNumber('market_price') || 0,
total_stock: prodObj.getNumber('total_stock') || 0,
sale_count: prodObj.getNumber('sale_count') || 0,
<<<<<<< HEAD
status: prodObj.getNumber('status') || 0,
=======
status: prodObj.getNumber('status') || 1,
>>>>>>> local-backup-root-cyj
is_hot: prodObj.getBoolean('is_hot') || false,
is_new: prodObj.getBoolean('is_new') || false,
is_featured: prodObj.getBoolean('is_featured') || false,
@@ -353,11 +333,7 @@
},
async toggleStatus(product: ProductType) {
<<<<<<< HEAD
const newStatus = product.status === 1 ? 0 : 1
=======
const newStatus = product.status === 1 ? 2 : 1
>>>>>>> local-backup-root-cyj
const actionText = newStatus === 1 ? '上架' : '下架'
uni.showModal({
@@ -420,21 +396,13 @@
getStatusClass(status: number): string {
if (status === 1) return 'status-onsale'
<<<<<<< HEAD
if (status === 0) return 'status-offsale'
=======
if (status === 2 || status === 0) return 'status-offsale'
>>>>>>> local-backup-root-cyj
return 'status-pending'
},
getStatusText(status: number): string {
if (status === 1) return '在售'
<<<<<<< HEAD
if (status === 0) return '已下架'
=======
if (status === 2 || status === 0) return '已下架'
>>>>>>> local-backup-root-cyj
return '待审核'
}
}
@@ -634,12 +602,6 @@
color: #fff;
}
<<<<<<< HEAD
.tag.recommend {
background-color: #9C27B0;
color: #fff;
}
=======
.tag.recommend {
background-color: #9C27B0;
color: #fff;
@@ -650,7 +612,6 @@
color: #333;
font-weight: bold;
}
>>>>>>> local-backup-root-cyj
.product-stats {
display: flex;
@@ -756,9 +717,3 @@
font-weight: bold;
}
</style>
<<<<<<< HEAD
=======
>>>>>>> local-backup-root-cyj