更新文件结构,统一文档格式

This commit is contained in:
ylweng
2025-09-01 03:32:45 +08:00
parent 950ef70173
commit 23041faa2a
39 changed files with 817 additions and 111 deletions

View File

@@ -2,7 +2,7 @@
NODE_ENV=development
# API配置
VITE_API_BASE_URL=http://localhost:3100/api/v1
VITE_API_BASE_URL=https://api.jiebanke.com/api/v1
VITE_API_TIMEOUT=30000
# 功能开关

View File

@@ -86,7 +86,7 @@ docker-compose up mysql redis rabbitmq
**.env.development** (开发环境):
```
VITE_APP_TITLE=结伴客后台管理系统(开发)
VITE_API_BASE_URL=http://localhost:3000
VITE_API_BASE_URL=https://api.jiebanke.com/api/v1
VITE_APP_VERSION=dev
```
@@ -130,8 +130,8 @@ environment:
## 健康检查
系统提供健康检查端点:
- 前端: `http://localhost:80/health`
- 后端: `http://localhost:3000/health`
- 前端: `https://admin.jiebanke.com/health`
- 后端: `https://api.jiebanke.com/health`
## 监控和日志

View File

@@ -45,7 +45,7 @@ npm run preview
### 开发环境 (.env.development)
```env
NODE_ENV=development
VITE_API_BASE_URL=http://localhost:3000/api/v1
VITE_API_BASE_URL=https://api.jiebanke.com/api/v1
VITE_FEATURE_DEBUG=true
```
@@ -238,7 +238,7 @@ const getUsers = async () => {
### 开发环境部署
1. 安装依赖: `npm install`
2. 启动开发服务器: `npm run dev`
3. 访问: http://localhost:3001
3. 访问: https://admin.jiebanke.com
### 生产环境部署
1. 构建项目: `npm run build`

View File

@@ -14,7 +14,7 @@ services:
networks:
- jiebanke-network
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:80/health"]
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "https://admin.jiebanke.com/health"]
interval: 30s
timeout: 10s
retries: 3

View File

@@ -1,6 +1,6 @@
server {
listen 80;
server_name localhost;
server_name admin.jiebanke.com;
# 静态文件服务
location / {

View File

@@ -3,7 +3,7 @@ import { message } from 'ant-design-vue'
import type { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios'
// API基础配置
const baseURL = import.meta.env.VITE_API_BASE_URL || 'http://localhost:3100/api'
const baseURL = import.meta.env.VITE_API_BASE_URL || 'https://api.jiebanke.com/api'
const timeout = parseInt(import.meta.env.VITE_API_TIMEOUT || '10000')
// 创建axios实例

View File

@@ -39,7 +39,7 @@ export const useMerchantStore = defineStore('merchant', () => {
businessLicense: '1234567890',
contactPerson: '张老板',
contactPhone: '13800138001',
contactEmail: 'flower@example.com',
contactEmail: 'flower@jiebanke.com',
address: '北京市朝阳区',
description: '专业鲜花销售',
status: 'active',
@@ -58,7 +58,7 @@ export const useMerchantStore = defineStore('merchant', () => {
businessLicense: '0987654321',
contactPerson: '李农场主',
contactPhone: '13900139001',
contactEmail: 'farm@example.com',
contactEmail: 'farm@jiebanke.com',
address: '上海市浦东新区',
description: '动物认领和农场体验',
status: 'active',
@@ -107,7 +107,7 @@ export const useMerchantStore = defineStore('merchant', () => {
businessLicense: `LICENSE${merchantId}`,
contactPerson: '联系人',
contactPhone: '13800138000',
contactEmail: `merchant${merchantId}@example.com`,
contactEmail: `merchant${merchantId}@jiebanke.com`,
address: '地址',
description: '商家描述',
status: 'active',

View File

@@ -31,7 +31,7 @@ export const useUserStore = defineStore('user', () => {
nickname: '用户1',
avatar: '',
phone: '13800138000',
email: 'user1@example.com',
email: 'user1@jiebanke.com',
status: 'active',
registerTime: '2024-01-01 10:00:00',
lastLoginTime: '2024-01-15 15:30:00',
@@ -43,7 +43,7 @@ export const useUserStore = defineStore('user', () => {
nickname: '商家1',
avatar: '',
phone: '13900139000',
email: 'merchant1@example.com',
email: 'merchant1@jiebanke.com',
status: 'active',
registerTime: '2024-01-02 09:00:00',
lastLoginTime: '2024-01-14 14:20:00',
@@ -76,7 +76,7 @@ export const useUserStore = defineStore('user', () => {
nickname: `用户${userId}`,
avatar: '',
phone: '13800138000',
email: `user${userId}@example.com`,
email: `user${userId}@jiebanke.com`,
status: 'active',
registerTime: '2024-01-01 10:00:00',
lastLoginTime: '2024-01-15 15:30:00',

View File

@@ -27,7 +27,7 @@ export default defineConfig({
port: 3150,
proxy: {
'/api': {
target: 'http://localhost:3100',
target: 'https://api.jiebanke.com',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '/api/v1')
}