fix(player): 未登录悬停赔率仅展示快算弹层,下注时再提示登录
This commit is contained in:
@@ -6,7 +6,6 @@ import { teamFlagUrl } from '../utils/teamFlag';
|
|||||||
import { matchPhaseLabel, type MatchPhase } from '../utils/matchPhase';
|
import { matchPhaseLabel, type MatchPhase } from '../utils/matchPhase';
|
||||||
import { formatLocalMatchDateTime } from '@thebet365/shared';
|
import { formatLocalMatchDateTime } from '@thebet365/shared';
|
||||||
import { useBetSlipStore } from '../stores/betSlip';
|
import { useBetSlipStore } from '../stores/betSlip';
|
||||||
import { useAuthStore } from '../stores/auth';
|
|
||||||
import { useDesktopBetPopover } from '../composables/useDesktopBetPopover';
|
import { useDesktopBetPopover } from '../composables/useDesktopBetPopover';
|
||||||
import { resolveSelectionLabel } from '../utils/selectionLabel';
|
import { resolveSelectionLabel } from '../utils/selectionLabel';
|
||||||
import MarketSelectionsPanel from './match-detail/MarketSelectionsPanel.vue';
|
import MarketSelectionsPanel from './match-detail/MarketSelectionsPanel.vue';
|
||||||
@@ -47,7 +46,6 @@ const emit = defineEmits<{ bet: [id: string] }>();
|
|||||||
const { t, locale } = useI18n();
|
const { t, locale } = useI18n();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const slip = useBetSlipStore();
|
const slip = useBetSlipStore();
|
||||||
const auth = useAuthStore();
|
|
||||||
const { openAt, visible: popoverVisible, pendingItem, cancelClose, scheduleClose, isActiveForCard } =
|
const { openAt, visible: popoverVisible, pendingItem, cancelClose, scheduleClose, isActiveForCard } =
|
||||||
useDesktopBetPopover();
|
useDesktopBetPopover();
|
||||||
|
|
||||||
@@ -184,10 +182,6 @@ function getActiveMarket() {
|
|||||||
|
|
||||||
function handleOddsClick(match: any, market: any, selId: string, event?: MouseEvent) {
|
function handleOddsClick(match: any, market: any, selId: string, event?: MouseEvent) {
|
||||||
if (isMarketLocked(match, market)) return;
|
if (isMarketLocked(match, market)) return;
|
||||||
if (!auth.token) {
|
|
||||||
auth.showLoginPrompt(router.currentRoute.value.fullPath);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const sel = market.selections?.find((s: { id: string }) => s.id === selId);
|
const sel = market.selections?.find((s: { id: string }) => s.id === selId);
|
||||||
if (!sel || !event) return;
|
if (!sel || !event) return;
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,6 @@ import TeamEmblem from '../../components/TeamEmblem.vue';
|
|||||||
import GoldSpinner from '../../components/GoldSpinner.vue';
|
import GoldSpinner from '../../components/GoldSpinner.vue';
|
||||||
import { formatLocalMatchDateTime } from '@thebet365/shared';
|
import { formatLocalMatchDateTime } from '@thebet365/shared';
|
||||||
import type { PlayerHomeMatch } from '../../composables/usePlayerHome';
|
import type { PlayerHomeMatch } from '../../composables/usePlayerHome';
|
||||||
import { useBetSlipStore } from '../../stores/betSlip';
|
|
||||||
import { useAuthStore } from '../../stores/auth';
|
|
||||||
import { useDesktopBetPopover } from '../../composables/useDesktopBetPopover';
|
import { useDesktopBetPopover } from '../../composables/useDesktopBetPopover';
|
||||||
import { resolveSelectionLabel } from '../../utils/selectionLabel';
|
import { resolveSelectionLabel } from '../../utils/selectionLabel';
|
||||||
import MarketSelectionsPanel from '../../components/match-detail/MarketSelectionsPanel.vue';
|
import MarketSelectionsPanel from '../../components/match-detail/MarketSelectionsPanel.vue';
|
||||||
@@ -19,8 +17,6 @@ const { t, locale } = useI18n();
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { banners, hotMatches, upcomingMatches, loading, load, announcementItems } = usePlayerHome();
|
const { banners, hotMatches, upcomingMatches, loading, load, announcementItems } = usePlayerHome();
|
||||||
|
|
||||||
const slip = useBetSlipStore();
|
|
||||||
const auth = useAuthStore();
|
|
||||||
const { openAt, visible: popoverVisible, pendingItem, cancelClose, scheduleClose, isActiveForCard } = useDesktopBetPopover();
|
const { openAt, visible: popoverVisible, pendingItem, cancelClose, scheduleClose, isActiveForCard } = useDesktopBetPopover();
|
||||||
|
|
||||||
const activeMarketTypes = ref<Record<string, string>>({});
|
const activeMarketTypes = ref<Record<string, string>>({});
|
||||||
@@ -111,10 +107,6 @@ function isSelected(id: string) {
|
|||||||
|
|
||||||
function handleOddsClick(match: PlayerHomeMatch, market: any, selId: string, event?: MouseEvent) {
|
function handleOddsClick(match: PlayerHomeMatch, market: any, selId: string, event?: MouseEvent) {
|
||||||
if (isMarketLocked(match, market)) return;
|
if (isMarketLocked(match, market)) return;
|
||||||
if (!auth.token) {
|
|
||||||
auth.showLoginPrompt(router.currentRoute.value.fullPath);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const sel = market.selections?.find((s: any) => s.id === selId);
|
const sel = market.selections?.find((s: any) => s.id === selId);
|
||||||
if (!sel || !event) return;
|
if (!sel || !event) return;
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { useRoute, useRouter } from 'vue-router';
|
|||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import api from '../../api';
|
import api from '../../api';
|
||||||
import { useBetSlipStore } from '../../stores/betSlip';
|
import { useBetSlipStore } from '../../stores/betSlip';
|
||||||
import { useAuthStore } from '../../stores/auth';
|
|
||||||
import TeamEmblem from '../../components/TeamEmblem.vue';
|
import TeamEmblem from '../../components/TeamEmblem.vue';
|
||||||
import MatchBetGuide from '../../components/match-detail/MatchBetGuide.vue';
|
import MatchBetGuide from '../../components/match-detail/MatchBetGuide.vue';
|
||||||
import MarketSelectionsPanel from '../../components/match-detail/MarketSelectionsPanel.vue';
|
import MarketSelectionsPanel from '../../components/match-detail/MarketSelectionsPanel.vue';
|
||||||
@@ -22,7 +21,6 @@ const route = useRoute();
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { t, locale } = useI18n();
|
const { t, locale } = useI18n();
|
||||||
const slip = useBetSlipStore();
|
const slip = useBetSlipStore();
|
||||||
const auth = useAuthStore();
|
|
||||||
const { openAt, visible: popoverVisible, pendingItem: popoverItem, cancelClose, scheduleClose } = useDesktopBetPopover();
|
const { openAt, visible: popoverVisible, pendingItem: popoverItem, cancelClose, scheduleClose } = useDesktopBetPopover();
|
||||||
const { pendingLocate, clearLocate } = useDesktopBetLocate();
|
const { pendingLocate, clearLocate } = useDesktopBetLocate();
|
||||||
|
|
||||||
@@ -291,10 +289,6 @@ function buildSlipItem(sel: Selection, market: Market) {
|
|||||||
|
|
||||||
function toggleSelection(sel: Selection, market: Market, event?: MouseEvent) {
|
function toggleSelection(sel: Selection, market: Market, event?: MouseEvent) {
|
||||||
if (!match.value || isMarketLocked(market)) return;
|
if (!match.value || isMarketLocked(market)) return;
|
||||||
if (!auth.token) {
|
|
||||||
auth.showLoginPrompt(route.fullPath);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const item = buildSlipItem(sel, market);
|
const item = buildSlipItem(sel, market);
|
||||||
if (!item || !event) return;
|
if (!item || !event) return;
|
||||||
openAt(event, item);
|
openAt(event, item);
|
||||||
|
|||||||
Reference in New Issue
Block a user