Compare commits

..

No commits in common. "8a2bf1bad2d962e9275c6fa1cf7d887c9fbca9cd" and "da1fbce57581a91b9a7332b53c0ceccffe08e1d6" have entirely different histories.

6 changed files with 60 additions and 47 deletions

View File

@ -22,22 +22,35 @@ function vote() {
// return
const token=localStorage.getItem('bearer-tokens');
if (typeof token === "undefined" || token == null || token == "" || token == "undefined") {
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()
// 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 {
}
else
{
emits('vote-click',ticket)
localStorage.setItem('qr-tickets', "");
}
}
else
{
emits('vote-click','1')
}
}
</script>
<style scoped>
.votbg{
height: 56px;
@ -56,4 +69,5 @@ function vote() {
}
</style>

View File

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