fix: 前端问题修复

This commit is contained in:
Kerwin
2025-07-21 15:27:58 +08:00
parent 51975ad408
commit 8ed7cbc181
10 changed files with 25 additions and 9 deletions

View File

@@ -90,7 +90,7 @@ cd urldb
docker compose up --build -d
# 访问应用
# 前端: http://localhost:3000
# 前端: http://localhost:3030
# 后端API: http://localhost:8080
```

View File

@@ -41,7 +41,7 @@ services:
frontend:
image: ctwj/urldb-frontend:1.0.6
environment:
API_BASE: http://backend:8080/api
API_BASE: /api
depends_on:
- backend
networks:

View File

@@ -38,7 +38,7 @@ $DOCKER_COMPOSE ps
echo ""
echo "✅ 系统启动完成!"
echo "🌐 前端访问地址: http://localhost:3000"
echo "🌐 前端访问地址: http://localhost:3030"
echo "🔧 后端API地址: http://localhost:8080"
echo "🗄️ 数据库地址: localhost:5432"
echo ""

View File

@@ -47,6 +47,7 @@ docker compose ps
可以通过修改 `docker-compose.yml` 文件中的环境变量来配置服务:
后端 backend
```yaml
environment:
DB_HOST: postgres
@@ -55,7 +56,12 @@ environment:
DB_PASSWORD: password
DB_NAME: url_db
PORT: 8080
API_BASE: http://localhost:8080/api
```
前端 frontend
```yaml
environment:
API_BASE: /api
```
### 端口映射

View File

@@ -23,7 +23,7 @@ docker compose up --build -d
启动成功后,您可以通过以下地址访问:
- **前端界面**: http://localhost:3000
- **前端界面**: http://localhost:3030
默认用户密码: admin/password

2
web/components.d.ts vendored
View File

@@ -8,8 +8,10 @@ export {}
/* prettier-ignore */
declare module 'vue' {
export interface GlobalComponents {
NA: typeof import('naive-ui')['NA']
NAlert: typeof import('naive-ui')['NAlert']
NButton: typeof import('naive-ui')['NButton']
NIcon: typeof import('naive-ui')['NIcon']
NSelect: typeof import('naive-ui')['NSelect']
NTabPane: typeof import('naive-ui')['NTabPane']
NTabs: typeof import('naive-ui')['NTabs']

View File

@@ -4,7 +4,15 @@
<p class="mb-2">本站内容由网络爬虫自动抓取本站不储存复制传播任何文件仅作个人公益学习请在获取后24小内删除!!!</p>
<p class="flex items-center justify-center gap-2">
<span>{{ systemConfig?.copyright || '© 2025 老九网盘资源数据库 By 老九' }}</span>
<span v-if="versionInfo.version" class="text-gray-400 dark:text-gray-500">| v{{ versionInfo.version }}</span>
<span v-if="versionInfo.version" class="text-gray-400 dark:text-gray-500">| v <n-a
href="https://github.com/ctwj/urldb"
target="_blank"
rel="noopener noreferrer"
referrerpolicy="no-referrer"
aria-label=" GitHub 上查看版本信息"
class="github-link"
><span>{{ versionInfo.version }}</span></n-a>
</span>
</p>
</div>
</footer>

View File

@@ -354,7 +354,7 @@ curl -X GET "http://localhost:8080/api/public/hot-dramas?page=1&page_size=5" \
<script setup>
// 设置页面布局
definePageMeta({
layout: 'admin'
layout: 'default'
})
// 页面元数据

View File

@@ -205,7 +205,7 @@
<script setup>
// 设置页面布局
definePageMeta({
layout: 'admin'
layout: 'default'
})
import { ref, computed, onMounted, watch } from 'vue'

View File

@@ -241,7 +241,7 @@
<script setup lang="ts">
// 设置页面布局
definePageMeta({
layout: 'admin'
layout: 'default'
})
import { ref, onMounted, onUnmounted, computed } from 'vue'