Comments (5)
本来真实的接口地址就要和mock的一样才有意义,如果相切换的话只要注释一下这个接口就可以了,一样的话优先走mock的
from dva-boot-admin.
首先,针对这个url来说,因为没有接口,前台通过mock生成数据,具体Mock看下src/mock/user.js,这个登录api在Login下的service里,再者开发时推荐使用代理来发请求,这样可以解决跨域问题,具体配置在src/setupProxy.js
发请求时,首先会在mock的列表里看是不是mock接口,如果没找到就直接发请求,如果有代理会经过代理
from dva-boot-admin.
这个代理里面写的接口怎么用到login下service里面呢,如果我的接口名字和mock里面的一样咋办
from dva-boot-admin.
@weiq /user/menu这一部分能否不使用mock,直接写到问价里面?或者说有没有办法把mock 全拿掉,我不用mock,我是前后端都自己写,所以不用mock
from dva-boot-admin.
可以啊,你把这部分的代码注释掉就可以了,或者直接在index.js里去掉mock支持
from dva-boot-admin.
Related Issues (20)
- dva-boot-admin HOT 2
- 编译之后,总共45MB HOT 1
- 启动太慢,大概一分钟才能看到界面 HOT 1
- 布局是标签模式事,输入地址/ 路由无法进行重定向到设置的indexRoute
- 表单提交问题 HOT 1
- create-template创建的simple工程无法代码跳转,尤其是第三方包 HOT 1
- Ripple按钮没有点击事件,这个按钮使用场景是?
- 标签页模式切换tab会导致url query丢失
- 如何加权限 HOT 1
- 请问这是最新代码吗?
- Select相关
- 这个框架怎么与qiankun融合搭建微前端项目,该项目如果成为主应用和微应用分别该如何配置,急急急
- help
- 使用Antd暗黑色主题 HOT 1
- 路由问题 HOT 1
- 下拉框没有正确响应鼠标滚动事件 HOT 1
- 项目启动报错,好几个错误,不知道为什么。。。。。 HOT 1
- column里面配了upload类型的表单项,如果不选择一个文件就不能提交表单了(upload表单项是非必填字段) HOT 1
- Tabs 模式下面,page 怎么关闭自己? HOT 2
- 启动错误 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dva-boot-admin.