docs: 修改README文档 (#4)
- 修改默认的README文档,为项目提供部分说明 Reviewed-on: http://192.168.84.125:3030/remilia/jinshen-website/pulls/4 Co-authored-by: R2m1liA <15258427350@163.com> Co-committed-by: R2m1liA <15258427350@163.com>
This commit is contained in:
102
README.md
102
README.md
@ -1,75 +1,79 @@
|
||||
# Nuxt Minimal Starter
|
||||
# 金申机械制造有限公司官方网站——前端服务
|
||||
|
||||
Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
|
||||
这是公司(金申机械制造有限公司)官网的前端服务。项目使用Nuxt.js与Element Plus进行开发,后端服务使用Strapi。旨在为客户提供直观的公司简介、产品信息、解决方案、联系方式等。
|
||||
|
||||
## Setup
|
||||
## 站点内容
|
||||
|
||||
Make sure to install dependencies:
|
||||
- 首页
|
||||
- 首页Banner
|
||||
- 推荐产品
|
||||
- 产品展示
|
||||
- 产品列表分类展示
|
||||
- 产品详情页
|
||||
- 解决方案
|
||||
- 以Markdown形式渲染解决方案文章
|
||||
- 服务支持
|
||||
- 常见问题列表
|
||||
- 文档资料列表
|
||||
- 联系信息
|
||||
- 关于我们
|
||||
- 公司基本信息
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm install
|
||||
|
||||
# pnpm
|
||||
pnpm install
|
||||
## 安装与设置
|
||||
|
||||
# yarn
|
||||
yarn install
|
||||
> [!NOTE]
|
||||
> 本项目默认使用bun作为包管理器
|
||||
|
||||
# bun
|
||||
1. 克隆项目仓库:
|
||||
|
||||
``` bash
|
||||
git clone http://192.168.84.125/remilia/jinshen-website.git
|
||||
```
|
||||
|
||||
2. 进入项目目录:
|
||||
|
||||
``` bash
|
||||
cd jinshen-website
|
||||
```
|
||||
|
||||
3. 安装依赖
|
||||
|
||||
``` bash
|
||||
bun install
|
||||
```
|
||||
|
||||
## Development Server
|
||||
4. 运行开发环境
|
||||
|
||||
Start the development server on `http://localhost:3000`:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm run dev
|
||||
|
||||
# pnpm
|
||||
pnpm dev
|
||||
|
||||
# yarn
|
||||
yarn dev
|
||||
|
||||
# bun
|
||||
``` bash
|
||||
bun run dev
|
||||
```
|
||||
|
||||
## Production
|
||||
5. 访问开发环境
|
||||
|
||||
Build the application for production:
|
||||
通过http://localhost:3000访问前端服务
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm run build
|
||||
### 配置说明
|
||||
|
||||
# pnpm
|
||||
pnpm build
|
||||
项目用到以下环境变量,请自行在项目中配置
|
||||
|
||||
# yarn
|
||||
yarn build
|
||||
- 'STRAPI_URL': 后端Strapi服务URL
|
||||
- 'STRAPI_TOKEN': Strapi服务的API Token
|
||||
|
||||
# bun
|
||||
## 构建与部署
|
||||
|
||||
1. 构建生产版本
|
||||
|
||||
项目构建
|
||||
``` bash
|
||||
bun run build
|
||||
```
|
||||
|
||||
Locally preview production build:
|
||||
|
||||
预览构建版本
|
||||
```bash
|
||||
# npm
|
||||
npm run preview
|
||||
|
||||
# pnpm
|
||||
pnpm preview
|
||||
|
||||
# yarn
|
||||
yarn preview
|
||||
|
||||
# bun
|
||||
bun run preview
|
||||
```
|
||||
|
||||
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
|
||||
2. 部署
|
||||
|
||||
部署构建后的项目并推送到文件服务器中,具体步骤视服务器配置而定
|
||||
Reference in New Issue
Block a user