From e2e17eef964e25eccb04af022bf7a435e0bea1cf Mon Sep 17 00:00:00 2001 From: AceDataCloud Date: Tue, 31 Jan 2023 16:30:00 +0800 Subject: [PATCH] migrate new model --- src/components/api/Info.vue | 61 +++++++++++++++++++++ src/components/api/Usage.vue | 40 +------------- src/components/document/ListItem.vue | 11 +++- src/components/order/Create.vue | 11 ++-- src/i18n/zh/application/field.ts | 3 +- src/i18n/zh/order/field.ts | 3 +- src/i18n/zh/service/field.ts | 4 +- src/main.ts | 20 ------- src/operators/api/index.ts | 4 +- src/operators/api/models.ts | 8 ++- src/operators/application/models.ts | 13 ++++- src/operators/document/models.ts | 7 ++- src/operators/service/models.ts | 4 +- src/pages/console/application/List.vue | 17 ++++-- src/pages/console/order/Detail.vue | 6 +- src/pages/document/Detail.vue | 12 ++-- src/pages/service/Detail.vue | 76 ++++++++++++++++++++------ src/pages/service/List.vue | 8 +++ vite.config.ts | 2 +- 19 files changed, 202 insertions(+), 108 deletions(-) create mode 100644 src/components/api/Info.vue diff --git a/src/components/api/Info.vue b/src/components/api/Info.vue new file mode 100644 index 00000000..0b9298d3 --- /dev/null +++ b/src/components/api/Info.vue @@ -0,0 +1,61 @@ + + + + + diff --git a/src/components/api/Usage.vue b/src/components/api/Usage.vue index 2526ac32..070acc48 100644 --- a/src/components/api/Usage.vue +++ b/src/components/api/Usage.vue @@ -5,16 +5,7 @@
-
- {{ api?.title }} -
-
- {{ api?.request?.method }} - {{ urlJoin(api?.endpoint, api?.path) }} -
-
-

{{ api?.introduction }}

-
+

{{ $t('api.entity.requestQueries') }}

@@ -56,10 +47,10 @@ import { defineComponent } from 'vue'; import { IApi, IForm } from '@/operators/api/models'; import ApiForm from './Form.vue'; import ApiResult from './Result.vue'; -import urlJoin from 'url-join'; import { applicationOperator } from '@/operators/application/operator'; import { IApplication, IApplicationListResponse } from '@/operators/application/models'; import { ElSkeleton, ElDivider, ElTag } from 'element-plus'; +import ApiInfo from './Info.vue'; export interface IData { formValue: IForm; @@ -73,7 +64,7 @@ export default defineComponent({ ApiResult, ElSkeleton, ElDivider, - ElTag + ApiInfo }, props: { api: { @@ -106,7 +97,6 @@ export default defineComponent({ }, mounted() {}, methods: { - urlJoin, getApplications() { applicationOperator .getAll({ @@ -123,30 +113,6 @@ export default defineComponent({ diff --git a/src/pages/service/List.vue b/src/pages/service/List.vue index 9a155de1..6cf75376 100644 --- a/src/pages/service/List.vue +++ b/src/pages/service/List.vue @@ -223,6 +223,14 @@ export default defineComponent({ } $transition-duration: 0.5s; + +@media (min-width: 1400px) { + .services { + width: 1300px; + margin: auto !important; + } +} + .services { padding: 50px 0; .service { diff --git a/vite.config.ts b/vite.config.ts index a000b116..63be5724 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -20,7 +20,7 @@ const getAuthEndpoint = () => { const getDataEndpoint = () => { switch (process.env.NODE_ENV) { case 'local': - return 'http://localhost:8007'; + return 'http://127.0.0.1:8007'; case 'test': return 'https://data.test.zhishuyun.com'; case 'production':