fix canbuy check, allow both live-request and music-request

This commit is contained in:
2024-03-12 19:09:16 +08:00
parent 5277c8a2b4
commit 9ea4c2b9d0
2 changed files with 3 additions and 4 deletions

View File

@@ -260,10 +260,10 @@ async function downloadConfig() {
})
}
function startListen() {
if (accountInfo.value?.settings.enableFunctions.includes(FunctionTypes.SongRequest)) {
/*if (accountInfo.value?.settings.enableFunctions.includes(FunctionTypes.SongRequest)) {
message.warning('使用这个点歌则需要先关闭歌势点歌 (SongRequest)')
return
}
}*/
listening.value = true
message.success('开始监听')
}

View File

@@ -77,7 +77,6 @@ const addressOptions = computed(() => {
const canBuy = computed(() => {
if (!biliAuth.value.id) return false
if (!currentPoint.value) return false
return true
})
function getTooltip(goods: ResponsePointGoodModel) {
@@ -213,7 +212,7 @@ onMounted(async () => {
<NFlex justify="space-between" align="center">
<NTooltip>
<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>
{{ getTooltip(item) }}
</NTooltip>