# 记账管理端 **Repository Path**: brisklan/bs_account_admin ## Basic Information - **Project Name**: 记账管理端 - **Description**: 极简随手记的管理后台 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 2 - **Created**: 2024-09-23 - **Last Updated**: 2025-05-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 用node 14 编译 ## Build Setup ```bash # 克隆项目 git clone https://gitee.com/brisklan/bs_account_admin.git # 进入项目目录 cd bs_account_admin # 安装依赖 npm install # 建议不要直接使用 cnpm 安装以来,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题 npm install --registry=https://registry.npmmirror.com # 启动服务 npm run dev ``` 浏览器访问 [http://localhost:8787](http://localhost:8787) 默认账户密码 admin/123456 ## 发布 ```bash # 构建测试环境 npm run build:stage # 构建生产环境 npm run build:prod #或者直接 npm run build ``` ## 其它 ```bash # 预览发布环境效果 npm run preview # 预览发布环境效果 + 静态资源分析 npm run preview -- --report # 代码格式检查 npm run lint # 代码格式检查并自动修复 npm run lint -- --fix ``` ## 部署 - 打包后上传到服务器即可,静态网站 ### 如果放在二级目录,可以修改nginx重写,加入是http://xxx.com/jz-m/目录 修改vue.config.js下面的publicPath即可,默认'/'代表根目录,如下 ```plantuml publicPath: '/jz-m/',//部署路径二级目录时这样设置,假设后台代码根目录是xxxx.com/jz-m/ ``` - 如果.env.production没有修改,部署后需要自己反向代理,比如 ```shell #PROXY-START/manager/ location ^~ /manager/ { proxy_pass http://你的后台域名/admin/; proxy_set_header Host 你的后台域名; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header REMOTE-HOST $remote_addr; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_http_version 1.1; # proxy_hide_header Upgrade; add_header X-Cache $upstream_cache_status; #Set Nginx Cache set $static_filehh9Q5bP9 0; if ( $uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$" ) { set $static_filehh9Q5bP9 1; expires 1m; } if ( $static_filehh9Q5bP9 = 0 ) { add_header Cache-Control no-cache; } } #PROXY-END/manager/ ```