fix: 优化体验
Some checks failed
构建并部署前端到测试环境 / build-and-deploy (push) Failing after 3h10m20s

This commit is contained in:
sexygoat
2026-05-09 16:13:39 +08:00
parent b54d8f5b32
commit 28246f5345
17 changed files with 1684 additions and 255 deletions

View File

@@ -76,6 +76,14 @@ function getPackageTypeText(type?: AssetPackage['package_type']) {
return type ? map[type] || type : '-'
}
function formatPackageEffectivePeriod(activatedAt?: string | null, expiresAt?: string | null) {
return `生效期:${formatTime(activatedAt || undefined, 'date')}${formatTime(expiresAt || undefined, 'date')}`
}
function formatCurrentPackagePeriodRange(activatedAt?: string | null, expiresAt?: string | null) {
return `生效期:${formatTime(activatedAt || undefined, 'date')} - ${formatTime(expiresAt || undefined, 'date')}`
}
// 页面加载
onMounted(() => {
// 从路由参数获取 assetType 和 assetIdentifier
@@ -506,8 +514,8 @@ function viewWallet() {
<text class="text-14px font-600 text-[#212121] block break-all">
{{ currentPackage.package_name || '-' }}
</text>
<text class="text-11px text-[#999] block mt-1 break-all">
订单号{{ currentPackage.order_no || '-' }}
<text class="text-11px text-[#64748b] block mt-1 break-all">
{{ formatCurrentPackagePeriodRange(currentPackage.activated_at, currentPackage.expires_at) }}
</text>
</view>
<view
@@ -564,14 +572,6 @@ function viewWallet() {
<text class="text-[#666]">套餐类型</text>
<text class="text-[#212121]">{{ getPackageTypeText(currentPackage.package_type) }}</text>
</view>
<view class="flex items-center justify-between text-12px">
<text class="text-[#666]">开始时间</text>
<text class="text-[#212121]">{{ formatTime(currentPackage.activated_at) }}</text>
</view>
<view class="flex items-center justify-between text-12px">
<text class="text-[#666]">到期时间</text>
<text class="text-[#212121]">{{ formatTime(currentPackage.expires_at) }}</text>
</view>
<view class="flex items-center justify-between text-12px">
<text class="text-[#666]">下单时间</text>
<text class="text-[#212121]">{{ formatTime(currentPackage.created_at) }}</text>
@@ -642,9 +642,11 @@ function viewWallet() {
<text class="text-[#666]">金额</text>
<text class="text-[#212121]">{{ formatPackagePrice(pkg.paid_amount) }}</text>
</view>
<text class="text-11px text-[#999]">
{{ pkg.activated_at || '-' }} ~ {{ pkg.expires_at || '-' }}
</text>
<view v-if="pkg.status === 1" class="mt-2 bg-[#f8fafc] rounded-8px px-2.5 py-2">
<text class="text-11px font-600 text-[#475569]">
{{ formatPackageEffectivePeriod(pkg.activated_at, pkg.expires_at) }}
</text>
</view>
</view>
</view>