update
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -22,3 +22,6 @@ Thumbs.db
|
||||
# Editor (optional local)
|
||||
*.swp
|
||||
*.swo
|
||||
|
||||
# Wrangler local state
|
||||
.wrangler/
|
||||
|
||||
1835
package-lock.json
generated
1835
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -6,7 +6,8 @@
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc -b && vite build",
|
||||
"preview": "vite preview"
|
||||
"preview": "vite preview",
|
||||
"deploy:pages": "bash scripts/deploy-pages.sh"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "^18.3.1",
|
||||
@@ -16,8 +17,9 @@
|
||||
"devDependencies": {
|
||||
"@types/react": "^18.3.12",
|
||||
"@types/react-dom": "^18.3.1",
|
||||
"@vitejs/plugin-react": "^4.3.3",
|
||||
"@vitejs/plugin-react": "^4.7.0",
|
||||
"typescript": "^5.6.3",
|
||||
"vite": "^5.4.10"
|
||||
"vite": "^6.4.2",
|
||||
"wrangler": "^4.92.0"
|
||||
}
|
||||
}
|
||||
|
||||
1
public/_redirects
Normal file
1
public/_redirects
Normal file
@@ -0,0 +1 @@
|
||||
/* /index.html 200
|
||||
33
scripts/deploy-pages.sh
Executable file
33
scripts/deploy-pages.sh
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env bash
|
||||
# 构建 Vite 产物并上传到 Cloudflare Pages(静态资源直连部署)。
|
||||
#
|
||||
# 本机首次:
|
||||
# npm install
|
||||
# npx wrangler login
|
||||
#
|
||||
# CI / 非交互登录请设置:
|
||||
# CLOUDFLARE_API_TOKEN(权限需包含 Account · Cloudflare Pages · Edit)
|
||||
# CLOUDFLARE_ACCOUNT_ID(仪表盘「账户 ID」或运行 npx wrangler whoami)
|
||||
#
|
||||
# 可选环境变量:
|
||||
# PAGES_PROJECT_NAME 覆盖 Pages 项目名(默认 heguangtongkun-landing,需与 wrangler.toml / 控制台一致)
|
||||
# PAGES_DEPLOY_BRANCH 部署分支名,影响生产/预览归类(默认 main)
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
cd "$ROOT"
|
||||
|
||||
PAGES_PROJECT_NAME="${PAGES_PROJECT_NAME:-hgtk-landing}"
|
||||
PAGES_DEPLOY_BRANCH="${PAGES_DEPLOY_BRANCH:-main}"
|
||||
|
||||
echo "==> npm ci & build"
|
||||
npm ci
|
||||
npm run build
|
||||
|
||||
echo "==> wrangler pages deploy -> project: ${PAGES_PROJECT_NAME}, branch: ${PAGES_DEPLOY_BRANCH}"
|
||||
npx wrangler pages deploy dist \
|
||||
--project-name="$PAGES_PROJECT_NAME" \
|
||||
--branch="$PAGES_DEPLOY_BRANCH"
|
||||
|
||||
echo "==> Done."
|
||||
@@ -2,6 +2,9 @@ import { type CSSProperties } from "react";
|
||||
import CompareSlider from "./CompareSlider";
|
||||
import LogoMark from "./LogoMark";
|
||||
|
||||
/** 工信部 ICP 备案号(页脚公示,需与域名备案信息一致) */
|
||||
const SITE_ICP_NUMBER = "沪ICP备2026019929号";
|
||||
|
||||
/* ── Feature cards ─────────────────────────────── */
|
||||
const features = [
|
||||
{
|
||||
@@ -542,8 +545,20 @@ export default function LandingPage() {
|
||||
|
||||
<footer className="site-footer">
|
||||
<div className="wrap footer-inner">
|
||||
<span>© {new Date().getFullYear()} 上海和光同坤科技有限公司 · 颜值秤</span>
|
||||
<span className="footer-note">医美 3D 扫描 App · 立体之美,可被看见</span>
|
||||
<div className="footer-main">
|
||||
<span>© {new Date().getFullYear()} 上海和光同坤科技有限公司 · 颜值秤</span>
|
||||
<span className="footer-note">医美 3D 扫描 App · 立体之美,可被看见</span>
|
||||
</div>
|
||||
<div className="footer-filings">
|
||||
<a
|
||||
className="footer-filing-link"
|
||||
href="https://beian.miit.gov.cn/"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
{SITE_ICP_NUMBER}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</>
|
||||
|
||||
@@ -1732,13 +1732,19 @@
|
||||
.footer-inner {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
gap: 0.75rem;
|
||||
font-size: 0.92rem;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.footer-main {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
.footer-inner {
|
||||
.footer-main {
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
@@ -1748,3 +1754,19 @@
|
||||
.footer-note {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.footer-filings {
|
||||
font-size: 0.85rem;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.footer-filing-link {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.footer-filing-link:hover {
|
||||
text-decoration: underline;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
14
wrangler.toml
Normal file
14
wrangler.toml
Normal file
@@ -0,0 +1,14 @@
|
||||
# Git 集成时的两种常见配置:
|
||||
#
|
||||
# 1) 仅静态 Pages:Build = npm run build,Output = dist,「Deploy command」留空
|
||||
# (由 Cloudflare 直接发布 dist,勿再执行 wrangler deploy)
|
||||
#
|
||||
# 2) Workers + Vite 管道:控制台会执行 npx wrangler deploy,要求 package.json 中 Vite ≥ 6
|
||||
#
|
||||
# 下面 name 建议与 Cloudflare 控制台里的 Worker / Pages 项目名一致(你当前日志为 hgtk-landing)
|
||||
name = "hgtk-landing"
|
||||
compatibility_date = "2025-05-01"
|
||||
pages_build_output_dir = "dist"
|
||||
|
||||
# 若 wrangler 提示需要账户 ID,可取消下行注释并填入(或与 CLOUDFLARE_ACCOUNT_ID 二选一)
|
||||
# account_id = ""
|
||||
Reference in New Issue
Block a user