diff --git a/.husky/commit-msg b/.husky/commit-msg index 78758de..8b85bc4 100644 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -56,26 +56,11 @@ print_debug "Shell: $SHELL" print_debug "PATH: $PATH" print_debug "当前进程ID: $" -# 检查 bunx 是否可用 -print_section "检查工具可用性..." -print_info "尝试导入用户环境变量..." -export PATH="$HOME/.bun/bin:$PATH" -if command -v bunx >/dev/null 2>&1; then - BUNX_PATH=$(command -v bunx) - print_success "bunx 可用: $BUNX_PATH" - print_debug "bunx 版本信息:" - print_debug "$(bunx --version 2>&1 || echo 'bunx --version 失败')" -else - print_error "bunx 不可用" - print_info "PATH 内容: $PATH" - exit 1 -fi - # 检查 commitlint 是否可用 print_section "检查 commitlint..." -if bunx commitlint --version >/dev/null 2>&1; then - COMMITLINT_VERSION=$(bunx commitlint --version) +if npx commitlint --version >/dev/null 2>&1; then + COMMITLINT_VERSION=$(npx commitlint --version) print_success "commitlint 可用: $COMMITLINT_VERSION" else print_error "commitlint 不可用或配置有误" @@ -132,15 +117,15 @@ fi # 运行 commitlint echo print_section "执行 commitlint 检查..." -print_command "执行命令: bunx commitlint --edit \"$1\"" +print_command "执行命令: npx commitlint --edit \"$1\"" # 显示详细的执行过程 if [ "$DEBUG" = "true" ]; then print_debug "详细执行过程:" - bunx commitlint --edit "$1" --verbose + npx commitlint --edit "$1" --verbose RESULT=$? else - bunx commitlint --edit "$1" + npx commitlint --edit "$1" RESULT=$? fi @@ -156,7 +141,7 @@ else echo "1. 检查提交消息是否符合约定式提交格式" echo "2. 确认 commitlint 配置是否正确" echo "3. 运行 'DEBUG=true git commit' 查看详细调试信息" - echo "4. 手动测试: bunx commitlint --edit .git/COMMIT_EDITMSG" + echo "4. 手动测试: npx commitlint --edit .git/COMMIT_EDITMSG" echo print_debug "Hook 执行失败,退出代码: $RESULT" fi diff --git a/.husky/pre-commit b/.husky/pre-commit index e69de29..d0a7784 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged \ No newline at end of file diff --git a/README.md b/README.md index 7e8b174..ae7c747 100644 --- a/README.md +++ b/README.md @@ -5,20 +5,19 @@ ## 站点内容 - 首页 - - 首页Banner - - 推荐产品 + - 首页Banner + - 推荐产品 - 产品展示 - - 产品列表分类展示 - - 产品详情页 + - 产品列表分类展示 + - 产品详情页 - 解决方案 - - 以Markdown形式渲染解决方案文章 + - 以Markdown形式渲染解决方案文章 - 服务支持 - - 常见问题列表 - - 文档资料列表 - - 联系信息 + - 常见问题列表 + - 文档资料列表 + - 联系信息 - 关于我们 - - 公司基本信息 - + - 公司基本信息 ## 安装与设置 @@ -27,25 +26,25 @@ 1. 克隆项目仓库: -``` bash +```bash git clone http://192.168.84.125/remilia/jinshen-website.git ``` 2. 进入项目目录: -``` bash +```bash cd jinshen-website ``` 3. 安装依赖 -``` bash +```bash pnpm install ``` 4. 运行开发环境 -``` bash +```bash pnpm run dev ``` @@ -65,15 +64,18 @@ pnpm run dev 1. 构建生产版本 项目构建 -``` bash + +```bash pnpm run build ``` 预览构建版本 + ```bash pnpm run preview ``` 2. 部署 -部署构建后的项目并推送到文件服务器中,具体步骤视服务器配置而定 \ No newline at end of file +部署构建后的项目并推送到文件服务器中,具体步骤视服务器配置而定 + diff --git a/app/app.vue b/app/app.vue index a45597f..c6553da 100644 --- a/app/app.vue +++ b/app/app.vue @@ -9,28 +9,28 @@ diff --git a/app/assets/css/fonts.css b/app/assets/css/fonts.css index 029e9e3..142e7fb 100644 --- a/app/assets/css/fonts.css +++ b/app/assets/css/fonts.css @@ -1,26 +1,36 @@ @font-face { - font-family: "Source Han Sans CN"; - src: url("/fonts/source-han-sans/SourceHanSansCN-Regular-Alphabetic.woff2") format("woff2"), - url("/fonts/source-han-sans/SourceHanSansCN-Regular-Alphabetic.woff") format("woff"); - font-weight: 400; - font-style: normal; - font-display: swap; + font-family: "Source Han Sans CN"; + src: + url("/fonts/source-han-sans/SourceHanSansCN-Regular-Alphabetic.woff2") + format("woff2"), + url("/fonts/source-han-sans/SourceHanSansCN-Regular-Alphabetic.woff") + format("woff"); + font-weight: 400; + font-style: normal; + font-display: swap; } @font-face { - font-family: "Source Han Sans CN"; - src: url("/fonts/source-han-sans/SourceHanSansCN-Bold-Alphabetic.woff2") format("woff2"), - url("/fonts/source-han-sans/SourceHanSansCN-Bold-Alphabetic.woff") format("woff"); - font-weight: 700; - font-style: normal; - font-display: swap; + font-family: "Source Han Sans CN"; + src: + url("/fonts/source-han-sans/SourceHanSansCN-Bold-Alphabetic.woff2") + format("woff2"), + url("/fonts/source-han-sans/SourceHanSansCN-Bold-Alphabetic.woff") + format("woff"); + + font-weight: 700; + font-style: normal; + font-display: swap; } @font-face { - font-family: "Source Han Sans CN"; - src: url("/fonts/source-han-sans/SourceHanSansCN-Light-Alphabetic.woff2") format("woff2"), - url("/fonts/source-han-sans/SourceHanSansCN-Light-Alphabetic.woff") format("woff"); - font-weight: 300; - font-style: normal; - font-display: swap; -} \ No newline at end of file + font-family: "Source Han Sans CN"; + src: + url("/fonts/source-han-sans/SourceHanSansCN-Light-Alphabetic.woff2") + format("woff2"), + url("/fonts/source-han-sans/SourceHanSansCN-Light-Alphabetic.woff") + format("woff"); + font-weight: 300; + font-style: normal; + font-display: swap; +} diff --git a/app/assets/scss/element/dark.scss b/app/assets/scss/element/dark.scss index 93bf00c..741cae4 100644 --- a/app/assets/scss/element/dark.scss +++ b/app/assets/scss/element/dark.scss @@ -1,6 +1,6 @@ -@forward 'element-plus/theme-chalk/src/dark/var.scss' with ( +@forward "element-plus/theme-chalk/src/dark/var.scss" with ( $bg-color: ( - 'page': #0a0a0a, - 'overlay': #1d1e1f, + "page": #0a0a0a, + "overlay": #1d1e1f, ) ); diff --git a/app/assets/scss/element/index.scss b/app/assets/scss/element/index.scss index 002ec4f..4285909 100644 --- a/app/assets/scss/element/index.scss +++ b/app/assets/scss/element/index.scss @@ -1,26 +1,26 @@ $-colors: ( - 'primary': ( - 'base': #177ee5, + "primary": ( + "base": #177ee5, ), - 'success': ( - 'base': green, + "success": ( + "base": green, ), - 'warning': ( - 'base': #f9a23c, + "warning": ( + "base": #f9a23c, ), - 'danger': ( - 'base': #ff3300, + "danger": ( + "base": #ff3300, ), - 'error': ( - 'base': #f56c6c, + "error": ( + "base": #f56c6c, ), - 'info': ( - 'base': #909399, + "info": ( + "base": #909399, ), ); -@forward 'element-plus/theme-chalk/src/common/var.scss' with ( +@forward "element-plus/theme-chalk/src/common/var.scss" with ( $colors: $-colors ); -@use './dark.scss'; \ No newline at end of file +@use "./dark.scss"; diff --git a/app/assets/scss/index.scss b/app/assets/scss/index.scss index 18852e2..4e52518 100644 --- a/app/assets/scss/index.scss +++ b/app/assets/scss/index.scss @@ -17,5 +17,6 @@ a { } :root { - --font-main: "Source Han Sans CN", "Noto Sans CJK SC", "Noto Sans CJK", sans-serif; -} \ No newline at end of file + --font-main: + "Source Han Sans CN", "Noto Sans CJK SC", "Noto Sans CJK", sans-serif; +} diff --git a/app/components/DocumentList.vue b/app/components/DocumentList.vue index 68f6ec6..c30953a 100644 --- a/app/components/DocumentList.vue +++ b/app/components/DocumentList.vue @@ -28,48 +28,48 @@ diff --git a/app/components/JinshenFooter.vue b/app/components/JinshenFooter.vue index 39bd602..66a42e0 100644 --- a/app/components/JinshenFooter.vue +++ b/app/components/JinshenFooter.vue @@ -4,39 +4,39 @@
-
+ - {{ $t("company-description") }} + {{ $t('company-description') }}
- {{ $t("search.results-for", { query: keyword }) }} + {{ $t('search.results-for', { query: keyword }) }}