From 8c3e107fd987d6e70baf887627448a96ef423efc Mon Sep 17 00:00:00 2001 From: ewall <1054064180@qq.com> Date: Thu, 2 Apr 2020 15:14:27 +0800 Subject: [PATCH] .docs --- README.md | 4 ++-- mock/index.js | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 749c96a..dac316a 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,8 @@ 使用`vue`的技术栈来开发一个商场小项目。 这是一个纯前端的项目,后面可能会用`node`来写下服务端,但是当前项目中的数据都是走的mock,并为此维护了一份接口文档。 -- [文章简要系列](https://www.jianshu.com/nb/14505636) -- [yapi接口文档](http://yapi.demo.qunar.com/project/17982) +- [文档说明](https://ewall1106.github.io/docs-mall) +- [项目预览](https://ewall1106.github.io/panda-mall) ## 使用 ``` diff --git a/mock/index.js b/mock/index.js index c1d1863..f20dfa9 100644 --- a/mock/index.js +++ b/mock/index.js @@ -9,11 +9,11 @@ import cart from './cart' const mocks = [...user, ...home, ...category, ...product, ...detail, ...cart] -const delayApi = [ - '/prod-api/user/login', - '/prod-api/home/list', - '/prod-api/product/list' -] +// const delayApi = [ +// '/prod-api/user/login', +// '/prod-api/home/list', +// '/prod-api/product/list' +// ] // https://github.com/nuysoft/Mock/wiki export function mockXHR() { @@ -21,10 +21,10 @@ export function mockXHR() { Mock.mock(item.url, item.type, item.response) // 为了效果演示,定义一些接口延时 - if (delayApi.includes(item.url)) { - Mock.setup({ - timeout: 1500 - }) - } + // if (delayApi.includes(item.url)) { + // Mock.setup({ + // timeout: 1500 + // }) + // } } }