去掉关注

This commit is contained in:
haomingming 2025-12-28 09:02:41 +08:00
parent 3a547c16de
commit 34a338fa55

View File

@ -1,73 +1,59 @@
<template> <template>
<div class="votbg" @click="vote()"> <div class="votbg" @click="vote()">
<div>{{ text }}</div> <div>{{ text }}</div>
</div> </div>
</template> </template>
<script setup > <script setup>
import {goAuth}from '@/utils/authorize.js'; import { goAuth } from '@/utils/authorize.js';
const props = defineProps({ const props = defineProps({
text: { text: {
type: String, type: String,
}, },
}); });
const emits = defineEmits(["vote-click"]); const emits = defineEmits(["vote-click"]);
function vote(){ function vote() {
// emits('vote-click','1') // emits('vote-click','1')
// return // return
const token=localStorage.getItem('bearer-tokens'); const token = localStorage.getItem('bearer-tokens');
if(typeof token === "undefined"||token ==null|| token == ""|| token == "undefined") if (typeof token === "undefined" || token == null || token == "" || token == "undefined") {
{ goAuth()
// const ticket = localStorage.getItem('qr-tickets');
const ticket= localStorage.getItem('qr-tickets'); // if (typeof ticket === "undefined" || ticket == null || ticket == "" || ticket == "undefined") {
// goAuth()
if(typeof ticket === "undefined"||ticket ==null|| ticket == ""|| ticket == "undefined") // }else {
{ // emits('vote-click', ticket)
// localStorage.setItem('qr-tickets', "");
goAuth() // }
} }else {
else emits('vote-click', '1')
{ }
emits('vote-click',ticket)
localStorage.setItem('qr-tickets', "");
}
}
else
{
emits('vote-click','1')
}
} }
</script> </script>
<style scoped> <style scoped>
.votbg {
.votbg{ height: 56px;
width: 212px;
height: 56px; margin-bottom: 16px;
width: 212px; background: url('../assets/votbutton.png');
margin-bottom: 16px; background-repeat: no-repeat;
background: url('../assets/votbutton.png'); background-size: cover;
background-repeat: no-repeat; font-family: AlibabaPuHuiTiH;
background-size: cover; font-size: 24px;
font-family: AlibabaPuHuiTiH; color: #FFFFFF;
font-size: 24px; line-height: 56px;
color: #FFFFFF; text-shadow: 0px 2px 2px #00A9E6;
line-height: 56px; text-align: center;
text-shadow: 0px 2px 2px #00A9E6; font-style: normal;
text-align: center;
font-style: normal;
} }
</style> </style>