React+mock实现简单源代码
文件大小: 12k
源码售价: 10 个金币 积分规则     积分充值
资源说明:提供了以下mock接口的demo,更多源码请下载附件信息 const compuser_data = '/api/compuser/data'; const compuser_findById = '/api/compuser/findById'; const compuser_save = '/api/compuser/save'; const compuser_del = '/api/compuser/del'; const userinfo = '/api/userinfo'; const query = '/user/query'; const page = '/user/page'; const find = '/user/findById'; const del = '/user/del'; /* mockjs语法参考官网http://mockjs.com/ */ const Mock = require('mockjs'); const userinfo = '/api/userinfo'; const loginData = Mock.mock({ username: 'guest', sex: '男', age: 18 }); module.exports = { [`POST ${userinfo}`](req, res) { res.json(loginData); }, [`GET ${userinfo}`](req, res) { res.json(loginData); } };
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。