diff --git a/src/assets/images/bg.png b/src/assets/images/bg.png new file mode 100644 index 00000000..81be42d1 Binary files /dev/null and b/src/assets/images/bg.png differ diff --git a/src/assets/images/illustration.png b/src/assets/images/illustration.png new file mode 100644 index 00000000..cffa9007 Binary files /dev/null and b/src/assets/images/illustration.png differ diff --git a/src/assets/scss/_element.scss b/src/assets/scss/_element.scss index edae1c35..49a377f8 100644 --- a/src/assets/scss/_element.scss +++ b/src/assets/scss/_element.scss @@ -1,5 +1,8 @@ @forward 'element-plus/theme-chalk/src/common/var.scss' with ( $colors: ( + 'primary': ( + 'base': #705cf6 + ), 'danger': ( 'base': #ec4450 ) diff --git a/src/components/common/TopHeader.vue b/src/components/common/TopHeader.vue index 064dd942..db2e856d 100644 --- a/src/components/common/TopHeader.vue +++ b/src/components/common/TopHeader.vue @@ -94,7 +94,7 @@ $height: 60px; height: $height; z-index: 999; width: 100%; - background: radial-gradient(circle at 0 2%, #283e63, #172337 99%); + background: radial-gradient(circle at 0 2%, #111827, #1a125d 99%); .logo { height: $height - 5px; width: 250px; diff --git a/src/components/document/ApiCode.vue b/src/components/document/ApiCode.vue index b4671d5a..e90262ed 100644 --- a/src/components/document/ApiCode.vue +++ b/src/components/document/ApiCode.vue @@ -1,38 +1,14 @@ diff --git a/src/components/document/ApiForm.vue b/src/components/document/ApiForm.vue index 654bcd25..8977d531 100644 --- a/src/components/document/ApiForm.vue +++ b/src/components/document/ApiForm.vue @@ -12,7 +12,15 @@
- + + + +
@@ -45,7 +53,6 @@ export default defineComponent({ watch: { value: { handler() { - console.log('change', this.value); this.$emit('update:form', { ...this.value }); }, deep: true diff --git a/src/components/document/ApiList.vue b/src/components/document/ApiList.vue index 9967afff..e45b52c5 100644 --- a/src/components/document/ApiList.vue +++ b/src/components/document/ApiList.vue @@ -39,7 +39,6 @@ export default defineComponent({ }) .then(({ data: data }: { data: IApiListResponse }) => { this.apis = data.items; - console.log('apis', this.apis); }) .catch((error) => { console.error(error); diff --git a/src/components/document/ApiTry.vue b/src/components/document/ApiTry.vue index 36785504..9d716a92 100644 --- a/src/components/document/ApiTry.vue +++ b/src/components/document/ApiTry.vue @@ -3,8 +3,9 @@
{{ $t('common.button.try') }}
-
+
{{ $t('api.entity.response') }}
+
@@ -14,9 +15,13 @@ import { IApi, IForm, IRequest } from '@/operators/api/models'; import { defineComponent } from 'vue'; import axios, { Method } from 'axios'; import urlJoin from 'url-join'; +import CodeSnippet from '../common/CodeSnippet.vue'; export default defineComponent({ name: 'ApiTry', + components: { + CodeSnippet + }, props: { api: { type: Object as () => IApi, @@ -29,7 +34,8 @@ export default defineComponent({ }, data() { return { - apiKeyValue: this.apiKey + apiKeyValue: this.apiKey, + responseData: '' }; }, methods: { @@ -42,10 +48,17 @@ export default defineComponent({ data: { ...this.form.body } }; console.debug('config', config); - axios(config).then((response) => { - console.log('response', response); - // response.data.pipe(fs.createWriteStream('ada_lovelace.jpg')); - }); + axios(config) + .then((response) => { + this.responseData = JSON.stringify(response?.data, null, ' '); + }) + .catch((error) => { + console.log('error', error); + console.log(error); + console.log('error'); + console.log(error.response); + this.responseData = JSON.stringify(error?.response?.data, null, ' '); + }); } } }); @@ -54,8 +67,19 @@ export default defineComponent({ diff --git a/src/components/document/ApiUsage.vue b/src/components/document/ApiUsage.vue index 3bcda3ad..146effbd 100644 --- a/src/components/document/ApiUsage.vue +++ b/src/components/document/ApiUsage.vue @@ -75,7 +75,6 @@ export default defineComponent({ watch: { formValue: { handler(val) { - console.log('formValue changeddd'); this.$emit('update:form', { ...val }); }, deep: true diff --git a/src/i18n/zh/common/title.ts b/src/i18n/zh/common/title.ts index 795bca86..6e5d2895 100644 --- a/src/i18n/zh/common/title.ts +++ b/src/i18n/zh/common/title.ts @@ -1,3 +1,5 @@ export default { - orderDescription: '知数云课程订单' + orderDescription: '知数云课程订单', + documentIntroduction: '文档介绍', + select: '请选择' }; diff --git a/src/layouts/Console.vue b/src/layouts/Console.vue index e67d1ffb..0b0eb58c 100644 --- a/src/layouts/Console.vue +++ b/src/layouts/Console.vue @@ -1,5 +1,8 @@