diff --git a/front/client/components/Article.vue b/front/client/components/Article.vue new file mode 100644 index 0000000..14c08e1 --- /dev/null +++ b/front/client/components/Article.vue @@ -0,0 +1,23 @@ + + + diff --git a/front/client/components/Toolbar.vue b/front/client/components/Toolbar.vue index 0ce2532..e4bdea9 100644 --- a/front/client/components/Toolbar.vue +++ b/front/client/components/Toolbar.vue @@ -3,9 +3,9 @@ Aelve Guide - + - Login + Login @@ -14,11 +14,17 @@ import Vue from 'vue'; import Search from './Search.vue'; import Component from 'vue-class-component'; +import axios from "axios"; @Component({ components: { Search } }) -export default class Toolbar extends Vue {} +export default class Toolbar extends Vue { + async getApi() { + const { data } = await axios.get('api'); + console.log(data); + } +} diff --git a/front/client/service/Article.ts b/front/client/service/Article.ts new file mode 100644 index 0000000..91f9d5f --- /dev/null +++ b/front/client/service/Article.ts @@ -0,0 +1,23 @@ +import axios from 'axios'; + +class ArticleService { + async getArticle(): Promise { + const { data } = await axios.get('api/category/sth6l9jl', {}) + console.log(data); + + return data; + } +} + +export interface IArticle { + status: string, + group: string, + uid: string, + items: [], + title: string, + desription: string +} + +const articleServiceInstance = new ArticleService(); + +export { articleServiceInstance as ArticleService } \ No newline at end of file