移动端增加租期 展示
This commit is contained in:
@@ -520,7 +520,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.mobile-listing-no,
|
.mobile-listing-no,
|
||||||
.daily-loss-badge {
|
.rental-meta-badge {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -534,10 +534,16 @@
|
|||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.daily-loss-badge {
|
.rental-meta-badge {
|
||||||
|
gap: 2px;
|
||||||
border: none;
|
border: none;
|
||||||
background: #f5f7fa;
|
background: #f5f7fa;
|
||||||
color: #64748b;
|
color: #64748b;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.meta-separator {
|
||||||
|
color: #cbd5e1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-subtitle {
|
.card-subtitle {
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ import {
|
|||||||
getDailyLoss,
|
getDailyLoss,
|
||||||
getRatioValue,
|
getRatioValue,
|
||||||
formatListingCode,
|
formatListingCode,
|
||||||
|
formatEstimatedRentalDuration,
|
||||||
getLoginMethod,
|
getLoginMethod,
|
||||||
getServerRegion,
|
getServerRegion,
|
||||||
assetRegions,
|
assetRegions,
|
||||||
@@ -754,9 +755,21 @@ syncMobileHomeQuery()
|
|||||||
<h2>{{ getListingTitle(item) }}</h2>
|
<h2>{{ getListingTitle(item) }}</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-meta-row">
|
<div class="card-meta-row">
|
||||||
<div class="mobile-listing-no">编号 {{ formatListingCode(item) }}</div>
|
<div class="mobile-listing-no">{{ formatListingCode(item) }}</div>
|
||||||
<div v-if="getDailyLoss(item)" class="daily-loss-badge">
|
<div
|
||||||
消耗 {{ getDailyLoss(item) }}/天
|
v-if="getDailyLoss(item) || formatEstimatedRentalDuration(item) !== '--'"
|
||||||
|
class="rental-meta-badge"
|
||||||
|
>
|
||||||
|
<span v-if="getDailyLoss(item)">消耗 {{ getDailyLoss(item) }}/天</span>
|
||||||
|
<span
|
||||||
|
v-if="getDailyLoss(item) && formatEstimatedRentalDuration(item) !== '--'"
|
||||||
|
class="meta-separator"
|
||||||
|
>
|
||||||
|
·
|
||||||
|
</span>
|
||||||
|
<span v-if="formatEstimatedRentalDuration(item) !== '--'">
|
||||||
|
租期 {{ formatEstimatedRentalDuration(item) }}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-action-row">
|
<div class="card-action-row">
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import { formatCent, formatMoney } from '@/shared/utils/money'
|
|||||||
import {
|
import {
|
||||||
assetRegions,
|
assetRegions,
|
||||||
formatAssetNumber,
|
formatAssetNumber,
|
||||||
|
formatEstimatedRentalDuration,
|
||||||
formatHafCoinM,
|
formatHafCoinM,
|
||||||
formatListingCode,
|
formatListingCode,
|
||||||
formatRatio,
|
formatRatio,
|
||||||
@@ -108,6 +109,11 @@ const detailMetrics = computed(() => {
|
|||||||
value: dailyLoss ? `${dailyLoss}/天` : '--',
|
value: dailyLoss ? `${dailyLoss}/天` : '--',
|
||||||
tone: 'coin',
|
tone: 'coin',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '预计可租',
|
||||||
|
value: formatEstimatedRentalDuration(listing.value),
|
||||||
|
tone: 'coin',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '价格',
|
label: '价格',
|
||||||
value: `¥${formatMoney(getListingDisplayPrice(listing.value))}`,
|
value: `¥${formatMoney(getListingDisplayPrice(listing.value))}`,
|
||||||
@@ -269,7 +275,6 @@ function updateAgreementReadState(type: 'virtual' | 'renter') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async function copyListingCode() {
|
async function copyListingCode() {
|
||||||
if (!listing.value) return
|
if (!listing.value) return
|
||||||
try {
|
try {
|
||||||
@@ -295,7 +300,12 @@ function handleToggleFavorite() {
|
|||||||
<van-icon name="arrow-left" :size="20" />
|
<van-icon name="arrow-left" :size="20" />
|
||||||
</button>
|
</button>
|
||||||
<h1>账号详情</h1>
|
<h1>账号详情</h1>
|
||||||
<button v-if="listing" class="favorite-header-btn" type="button" @click="handleToggleFavorite">
|
<button
|
||||||
|
v-if="listing"
|
||||||
|
class="favorite-header-btn"
|
||||||
|
type="button"
|
||||||
|
@click="handleToggleFavorite"
|
||||||
|
>
|
||||||
<van-icon :name="listingFavorited ? 'star' : 'star-o'" :size="20" />
|
<van-icon :name="listingFavorited ? 'star' : 'star-o'" :size="20" />
|
||||||
</button>
|
</button>
|
||||||
</header>
|
</header>
|
||||||
@@ -340,7 +350,7 @@ function handleToggleFavorite() {
|
|||||||
<van-tag v-if="listing.rank_level" plain size="medium">{{ listing.rank_level }}</van-tag>
|
<van-tag v-if="listing.rank_level" plain size="medium">{{ listing.rank_level }}</van-tag>
|
||||||
</div>
|
</div>
|
||||||
<button class="mobile-code-chip" type="button" @click="copyListingCode">
|
<button class="mobile-code-chip" type="button" @click="copyListingCode">
|
||||||
编号 {{ formatListingCode(listing) }}
|
{{ formatListingCode(listing) }}
|
||||||
</button>
|
</button>
|
||||||
<button class="mobile-favorite-chip" type="button" @click="handleToggleFavorite">
|
<button class="mobile-favorite-chip" type="button" @click="handleToggleFavorite">
|
||||||
<van-icon :name="listingFavorited ? 'star' : 'star-o'" :size="15" />
|
<van-icon :name="listingFavorited ? 'star' : 'star-o'" :size="15" />
|
||||||
@@ -697,7 +707,7 @@ function handleToggleFavorite() {
|
|||||||
/* ========== 资产指标 ========== */
|
/* ========== 资产指标 ========== */
|
||||||
.metric-row {
|
.metric-row {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(5, minmax(0, 1fr));
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
padding: 0 12px;
|
padding: 0 12px;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user