From 5b723b7a40580b008b0aeea589690542688f6bb0 Mon Sep 17 00:00:00 2001 From: AceDataCloud Date: Fri, 3 Mar 2023 01:40:49 +0800 Subject: [PATCH] fix ux details --- src/components/api/Form.vue | 13 +++++++++++++ src/i18n/zh/application/message.ts | 3 ++- src/i18n/zh/service/message.ts | 3 ++- src/i18n/zh/service/unit.ts | 4 +++- src/operators/api/models.ts | 1 + src/operators/service/models.ts | 1 + src/pages/service/Detail.vue | 18 +++++++++++++++++- src/pages/service/List.vue | 2 +- 8 files changed, 40 insertions(+), 5 deletions(-) diff --git a/src/components/api/Form.vue b/src/components/api/Form.vue index 02ec7479..026d3d3e 100644 --- a/src/components/api/Form.vue +++ b/src/components/api/Form.vue @@ -76,6 +76,19 @@ + + + {{ item.example }} + {{ $t('application.message.example') }} + + diff --git a/src/i18n/zh/application/message.ts b/src/i18n/zh/application/message.ts index d6b92c67..75148977 100644 --- a/src/i18n/zh/application/message.ts +++ b/src/i18n/zh/application/message.ts @@ -5,5 +5,6 @@ export default { yourApplication: '你的申请', unverified: '您需要完成实名认证之后方可申请该服务', goVerify: '去实名认证', - requiredParameter: '必填参数' + requiredParameter: '必填参数', + example: '样例' }; diff --git a/src/i18n/zh/service/message.ts b/src/i18n/zh/service/message.ts index 5ce84a86..fdf4facd 100644 --- a/src/i18n/zh/service/message.ts +++ b/src/i18n/zh/service/message.ts @@ -2,5 +2,6 @@ export default { free: '免费', appliedCount: '申请次数', indexTitle: '方便易用的数字化解决方案', - indexSubtitle: '用一个个标准化服务,助力你工作与生活的方方面面。' + indexSubtitle: '用一个个标准化服务,助力你工作与生活的方方面面。', + fromPrice: '起' }; diff --git a/src/i18n/zh/service/unit.ts b/src/i18n/zh/service/unit.ts index 3c5b3d8a..2332000b 100644 --- a/src/i18n/zh/service/unit.ts +++ b/src/i18n/zh/service/unit.ts @@ -1,3 +1,5 @@ export default { - usage: '次' + count: '次', + Count: '次', + MB: 'MB' }; diff --git a/src/operators/api/models.ts b/src/operators/api/models.ts index 05e6ba9b..603cee99 100644 --- a/src/operators/api/models.ts +++ b/src/operators/api/models.ts @@ -21,6 +21,7 @@ export interface ISchema { type: 'object' | 'array' | 'string' | 'number' | 'boolean'; title: string; optional: boolean; + example: string | number; } export interface IRequest { diff --git a/src/operators/service/models.ts b/src/operators/service/models.ts index 6a6c94fa..07dac0ba 100644 --- a/src/operators/service/models.ts +++ b/src/operators/service/models.ts @@ -3,6 +3,7 @@ import { IApi } from '../api/models'; export interface IService { id: string; title: string; + unit?: string; price?: number; description?: string; tags?: string[]; diff --git a/src/pages/service/Detail.vue b/src/pages/service/Detail.vue index 53dba4e4..ec5dedfa 100644 --- a/src/pages/service/Detail.vue +++ b/src/pages/service/Detail.vue @@ -23,7 +23,10 @@

¥{{ service.price }} - / {{ $t('service.unit.usage') }} + / {{ $t(`service.unit.${service.unit}`) }} + + {{ $t('service.message.fromPrice') }} +

{{ $t('service.message.free') }} @@ -337,6 +340,10 @@ export default defineComponent({ .unit { color: white; } + + .from { + color: white; + } } .free { color: #29c287; @@ -479,4 +486,13 @@ export default defineComponent({ display: flex; } } + +.proxies { + margin-bottom: 40px; + .operations { + align-items: center; + justify-items: center; + display: flex; + } +} diff --git a/src/pages/service/List.vue b/src/pages/service/List.vue index b4ef7a2f..a9a5bd9a 100644 --- a/src/pages/service/List.vue +++ b/src/pages/service/List.vue @@ -45,7 +45,7 @@

{{ service.title }}
- +