| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318 |
- const mockDataList = {
- // 获取个人中心数据
- '/personCenter/getPersonCards': {
- method: 'get',
- params: {
- userId: '',
- },
- url: '/prod-api/crm/personCenter/getPersonCards',
- delay: 300,
- response: {
- code: 200,
- msg: 'success',
- data: {
- todayConsume: 1234.56,//今日消耗
- todayPerformance: 56789.01,//今日业绩
- countTypeA: 25,//条数统计A类
- countTypeB: 12,//条数统计B类
- countTypeC: 8,//条数统计C类
- visitCount: 15,//上门
- visitRate: 85.5,//上门率
- dealRate: 42.3,//成交率
- roi: 3.25,//投产比
- beatRate: 78.9,//击败率
- level: '高级',//等级
- score: 'A'//评分
- }
- }
- },
- // 个人中心-获取最新线索
- '/personCenter/getPersonLatestClue': {
- method: 'get',
- params: {
- userId: '',
- },
- url: '/prod-api/crm/personCenter/getPersonLatestClue',
- delay: 300,
- response: {
- code: 200,
- msg: 'success',
- data: [
- {
- id:1,
- name:'张三',//客户名称
- star:3,//客户等级
- prodTitle:'LV 发财桶',//产品名称
- desc:'客户说价格有点低'//客户描述
- },
- {
- id:2,
- name:'李四',//客户名称
- star:3,//客户等级
- prodTitle:'LV 发财桶',//产品名称
- desc:'客户说价格有点低'//客户描述
- },
- {
- id:3,
- name:'张三',//客户名称
- star:3,//客户等级
- prodTitle:'LV 发财桶',//产品名称
- desc:'客户说价格有点低'//客户描述
- },
-
- ]
- }
- },
- // 个人中心-近七天排名折线图
- '/personCenter/getPersonRanking': {
- method: 'get',
- params: {
- userId: '',
- },
- url: '/prod-api/crm/personCenter/getPersonRanking',
- delay: 300,
- response: {
- code: 200,
- msg: 'success',
- data: [
- {
- x: '2026-1-1',//x轴日期
- y: 80,//y轴value
- },
- {
- x: '2026-1-2',
- y: 12,
- },
- {
- x: '2026-1-3',
- y: 33,
- },
- {
- x: '2026-1-4',//日期
- y: 94,
- },
- {
- x: '2026-1-5',//日期
- y: 45,
- },
- ]
- }
- },
- // 询价-新增
- '/inquiryCenter/addInquiry': {
- method: 'post',
- data: {
- clueId:'',//线索公海id
- dictValue:'',//品牌id
- dictLabel:'',//品牌名称
- model:'',//型号
- code:'',//编码
- id:'',//询价id,新增为'',编辑传值
- price:'',//询价价格,新增为'',编辑传值
- 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/1767677342956-1767677338014.jpg"
- // ]
- },
- url: '/prod-api/crm/inquiryCenter/addInquiry',
- delay: 300,
- response: {
- code: 200,
- msg: 'success'
- }
- },
- // 询价-核价-列表
- '/inquiryCenter/inquiryVerificationList': {
- method: 'post',
- params: {
- pageSize:'',//每页条数
- pageNum:'',//当前页
- },
- data:{
- type:1,//1-询价列表 2-核价列表
- },
- url: '/prod-api/crm/inquiryCenter/inquiryVerificationList',
- delay: 300,
- response: {
- code: 200,
- msg: 'success',
- rows: [
- {
- clueId:'',//线索公海id
- id:'',//询价id
- dictValue:'2',//品牌id
- dictLabel:'Rolex',//品牌名称
- model:'Submariner Date 126610LN',//型号
- code:'123',//编码
- price:'12345',//询价价格
- desc:'意向',
- date:'2026-2-1 10:00:00',//询价日期
- status:'1',//询价列表:1-待询价 2-询价完成; 核价列表:1-待核价 2-核价完成
- 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']//询价图片数组
- },
- {
- clueId:'',//线索公海id
- id:'',//询价id
- dictValue:'2',//品牌id
- dictLabel:'Rolex',//品牌名称
- model:'Submariner Date 126610LN',//型号
- code:'123',//编码
- price:'12345',//询价价格
- desc:'意向',
- date:'2026-2-1 10:00:00',//询价日期
- status:'1',//询价列表:1-待询价 2-询价完成; 核价列表:1-待核价 2-核价完成
- 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']//询价图片数组
- },
- {
- clueId:'',//线索公海id
- id:'',//询价id
- dictValue:'2',//品牌id
- dictLabel:'Rolex',//品牌名称
- model:'Submariner Date 126610LN',//型号
- code:'123',//编码
- price:'12345',//询价价格
- desc:'意向',
- date:'2026-2-1 10:00:00',//询价日期
- status:'1',//询价列表:1-待询价 2-询价完成; 核价列表:1-待核价 2-核价完成
- 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']//询价图片数组
- },
- {
- clueId:'',//线索公海id
- id:'',//询价id
- dictValue:'2',//品牌id
- dictLabel:'Rolex',//品牌名称
- model:'Submariner Date 126610LN',//型号
- code:'123',//编码
- price:'12345',//询价价格
- desc:'意向',
- date:'2026-2-1 10:00:00',//询价日期
- status:'1',//询价列表:1-待询价 2-询价完成; 核价列表:1-待核价 2-核价完成
- 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']//询价图片数组
- },
- {
- clueId:'',//线索公海id
- id:'',//询价id
- dictValue:'2',//品牌id
- dictLabel:'Rolex',//品牌名称
- model:'Submariner Date 126610LN',//型号
- code:'123',//编码
- price:'12345',//询价价格
- desc:'意向',
- date:'2026-2-1 10:00:00',//询价日期
- status:'1',//询价列表:1-待询价 2-询价完成; 核价列表:1-待核价 2-核价完成
- 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']//询价图片数组
- },
- {
- clueId:'',//线索公海id
- id:'',//询价id
- dictValue:'2',//品牌id
- dictLabel:'Rolex',//品牌名称
- model:'Submariner Date 126610LN',//型号
- code:'123',//编码
- price:'12345',//询价价格
- desc:'意向',
- date:'2026-2-1 10:00:00',//询价日期
- status:'1',//询价列表:1-待询价 2-询价完成; 核价列表:1-待核价 2-核价完成
- 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']//询价图片数组
- },
- {
- clueId:'',//线索公海id
- id:'',//询价id
- dictValue:'2',//品牌id
- dictLabel:'Rolex',//品牌名称
- model:'Submariner Date 126610LN',//型号
- code:'123',//编码
- price:'12345',//询价价格
- desc:'意向',
- date:'2026-2-1 10:00:00',//询价日期
- status:'1',//询价列表:1-待询价 2-询价完成; 核价列表:1-待核价 2-核价完成
- 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']//询价图片数组
- },
- ],
- total: 14,//总条数
- }
- },
- // 仓库模块-卡片数据
- '/warehouse/getWareHouseCard': {
- method: 'get',
- params: {
- userId: '',
- },
- url: '/prod-api/crm/warehouse/getWareHouseCard',
- delay: 300,
- response: {
- code: 200,
- msg: 'success',
- data: {
- totalCost: 12456.5,//总资产成本
- uploadCostToday: 5678,//今日上传
- outStockToday: 12,//今日出库
- totalNum: 1235,//总条数
- }
- }
- },
- // 仓库模块-列表
- '/warehouse/wareHouseList': {
- method: 'post',
- params: {
- pageSize: 10,
- pageNum: 1,
- },
- data:{
- category:'1',//品类:1-全部 2-腕表 3-箱包 4-珠宝 5-鞋靴 6-配饰 7-服饰
- sort:'date',// 排序方式:date-按最近更新排序
- dictValue:'2',//品牌id
- priceMin:'1000',//价格范围:最小价格
- priceMax:'10000',//价格范围:最大价格
- location:'',//位置
- date:'2026-02-01',//回收时间,比如2026-02-01
- recyclePerson:'',//回收人员
- identifyingPerson:'',//鉴定人员
- productAttribute:'',//产品属性:1-自有商品 2-寄卖商品 3-质押商品 4-其它
- },
- url: '/prod-api/crm/warehouse/wareHouseList',
- delay: 300,
- response: {
- code: 200,
- msg: 'success',
- }
- }
-
-
-
- };
- function getMockDataList() {
- return mockDataList;
- }
- function addMockData(key, config) {
- mockDataList[key] = config;
- console.log(`[Mock] 新增Mock接口: ${key}`);
- return true;
- }
- function removeMockData(key) {
- if (mockDataList[key]) {
- delete mockDataList[key];
- console.log(`[Mock] 删除Mock接口: ${key}`);
- return true;
- }
- return false;
- }
- function getMockData(key) {
- return mockDataList[key] || null;
- }
- module.exports = {
- getMockDataList,
- addMockData,
- removeMockData,
- getMockData,
- mockDataList
- };
|