mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-07 02:46:55 +08:00
update afdian slug, fix storage count display
This commit is contained in:
@@ -28,15 +28,17 @@ const emptyCover = IMGUR_URL + 'None.png'
|
|||||||
<NFlex justify="space-between">
|
<NFlex justify="space-between">
|
||||||
<NFlex>
|
<NFlex>
|
||||||
<NText depth="3"> 库存: </NText>
|
<NText depth="3"> 库存: </NText>
|
||||||
<NText v-if="goods.count && goods.count > -1">
|
<NText v-if="goods.count && goods.count > 0">
|
||||||
{{ goods.count }}
|
{{ goods.count }}
|
||||||
</NText>
|
</NText>
|
||||||
|
<NText v-else-if="goods.count == 0" style="color: #5f5f5f;"> 无 </NText>
|
||||||
<NText v-else> ∞ </NText>
|
<NText v-else> ∞ </NText>
|
||||||
</NFlex>
|
</NFlex>
|
||||||
</NFlex>
|
</NFlex>
|
||||||
</template>
|
</template>
|
||||||
<template #header>
|
<template #header>
|
||||||
<NFlex align="center">
|
<NFlex align="center" :size="5">
|
||||||
|
<NTag v-if="goods.count == 0" size="small" type="error" :bordered="false"> 已售完 </NTag>
|
||||||
<NTag size="small" :bordered="goods.type != GoodsTypes.Physical">
|
<NTag size="small" :bordered="goods.type != GoodsTypes.Physical">
|
||||||
{{ goods.type == GoodsTypes.Physical ? '实物' : '虚拟' }}
|
{{ goods.type == GoodsTypes.Physical ? '实物' : '虚拟' }}
|
||||||
</NTag>
|
</NTag>
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ import { NButton, NCard, NDivider, NLayoutContent, NSpace, NText, NTimeline, NTi
|
|||||||
<NDivider title-placement="left"> 赞助我 </NDivider>
|
<NDivider title-placement="left"> 赞助我 </NDivider>
|
||||||
<iframe
|
<iframe
|
||||||
id="afdian_leaflet_vtsuru"
|
id="afdian_leaflet_vtsuru"
|
||||||
src="https://afdian.net/leaflet?slug=vtsuru"
|
src="https://afdian.com/leaflet?slug=vtsuru"
|
||||||
width="100%"
|
width="100%"
|
||||||
scrolling="no"
|
scrolling="no"
|
||||||
height="200"
|
height="200"
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ function getTooltip(goods: ResponsePointGoodModel) {
|
|||||||
if ((currentPoint.value ?? 0) < goods.price) {
|
if ((currentPoint.value ?? 0) < goods.price) {
|
||||||
return '当前积分不足'
|
return '当前积分不足'
|
||||||
} else if (!biliAuth.value.id) return '请先进行账号认证'
|
} else if (!biliAuth.value.id) return '请先进行账号认证'
|
||||||
|
else if ((goods?.count ?? Number.MAX_VALUE) <= 0) return '库存不足'
|
||||||
else {
|
else {
|
||||||
return '开始兑换'
|
return '开始兑换'
|
||||||
}
|
}
|
||||||
@@ -230,10 +231,10 @@ onMounted(async () => {
|
|||||||
<template #trigger>
|
<template #trigger>
|
||||||
<NText style="size: 34px" :delete="item.canFreeBuy">
|
<NText style="size: 34px" :delete="item.canFreeBuy">
|
||||||
🪙
|
🪙
|
||||||
{{ item.price }}
|
{{ item.price > 0 ? item.price : '免费' }}
|
||||||
</NText>
|
</NText>
|
||||||
</template>
|
</template>
|
||||||
{{ item.canFreeBuy ? '你可以免费兑换此礼物' : '付费' }}
|
{{ item.canFreeBuy ? '你可以免费兑换此礼物' : '所需积分' }}
|
||||||
</NTooltip>
|
</NTooltip>
|
||||||
</NFlex>
|
</NFlex>
|
||||||
</NFlex>
|
</NFlex>
|
||||||
|
|||||||
Reference in New Issue
Block a user