mockData.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606
  1. const mockDataList = {
  2. // 获取个人中心数据
  3. '/personCenter/getPersonCards': {
  4. method: 'get',
  5. params: {
  6. userId: '',
  7. },
  8. url: '/prod-api/crm/personCenter/getPersonCards',
  9. delay: 300,
  10. response: {
  11. code: 200,
  12. msg: 'success',
  13. data: {
  14. todayConsume: 1234.56,//今日消耗
  15. todayPerformance: 56789.01,//今日业绩
  16. countTypeA: 25,//条数统计A类
  17. countTypeB: 12,//条数统计B类
  18. countTypeC: 8,//条数统计C类
  19. visitCount: 15,//上门
  20. visitRate: 85.5,//上门率
  21. dealRate: 42.3,//成交率
  22. roi: 3.25,//投产比
  23. beatRate: 78.9,//击败率
  24. level: '高级',//等级
  25. score: 'A'//评分
  26. }
  27. }
  28. },
  29. // 个人中心-获取最新线索
  30. '/personCenter/getPersonLatestClue': {
  31. method: 'get',
  32. params: {
  33. userId: '',
  34. },
  35. url: '/prod-api/crm/personCenter/getPersonLatestClue',
  36. delay: 300,
  37. response: {
  38. code: 200,
  39. msg: 'success',
  40. data: [
  41. {
  42. id:1,
  43. name:'张三',//客户名称
  44. star:3,//客户等级
  45. prodTitle:'LV 发财桶',//产品名称
  46. desc:'客户说价格有点低'//客户描述
  47. },
  48. {
  49. id:2,
  50. name:'李四',//客户名称
  51. star:3,//客户等级
  52. prodTitle:'LV 发财桶',//产品名称
  53. desc:'客户说价格有点低'//客户描述
  54. },
  55. {
  56. id:3,
  57. name:'张三',//客户名称
  58. star:3,//客户等级
  59. prodTitle:'LV 发财桶',//产品名称
  60. desc:'客户说价格有点低'//客户描述
  61. },
  62. ]
  63. }
  64. },
  65. // 个人中心-近七天排名折线图
  66. '/personCenter/getPersonRanking': {
  67. method: 'get',
  68. params: {
  69. userId: '',
  70. },
  71. url: '/prod-api/crm/personCenter/getPersonRanking',
  72. delay: 300,
  73. response: {
  74. code: 200,
  75. msg: 'success',
  76. data: [
  77. {
  78. x: '2026-1-1',//x轴日期
  79. y: 80,//y轴value
  80. },
  81. {
  82. x: '2026-1-2',
  83. y: 12,
  84. },
  85. {
  86. x: '2026-1-3',
  87. y: 33,
  88. },
  89. {
  90. x: '2026-1-4',//日期
  91. y: 94,
  92. },
  93. {
  94. x: '2026-1-5',//日期
  95. y: 45,
  96. },
  97. ]
  98. }
  99. },
  100. // 询价-新增
  101. '/inquiryCenter/addInquiry': {
  102. method: 'post',
  103. data: {
  104. clueId:'',//线索公海id
  105. dictValue:'',//品牌id
  106. dictLabel:'',//品牌名称
  107. model:'',//型号
  108. code:'',//编码
  109. id:'',//询价id,新增为'',编辑传值
  110. price:'',//询价价格,新增为'',编辑传值
  111. imgsUrl:[]//询价图片数组,比如
  112. // [
  113. // "https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg",
  114. // "https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677342956-1767677338014.jpg"
  115. // ]
  116. },
  117. url: '/prod-api/crm/inquiryCenter/addInquiry',
  118. delay: 300,
  119. response: {
  120. code: 200,
  121. msg: 'success'
  122. }
  123. },
  124. // 询价-核价-列表
  125. '/inquiryCenter/inquiryVerificationList': {
  126. method: 'post',
  127. params: {
  128. pageSize:'',//每页条数
  129. pageNum:'',//当前页
  130. },
  131. data:{
  132. type:1,//1-询价列表 2-核价列表
  133. },
  134. url: '/prod-api/crm/inquiryCenter/inquiryVerificationList',
  135. delay: 300,
  136. response: {
  137. code: 200,
  138. msg: 'success',
  139. rows: [
  140. {
  141. clueId:'',//线索公海id
  142. id:'',//询价id
  143. dictValue:'2',//品牌id
  144. dictLabel:'Rolex',//品牌名称
  145. model:'Submariner Date 126610LN',//型号
  146. code:'123',//编码
  147. price:'12345',//询价价格
  148. desc:'意向',
  149. date:'2026-2-1 10:00:00',//询价日期
  150. status:'1',//询价列表:1-待询价 2-询价完成; 核价列表:1-待核价 2-核价完成
  151. imgsUrl:['https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg','https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg']//询价图片数组
  152. },
  153. {
  154. clueId:'',//线索公海id
  155. id:'',//询价id
  156. dictValue:'2',//品牌id
  157. dictLabel:'Rolex',//品牌名称
  158. model:'Submariner Date 126610LN',//型号
  159. code:'123',//编码
  160. price:'12345',//询价价格
  161. desc:'意向',
  162. date:'2026-2-1 10:00:00',//询价日期
  163. status:'1',//询价列表:1-待询价 2-询价完成; 核价列表:1-待核价 2-核价完成
  164. imgsUrl:['https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg','https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg']//询价图片数组
  165. },
  166. {
  167. clueId:'',//线索公海id
  168. id:'',//询价id
  169. dictValue:'2',//品牌id
  170. dictLabel:'Rolex',//品牌名称
  171. model:'Submariner Date 126610LN',//型号
  172. code:'123',//编码
  173. price:'12345',//询价价格
  174. desc:'意向',
  175. date:'2026-2-1 10:00:00',//询价日期
  176. status:'1',//询价列表:1-待询价 2-询价完成; 核价列表:1-待核价 2-核价完成
  177. imgsUrl:['https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg','https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg']//询价图片数组
  178. },
  179. {
  180. clueId:'',//线索公海id
  181. id:'',//询价id
  182. dictValue:'2',//品牌id
  183. dictLabel:'Rolex',//品牌名称
  184. model:'Submariner Date 126610LN',//型号
  185. code:'123',//编码
  186. price:'12345',//询价价格
  187. desc:'意向',
  188. date:'2026-2-1 10:00:00',//询价日期
  189. status:'1',//询价列表:1-待询价 2-询价完成; 核价列表:1-待核价 2-核价完成
  190. imgsUrl:['https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg','https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg']//询价图片数组
  191. },
  192. {
  193. clueId:'',//线索公海id
  194. id:'',//询价id
  195. dictValue:'2',//品牌id
  196. dictLabel:'Rolex',//品牌名称
  197. model:'Submariner Date 126610LN',//型号
  198. code:'123',//编码
  199. price:'12345',//询价价格
  200. desc:'意向',
  201. date:'2026-2-1 10:00:00',//询价日期
  202. status:'1',//询价列表:1-待询价 2-询价完成; 核价列表:1-待核价 2-核价完成
  203. imgsUrl:['https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg','https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg']//询价图片数组
  204. },
  205. {
  206. clueId:'',//线索公海id
  207. id:'',//询价id
  208. dictValue:'2',//品牌id
  209. dictLabel:'Rolex',//品牌名称
  210. model:'Submariner Date 126610LN',//型号
  211. code:'123',//编码
  212. price:'12345',//询价价格
  213. desc:'意向',
  214. date:'2026-2-1 10:00:00',//询价日期
  215. status:'1',//询价列表:1-待询价 2-询价完成; 核价列表:1-待核价 2-核价完成
  216. imgsUrl:['https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg','https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg']//询价图片数组
  217. },
  218. {
  219. clueId:'',//线索公海id
  220. id:'',//询价id
  221. dictValue:'2',//品牌id
  222. dictLabel:'Rolex',//品牌名称
  223. model:'Submariner Date 126610LN',//型号
  224. code:'123',//编码
  225. price:'12345',//询价价格
  226. desc:'意向',
  227. date:'2026-2-1 10:00:00',//询价日期
  228. status:'1',//询价列表:1-待询价 2-询价完成; 核价列表:1-待核价 2-核价完成
  229. imgsUrl:['https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg','https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg']//询价图片数组
  230. },
  231. ],
  232. total: 14,//总条数
  233. }
  234. },
  235. // 仓库模块-卡片数据
  236. '/warehouse/getWareHouseCard': {
  237. method: 'get',
  238. params: {
  239. userId: '',
  240. },
  241. url: '/prod-api/crm/warehouse/getWareHouseCard',
  242. delay: 300,
  243. response: {
  244. code: 200,
  245. msg: 'success',
  246. data: {
  247. totalCost: 12456.5,//总资产成本
  248. uploadCostToday: 5678,//今日上传
  249. outStockToday: 12,//今日出库
  250. totalNum: 1235,//总条数
  251. }
  252. }
  253. },
  254. // 仓库模块-列表
  255. '/warehouse/wareHouseList': {
  256. method: 'post',
  257. params: {
  258. pageSize: 10,
  259. pageNum: 1,
  260. },
  261. data:{
  262. searchString:'',//搜索编号、名称、品牌...
  263. category:1,//品类:1-全部 2-腕表 3-箱包 4-珠宝 5-鞋靴 6-配饰 7-服饰 8-其它
  264. sortType:4,// 排序方式:1-按最久未下载 2-按最近更新 3-按最久更新 4-按入库最新 5-按入库最久 6-按价格最高 7-按价格最低
  265. dictLabel:'Rolex',//品牌名称
  266. dictValue:'2',//品牌id
  267. priceMin:'1000',//价格范围:最小价格
  268. priceMax:'10000',//价格范围:最大价格
  269. location:'',//位置
  270. recycleTime:'2026-01-09',//回收时间,比如2026-02-01
  271. recyclePerson:'张三',//回收人员
  272. recyclePersonId:'',//回收人员id
  273. identifyingPerson:'李四',//鉴定人员
  274. identifyingPersonId:'',//鉴定人员id
  275. productAttribute:['1','2'],//产品属性 多选:1-自有商品 2-寄卖商品 3-质押商品 4-其它
  276. },
  277. url: '/prod-api/crm/warehouse/wareHouseList',
  278. delay: 300,
  279. response: {
  280. code: 200,
  281. msg: 'success',
  282. rows:[
  283. {
  284. id:'123456754',//商品库存id
  285. name:'Rolex',//商品名称
  286. model:'Submariner Date 126610LN',//型号
  287. costPrice:'12345',//成本价格
  288. salesPrice:'12345',//销售价格
  289. peerPrice:'12345',//同行价格
  290. agentPrice:'12345',//代理价格
  291. stock:'12345',//库存数量
  292. imgUrl:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
  293. platform:[]//同步平台,此功能暂时不做,先定义一个字段
  294. },
  295. {
  296. id:'',//商品库存id
  297. name:'Rolex',//商品名称
  298. model:'Submariner Date 126610LN',//型号
  299. costPrice:'12345',//成本价格
  300. salesPrice:'12345',//销售价格
  301. peerPrice:'12345',//同行价格
  302. agentPrice:'12345',//代理价格
  303. stock:'12345',//库存数量
  304. imgUrl:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
  305. platform:[]//同步平台,此功能暂时不做,先定义一个字段
  306. },
  307. {
  308. id:'',//商品库存id
  309. name:'Rolex',//商品名称
  310. model:'Submariner Date 126610LN',//型号
  311. costPrice:'12345',//成本价格
  312. salesPrice:'12345',//销售价格
  313. peerPrice:'12345',//同行价格
  314. agentPrice:'12345',//代理价格
  315. stock:'12345',//库存数量
  316. imgUrl:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
  317. platform:[]//同步平台,此功能暂时不做,先定义一个字段
  318. },
  319. {
  320. id:'',//商品库存id
  321. name:'Rolex',//商品名称
  322. model:'Submariner Date 126610LN',//型号
  323. costPrice:'12345',//成本价格
  324. salesPrice:'12345',//销售价格
  325. peerPrice:'12345',//同行价格
  326. agentPrice:'12345',//代理价格
  327. stock:'12345',//库存数量
  328. imgUrl:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
  329. platform:[]//同步平台,此功能暂时不做,先定义一个字段
  330. },
  331. {
  332. id:'',//商品库存id
  333. name:'Rolex',//商品名称
  334. model:'Submariner Date 126610LN',//型号
  335. costPrice:'12345',//成本价格
  336. salesPrice:'12345',//销售价格
  337. peerPrice:'12345',//同行价格
  338. agentPrice:'12345',//代理价格
  339. stock:'12345',//库存数量
  340. imgUrl:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
  341. platform:[]//同步平台,此功能暂时不做,先定义一个字段
  342. },
  343. {
  344. id:'',//商品库存id
  345. name:'Rolex',//商品名称
  346. model:'Submariner Date 126610LN',//型号
  347. costPrice:'12345',//成本价格
  348. salesPrice:'12345',//销售价格
  349. peerPrice:'12345',//同行价格
  350. agentPrice:'12345',//代理价格
  351. stock:'12345',//库存数量
  352. imgUrl:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
  353. platform:[]//同步平台,此功能暂时不做,先定义一个字段
  354. },
  355. {
  356. id:'',//商品库存id
  357. name:'Rolex',//商品名称
  358. model:'Submariner Date 126610LN',//型号
  359. costPrice:'12345',//成本价格
  360. salesPrice:'12345',//销售价格
  361. peerPrice:'12345',//同行价格
  362. agentPrice:'12345',//代理价格
  363. stock:'12345',//库存数量
  364. imgUrl:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
  365. platform:[]//同步平台,此功能暂时不做,先定义一个字段
  366. },
  367. {
  368. id:'',//商品库存id
  369. name:'Rolex',//商品名称
  370. model:'Submariner Date 126610LN',//型号
  371. costPrice:'12345',//成本价格
  372. salesPrice:'12345',//销售价格
  373. peerPrice:'12345',//同行价格
  374. agentPrice:'12345',//代理价格
  375. stock:'12345',//库存数量
  376. imgUrl:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
  377. platform:[]//同步平台,此功能暂时不做,先定义一个字段
  378. },
  379. {
  380. id:'',//商品库存id
  381. name:'Rolex',//商品名称
  382. model:'Submariner Date 126610LN',//型号
  383. costPrice:'12345',//成本价格
  384. salesPrice:'12345',//销售价格
  385. peerPrice:'12345',//同行价格
  386. agentPrice:'12345',//代理价格
  387. stock:'12345',//库存数量
  388. imgUrl:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
  389. platform:[]//同步平台,此功能暂时不做,先定义一个字段
  390. },
  391. {
  392. id:'',//商品库存id
  393. name:'Rolex',//商品名称
  394. model:'Submariner Date 126610LN',//型号
  395. costPrice:'12345',//成本价格
  396. salesPrice:'12345',//销售价格
  397. peerPrice:'12345',//同行价格
  398. agentPrice:'12345',//代理价格
  399. stock:'12345',//库存数量
  400. imgUrl:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
  401. platform:[]//同步平台,此功能暂时不做,先定义一个字段
  402. }
  403. ],
  404. total: 20,//总条数
  405. }
  406. },
  407. // 仓库模块-详情
  408. '/warehouse/wareHouseDetail': {
  409. method: 'get',
  410. params: {
  411. id: '',
  412. userId:'12345',//用户id
  413. },
  414. url: '/prod-api/crm/warehouse/wareHouseDetail',
  415. delay: 300,
  416. response: {
  417. code: 200,
  418. msg: 'success',
  419. data: {
  420. id:'12345',//商品库存id
  421. imgsUrl:[{
  422. url:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
  423. },
  424. {
  425. url:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
  426. }],//商品图片
  427. dictLabel:'Rolex',//商品名称
  428. dictValue:'12345',//商品名称id
  429. model:'Submariner Date 126610LN',//型号
  430. code:'12345',//独立编码
  431. warehouseDate:'2026-01-06',//入库日期
  432. payType:'1',//付款方式 1:微信 2:支付宝 3:银行卡 4:现金 5:数字货币 6:挂账
  433. note:'单包 附件齐全 成色极好',//备注
  434. originalCost:'12345',//原始成本
  435. additionalCost:'12345',//附加成本
  436. agentPrice:'12345',//代理价格
  437. suggestedPrice:'12345',//建议价格
  438. location:'上海',//商品位置
  439. recyclePerson:'张三',//回收人员
  440. recyclePersonId:'12345',//回收人员id
  441. identifyingPerson:'张三',//鉴定人员
  442. identifyingPersonId:'12345',//鉴定人员id
  443. logTotal:12,//操作日志总数
  444. lockStatus:'0',//锁单状态 0:未锁单 1:已锁单
  445. downStatus:'1',//下架状态 0:已下架 1:已上架
  446. }
  447. }
  448. },
  449. // 仓库模块-详情-操作日志-列表
  450. '/warehouse/wareHouseLog': {
  451. method: 'get',
  452. params: {
  453. id: '',//商品库存id
  454. userId:'12345',//用户id
  455. },
  456. url: '/prod-api/crm/warehouse/wareHouseLog',
  457. delay: 300,
  458. response: {
  459. code: 200,
  460. msg: 'success',
  461. data: [
  462. {
  463. id:1,//操作日志id
  464. name:'张三',//操作人
  465. createTime:'2026-01-06 12:00:00',//操作时间
  466. operation:'修改名称为Rolex',//操作内容
  467. },
  468. {
  469. id:2,//操作日志id
  470. name:'张三',//操作人
  471. createTime:'2026-01-06 12:00:00',//操作时间
  472. operation:'修改型号为Submariner Date 126610LN',//操作内容
  473. },
  474. {
  475. id:3,//操作日志id
  476. name:'张三',//操作人
  477. createTime:'2026-01-06 12:00:00',//操作时间
  478. operation:'修改名称为Rolex',//操作内容
  479. },
  480. {
  481. id:4,//操作日志id
  482. name:'张三',//操作人
  483. createTime:'2026-01-06 12:00:00',//操作时间
  484. operation:'修改型号为Submariner Date 126610LN',//操作内容
  485. },
  486. ]
  487. }
  488. },
  489. // 仓库模块-详情-编辑
  490. '/warehouse/wareHouseUpdate': {
  491. method: 'post',
  492. data:{
  493. id:'',//商品库存id
  494. imgsUrl:[{
  495. url:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
  496. },
  497. {
  498. url:'https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg',//商品图片
  499. }],//商品图片
  500. dictLabel:'Rolex',//商品名称
  501. dictValue:'12345',//商品名称id
  502. model:'Submariner Date 126610LN',//型号
  503. code:'12345',//独立编码
  504. warehouseDate:'2026-01-06',//入库日期
  505. payType:'1',//付款方式 1:微信 2:支付宝 3:银行卡 4:现金 5:数字货币 6:挂账
  506. note:'单包 附件齐全 成色极好',//备注
  507. originalCost:'12345',//原始成本
  508. additionalCost:'12345',//附加成本
  509. agentPrice:'12345',//代理价格
  510. suggestedPrice:'12345',//建议价格
  511. location:'上海',//商品位置
  512. recyclePerson:'张三',//回收人员
  513. recyclePersonId:'12345',//回收人员id
  514. identifyingPerson:'张三',//鉴定人员
  515. identifyingPersonId:'12345',//鉴定人员id
  516. },
  517. url: '/prod-api/crm/warehouse/wareHouseUpdate',
  518. delay: 300,
  519. response: {
  520. code: 200,
  521. msg: 'success'
  522. }
  523. },
  524. // 仓库模块-详情-锁单/解锁
  525. '/warehouse/wareHouseLock': {
  526. method: 'post',
  527. data:{
  528. id:'',//商品库存id
  529. lockStatus:'1',//锁单状态 0:解锁 1:锁单
  530. },
  531. url: '/prod-api/crm/warehouse/wareHouseLock',
  532. delay: 300,
  533. response: {
  534. code: 200,
  535. msg: 'success'
  536. }
  537. },
  538. // 仓库模块-详情-上架/下架
  539. '/warehouse/wareHouseDown': {
  540. method: 'post',
  541. data:{
  542. id:'',//商品库存id
  543. downStatus:'1',//下架状态 0:下架 1:上架
  544. },
  545. url: '/prod-api/crm/warehouse/wareHouseDown',
  546. delay: 300,
  547. response: {
  548. code: 200,
  549. msg: 'success'
  550. }
  551. },
  552. // 仓库模块-新增
  553. '/warehouse/wareHouseAdd': {
  554. method: 'post',
  555. data:{
  556. },
  557. url: '/prod-api/crm/warehouse/wareHouseAdd',
  558. delay: 300,
  559. response: {
  560. code: 200,
  561. msg: 'success'
  562. }
  563. }
  564. };
  565. function getMockDataList() {
  566. return mockDataList;
  567. }
  568. function addMockData(key, config) {
  569. mockDataList[key] = config;
  570. console.log(`[Mock] 新增Mock接口: ${key}`);
  571. return true;
  572. }
  573. function removeMockData(key) {
  574. if (mockDataList[key]) {
  575. delete mockDataList[key];
  576. console.log(`[Mock] 删除Mock接口: ${key}`);
  577. return true;
  578. }
  579. return false;
  580. }
  581. function getMockData(key) {
  582. return mockDataList[key] || null;
  583. }
  584. module.exports = {
  585. getMockDataList,
  586. addMockData,
  587. removeMockData,
  588. getMockData,
  589. mockDataList
  590. };