mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-06 18:36:55 +08:00
feat: 更新积分历史和订单卡片组件
- 在 PointHistoryCard.vue 中优化积分来源标签显示逻辑 - 在 PointOrderCard.vue 中添加收货地址信息展示 - 修复开放平台弹幕排队无法加载的问题
This commit is contained in:
@@ -96,7 +96,7 @@ const historyColumn: DataTableColumns<ResponsePointHisrotyModel> = [
|
|||||||
case PointFrom.Manual:
|
case PointFrom.Manual:
|
||||||
return h(
|
return h(
|
||||||
NTag,
|
NTag,
|
||||||
{ type: 'success', bordered: false, size: 'small' },
|
{ type: row.point > 0 ? 'success' : 'error', bordered: false, size: 'small' },
|
||||||
() => '主播' + (row.point > 0 ? '赠予' : '扣除'),
|
() => '主播' + (row.point > 0 ? '赠予' : '扣除'),
|
||||||
)
|
)
|
||||||
case PointFrom.Use:
|
case PointFrom.Use:
|
||||||
@@ -194,22 +194,40 @@ const historyColumn: DataTableColumns<ResponsePointHisrotyModel> = [
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<!-- 无数据时显示提示 -->
|
<!-- 无数据时显示提示 -->
|
||||||
<NEmpty v-if="!histories || histories.length === 0" description="暂无积分历史记录" />
|
<NEmpty
|
||||||
|
v-if="!histories || histories.length === 0"
|
||||||
|
description="暂无积分历史记录"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- 有数据时显示表格 -->
|
<!-- 有数据时显示表格 -->
|
||||||
<NDataTable v-else :columns="historyColumn" :data="histories" :pagination="{
|
<NDataTable
|
||||||
showSizePicker: true,
|
v-else
|
||||||
pageSizes: [10, 25, 50, 100],
|
:columns="historyColumn"
|
||||||
defaultPageSize: 10,
|
:data="histories"
|
||||||
size: 'small'
|
:pagination="{
|
||||||
}" />
|
showSizePicker: true,
|
||||||
|
pageSizes: [10, 25, 50, 100],
|
||||||
|
defaultPageSize: 10,
|
||||||
|
size: 'small'
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- 商品详情模态框 -->
|
<!-- 商品详情模态框 -->
|
||||||
<NModal v-model:show="showGoodsModal" preset="card" title="礼物详情 (快照)" style="max-width: 400px; height: auto">
|
<NModal
|
||||||
|
v-model:show="showGoodsModal"
|
||||||
|
preset="card"
|
||||||
|
title="礼物详情 (快照)"
|
||||||
|
style="max-width: 400px; height: auto"
|
||||||
|
>
|
||||||
<PointGoodsItem :goods="currentGoods" />
|
<PointGoodsItem :goods="currentGoods" />
|
||||||
<template v-if="currentGoods?.content">
|
<template v-if="currentGoods?.content">
|
||||||
<NDivider>礼物内容</NDivider>
|
<NDivider>礼物内容</NDivider>
|
||||||
<NInput :value="currentGoods?.content" type="textarea" readonly placeholder="无内容" />
|
<NInput
|
||||||
|
:value="currentGoods?.content"
|
||||||
|
type="textarea"
|
||||||
|
readonly
|
||||||
|
placeholder="无内容"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</NModal>
|
</NModal>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -721,6 +721,16 @@ onMounted(() => {
|
|||||||
</NSpace>
|
</NSpace>
|
||||||
</NCard>
|
</NCard>
|
||||||
|
|
||||||
|
<!-- 收货地址信息 -->
|
||||||
|
<template v-if="orderDetail.type === GoodsTypes.Physical">
|
||||||
|
<NDivider>收货地址</NDivider>
|
||||||
|
<NCard
|
||||||
|
size="small"
|
||||||
|
class="address-info-card"
|
||||||
|
>
|
||||||
|
<AddressDisplay :address="orderDetail.address" />
|
||||||
|
</NCard>
|
||||||
|
</template>
|
||||||
|
|
||||||
<!-- 快递信息 -->
|
<!-- 快递信息 -->
|
||||||
<template v-if="orderDetail.status === PointOrderStatus.Shipped && orderDetail.instanceOf === 'owner' && orderDetail.type === GoodsTypes.Physical">
|
<template v-if="orderDetail.status === PointOrderStatus.Shipped && orderDetail.instanceOf === 'owner' && orderDetail.type === GoodsTypes.Physical">
|
||||||
@@ -939,6 +949,10 @@ onMounted(() => {
|
|||||||
box-shadow: 0 2px 8px var(--n-box-shadow-color);
|
box-shadow: 0 2px 8px var(--n-box-shadow-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.address-info-card {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.order-detail-modal {
|
.order-detail-modal {
|
||||||
max-width: 95vw;
|
max-width: 95vw;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user