去掉关注

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