fix: 修复三端路由引用并统一共享 Logo 静态资源

修正 admin/agent/player 路由与 agent App.vue 的 import 路径,三端 Vite 共用 packages/shared/public 下的 logo 与 favicon。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-02 15:01:55 +08:00
parent 4c92157299
commit 000bd8c956
18 changed files with 65 additions and 35 deletions

View File

@@ -3,6 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<title>TheBet365</title>
</head>
<body>

View File

@@ -27,7 +27,7 @@ function setLocale(code: string) {
<template>
<div class="layout">
<header class="header">
<span class="logo">TheBet365</span>
<img src="/logo.svg" alt="TheBet365" class="logo" />
<div class="header-actions">
<select :value="locale" @change="setLocale(($event.target as HTMLSelectElement).value)" class="lang-select">
<option v-for="l in locales" :key="l.code" :value="l.code">{{ l.label }}</option>
@@ -61,7 +61,7 @@ function setLocale(code: string) {
display: flex; justify-content: space-between; align-items: center;
padding: 12px 16px; background: #1a2332; border-bottom: 1px solid var(--border);
}
.logo { font-weight: 800; color: var(--primary); font-size: 18px; }
.logo { height: 24px; width: auto; display: block; }
.header-actions { display: flex; gap: 12px; align-items: center; }
.lang-select { background: var(--bg-card); color: #fff; border: 1px solid var(--border); padding: 4px 8px; border-radius: 4px; width: auto; }
.balance { font-size: 13px; color: var(--text-muted); }

View File

@@ -1,20 +1,20 @@
import { createRouter, createWebHistory } from 'vue-router';
import { useAuthStore } from './stores/auth';
import { useAuthStore } from '../stores/auth';
const router = createRouter({
history: createWebHistory(),
routes: [
{ path: '/login', component: () => import('./views/LoginView.vue') },
{ path: '/login', component: () => import('../views/LoginView.vue') },
{
path: '/',
component: () => import('./layouts/MainLayout.vue'),
component: () => import('../layouts/MainLayout.vue'),
meta: { requiresAuth: true },
children: [
{ path: '', component: () => import('./views/HomeView.vue') },
{ path: 'football', component: () => import('./views/FootballView.vue') },
{ path: 'match/:id', component: () => import('./views/MatchDetailView.vue') },
{ path: 'bets', component: () => import('./views/MyBetsView.vue') },
{ path: 'profile', component: () => import('./views/ProfileView.vue') },
{ path: '', component: () => import('../views/HomeView.vue') },
{ path: 'football', component: () => import('../views/FootballView.vue') },
{ path: 'match/:id', component: () => import('../views/MatchDetailView.vue') },
{ path: 'bets', component: () => import('../views/MyBetsView.vue') },
{ path: 'profile', component: () => import('../views/ProfileView.vue') },
],
},
],

View File

@@ -28,7 +28,7 @@ async function submit() {
<template>
<div class="login-page">
<h1 class="logo">TheBet365</h1>
<img src="/logo.svg" alt="TheBet365" class="logo" />
<form @submit.prevent="submit" class="login-form">
<label>{{ t('auth.username') }}</label>
<input v-model="username" required />
@@ -47,7 +47,7 @@ async function submit() {
min-height: 100vh; display: flex; flex-direction: column;
align-items: center; justify-content: center; padding: 24px;
}
.logo { color: var(--primary); font-size: 32px; margin-bottom: 32px; }
.logo { height: 40px; width: auto; margin-bottom: 32px; }
.login-form { width: 100%; max-width: 320px; display: flex; flex-direction: column; gap: 12px; }
label { font-size: 13px; color: var(--text-muted); }
.error { color: var(--danger); font-size: 13px; }

View File

@@ -1,8 +1,10 @@
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import { resolve } from 'path';
export default defineConfig({
plugins: [vue()],
publicDir: resolve(__dirname, '../../packages/shared/public'),
server: {
port: 5173,
proxy: {