Compare commits
No commits in common. "8a2bf1bad2d962e9275c6fa1cf7d887c9fbca9cd" and "da1fbce57581a91b9a7332b53c0ceccffe08e1d6" have entirely different histories.
8a2bf1bad2
...
da1fbce575
@ -1,59 +1,73 @@
|
|||||||
<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');
|
|
||||||
// if (typeof ticket === "undefined" || ticket == null || ticket == "" || ticket == "undefined") {
|
const ticket= localStorage.getItem('qr-tickets');
|
||||||
// goAuth()
|
|
||||||
// }else {
|
if(typeof ticket === "undefined"||ticket ==null|| ticket == ""|| ticket == "undefined")
|
||||||
// emits('vote-click', ticket)
|
{
|
||||||
// localStorage.setItem('qr-tickets', "");
|
|
||||||
// }
|
goAuth()
|
||||||
}else {
|
}
|
||||||
emits('vote-click', '1')
|
else
|
||||||
}
|
{
|
||||||
|
|
||||||
|
emits('vote-click',ticket)
|
||||||
|
localStorage.setItem('qr-tickets', "");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
emits('vote-click','1')
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.votbg {
|
|
||||||
|
|
||||||
height: 56px;
|
.votbg{
|
||||||
width: 212px;
|
|
||||||
margin-bottom: 16px;
|
height: 56px;
|
||||||
background: url('../assets/votbutton.png');
|
width: 212px;
|
||||||
background-repeat: no-repeat;
|
margin-bottom: 16px;
|
||||||
background-size: cover;
|
background: url('../assets/votbutton.png');
|
||||||
font-family: AlibabaPuHuiTiH;
|
background-repeat: no-repeat;
|
||||||
font-size: 24px;
|
background-size: cover;
|
||||||
color: #FFFFFF;
|
font-family: AlibabaPuHuiTiH;
|
||||||
line-height: 56px;
|
font-size: 24px;
|
||||||
text-shadow: 0px 2px 2px #00A9E6;
|
color: #FFFFFF;
|
||||||
text-align: center;
|
line-height: 56px;
|
||||||
font-style: normal;
|
text-shadow: 0px 2px 2px #00A9E6;
|
||||||
|
text-align: center;
|
||||||
|
font-style: normal;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -54,8 +54,7 @@ router.beforeEach((to, from, next) => {
|
|||||||
const urlToBeAccessed = to.fullPath; // 获取即将跳转的完整URL
|
const urlToBeAccessed = to.fullPath; // 获取即将跳转的完整URL
|
||||||
// alert(urlToBeAccessed+' 11111')
|
// alert(urlToBeAccessed+' 11111')
|
||||||
console.log('即将跳转到:', urlToBeAccessed);
|
console.log('即将跳转到:', urlToBeAccessed);
|
||||||
|
if(urlToBeAccessed.includes('subscribe')){
|
||||||
if(1==1){
|
|
||||||
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")
|
||||||
{
|
{
|
||||||
@ -63,7 +62,7 @@ router.beforeEach((to, from, next) => {
|
|||||||
let queryParams = to.query;
|
let queryParams = to.query;
|
||||||
let subscribe = queryParams.subscribe
|
let subscribe = queryParams.subscribe
|
||||||
// alert(subscribe+' 3333')
|
// alert(subscribe+' 3333')
|
||||||
if(1==1){
|
if(subscribe == '1'){
|
||||||
|
|
||||||
// let openid = queryParams.openid
|
// let openid = queryParams.openid
|
||||||
let openid = getCookie('wechat_user_openid')
|
let openid = getCookie('wechat_user_openid')
|
||||||
|
|||||||
@ -33,7 +33,7 @@
|
|||||||
<votButton v-text="'投票'" @vote-click="vote" ></votButton>
|
<votButton v-text="'投票'" @vote-click="vote" ></votButton>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
</template>
|
||||||
<script setup >
|
<script setup >
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
<div style="display: flex; justify-content: center;margin-top: 16px;">
|
<div style="display: flex; justify-content: center;margin-top: 16px;">
|
||||||
<votButton v-text="'开始投票'" @vote-click="voet"></votButton>
|
<votButton v-text="'开始投票'" @vote-click="voet"></votButton>
|
||||||
</div>
|
</div>
|
||||||
<!-- <votView :show=sho :ticket=ticket @onchange="handlechange" ></votView> -->
|
<votView :show=show :ticket=ticket @onchange="handlechange" ></votView>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
<votButton v-text="'投票'" @vote-click="vote" ></votButton>
|
<votButton v-text="'投票'" @vote-click="vote" ></votButton>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
</template>
|
||||||
<script setup >
|
<script setup >
|
||||||
import { useRouter,useRoute } from 'vue-router';
|
import { useRouter,useRoute } from 'vue-router';
|
||||||
|
|||||||
@ -194,7 +194,7 @@ v-show="voting">
|
|||||||
<van-empty description="暂无数据" />
|
<van-empty description="暂无数据" />
|
||||||
</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>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup >
|
<script setup >
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user