From ef8c55510892ff56f59b9705cf3a99de2857a6c6 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Tue, 24 Jun 2025 18:21:09 +0800 Subject: [PATCH] refactor: ui --- ui/src/api/application/application.ts | 26 +++++++--- ui/src/views/login/index.vue | 49 ++++++++++--------- .../views/login/scanCompinents/larkQrCode.vue | 13 ++--- .../authentication/component/LDAP.vue | 4 +- .../authentication/component/EditModal.vue | 2 +- .../authentication/component/LDAP.vue | 4 +- .../authentication/component/SCAN.vue | 2 +- 7 files changed, 55 insertions(+), 45 deletions(-) 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 @@
- +