import Mock from 'mockjs'
import loginAPI from './login'
import articleAPI from './article'
import article_tableAPI from './article_table'
import remoteSearchAPI from './remoteSearch'

// 登录相关
Mock.mock(/\/login\/login/, 'post', loginAPI.loginByUsername)
Mock.mock(/\/login\/logout/, 'post', loginAPI.logout)
Mock.mock(/\/user\/info\.*/, 'get', loginAPI.getInfo)

// 文章相关
Mock.mock(/\/article\/list/, 'get', articleAPI.getList)
Mock.mock(/\/article\/detail/, 'get', articleAPI.getArticle)

// table example相关
Mock.mock(/\/article_table\/list/, 'get', article_tableAPI.getList)
Mock.mock(/\/article_table\/p/, 'get', article_tableAPI.getPv)

// 搜索相关
Mock.mock(/\/search\/user/, 'get', remoteSearchAPI.searchUser)

export default Mock

@@ -178,16 +178,54 @@
 earch'%0A%0A
+Mock.setup(%7B%0A  timeout: '350-600'%0A%7D)%0A%0A
 // %E7%99%BB%E5%BD%95%E7%9B%B8%E5%85%B3%0A

add mock delay