fix: default interceptor response return
This commit is contained in:
parent
4947c82d67
commit
c3d8540ab2
|
@ -13,14 +13,12 @@ export default [
|
|||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
code: code,
|
||||
data: {
|
||||
code: code,
|
||||
data: {
|
||||
users: 102400,
|
||||
messages: 81212,
|
||||
moneys: 9280,
|
||||
shoppings: 13600
|
||||
}
|
||||
users: 102400,
|
||||
messages: 81212,
|
||||
moneys: 9280,
|
||||
shoppings: 13600
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,16 +30,14 @@ export default [
|
|||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
data: {
|
||||
code: code,
|
||||
data: [
|
||||
{ value: 1000, name: 'analysis.directAccess' },
|
||||
{ value: 310, name: 'analysis.mailMarketing' },
|
||||
{ value: 234, name: 'analysis.allianceAdvertising' },
|
||||
{ value: 135, name: 'analysis.videoAdvertising' },
|
||||
{ value: 1548, name: 'analysis.searchEngines' }
|
||||
]
|
||||
}
|
||||
code: code,
|
||||
data: [
|
||||
{ value: 1000, name: 'analysis.directAccess' },
|
||||
{ value: 310, name: 'analysis.mailMarketing' },
|
||||
{ value: 234, name: 'analysis.allianceAdvertising' },
|
||||
{ value: 135, name: 'analysis.videoAdvertising' },
|
||||
{ value: 1548, name: 'analysis.searchEngines' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -52,18 +48,16 @@ export default [
|
|||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
data: {
|
||||
code: code,
|
||||
data: [
|
||||
{ value: 13253, name: 'analysis.monday' },
|
||||
{ value: 34235, name: 'analysis.tuesday' },
|
||||
{ value: 26321, name: 'analysis.wednesday' },
|
||||
{ value: 12340, name: 'analysis.thursday' },
|
||||
{ value: 24643, name: 'analysis.friday' },
|
||||
{ value: 1322, name: 'analysis.saturday' },
|
||||
{ value: 1324, name: 'analysis.sunday' }
|
||||
]
|
||||
}
|
||||
code: code,
|
||||
data: [
|
||||
{ value: 13253, name: 'analysis.monday' },
|
||||
{ value: 34235, name: 'analysis.tuesday' },
|
||||
{ value: 26321, name: 'analysis.wednesday' },
|
||||
{ value: 12340, name: 'analysis.thursday' },
|
||||
{ value: 24643, name: 'analysis.friday' },
|
||||
{ value: 1322, name: 'analysis.saturday' },
|
||||
{ value: 1324, name: 'analysis.sunday' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -74,23 +68,21 @@ export default [
|
|||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
data: {
|
||||
code: code,
|
||||
data: [
|
||||
{ estimate: 100, actual: 120, name: 'analysis.january' },
|
||||
{ estimate: 120, actual: 82, name: 'analysis.february' },
|
||||
{ estimate: 161, actual: 91, name: 'analysis.march' },
|
||||
{ estimate: 134, actual: 154, name: 'analysis.april' },
|
||||
{ estimate: 105, actual: 162, name: 'analysis.may' },
|
||||
{ estimate: 160, actual: 140, name: 'analysis.june' },
|
||||
{ estimate: 165, actual: 145, name: 'analysis.july' },
|
||||
{ estimate: 114, actual: 250, name: 'analysis.august' },
|
||||
{ estimate: 163, actual: 134, name: 'analysis.september' },
|
||||
{ estimate: 185, actual: 56, name: 'analysis.october' },
|
||||
{ estimate: 118, actual: 99, name: 'analysis.november' },
|
||||
{ estimate: 123, actual: 123, name: 'analysis.december' }
|
||||
]
|
||||
}
|
||||
code: code,
|
||||
data: [
|
||||
{ estimate: 100, actual: 120, name: 'analysis.january' },
|
||||
{ estimate: 120, actual: 82, name: 'analysis.february' },
|
||||
{ estimate: 161, actual: 91, name: 'analysis.march' },
|
||||
{ estimate: 134, actual: 154, name: 'analysis.april' },
|
||||
{ estimate: 105, actual: 162, name: 'analysis.may' },
|
||||
{ estimate: 160, actual: 140, name: 'analysis.june' },
|
||||
{ estimate: 165, actual: 145, name: 'analysis.july' },
|
||||
{ estimate: 114, actual: 250, name: 'analysis.august' },
|
||||
{ estimate: 163, actual: 134, name: 'analysis.september' },
|
||||
{ estimate: 185, actual: 56, name: 'analysis.october' },
|
||||
{ estimate: 118, actual: 99, name: 'analysis.november' },
|
||||
{ estimate: 123, actual: 123, name: 'analysis.december' }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,11 +85,9 @@ export default [
|
|||
method: 'get',
|
||||
response: () => {
|
||||
return {
|
||||
code: code,
|
||||
data: {
|
||||
code: code,
|
||||
data: {
|
||||
list: departmentList
|
||||
}
|
||||
list: departmentList
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -99,12 +97,10 @@ export default [
|
|||
method: 'get',
|
||||
response: () => {
|
||||
return {
|
||||
code: code,
|
||||
data: {
|
||||
code: code,
|
||||
data: {
|
||||
list: departmentList,
|
||||
total: 5
|
||||
}
|
||||
list: departmentList,
|
||||
total: 5
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -136,12 +132,10 @@ export default [
|
|||
)
|
||||
}
|
||||
return {
|
||||
code: code,
|
||||
data: {
|
||||
code: code,
|
||||
data: {
|
||||
total: 100,
|
||||
list: mockList
|
||||
}
|
||||
total: 100,
|
||||
list: mockList
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -153,10 +147,8 @@ export default [
|
|||
timeout: 1000,
|
||||
response: () => {
|
||||
return {
|
||||
data: {
|
||||
code: code,
|
||||
data: 'success'
|
||||
}
|
||||
code: code,
|
||||
data: 'success'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -168,17 +160,13 @@ export default [
|
|||
const ids = body.ids
|
||||
if (!ids) {
|
||||
return {
|
||||
data: {
|
||||
code: 500,
|
||||
message: '请选择需要删除的数据'
|
||||
}
|
||||
code: 500,
|
||||
message: '请选择需要删除的数据'
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
data: {
|
||||
code: code,
|
||||
data: 'success'
|
||||
}
|
||||
code: code,
|
||||
data: 'success'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -190,10 +178,8 @@ export default [
|
|||
timeout: 1000,
|
||||
response: () => {
|
||||
return {
|
||||
data: {
|
||||
code: code,
|
||||
data: 'success'
|
||||
}
|
||||
code: code,
|
||||
data: 'success'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -205,17 +191,13 @@ export default [
|
|||
const ids = body.ids
|
||||
if (!ids) {
|
||||
return {
|
||||
data: {
|
||||
code: 500,
|
||||
message: '请选择需要删除的数据'
|
||||
}
|
||||
code: 500,
|
||||
message: '请选择需要删除的数据'
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
data: {
|
||||
code: code,
|
||||
data: 'success'
|
||||
}
|
||||
code: code,
|
||||
data: 'success'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,10 +30,8 @@ export default [
|
|||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
data: {
|
||||
code: code,
|
||||
data: dictObj
|
||||
}
|
||||
code: code,
|
||||
data: dictObj
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -44,23 +42,21 @@ export default [
|
|||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
data: {
|
||||
code: code,
|
||||
data: [
|
||||
{
|
||||
label: 'test1',
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
label: 'test2',
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
label: 'test3',
|
||||
value: 2
|
||||
}
|
||||
]
|
||||
}
|
||||
code: code,
|
||||
data: [
|
||||
{
|
||||
label: 'test1',
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
label: 'test2',
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
label: 'test3',
|
||||
value: 2
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,235 +14,233 @@ export default [
|
|||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
code: code,
|
||||
data: {
|
||||
code: code,
|
||||
data: {
|
||||
list: [
|
||||
{
|
||||
path: '/dashboard',
|
||||
component: '#',
|
||||
redirect: '/dashboard/analysis',
|
||||
name: 'Dashboard',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 1,
|
||||
meta: {
|
||||
title: '首页',
|
||||
icon: 'ant-design:dashboard-filled',
|
||||
alwaysShow: true
|
||||
list: [
|
||||
{
|
||||
path: '/dashboard',
|
||||
component: '#',
|
||||
redirect: '/dashboard/analysis',
|
||||
name: 'Dashboard',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 1,
|
||||
meta: {
|
||||
title: '首页',
|
||||
icon: 'ant-design:dashboard-filled',
|
||||
alwaysShow: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'analysis',
|
||||
component: 'views/Dashboard/Analysis',
|
||||
name: 'Analysis',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 2,
|
||||
meta: {
|
||||
title: '分析页',
|
||||
noCache: true
|
||||
}
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'analysis',
|
||||
component: 'views/Dashboard/Analysis',
|
||||
name: 'Analysis',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 2,
|
||||
meta: {
|
||||
title: '分析页',
|
||||
noCache: true
|
||||
}
|
||||
{
|
||||
path: 'workplace',
|
||||
component: 'views/Dashboard/Workplace',
|
||||
name: 'Workplace',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 3,
|
||||
meta: {
|
||||
title: '工作台',
|
||||
noCache: true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/external-link',
|
||||
component: '#',
|
||||
meta: {
|
||||
title: '文档',
|
||||
icon: 'clarity:document-solid'
|
||||
},
|
||||
name: 'ExternalLink',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 4,
|
||||
children: [
|
||||
{
|
||||
path: 'https://element-plus-admin-doc.cn/',
|
||||
name: 'DocumentLink',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 5,
|
||||
meta: {
|
||||
title: '文档'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/level',
|
||||
component: '#',
|
||||
redirect: '/level/menu1/menu1-1/menu1-1-1',
|
||||
name: 'Level',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 6,
|
||||
meta: {
|
||||
title: '菜单',
|
||||
icon: 'carbon:skill-level-advanced'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'menu1',
|
||||
name: 'Menu1',
|
||||
component: '##',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 7,
|
||||
redirect: '/level/menu1/menu1-1/menu1-1-1',
|
||||
meta: {
|
||||
title: '菜单1'
|
||||
},
|
||||
{
|
||||
path: 'workplace',
|
||||
component: 'views/Dashboard/Workplace',
|
||||
name: 'Workplace',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 3,
|
||||
meta: {
|
||||
title: '工作台',
|
||||
noCache: true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/external-link',
|
||||
component: '#',
|
||||
meta: {
|
||||
title: '文档',
|
||||
icon: 'clarity:document-solid'
|
||||
},
|
||||
name: 'ExternalLink',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 4,
|
||||
children: [
|
||||
{
|
||||
path: 'https://element-plus-admin-doc.cn/',
|
||||
name: 'DocumentLink',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 5,
|
||||
meta: {
|
||||
title: '文档'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/level',
|
||||
component: '#',
|
||||
redirect: '/level/menu1/menu1-1/menu1-1-1',
|
||||
name: 'Level',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 6,
|
||||
meta: {
|
||||
title: '菜单',
|
||||
icon: 'carbon:skill-level-advanced'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'menu1',
|
||||
name: 'Menu1',
|
||||
component: '##',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 7,
|
||||
redirect: '/level/menu1/menu1-1/menu1-1-1',
|
||||
meta: {
|
||||
title: '菜单1'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'menu1-1',
|
||||
name: 'Menu11',
|
||||
component: '##',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 8,
|
||||
redirect: '/level/menu1/menu1-1/menu1-1-1',
|
||||
meta: {
|
||||
title: '菜单1-1',
|
||||
alwaysShow: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'menu1-1-1',
|
||||
name: 'Menu111',
|
||||
component: 'views/Level/Menu111',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 9,
|
||||
permission: ['edit', 'add', 'delete'],
|
||||
meta: {
|
||||
title: '菜单1-1-1'
|
||||
}
|
||||
}
|
||||
]
|
||||
children: [
|
||||
{
|
||||
path: 'menu1-1',
|
||||
name: 'Menu11',
|
||||
component: '##',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 8,
|
||||
redirect: '/level/menu1/menu1-1/menu1-1-1',
|
||||
meta: {
|
||||
title: '菜单1-1',
|
||||
alwaysShow: true
|
||||
},
|
||||
{
|
||||
path: 'menu1-2',
|
||||
name: 'Menu12',
|
||||
component: 'views/Level/Menu12',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 10,
|
||||
permission: ['edit', 'add', 'delete'],
|
||||
meta: {
|
||||
title: '菜单1-2'
|
||||
children: [
|
||||
{
|
||||
path: 'menu1-1-1',
|
||||
name: 'Menu111',
|
||||
component: 'views/Level/Menu111',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 9,
|
||||
permission: ['edit', 'add', 'delete'],
|
||||
meta: {
|
||||
title: '菜单1-1-1'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'menu1-2',
|
||||
name: 'Menu12',
|
||||
component: 'views/Level/Menu12',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 10,
|
||||
permission: ['edit', 'add', 'delete'],
|
||||
meta: {
|
||||
title: '菜单1-2'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'menu2',
|
||||
name: 'Menu2Demo',
|
||||
component: 'views/Level/Menu2',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 11,
|
||||
permission: ['edit', 'add', 'delete'],
|
||||
meta: {
|
||||
title: '菜单2'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/example',
|
||||
component: '#',
|
||||
redirect: '/example/example-dialog',
|
||||
name: 'Example',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 12,
|
||||
meta: {
|
||||
title: '综合示例',
|
||||
icon: 'ep:management',
|
||||
alwaysShow: true
|
||||
]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'example-dialog',
|
||||
component: 'views/Example/Dialog/ExampleDialog',
|
||||
name: 'ExampleDialog',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 13,
|
||||
permission: ['edit', 'add', 'delete'],
|
||||
meta: {
|
||||
title: '综合示例-弹窗',
|
||||
permission: ['edit', 'add']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'example-page',
|
||||
component: 'views/Example/Page/ExamplePage',
|
||||
name: 'ExamplePage',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 14,
|
||||
permission: ['edit', 'add', 'delete'],
|
||||
meta: {
|
||||
title: '综合示例-页面',
|
||||
permission: ['edit', 'add']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'example-add',
|
||||
component: 'views/Example/Page/ExampleAdd',
|
||||
name: 'ExampleAdd',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 15,
|
||||
permission: ['edit', 'add', 'delete'],
|
||||
meta: {
|
||||
title: '综合示例-新增',
|
||||
noTagsView: true,
|
||||
noCache: true,
|
||||
hidden: true,
|
||||
showMainRoute: true,
|
||||
activeMenu: '/example/example-page',
|
||||
permission: ['delete', 'add']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'example-edit',
|
||||
component: 'views/Example/Page/ExampleEdit',
|
||||
name: 'ExampleEdit',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 16,
|
||||
permission: ['edit', 'add', 'delete'],
|
||||
meta: {
|
||||
title: '综合示例-编辑',
|
||||
noTagsView: true,
|
||||
noCache: true,
|
||||
hidden: true,
|
||||
showMainRoute: true,
|
||||
activeMenu: '/example/example-page',
|
||||
permission: ['delete', 'add']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'example-detail',
|
||||
component: 'views/Example/Page/ExampleDetail',
|
||||
name: 'ExampleDetail',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 17,
|
||||
permission: ['edit', 'add', 'delete'],
|
||||
meta: {
|
||||
title: '综合示例-详情',
|
||||
noTagsView: true,
|
||||
noCache: true,
|
||||
hidden: true,
|
||||
showMainRoute: true,
|
||||
activeMenu: '/example/example-page',
|
||||
permission: ['delete', 'edit']
|
||||
}
|
||||
{
|
||||
path: 'menu2',
|
||||
name: 'Menu2Demo',
|
||||
component: 'views/Level/Menu2',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 11,
|
||||
permission: ['edit', 'add', 'delete'],
|
||||
meta: {
|
||||
title: '菜单2'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/example',
|
||||
component: '#',
|
||||
redirect: '/example/example-dialog',
|
||||
name: 'Example',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 12,
|
||||
meta: {
|
||||
title: '综合示例',
|
||||
icon: 'ep:management',
|
||||
alwaysShow: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'example-dialog',
|
||||
component: 'views/Example/Dialog/ExampleDialog',
|
||||
name: 'ExampleDialog',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 13,
|
||||
permission: ['edit', 'add', 'delete'],
|
||||
meta: {
|
||||
title: '综合示例-弹窗',
|
||||
permission: ['edit', 'add']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'example-page',
|
||||
component: 'views/Example/Page/ExamplePage',
|
||||
name: 'ExamplePage',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 14,
|
||||
permission: ['edit', 'add', 'delete'],
|
||||
meta: {
|
||||
title: '综合示例-页面',
|
||||
permission: ['edit', 'add']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'example-add',
|
||||
component: 'views/Example/Page/ExampleAdd',
|
||||
name: 'ExampleAdd',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 15,
|
||||
permission: ['edit', 'add', 'delete'],
|
||||
meta: {
|
||||
title: '综合示例-新增',
|
||||
noTagsView: true,
|
||||
noCache: true,
|
||||
hidden: true,
|
||||
showMainRoute: true,
|
||||
activeMenu: '/example/example-page',
|
||||
permission: ['delete', 'add']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'example-edit',
|
||||
component: 'views/Example/Page/ExampleEdit',
|
||||
name: 'ExampleEdit',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 16,
|
||||
permission: ['edit', 'add', 'delete'],
|
||||
meta: {
|
||||
title: '综合示例-编辑',
|
||||
noTagsView: true,
|
||||
noCache: true,
|
||||
hidden: true,
|
||||
showMainRoute: true,
|
||||
activeMenu: '/example/example-page',
|
||||
permission: ['delete', 'add']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'example-detail',
|
||||
component: 'views/Example/Page/ExampleDetail',
|
||||
name: 'ExampleDetail',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 17,
|
||||
permission: ['edit', 'add', 'delete'],
|
||||
meta: {
|
||||
title: '综合示例-详情',
|
||||
noTagsView: true,
|
||||
noCache: true,
|
||||
hidden: true,
|
||||
showMainRoute: true,
|
||||
activeMenu: '/example/example-page',
|
||||
permission: ['delete', 'edit']
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1072,10 +1072,8 @@ export default [
|
|||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
data: {
|
||||
code: code,
|
||||
data: adminList
|
||||
}
|
||||
code: code,
|
||||
data: adminList
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1085,12 +1083,10 @@ export default [
|
|||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
code: code,
|
||||
data: {
|
||||
code: code,
|
||||
data: {
|
||||
list: List,
|
||||
total: 4
|
||||
}
|
||||
list: List,
|
||||
total: 4
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1102,10 +1098,8 @@ export default [
|
|||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
data: {
|
||||
code: code,
|
||||
data: testList
|
||||
}
|
||||
code: code,
|
||||
data: testList
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1115,12 +1109,10 @@ export default [
|
|||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
code: code,
|
||||
data: {
|
||||
code: code,
|
||||
data: {
|
||||
list: List,
|
||||
total: 4
|
||||
}
|
||||
list: List,
|
||||
total: 4
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -150,12 +150,10 @@ export default [
|
|||
(_, index) => index < pageSize * pageIndex && index >= pageSize * (pageIndex - 1)
|
||||
)
|
||||
return {
|
||||
code: code,
|
||||
data: {
|
||||
code: code,
|
||||
data: {
|
||||
total: mockList.length,
|
||||
list: pageList
|
||||
}
|
||||
total: mockList.length,
|
||||
list: pageList
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -175,12 +173,10 @@ export default [
|
|||
(_, index) => index < pageSize * pageIndex && index >= pageSize * (pageIndex - 1)
|
||||
)
|
||||
return {
|
||||
code: code,
|
||||
data: {
|
||||
code: code,
|
||||
data: {
|
||||
total: mockList.length,
|
||||
list: pageList
|
||||
}
|
||||
total: mockList.length,
|
||||
list: pageList
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -198,10 +194,8 @@ export default [
|
|||
})
|
||||
].concat(List)
|
||||
return {
|
||||
data: {
|
||||
code: code,
|
||||
data: 'success'
|
||||
}
|
||||
code: code,
|
||||
data: 'success'
|
||||
}
|
||||
} else {
|
||||
List.map((item) => {
|
||||
|
@ -212,10 +206,8 @@ export default [
|
|||
}
|
||||
})
|
||||
return {
|
||||
data: {
|
||||
code: code,
|
||||
data: 'success'
|
||||
}
|
||||
code: code,
|
||||
data: 'success'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -229,10 +221,8 @@ export default [
|
|||
for (const example of List) {
|
||||
if (example.id === id) {
|
||||
return {
|
||||
data: {
|
||||
code: code,
|
||||
data: example
|
||||
}
|
||||
code: code,
|
||||
data: example
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -246,10 +236,8 @@ export default [
|
|||
const ids = body.ids
|
||||
if (!ids) {
|
||||
return {
|
||||
data: {
|
||||
code: 500,
|
||||
message: '请选择需要删除的数据'
|
||||
}
|
||||
code: 500,
|
||||
message: '请选择需要删除的数据'
|
||||
}
|
||||
} else {
|
||||
let i = List.length
|
||||
|
@ -259,10 +247,8 @@ export default [
|
|||
}
|
||||
}
|
||||
return {
|
||||
data: {
|
||||
code: code,
|
||||
data: 'success'
|
||||
}
|
||||
code: code,
|
||||
data: 'success'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,12 +45,10 @@ export default [
|
|||
)
|
||||
|
||||
return {
|
||||
code: code,
|
||||
data: {
|
||||
code: code,
|
||||
data: {
|
||||
total: mockList.length,
|
||||
list: pageList
|
||||
}
|
||||
total: mockList.length,
|
||||
list: pageList
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -67,19 +65,15 @@ export default [
|
|||
if (user.username === data.username && user.password === data.password) {
|
||||
hasUser = true
|
||||
return {
|
||||
data: {
|
||||
code: code,
|
||||
data: user
|
||||
}
|
||||
code: code,
|
||||
data: user
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!hasUser) {
|
||||
return {
|
||||
data: {
|
||||
code: 500,
|
||||
message: '账号或密码错误'
|
||||
}
|
||||
code: 500,
|
||||
message: '账号或密码错误'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -91,10 +85,8 @@ export default [
|
|||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
data: {
|
||||
code: code,
|
||||
data: null
|
||||
}
|
||||
code: code,
|
||||
data: null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,13 +13,11 @@ export default [
|
|||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
code: code,
|
||||
data: {
|
||||
code: code,
|
||||
data: {
|
||||
project: 40,
|
||||
access: 2340,
|
||||
todo: 10
|
||||
}
|
||||
project: 40,
|
||||
access: 2340,
|
||||
todo: 10
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -31,53 +29,51 @@ export default [
|
|||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
data: {
|
||||
code: code,
|
||||
data: [
|
||||
{
|
||||
name: 'Github',
|
||||
icon: 'akar-icons:github-fill',
|
||||
message: 'workplace.introduction',
|
||||
personal: 'Archer',
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
name: 'Vue',
|
||||
icon: 'logos:vue',
|
||||
message: 'workplace.introduction',
|
||||
personal: 'Archer',
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
name: 'Angular',
|
||||
icon: 'logos:angular-icon',
|
||||
message: 'workplace.introduction',
|
||||
personal: 'Archer',
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
name: 'React',
|
||||
icon: 'logos:react',
|
||||
message: 'workplace.introduction',
|
||||
personal: 'Archer',
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
name: 'Webpack',
|
||||
icon: 'logos:webpack',
|
||||
message: 'workplace.introduction',
|
||||
personal: 'Archer',
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
name: 'Vite',
|
||||
icon: 'vscode-icons:file-type-vite',
|
||||
message: 'workplace.introduction',
|
||||
personal: 'Archer',
|
||||
time: new Date()
|
||||
}
|
||||
]
|
||||
}
|
||||
code: code,
|
||||
data: [
|
||||
{
|
||||
name: 'Github',
|
||||
icon: 'akar-icons:github-fill',
|
||||
message: 'workplace.introduction',
|
||||
personal: 'Archer',
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
name: 'Vue',
|
||||
icon: 'logos:vue',
|
||||
message: 'workplace.introduction',
|
||||
personal: 'Archer',
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
name: 'Angular',
|
||||
icon: 'logos:angular-icon',
|
||||
message: 'workplace.introduction',
|
||||
personal: 'Archer',
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
name: 'React',
|
||||
icon: 'logos:react',
|
||||
message: 'workplace.introduction',
|
||||
personal: 'Archer',
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
name: 'Webpack',
|
||||
icon: 'logos:webpack',
|
||||
message: 'workplace.introduction',
|
||||
personal: 'Archer',
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
name: 'Vite',
|
||||
icon: 'vscode-icons:file-type-vite',
|
||||
message: 'workplace.introduction',
|
||||
personal: 'Archer',
|
||||
time: new Date()
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -88,35 +84,33 @@ export default [
|
|||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
data: {
|
||||
code: code,
|
||||
data: [
|
||||
{
|
||||
keys: ['workplace.push', 'Github'],
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
keys: ['workplace.push', 'Github'],
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
keys: ['workplace.push', 'Github'],
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
keys: ['workplace.push', 'Github'],
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
keys: ['workplace.push', 'Github'],
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
keys: ['workplace.push', 'Github'],
|
||||
time: new Date()
|
||||
}
|
||||
]
|
||||
}
|
||||
code: code,
|
||||
data: [
|
||||
{
|
||||
keys: ['workplace.push', 'Github'],
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
keys: ['workplace.push', 'Github'],
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
keys: ['workplace.push', 'Github'],
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
keys: ['workplace.push', 'Github'],
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
keys: ['workplace.push', 'Github'],
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
keys: ['workplace.push', 'Github'],
|
||||
time: new Date()
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -127,35 +121,33 @@ export default [
|
|||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
data: {
|
||||
code: code,
|
||||
data: [
|
||||
{
|
||||
name: 'Github',
|
||||
icon: 'akar-icons:github-fill'
|
||||
},
|
||||
{
|
||||
name: 'Vue',
|
||||
icon: 'logos:vue'
|
||||
},
|
||||
{
|
||||
name: 'Angular',
|
||||
icon: 'logos:angular-icon'
|
||||
},
|
||||
{
|
||||
name: 'React',
|
||||
icon: 'logos:react'
|
||||
},
|
||||
{
|
||||
name: 'Webpack',
|
||||
icon: 'logos:webpack'
|
||||
},
|
||||
{
|
||||
name: 'Vite',
|
||||
icon: 'vscode-icons:file-type-vite'
|
||||
}
|
||||
]
|
||||
}
|
||||
code: code,
|
||||
data: [
|
||||
{
|
||||
name: 'Github',
|
||||
icon: 'akar-icons:github-fill'
|
||||
},
|
||||
{
|
||||
name: 'Vue',
|
||||
icon: 'logos:vue'
|
||||
},
|
||||
{
|
||||
name: 'Angular',
|
||||
icon: 'logos:angular-icon'
|
||||
},
|
||||
{
|
||||
name: 'React',
|
||||
icon: 'logos:react'
|
||||
},
|
||||
{
|
||||
name: 'Webpack',
|
||||
icon: 'logos:webpack'
|
||||
},
|
||||
{
|
||||
name: 'Vite',
|
||||
icon: 'vscode-icons:file-type-vite'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -166,16 +158,14 @@ export default [
|
|||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
data: {
|
||||
code: code,
|
||||
data: [
|
||||
{ name: 'workplace.quote', max: 65, personal: 42, team: 50 },
|
||||
{ name: 'workplace.contribution', max: 160, personal: 30, team: 140 },
|
||||
{ name: 'workplace.hot', max: 300, personal: 20, team: 28 },
|
||||
{ name: 'workplace.yield', max: 130, personal: 35, team: 35 },
|
||||
{ name: 'workplace.follow', max: 100, personal: 80, team: 90 }
|
||||
]
|
||||
}
|
||||
code: code,
|
||||
data: [
|
||||
{ name: 'workplace.quote', max: 65, personal: 42, team: 50 },
|
||||
{ name: 'workplace.contribution', max: 160, personal: 30, team: 140 },
|
||||
{ name: 'workplace.hot', max: 300, personal: 20, team: 28 },
|
||||
{ name: 'workplace.yield', max: 130, personal: 35, team: 35 },
|
||||
{ name: 'workplace.follow', max: 100, personal: 80, team: 90 }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,8 @@ axiosInstance.interceptors.response.use(
|
|||
(res: AxiosResponse) => {
|
||||
const url = res.config.url || ''
|
||||
abortControllerMap.delete(url)
|
||||
return res.data
|
||||
// 这里不能做任何处理,否则后面的 interceptors 拿不到完整的上下文了
|
||||
return res
|
||||
},
|
||||
(err: any) => err
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue