Compare commits

...

7 Commits

Author SHA1 Message Date
haomingming
8a2bf1bad2 去 vconsole 2025-12-28 09:17:19 +08:00
haomingming
0c9587b100 cc 2025-12-28 09:14:24 +08:00
haomingming
9de11a5f52 11 2025-12-28 09:11:07 +08:00
haomingming
09e794b2ef auu 2025-12-28 09:10:01 +08:00
haomingming
90407680af 去掉关注 2025-12-28 09:08:07 +08:00
haomingming
34a338fa55 去掉关注 2025-12-28 09:02:41 +08:00
haomingming
3a547c16de 去掉关注 2025-12-28 08:56:58 +08:00
6 changed files with 47 additions and 60 deletions

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>

View File

@ -54,7 +54,8 @@ router.beforeEach((to, from, next) => {
const urlToBeAccessed = to.fullPath; // 获取即将跳转的完整URL
// alert(urlToBeAccessed+' 11111')
console.log('即将跳转到:', urlToBeAccessed);
if(urlToBeAccessed.includes('subscribe')){
if(1==1){
const token=localStorage.getItem('bearer-tokens');
if(typeof token === "undefined"||token ==null|| token == ""|| token == "undefined")
{
@ -62,7 +63,7 @@ router.beforeEach((to, from, next) => {
let queryParams = to.query;
let subscribe = queryParams.subscribe
// alert(subscribe+' 3333')
if(subscribe == '1'){
if(1==1){
// let openid = queryParams.openid
let openid = getCookie('wechat_user_openid')

View File

@ -33,7 +33,7 @@
<votButton v-text="'投票'" @vote-click="vote" ></votButton>
</div>
</div>
<votView :show =show :shows =shows @onchange="handlechange" @onchanges="handlechange" :ticket=tickets ></votView>
<!-- <votView :show =show :shows =shows @onchange="handlechange" @onchanges="handlechange" :ticket=tickets ></votView> -->
</template>
<script setup >

View File

@ -12,7 +12,7 @@
<div style="display: flex; justify-content: center;margin-top: 16px;">
<votButton v-text="'开始投票'" @vote-click="voet"></votButton>
</div>
<votView :show=show :ticket=ticket @onchange="handlechange" ></votView>
<!-- <votView :show=sho :ticket=ticket @onchange="handlechange" ></votView> -->
</div>
</template>

View File

@ -34,7 +34,7 @@
<votButton v-text="'投票'" @vote-click="vote" ></votButton>
</div>
</div>
<votView :show =show :shows =shows @onchange="handlechange" @onchanges="handlechange" :ticket=tickets ></votView>
<!-- <votView :show =show :shows =shows @onchange="handlechange" @onchanges="handlechange" :ticket=tickets ></votView> -->
</template>
<script setup >
import { useRouter,useRoute } from 'vue-router';

View File

@ -194,7 +194,7 @@ v-show="voting">
<van-empty description="暂无数据" />
</div>
<votView :show =show :shows =shows @onchange="handlechange" @onchanges="handlechange" :ticket=tickets ></votView>
<!-- <votView :show =show :shows =shows @onchange="handlechange" @onchanges="handlechange" :ticket=tickets ></votView> -->
</div>
</template>
<script setup >