6 Commits

  1. 7
      src/views/choujiang/hxl-cj/cj.vue
  2. 28
      src/views/choujiang/index.vue
  3. 4
      src/views/choujiang/lottery/PrizePanel.vue

7
src/views/choujiang/hxl-cj/cj.vue

@ -267,7 +267,7 @@ const closeGetPrize = () => {
}; };
// //
const lookPrize = (item) => {
const lookPrize = async (item) => {
// //
if (!joinLottery) { if (!joinLottery) {
addQipao("请先进入抽奖。"); addQipao("请先进入抽奖。");
@ -315,6 +315,8 @@ const lookPrize = (item) => {
// //
item.isLook = true; item.isLook = true;
} }
await nextTick();
setPrizeData(currentPrizeIndex);
}; };
function setPrizeData(currentPrizeIndex, isInit) { function setPrizeData(currentPrizeIndex, isInit) {
@ -345,7 +347,8 @@ function setPrizeData(currentPrizeIndex, isInit) {
} }
} }
// console.log("currentPrize", currentPrize);
console.log("count", count);
console.log("totalCount", totalCount);
let percent = (count / totalCount).toFixed(2); let percent = (count / totalCount).toFixed(2);
if (elements.bar) { if (elements.bar) {

28
src/views/choujiang/index.vue

@ -350,30 +350,22 @@ function handleNextPrize() {
} }
.modal-text { .modal-text {
position: fixed !important;
top: 300px;
left: 50% !important;
transform: translate(-50%, -50%) !important;
color: #ff0000; color: #ff0000;
font-size: 18px;
font-size: 50px;
font-weight: bold; font-weight: bold;
text-align: center;
margin: 0; margin: 0;
white-space: nowrap; white-space: nowrap;
} }
@keyframes fadeInOut { @keyframes fadeInOut {
0% {
opacity: 0;
transform: translateY(-20px);
}
20% {
opacity: 1;
transform: translateY(0);
}
80% {
opacity: 1;
transform: translateY(0);
}
100% {
opacity: 0;
transform: translateY(-20px);
}
0% { opacity: 0; }
20% { opacity: 1; }
80% { opacity: 1; }
100% { opacity: 0; }
} }
</style> </style>

4
src/views/choujiang/lottery/PrizePanel.vue

@ -55,7 +55,7 @@
</div> </div>
<div class="prize-panel-footer"> <div class="prize-panel-footer">
<div class="arrow-up" @click="openWinnerList"></div> <div class="arrow-up" @click="openWinnerList"></div>
<button ref="winnerBtnRef" class="winner-btn" @click="toggleWinnerList">
<button ref="winnerBtnRef" class="winner-btn" @click="openWinnerList">
获奖名单 获奖名单
</button> </button>
</div> </div>
@ -332,6 +332,7 @@ async function toggleWinnerList() {
await updateWinners(); await updateWinners();
showWinnerList.value = !showWinnerList.value; showWinnerList.value = !showWinnerList.value;
console.log( console.log(
"toggleWinnerList - showWinnerList:", "toggleWinnerList - showWinnerList:",
showWinnerList.value, showWinnerList.value,
@ -574,6 +575,7 @@ onMounted(() => {
font-weight: bold; font-weight: bold;
cursor: pointer; cursor: pointer;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
outline: none;
} }
.winner-modal-mask { .winner-modal-mask {
position: fixed; position: fixed;

Loading…
Cancel
Save