商城调整
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
<div v-else class="orders-container">
|
||||
<div v-for="order in filteredOrders" :key="order.id" class="order-card">
|
||||
<!-- 订单头部 -->
|
||||
<div class="order-header">
|
||||
@@ -78,11 +78,6 @@
|
||||
<el-icon><Coin /></el-icon>
|
||||
{{ item.points }}
|
||||
</span>
|
||||
<span class="plus-sign">+</span>
|
||||
<span class="price">
|
||||
<img src="/imgs/profile/融豆.png" alt="融豆" class="rongdou-icon" />
|
||||
{{ item.rongdouPrice }}
|
||||
</span>
|
||||
</div>
|
||||
<span class="quantity">x{{ item.quantity }}</span>
|
||||
</div>
|
||||
@@ -100,10 +95,6 @@
|
||||
<span class="total-points">
|
||||
<el-icon><Coin /></el-icon>{{ order.totalPoints }}
|
||||
</span>
|
||||
<span class="plus-sign">+</span>
|
||||
<span class="total-rongdou">
|
||||
<img src="/imgs/profile/融豆.png" alt="融豆" class="rongdou-icon" />{{ order.totalRongdou }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -111,6 +102,14 @@
|
||||
|
||||
<!-- 订单操作 -->
|
||||
<div class="order-actions">
|
||||
<el-button
|
||||
v-if="order.status === 'pending'"
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="goToPay(order.id)"
|
||||
>
|
||||
立即支付
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="order.status === 'pending'"
|
||||
size="small"
|
||||
@@ -251,8 +250,6 @@
|
||||
<div class="product-price">
|
||||
<div class="detail-item-price-group">
|
||||
<span><el-icon><Coin /></el-icon>{{ item.points }}</span>
|
||||
<span class="plus-sign">+</span>
|
||||
<span><img src="/imgs/profile/融豆.png" alt="融豆" class="rongdou-icon" />{{ item.rongdouPrice }}</span>
|
||||
</div>
|
||||
<span class="quantity-text">x {{ item.quantity }}</span>
|
||||
</div>
|
||||
@@ -279,8 +276,6 @@
|
||||
<div class="value">
|
||||
<span class="detail-price-group">
|
||||
<span><el-icon><Coin /></el-icon>{{ orderDetail.totalPoints }}</span>
|
||||
<span class="plus-sign">+</span>
|
||||
<span><img src="/imgs/profile/融豆.png" alt="融豆" class="rongdou-icon" />{{ orderDetail.totalRongdou }}</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -289,8 +284,6 @@
|
||||
<div class="value">
|
||||
<span class="detail-price-group">
|
||||
<span><el-icon><Coin /></el-icon>{{ orderDetail.totalPoints }}</span>
|
||||
<span class="plus-sign">+</span>
|
||||
<span><img src="/imgs/profile/融豆.png" alt="融豆" class="rongdou-icon" />{{ orderDetail.totalRongdou }}</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -333,7 +326,7 @@ const submittingReview = ref(false)
|
||||
// 状态标签
|
||||
const statusTabs = ref([
|
||||
{ label: '全部', value: 'all', count: 0 },
|
||||
{ label: '待发货', value: 'pending', count: 0 },
|
||||
{ label: '待支付', value: 'pending', count: 0 },
|
||||
{ label: '已发货', value: 'shipped', count: 0 },
|
||||
{ label: '已完成', value: 'completed', count: 0 },
|
||||
{ label: '已取消', value: 'cancelled', count: 0 }
|
||||
@@ -355,7 +348,7 @@ const selectStatus = (status) => {
|
||||
const getEmptyText = () => {
|
||||
const textMap = {
|
||||
all: '暂无订单',
|
||||
pending: '暂无待发货订单',
|
||||
pending: '暂无待支付订单',
|
||||
shipped: '暂无已发货订单',
|
||||
completed: '暂无已完成订单',
|
||||
cancelled: '暂无已取消订单'
|
||||
@@ -386,7 +379,7 @@ const mapOrderStatus = (backendStatus) => {
|
||||
|
||||
const getStatusText = (status) => {
|
||||
const textMap = {
|
||||
pending: '待发货',
|
||||
pending: '待支付',
|
||||
shipped: '已发货',
|
||||
completed: '已完成',
|
||||
cancelled: '已取消'
|
||||
@@ -411,6 +404,10 @@ const goToProduct = (productId) => {
|
||||
router.push(`/product/${productId}`)
|
||||
}
|
||||
|
||||
const goToPay = (orderId) => {
|
||||
router.push(`/pay/${orderId}`)
|
||||
}
|
||||
|
||||
const cancelOrder = async (orderId) => {
|
||||
try {
|
||||
await ElMessageBox.confirm('确定要取消这个订单吗?', '确认取消', {
|
||||
@@ -720,7 +717,12 @@ onMounted(() => {
|
||||
.orders-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.orders-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.order-card {
|
||||
|
||||
Reference in New Issue
Block a user