diff --git a/ui/src/api/application/application.ts b/ui/src/api/application/application.ts index 29205bbcd..fec1b0c5b 100644 --- a/ui/src/api/application/application.ts +++ b/ui/src/api/application/application.ts @@ -1,14 +1,14 @@ -import { Result } from '@/request/Result' -import { get, post, postStream, del, put, request, download, exportFile } from '@/request/index' -import type { pageRequest } from '@/api/type/common' -import type { ApplicationFormType } from '@/api/type/application' -import { type Ref } from 'vue' +import {Result} from '@/request/Result' +import {get, post, postStream, del, put, request, download, exportFile} from '@/request/index' +import type {pageRequest} from '@/api/type/common' +import type {ApplicationFormType} from '@/api/type/application' +import {type Ref} from 'vue' import useStore from '@/stores' -const prefix: any = { _value: '/workspace/' } +const prefix: any = {_value: '/workspace/'} Object.defineProperty(prefix, 'value', { get: function () { - const { user } = useStore() + const {user} = useStore() return this._value + user.getWorkspaceId() + '/application' }, }) @@ -212,6 +212,17 @@ const getPlatformConfig: (application_id: string, type: string) => Promise { return get(`${prefix.value}/${application_id}/platform/${type}`) } +/** + * 更新平台配置 + */ +const updatePlatformConfig: ( + application_id: string, + type: string, + data: any, + loading?: Ref +) => Promise> = (application_id, type, data, loading) => { + return post(`${prefix.value}/${application_id}/platform/${type}`, data, undefined, loading) +} /** * 应用发布 * @param application_id @@ -245,4 +256,5 @@ export default { updatePlatformStatus, getPlatformConfig, publish, + updatePlatformConfig } diff --git a/ui/src/views/login/index.vue b/ui/src/views/login/index.vue index 1b3f1c21f..7c8bc98b9 100644 --- a/ui/src/views/login/index.vue +++ b/ui/src/views/login/index.vue @@ -79,7 +79,7 @@
- +