diff --git a/uniapp/src/pages/lottery_analysis/lottery_analysis.vue b/uniapp/src/pages/lottery_analysis/lottery_analysis.vue index 47e51f6..3d6a4a8 100644 --- a/uniapp/src/pages/lottery_analysis/lottery_analysis.vue +++ b/uniapp/src/pages/lottery_analysis/lottery_analysis.vue @@ -34,9 +34,11 @@ {{ game.name }} - + 全部 - + @@ -315,8 +317,7 @@ const switchHallTab = (value: string) => { } const isGameChipActive = (game: any) => { - if (selectedGameCode.value) return selectedGameCode.value === game.code - return game.code === currentGames.value[0]?.code + return selectedGameCode.value === game.code } const selectAllGames = () => { @@ -357,10 +358,17 @@ const switchGameCategory = (val: number) => { } const selectGame = (game: any) => { - selectedGameCode.value = game.code - selectedGameName.value = game.name - gameSelections.value[currentGameCategory.value] = { code: game.code, name: game.name } - fetchDrawList(true) + if (selectedGameCode.value === game.code) { + selectedGameCode.value = '' + selectedGameName.value = '' + drawList.value = [] + delete gameSelections.value[currentGameCategory.value] + } else { + selectedGameCode.value = game.code + selectedGameName.value = game.name + gameSelections.value[currentGameCategory.value] = { code: game.code, name: game.name } + fetchDrawList(true) + } saveSelections() fetchLatest() } @@ -2336,6 +2344,12 @@ onReachBottom(() => { color: #e6a23c; } +.lottery-game-chip--all.lottery-game-chip--active { + background: #1468e8; + border-color: #1468e8; + color: #fff; +} + .latest-card__countdown { font-size: 28rpx; }