Compare commits
6 Commits
efc1156390
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 67f01900d9 | |||
| 3f5ea4bffd | |||
| 1c6599e50f | |||
| 41c6d11197 | |||
| 5d2a1b2688 | |||
| fc2510b567 |
25
.gitignore
vendored
Normal file
25
.gitignore
vendored
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# IDE
|
||||||
|
.idea/
|
||||||
|
.vscode/
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
*~
|
||||||
|
|
||||||
|
# OS
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
# Logs
|
||||||
|
logs/
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
|
||||||
|
# Temp
|
||||||
|
tmp/
|
||||||
|
temp/
|
||||||
|
*.tmp
|
||||||
|
|
||||||
|
# Environment
|
||||||
|
.env
|
||||||
|
.env.local
|
||||||
|
.env.*.local
|
||||||
44
client/.gitignore
vendored
Normal file
44
client/.gitignore
vendored
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
# Dependencies
|
||||||
|
node_modules/
|
||||||
|
.pnp
|
||||||
|
.pnp.js
|
||||||
|
|
||||||
|
# Build
|
||||||
|
dist/
|
||||||
|
dist-ssr/
|
||||||
|
*.local
|
||||||
|
|
||||||
|
# IDE
|
||||||
|
.idea/
|
||||||
|
*.suo
|
||||||
|
*.ntvs*
|
||||||
|
*.njsproj
|
||||||
|
*.sln
|
||||||
|
*.sw?
|
||||||
|
|
||||||
|
# Logs
|
||||||
|
logs/
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
pnpm-debug.log*
|
||||||
|
lerna-debug.log*
|
||||||
|
|
||||||
|
# OS
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
# Test
|
||||||
|
coverage/
|
||||||
|
*.lcov
|
||||||
|
|
||||||
|
# Environment
|
||||||
|
.env
|
||||||
|
.env.local
|
||||||
|
.env.*.local
|
||||||
|
|
||||||
|
# Cache
|
||||||
|
.cache/
|
||||||
|
.temp/
|
||||||
|
*.tmp
|
||||||
@@ -14,11 +14,11 @@
|
|||||||
<div class="info-card" v-if="contact">
|
<div class="info-card" v-if="contact">
|
||||||
<div class="info-item">
|
<div class="info-item">
|
||||||
<h3>{{ t('contact.phone') }}</h3>
|
<h3>{{ t('contact.phone') }}</h3>
|
||||||
<p>{{ contact.phoneZh || contact.phoneEn || '-' }}</p>
|
<p>{{ contact.phone?.trim() || '-' }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="info-item">
|
<div class="info-item">
|
||||||
<h3>{{ t('contact.email') }}</h3>
|
<h3>{{ t('contact.email') }}</h3>
|
||||||
<p>{{ contact.emailZh || contact.emailEn || '-' }}</p>
|
<p>{{ contact.email?.trim() || '-' }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="info-item">
|
<div class="info-item">
|
||||||
<h3>{{ t('contact.address') }}</h3>
|
<h3>{{ t('contact.address') }}</h3>
|
||||||
|
|||||||
11
database/fix_admin_user.sql
Normal file
11
database/fix_admin_user.sql
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
-- 检查是否存在 admin 用户
|
||||||
|
SELECT * FROM sys_user WHERE username = 'admin';
|
||||||
|
|
||||||
|
-- 如果不存在或密码错误,执行以下插入/更新
|
||||||
|
-- 密码是 admin123,使用 BCrypt 加密
|
||||||
|
INSERT INTO sys_user (username, password, nickname, status, create_time, update_time)
|
||||||
|
VALUES ('admin', '$2a$10$N.zmdr9k7uOCQb376NoUnuTJ8iAt6Z5EHsM8lE9lBOsl7iAt6Z5EO', '管理员', 1, NOW(), NOW())
|
||||||
|
ON DUPLICATE KEY UPDATE
|
||||||
|
password = '$2a$10$N.zmdr9k7uOCQb376NoUnuTJ8iAt6Z5EHsM8lE9lBOsl7iAt6Z5EO',
|
||||||
|
status = 1,
|
||||||
|
update_time = NOW();
|
||||||
56
scripts/sync-uploads-to-minio.ps1
Normal file
56
scripts/sync-uploads-to-minio.ps1
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
# Sync repo-root uploads/ -> MinIO bucket prefix uploads/ (matches DB paths /uploads/...)
|
||||||
|
# Requires MinIO Client: https://min.io/docs/minio/linux/reference/minio-mc.html
|
||||||
|
# Run from repo root:
|
||||||
|
# .\scripts\sync-uploads-to-minio.ps1 -McPath "D:\tools\mc.exe"
|
||||||
|
# Optional params: -Endpoint -User -Password -Bucket -Alias
|
||||||
|
|
||||||
|
param(
|
||||||
|
[string] $Endpoint = "http://117.72.159.31:9000",
|
||||||
|
[string] $User = "minioadmin",
|
||||||
|
[string] $Password = "minioadmin",
|
||||||
|
[string] $Bucket = "wuhan-saga",
|
||||||
|
[string] $Alias = "wuhan-saga-remote",
|
||||||
|
[string] $McPath = ""
|
||||||
|
)
|
||||||
|
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
[Console]::OutputEncoding = [System.Text.UTF8Encoding]::new($false)
|
||||||
|
|
||||||
|
$root = Split-Path -Parent $PSScriptRoot
|
||||||
|
if (-not (Test-Path -LiteralPath $root)) { $root = (Get-Location).Path }
|
||||||
|
|
||||||
|
$uploads = Join-Path $root "uploads"
|
||||||
|
if (-not (Test-Path -LiteralPath $uploads)) {
|
||||||
|
Write-Host "Skip: no folder $uploads"
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
$mcExe = $McPath
|
||||||
|
if (-not [string]::IsNullOrWhiteSpace($mcExe)) {
|
||||||
|
if (-not (Test-Path -LiteralPath $mcExe)) {
|
||||||
|
throw "McPath not found: $mcExe"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$tryLocal = Join-Path $root ".tools\mc.exe"
|
||||||
|
if (Test-Path -LiteralPath $tryLocal) { $mcExe = $tryLocal }
|
||||||
|
}
|
||||||
|
if ([string]::IsNullOrWhiteSpace($mcExe)) {
|
||||||
|
$mcCmd = Get-Command mc -ErrorAction SilentlyContinue
|
||||||
|
if ($mcCmd) { $mcExe = $mcCmd.Source }
|
||||||
|
}
|
||||||
|
if ([string]::IsNullOrWhiteSpace($mcExe)) {
|
||||||
|
throw "mc not found. Add to PATH, or place .tools/mc.exe, or pass -McPath. Download: https://dl.min.io/client/mc/release/windows-amd64/mc.exe"
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "Using mc: $mcExe"
|
||||||
|
& $mcExe alias set $Alias $Endpoint $User $Password
|
||||||
|
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||||||
|
|
||||||
|
& $mcExe mb "$Alias/$Bucket" --ignore-existing 2>$null
|
||||||
|
|
||||||
|
Write-Host "Mirror: $uploads -> $Alias/$Bucket/uploads/"
|
||||||
|
& $mcExe mirror --overwrite $uploads "$Alias/$Bucket/uploads"
|
||||||
|
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||||||
|
|
||||||
|
Write-Host "Done. Check bucket $Bucket for uploads/banner etc."
|
||||||
34
server/.gitignore
vendored
Normal file
34
server/.gitignore
vendored
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
# Compiled
|
||||||
|
/target/
|
||||||
|
*.class
|
||||||
|
*.jar
|
||||||
|
*.war
|
||||||
|
*.ear
|
||||||
|
|
||||||
|
# Maven
|
||||||
|
.mvn/
|
||||||
|
mvnw
|
||||||
|
mvnw.cmd
|
||||||
|
|
||||||
|
# IDE
|
||||||
|
.idea/
|
||||||
|
*.iml
|
||||||
|
.classpath
|
||||||
|
.project
|
||||||
|
.settings/
|
||||||
|
|
||||||
|
# Logs
|
||||||
|
logs/
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# Uploads (local storage files)
|
||||||
|
uploads/
|
||||||
|
|
||||||
|
# Temp
|
||||||
|
tmp/
|
||||||
|
temp/
|
||||||
|
|
||||||
|
# Environment
|
||||||
|
application-local.yml
|
||||||
|
application-dev.yml
|
||||||
|
application-prod.yml
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# Spring Boot 使用 MinIO 时,在「生产配置」里增加或改成以下内容。
|
# Spring Boot 使用 MinIO 时,在「生产配置」里增加或改成以下内容。
|
||||||
# 不要提交含真实生产密码的副本;交给运维时可另存为服务器上的 application-prod.yml。
|
# 不要提交含真实生产密码的副本;交给运维时可另存为服务器上的 application-prod.yml。
|
||||||
#
|
#
|
||||||
# 启动示例:java -jar wuhan-saga-server.jar --spring.profiles.active=prod
|
# 启动示例:java -jar wuhan-saga-server.jar --spring.profiles.active=prod
|
||||||
@@ -21,7 +21,7 @@ upload:
|
|||||||
|
|
||||||
minio:
|
minio:
|
||||||
endpoint: http://127.0.0.1:9000
|
endpoint: http://127.0.0.1:9000
|
||||||
access-key: klp
|
access-key: minioadmin
|
||||||
secret-key: ruoyi123
|
secret-key: minioadmin
|
||||||
bucket: wuhan-saga
|
bucket: wuhan-saga
|
||||||
region: us-east-1
|
region: us-east-1
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ spring:
|
|||||||
datasource:
|
datasource:
|
||||||
type: com.alibaba.druid.pool.DruidDataSource
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:mysql://localhost:3306/wuhan_saga?serverTimezone=Asia/Shanghai&useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8
|
url: jdbc:mysql://67.209.178.202:3306/wuhan_saga?serverTimezone=Asia/Shanghai&useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8
|
||||||
username: root
|
username: root
|
||||||
password: 135827
|
password: 135827
|
||||||
druid:
|
druid:
|
||||||
@@ -56,18 +56,18 @@ knife4j:
|
|||||||
setting:
|
setting:
|
||||||
language: zh_cn
|
language: zh_cn
|
||||||
|
|
||||||
# 存储:local=本机 uploads | minio=对象存储,见 server/deploy/minio-spring-config.example.yml
|
# 存储:local=本机 uploads | minio=对象存储(9000 为 API,不是控制台 9001)
|
||||||
|
# 密钥可用环境变量覆盖:MINIO_ACCESS_KEY、MINIO_SECRET_KEY(勿将生产密码提交到公开仓库)
|
||||||
upload:
|
upload:
|
||||||
storage: minio
|
storage: minio
|
||||||
path: uploads/
|
path: uploads/
|
||||||
allowed-types: image/jpeg,image/png,image/gif,image/webp,image/svg+xml,video/mp4,video/webm
|
allowed-types: image/jpeg,image/png,image/gif,image/webp,image/svg+xml,video/mp4,video/webm
|
||||||
max-size: 52428800
|
max-size: 52428800
|
||||||
|
|
||||||
# 仅 upload.storage=minio 时生效;密钥用环境变量注入,勿提交生产明文
|
|
||||||
minio:
|
minio:
|
||||||
endpoint: http://minio:9000
|
endpoint: http://117.72.159.31:9000
|
||||||
access-key: minioadmin
|
access-key: ${MINIO_ACCESS_KEY:minioadmin}
|
||||||
secret-key: minioadmin
|
secret-key: ${MINIO_SECRET_KEY:minioadmin}
|
||||||
bucket: wuhan-saga
|
bucket: wuhan-saga
|
||||||
region: us-east-1
|
region: us-east-1
|
||||||
|
|
||||||
|
|||||||
@@ -1,78 +0,0 @@
|
|||||||
server:
|
|
||||||
port: 8080
|
|
||||||
servlet:
|
|
||||||
context-path: /api
|
|
||||||
|
|
||||||
spring:
|
|
||||||
datasource:
|
|
||||||
type: com.alibaba.druid.pool.DruidDataSource
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
url: jdbc:mysql://localhost:3306/wuhan_saga?serverTimezone=Asia/Shanghai&useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8
|
|
||||||
username: root
|
|
||||||
password: 135827
|
|
||||||
druid:
|
|
||||||
initial-size: 5
|
|
||||||
min-idle: 5
|
|
||||||
max-active: 20
|
|
||||||
max-wait: 60000
|
|
||||||
time-between-eviction-runs-millis: 60000
|
|
||||||
min-evictable-idle-time-millis: 300000
|
|
||||||
validation-query: SELECT 1
|
|
||||||
test-while-idle: true
|
|
||||||
test-on-borrow: false
|
|
||||||
test-on-return: false
|
|
||||||
sql:
|
|
||||||
init:
|
|
||||||
mode: never
|
|
||||||
data:
|
|
||||||
redis:
|
|
||||||
host: localhost
|
|
||||||
port: 6379
|
|
||||||
database: 0
|
|
||||||
timeout: 5000ms
|
|
||||||
servlet:
|
|
||||||
multipart:
|
|
||||||
max-file-size: 50MB
|
|
||||||
max-request-size: 100MB
|
|
||||||
|
|
||||||
mybatis:
|
|
||||||
mapper-locations: classpath:mapper/**/*.xml
|
|
||||||
type-aliases-package: com.wuhansaga.server.entity
|
|
||||||
configuration:
|
|
||||||
map-underscore-to-camel-case: true
|
|
||||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
|
||||||
|
|
||||||
sa-token:
|
|
||||||
token-name: Authorization
|
|
||||||
timeout: 86400
|
|
||||||
active-timeout: -1
|
|
||||||
is-concurrent: true
|
|
||||||
is-share: true
|
|
||||||
token-style: uuid
|
|
||||||
is-log: false
|
|
||||||
|
|
||||||
knife4j:
|
|
||||||
enable: true
|
|
||||||
setting:
|
|
||||||
language: zh_cn
|
|
||||||
|
|
||||||
# 存储:local=本机 uploads | minio=对象存储,见 server/deploy/minio-spring-config.example.yml
|
|
||||||
upload:
|
|
||||||
storage: local
|
|
||||||
path: uploads/
|
|
||||||
allowed-types: image/jpeg,image/png,image/gif,image/webp,image/svg+xml,video/mp4,video/webm
|
|
||||||
max-size: 52428800
|
|
||||||
|
|
||||||
# 仅 upload.storage=minio 时生效;密钥用环境变量注入,勿提交生产明文
|
|
||||||
minio:
|
|
||||||
endpoint: http://127.0.0.1:9000
|
|
||||||
access-key: minioadmin
|
|
||||||
secret-key: minioadmin
|
|
||||||
bucket: wuhan-saga
|
|
||||||
region: us-east-1
|
|
||||||
|
|
||||||
# 新闻中心多站点:单部署实例默认站点;扩展编码时改 allowed-site-codes 与库内数据
|
|
||||||
app:
|
|
||||||
portal:
|
|
||||||
site-code: wuhansaga
|
|
||||||
allowed-site-codes: wuhansaga,saga-secondary
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user