mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-06 18:36:55 +08:00
fix canbuy check, allow both live-request and music-request
This commit is contained in:
@@ -260,10 +260,10 @@ async function downloadConfig() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
function startListen() {
|
function startListen() {
|
||||||
if (accountInfo.value?.settings.enableFunctions.includes(FunctionTypes.SongRequest)) {
|
/*if (accountInfo.value?.settings.enableFunctions.includes(FunctionTypes.SongRequest)) {
|
||||||
message.warning('使用这个点歌则需要先关闭歌势点歌 (SongRequest)')
|
message.warning('使用这个点歌则需要先关闭歌势点歌 (SongRequest)')
|
||||||
return
|
return
|
||||||
}
|
}*/
|
||||||
listening.value = true
|
listening.value = true
|
||||||
message.success('开始监听')
|
message.success('开始监听')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,7 +77,6 @@ const addressOptions = computed(() => {
|
|||||||
|
|
||||||
const canBuy = computed(() => {
|
const canBuy = computed(() => {
|
||||||
if (!biliAuth.value.id) return false
|
if (!biliAuth.value.id) return false
|
||||||
if (!currentPoint.value) return false
|
|
||||||
return true
|
return true
|
||||||
})
|
})
|
||||||
function getTooltip(goods: ResponsePointGoodModel) {
|
function getTooltip(goods: ResponsePointGoodModel) {
|
||||||
@@ -213,7 +212,7 @@ onMounted(async () => {
|
|||||||
<NFlex justify="space-between" align="center">
|
<NFlex justify="space-between" align="center">
|
||||||
<NTooltip>
|
<NTooltip>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<NButton :disabled="!canBuy" size="small" type="primary" @click="onBuyClick(item)">兑换</NButton>
|
<NButton :disabled="getTooltip(item) != '开始兑换'" size="small" type="primary" @click="onBuyClick(item)">兑换</NButton>
|
||||||
</template>
|
</template>
|
||||||
{{ getTooltip(item) }}
|
{{ getTooltip(item) }}
|
||||||
</NTooltip>
|
</NTooltip>
|
||||||
|
|||||||
Reference in New Issue
Block a user