This commit is contained in:
aaron 2025-05-11 18:50:12 +08:00
parent 19be26fa9e
commit 6a015b644c
5 changed files with 198 additions and 3 deletions

View File

@ -5,7 +5,7 @@ services:
build:
context: .
dockerfile: Dockerfile
image: tradus-web:1.6
image: tradus-web:1.7
container_name: tradus-web
ports:
- '6000:80'

View File

@ -1,9 +1,12 @@
<script setup lang="ts">
import { RouterView } from 'vue-router'
import { RouterView, useRoute } from 'vue-router'
import { computed, ref, onMounted, onUnmounted } from 'vue'
import { useUserStore } from './stores/user'
import { authApi } from './services/api'
const route = useRoute()
const isStandalonePage = computed(() => route.meta.standalone)
const userStore = useUserStore()
const isAuthenticated = computed(() => userStore.isAuthenticated)
const userInfo = computed(() => userStore.userInfo)
@ -232,7 +235,11 @@ onUnmounted(() => {
</script>
<template>
<div class="app-container">
<!-- 如果是独立页面直接显示路由内容 -->
<RouterView v-if="isStandalonePage" />
<!-- 否则显示完整应用布局 -->
<div v-else class="app-container">
<!-- 移动端菜单按钮 -->
<button class="menu-button" @click="toggleMobileMenu">
<svg

BIN
src/assets/app_logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -1,5 +1,6 @@
import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import DownloadView from '../views/DownloadView.vue'
import { useUserStore } from '../stores/user'
const router = createRouter({
@ -38,6 +39,12 @@ const router = createRouter({
component: () => import('../views/RegisterView.vue'),
meta: { requiresGuest: true },
},
{
path: '/download',
name: 'download',
component: DownloadView,
meta: { standalone: true },
},
],
})

181
src/views/DownloadView.vue Normal file
View File

@ -0,0 +1,181 @@
<template>
<div class="download-container">
<!-- Logo -->
<div class="logo-container">
<img src="@/assets/app_logo.png" alt="Tradus App Logo" class="app-logo" />
</div>
<!-- 产品名称和描述 -->
<h1 class="hero-title"><span class="accent">tradus</span></h1>
<p class="hero-subtitle">基于大语言模型构建的智能投研助理</p>
<!-- 下载按钮 -->
<div class="hero-actions">
<a href="https://cos.beefast.co/tradus_1.0.apk" class="btn btn-primary">
<span class="button-icon">📱</span>
<span class="button-text">下载 Android 版本</span>
</a>
</div>
</div>
</template>
<style scoped>
.download-container {
width: 100%;
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: #ffffff;
}
.logo-container {
margin-bottom: 2rem;
}
.app-logo {
width: 120px;
height: 120px;
border-radius: 24px;
box-shadow: 0 8px 24px rgba(51, 85, 255, 0.15);
}
.hero-title {
font-size: 1.8rem;
font-weight: 800;
margin-bottom: 0.3rem;
font-family:
'SF Pro Display',
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
Roboto,
sans-serif;
letter-spacing: -0.5px;
display: block;
}
.accent {
font-size: 2.8rem;
font-weight: 800;
background: linear-gradient(135deg, var(--color-accent) 0%, #2244ee 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
text-fill-color: transparent;
font-family:
'SF Pro Display',
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
Roboto,
sans-serif;
}
.hero-subtitle {
font-size: 1rem;
color: var(--color-text-secondary);
font-weight: 400;
font-family:
'SF Pro Display',
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
Roboto,
sans-serif;
letter-spacing: 0.5px;
text-transform: uppercase;
margin: 0 auto 4rem;
}
.hero-actions {
display: flex;
gap: 1.5rem;
justify-content: center;
margin-top: 2rem;
}
.btn {
padding: 1rem 2rem;
border-radius: 8px;
font-weight: 600;
font-size: 1.1rem;
cursor: pointer;
transition: all 0.3s ease;
text-decoration: none;
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 160px;
gap: 0.75rem;
}
.btn-primary {
background-color: #3355ff;
color: white;
border: none;
box-shadow: 0 4px 6px rgba(51, 85, 255, 0.1);
}
.btn-primary:hover {
background-color: #2244ee;
transform: translateY(-2px);
box-shadow: 0 6px 12px rgba(51, 85, 255, 0.2);
}
.button-icon {
font-size: 1.4rem;
}
@media (max-width: 768px) {
.download-container {
padding: 4rem 1.5rem;
}
.app-logo {
width: 100px;
height: 100px;
}
.hero-title {
font-size: 1.8rem;
}
.hero-subtitle {
font-size: 1.25rem;
margin-bottom: 3rem;
}
.btn {
padding: 0.875rem 1.75rem;
font-size: 1rem;
min-width: 140px;
}
}
@media (max-width: 480px) {
.download-container {
padding: 3rem 1rem;
}
.hero-title {
font-size: 1.5rem;
}
.hero-subtitle {
font-size: 1rem;
margin-bottom: 2.5rem;
}
.hero-actions {
flex-direction: column;
gap: 1rem;
width: 100%;
}
.btn {
width: 100%;
}
}
</style>