feat: 优化接口配置设计,注册的网络请求会自动注册到 vue 原型 $api 上,修改了一些旧的接口调用方式

This commit is contained in:
FairyEver
2020-05-07 15:49:28 +08:00
parent 804f66eb05
commit 28acfdbb04
21 changed files with 118 additions and 103 deletions

View File

@@ -17,7 +17,6 @@
</template>
<script>
import { businessTable1List } from '@api/demo.business.table.1'
export default {
// name 值和本页的 $route.name 一致才可以缓存页面
name: 'demo-business-table-1',
@@ -57,7 +56,7 @@ export default {
this.$notify({
title: '开始请求模拟表格数据'
})
businessTable1List({
this.$api.DEMO_BUSINESS_TABLE_1_LIST({
...form,
...this.page
})