Skip to content

Commit fcfacdb

Browse files
committed
更新联调
1 parent 1b516fa commit fcfacdb

File tree

20 files changed

+2193
-183
lines changed

20 files changed

+2193
-183
lines changed

client/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"typescript": "~5.8.0",
3939
"vite": "^7.0.6",
4040
"vite-plugin-vue-devtools": "^8.0.0",
41+
"vue-eslint-parser": "^10",
4142
"vue-tsc": "^3.0.4"
4243
}
4344
}

client/src/api/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import axios from 'axios'
22

33
// 创建 axios 实例
44
const api = axios.create({
5-
baseURL: 'http://localhost:8070', // 发布准备服务端口
65
timeout: 10000,
76
headers: {
87
'Content-Type': 'application/json'

client/src/mock/api.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,38 @@ export class MockApiService {
127127
return { status: 200 }
128128
}
129129

130+
// 创建部署计划 - 新的API接口
131+
static async createDeployment(data: {service: string, version: string, scheduleTime?: string}): Promise<{ status: number, data: {id: string, message: string} }> {
132+
await delay(500)
133+
console.log(`Mock API: 创建部署计划 - service: ${data.service}, version: ${data.version}`)
134+
135+
// 生成模拟的部署ID
136+
const deployID = `deploy-${Date.now()}`
137+
138+
// 模拟创建成功,返回状态码201
139+
return {
140+
status: 201,
141+
data: {
142+
id: deployID,
143+
message: 'deployment created successfully'
144+
}
145+
}
146+
}
147+
148+
// 更新部署计划 - 新的API接口
149+
static async updateDeployment(deployID: string, data: {version?: string, scheduleTime?: string}): Promise<{ status: number, data: {message: string} }> {
150+
await delay(300)
151+
console.log(`Mock API: 更新部署计划 - ${deployID}`, data)
152+
153+
// 模拟更新成功,返回状态码200
154+
return {
155+
status: 200,
156+
data: {
157+
message: 'deployment updated successfully'
158+
}
159+
}
160+
}
161+
130162
// 获取部署变更记录 - 新的API接口
131163
static async getDeploymentChangelog(start?: string, limit?: number): Promise<DeploymentChangelogResponse> {
132164
await delay(300)

0 commit comments

Comments
 (0)