diff --git a/.env b/.env index c6889c1a..27c38a1b 100644 --- a/.env +++ b/.env @@ -1,4 +1,5 @@ # 所有环境 # 页面 title 前缀 -VUE_APP_TITLE=D2Admin \ No newline at end of file +VUE_APP_TITLE=D2Admin +VUE_APP_API=/api/ diff --git a/docs/zh/collaborator/README.md b/docs/zh/collaborator/README.md index ea56aef7..0f8a0d1f 100644 --- a/docs/zh/collaborator/README.md +++ b/docs/zh/collaborator/README.md @@ -10,4 +10,5 @@ sidebar: auto | | sunhaoxiang | [https://github.com/sunhaoxiang](https://github.com/sunhaoxiang) | | | namklaw | [https://github.com/namklaw](https://github.com/namklaw) | | | mokeyjay | [https://github.com/mokeyjay](https://github.com/mokeyjay) | -| | Aysnine | [https://github.com/Aysnine](https://github.com/Aysnine) | \ No newline at end of file +| | Aysnine | [https://github.com/Aysnine](https://github.com/Aysnine) | +| | rongxingsun | [https://github.com/rongxingsun](https://github.com/rongxingsun) | \ No newline at end of file diff --git a/package-lock.json.REMOVED.git-id b/package-lock.json.REMOVED.git-id index 8e30f099..e44ada5f 100644 --- a/package-lock.json.REMOVED.git-id +++ b/package-lock.json.REMOVED.git-id @@ -1 +1 @@ -208665c165b32daf4021f61c3ad430a972cb9735 \ No newline at end of file +937f5369a5d9b43eeb3c7fa2991f76724481721c \ No newline at end of file diff --git a/src/api/components/markdown/index.js b/src/api/components/markdown/index.js new file mode 100644 index 00000000..8769a0b0 --- /dev/null +++ b/src/api/components/markdown/index.js @@ -0,0 +1,9 @@ +import request from '@/plugin/axios' + +export function ComponentsMarkdownBase (url) { + return request({ + baseURL: process.env.BASE_URL, + url, + method: 'get' + }) +} diff --git a/src/api/demo/business/table/1/index.js b/src/api/demo/business/table/1/index.js new file mode 100644 index 00000000..4e09ecb9 --- /dev/null +++ b/src/api/demo/business/table/1/index.js @@ -0,0 +1,9 @@ +import request from '@/plugin/axios' + +export function BusinessTable1List (data) { + return request({ + url: '/demo/business/table/1', + method: 'post', + data + }) +} diff --git a/src/api/demo/plugins/mocks/ajax/index.js b/src/api/demo/plugins/mocks/ajax/index.js new file mode 100644 index 00000000..a7ec00cc --- /dev/null +++ b/src/api/demo/plugins/mocks/ajax/index.js @@ -0,0 +1,8 @@ +import request from '@/plugin/axios' + +export function PluginMocksAjax () { + return request({ + url: '/demo/plugins/mock/ajax', + method: 'get' + }) +} diff --git a/src/api/sys/http/index.js b/src/api/sys/http/index.js new file mode 100644 index 00000000..c2f7eeb4 --- /dev/null +++ b/src/api/sys/http/index.js @@ -0,0 +1,17 @@ +import request from '@/plugin/axios' + +export function httpGet (url, params = {}) { + return request({ + url, + method: 'get', + params + }) +} + +export function httpPost (url, data = {}) { + return request({ + url, + method: 'post', + data + }) +} diff --git a/src/api/sys/login/index.js b/src/api/sys/login/index.js new file mode 100644 index 00000000..882292e3 --- /dev/null +++ b/src/api/sys/login/index.js @@ -0,0 +1,9 @@ +import request from '@/plugin/axios' + +export function AccountLogin (data) { + return request({ + url: '/login', + method: 'post', + data + }) +} diff --git a/src/assets/style/theme/theme.scss.REMOVED.git-id b/src/assets/style/theme/theme.scss.REMOVED.git-id index 8b5ae210..9ba9d43f 100644 --- a/src/assets/style/theme/theme.scss.REMOVED.git-id +++ b/src/assets/style/theme/theme.scss.REMOVED.git-id @@ -1 +1 @@ -87fff7214e7b64123842f1f52b649a8af614eb46 \ No newline at end of file +bfee5e91a3b150e04d9f24695061f6f3e7c59342 \ No newline at end of file diff --git a/src/components/d2-markdown/index.vue b/src/components/d2-markdown/index.vue index f6d733e2..aaf60f50 100644 --- a/src/components/d2-markdown/index.vue +++ b/src/components/d2-markdown/index.vue @@ -12,6 +12,7 @@ import marked from 'marked' import highlight from 'highlight.js' import bandupan from './plugin/baidupan' import 'github-markdown-css' +import { ComponentsMarkdownBase } from '@/api/components/markdown' export default { name: 'd2-markdown', props: { @@ -63,7 +64,7 @@ export default { }, // 从 url 加载原始数据 async getReadme (url) { - const data = await this.$axios.get(url) + const data = await ComponentsMarkdownBase(url) return this.marked(data) }, marked (data) { diff --git a/src/layout/header-aside/components/menu-header/index.vue b/src/layout/header-aside/components/menu-header/index.vue index acea80cf..940aaf63 100644 --- a/src/layout/header-aside/components/menu-header/index.vue +++ b/src/layout/header-aside/components/menu-header/index.vue @@ -1,5 +1,5 @@