// const baseUrl = '/api-v2' const baseUrl = '/api' const common = '/common/:org' const guest = '/guest/:org' const $api = { login: { // 登陆 signin: { method: 'post', url: `${baseUrl}${guest}/signin` } }, system: { init: { // 初始化菜单 method: 'get', url: `${baseUrl}${common}/system/init` }, signout: { // 登出 method: 'post', url: `${baseUrl}${common}/signout` }, editPassword: { // 修改密码 method: 'put', url: `${baseUrl}${common}/user/:id/password` }, notify: { newGoodsOrders: { method: 'put', url: `${baseUrl}${common}/websocket/:grps/:id` }, }, }, systemSet: { getUserList: { // 获取用户列表 method: 'get', url: `${baseUrl}${common}/user` }, getUserInfo: { // 获取用户信息 method: 'get', url: `${baseUrl}${common}/user/:id` }, addUser: { // 新增用户 method: 'post', url: `${baseUrl}${common}/user` }, editUser: { // 更新用户 method: 'put', url: `${baseUrl}${common}/user` }, deleteUser: { // 删除用户 method: 'delete', url: `${baseUrl}${common}/user/:id` }, resetPassword: { // 重置用户密码 method: 'put', url: `${baseUrl}${common}/user/password/reset` }, bindRoles: { // 绑定角色 method: 'put', url: `${baseUrl}${common}/userrole` }, getUserRoles: { // 获取用户绑定角色 method: 'get', url: `${baseUrl}${common}/userrole` }, getUserByTel: { method: 'get', url: `${baseUrl}${common}/user/tel/:tel` }, }, channelManager: { getChannelList: { // 渠道列表 method: 'get', url: `${baseUrl}${common}/channel` }, getChannelInfo: { // 获取渠道信息 method: 'get', url: `${baseUrl}${common}/channel/:channelId` }, addChannel: { // 新增渠道 method: 'post', url: `${baseUrl}${common}/channel` }, editChannel: { // 更新渠道 method: 'put', url: `${baseUrl}${common}/channel` }, deleteChannel: { // 删除渠道 method: 'delete', url: `${baseUrl}${common}/channel/:channelId` }, }, caseManager: { getKeyListById: { method: 'get', url: `${baseUrl}${common}/case/key` }, bindKeyByPhone: { method: 'post', url: `${baseUrl}${common}/case/key/:phone/:keyid` }, bindKey: { method: 'post', url: `${baseUrl}${common}/case/key/:keyid/:customerid/:customername` }, bindKeyByQrCode: { method: 'post', url: `${baseUrl}${common}/verify/case/key/:keyid/:customerid` }, getRolesList: { // 获取角色列表 method: 'get', url: `${baseUrl}${common}/role` }, getCaseList: { // 获取案场列表 method: 'get', url: `${baseUrl}${common}/case/info` }, addCase: { // 新增案场 method: 'post', url: `${baseUrl}${common}/case/info` }, getCaseInfo: { // 查询案场 method: 'get', url: `${baseUrl}${common}/case/info/:id` }, editCase: { // 编辑案场 method: 'put', url: `${baseUrl}${common}/case/info/:id` }, getCaseUserType: { // 获取案场相关人员类型 method: 'get', url: `${baseUrl}${common}/case/usertype` }, getCaseUserList: { // 获取案场相关人员列表 method: 'get', url: `${baseUrl}${common}/case/user` }, getCaseUserInfo: { // 获取案场相关人员信息 method: 'get', url: `${baseUrl}${common}/case/user/:id` }, addCaseUser: { // 新增案场相关人员 method: 'post', url: `${baseUrl}${common}/case/user` }, editCaseUser: { // 更新案场相关人员 method: 'put', url: `${baseUrl}${common}/case/user` }, getKeyList: { // 获取钥匙列表 method: 'get', url: `${baseUrl}${common}/case/key` }, addKey: { // 新增钥匙 method: 'post', url: `${baseUrl}${common}/case/key` }, cancelKey: { // 取消钥匙 method: 'put', url: `${baseUrl}${common}/case/unlock/:id` }, deleteKey: { // 删除钥匙 method: 'delete', url: `${baseUrl}${common}/case/key/:id` }, getCaseAreaList: { // 获取案场区域列表 method: 'get', url: `${baseUrl}${common}/case/area` }, addCaseArea: { // 新增案场区域 method: 'post', url: `${baseUrl}${common}/case/area` }, deleteCaseArea: { // 删除案场区域 method: 'delete', url: `${baseUrl}${common}/case/area/:id` }, getCaseAreaInfo: { // 获取案场区域信息 method: 'get', url: `${baseUrl}${common}/case/area/:id` }, editCaseArea: { // 更新案场区域信息 method: 'put', url: `${baseUrl}${common}/case/area` }, getCaseTableList: { // 获取案场桌位列表 method: 'get', url: `${baseUrl}${common}/case/table` }, addCaseTable: { // 新增案场桌位 method: 'post', url: `${baseUrl}${common}/case/table` }, getCaseTableInfo: { // 查询案场桌位信息 method: 'get', url: `${baseUrl}${common}/case/table/:id` }, editCaseTable: { // 更新案场桌位信息 method: 'put', url: `${baseUrl}${common}/case/table` }, deleteCaseTable: { // 删除案场桌位信息 method: 'delete', url: `${baseUrl}${common}/case/table/:id` }, getCaseTagList: { // 获取案场标签列表 method: 'get', url: `${baseUrl}${common}/case/tag` }, addCaseTag: { // 新增案场标签 method: 'post', url: `${baseUrl}${common}/case/tag` }, getTagInfo: { // 获取案场标签信息 method: 'get', url: `${baseUrl}${common}/case/tag/:id` }, deleteCaseTag: { // 删除案场标签 method: 'delete', url: `${baseUrl}${common}/case/tag/:id` }, getUserTypeList: { // 获取用户类型列表 method: 'get', url: `${baseUrl}${common}/usertype` }, getRecordList: { method: 'get', url: `${baseUrl}${common}/case/record` }, addRecord: { method: 'post', url: `${baseUrl}${common}/case/record` }, getSignin: { // 获取签到列表 method: 'get', url: `${baseUrl}${common}/case/signin` }, getExcelSignin: { // 获取签到列表 method: 'get', url: `${baseUrl}${common}/case/excelSignin` } }, goodsManager: { getGoodsSpecList: { // 商品规格列表 method: 'get', url: `${baseUrl}${common}/spec/goods` }, addGoodsSpec: { // 新增商品规格 method: 'post', url: `${baseUrl}${common}/spec/goods` }, getGoodsSpecById: { // 根据id获取商品规格 method: 'get', url: `${baseUrl}${common}/spec/goods/:id` }, editGoodsSpec: { // 编辑商品规格 method: 'put', url: `${baseUrl}${common}/spec/goods/:id` }, deleteGoodsSpec: { // 删除商品规格 method: 'delete', url: `${baseUrl}${common}/spec/goods/:id` }, getGoodsTypeList: { // 商品种类列表 method: 'get', url: `${baseUrl}${common}/type/goods` }, addGoodsType: { // 新增商品种类 method: 'post', url: `${baseUrl}${common}/type/goods` }, getGoodsTypeById: { // 根据id获取商品种类 method: 'get', url: `${baseUrl}${common}/type/goods/:id` }, editGoodsType: { // 编辑商品种类 method: 'put', url: `${baseUrl}${common}/type/goods/:id` }, deleteGoodsType: { // 删除商品种类 method: 'delete', url: `${baseUrl}${common}/type/goods/:id` }, getGoodsList: { method: 'get', url: `${baseUrl}${common}/goods` }, getGoodsByID: { method: 'get', url: `${baseUrl}${common}/goods/:id` }, addGoods: { method: 'post', url: `${baseUrl}${common}/goods` }, updateGoods: { method: 'put', url: `${baseUrl}${common}/goods/:id` }, deleteGoods: { method: 'delete', url: `${baseUrl}${common}/goods/:id` }, }, cms: { location: { // 图片位置(5A) method: 'get', url: `${baseUrl}${common}/cms/location` }, locationDetail: { // 5A详情 method: 'get', url: `${baseUrl}${common}/cms/location/:id` }, addLocation: { // 添加5A method: 'post', url: `${baseUrl}${common}/cms/location` }, editLocation: { // 编辑5A method: 'put', url: `${baseUrl}${common}/cms/location/:id` }, deleteLocation: { // 删除5A method: 'delete', url: `${baseUrl}${common}/cms/location/:id` }, orderChange: { method: 'put', url: `${baseUrl}${common}/cms/location/:id/sort` }, imageList: { // 轮播图列表 method: 'get', url: `${baseUrl}${common}/cms/image` }, imageDetail: { // 轮播图详情 method: 'get', url: `${baseUrl}${common}/cms/image/:id` }, addImage: { // 添加轮播图 method: 'post', url: `${baseUrl}${common}/cms/image` }, editImage: { // 编辑轮播图 method: 'put', url: `${baseUrl}${common}/cms/image/:id` }, deleteDetail: { // 删除轮播图 method: 'delete', url: `${baseUrl}${common}/cms/image/:id` }, case: { // 首页案场列表 method: 'get', url: `${baseUrl}${common}/cms/case` }, caseDetail: { // 首页案场详情 method: 'get', url: `${baseUrl}${common}/cms/case/:id` }, addCase: { // 添加首页案场 method: 'post', url: `${baseUrl}${common}/cms/case` }, editCase: { // 添加首页案场 method: 'put', url: `${baseUrl}${common}/cms/case/:id` }, deleteCase: { // 添加首页案场 method: 'delete', url: `${baseUrl}${common}/cms/case/:id` }, info: { // 首页消息列表 method: 'get', url: `${baseUrl}${common}/cms/info` }, infoDetail: { // 首页消息详情 method: 'get', url: `${baseUrl}${common}/cms/info/:id` }, addInfo: { // 新增首页消息 method: 'post', url: `${baseUrl}${common}/cms/info` }, editInfo: { // 编辑首页消息 method: 'put', url: `${baseUrl}${common}/cms/info/:id` }, deleteInfo: { // 删除首页消息 method: 'delete', url: `${baseUrl}${common}/cms/info/:id` }, news: { // 资讯列表 method: 'get', url: `${baseUrl}${common}/cms/news` }, newsDetail: { // 资讯详情 method: 'get', url: `${baseUrl}${common}/cms/news/:id` }, addNews: { // 新增资讯 method: 'post', url: `${baseUrl}${common}/cms/news` }, editNews: { // 编辑资讯 method: 'put', url: `${baseUrl}${common}/cms/news/:id` }, deleteNews: { // 删除资讯 method: 'delete', url: `${baseUrl}${common}/cms/news/:id` }, caseShow: { // 前台展示 method: 'put', url: `${baseUrl}${common}/cms/caseshow/:id` }, caseHide: { // 取消前台展示 method: 'put', url: `${baseUrl}${common}/cms/casehide/:id` }, getCourseLink: { // 获取课程链接列表 method: 'get', url: `${baseUrl}${common}/dict/course` }, }, file: { image: { // 图片上传 method: 'post', url: `${baseUrl}${common}/file` } }, role: { list: { method: 'get', url: `${baseUrl}${common}/role` }, info: { method: 'get', url: `${baseUrl}${common}/role/:id` }, add: { method: 'post', url: `${baseUrl}${common}/role` }, update: { method: 'put', url: `${baseUrl}${common}/role` }, delete: { method: 'delete', url: `${baseUrl}${common}/role/:id` }, getmenus: { method: 'get', url: `${baseUrl}${common}/rolemenu/:id` }, savemenu: { method: 'put', url: `${baseUrl}${common}/rolemenu/:id` }, }, dataStatistics: { getCustomerList: { // 获取会员列表 method: 'get', url: `${baseUrl}${common}/customer` } }, device: { list: { method: 'get', url: `${baseUrl}${common}/case/equipment` }, info: { method: 'get', url: `${baseUrl}${common}/case/equipment/:id` }, add: { method: 'post', url: `${baseUrl}${common}/case/equipment` }, update: { method: 'put', url: `${baseUrl}${common}/case/equipment` }, delete: { method: 'delete', url: `${baseUrl}${common}/case/equipment/:id` }, }, course: { getCourseList: { method: 'get', url: `${baseUrl}${common}/courseues` }, list: { method: 'get', url: `${baseUrl}${common}/course` }, info: { method: 'get', url: `${baseUrl}${common}/course/:id` }, tags: { method: 'get', url: `${baseUrl}${common}/coursetag` }, add: { method: 'post', url: `${baseUrl}${common}/course` }, update: { method: 'put', url: `${baseUrl}${common}/course` }, delete: { method: 'delete', url: `${baseUrl}${common}/course/:id` }, public: { method: 'put', url: `${baseUrl}${common}/course/:id/public` }, unpublic: { method: 'put', url: `${baseUrl}${common}/course/:id/unpublic` }, getimgs: { method: 'get', url: `${baseUrl}${common}/courseimg/:id` }, addimgs: { method: 'post', url: `${baseUrl}${common}/courseimg` }, updateimgs: { method: 'put', url: `${baseUrl}${common}/courseimg` }, deleteimgs: { method: 'delete', url: `${baseUrl}${common}/courseimg/:id` }, schedule: { method: 'get', url: `${baseUrl}${common}/schedule` }, detail: { method: 'get', url: `${baseUrl}${common}/detail` }, getDetailByID: { method: 'get', url: `${baseUrl}${common}/detail/:id` }, addDetail: { method: 'post', url: `${baseUrl}${common}/detail` }, updateDetail: { method: 'put', url: `${baseUrl}${common}/detail` }, delDetail: { method: 'delete', url: `${baseUrl}${common}/detail/:id` }, }, verification: { coursebycode: { method: 'get', url: `${baseUrl}${common}/verify/course/code/:id` }, coursebytel: { method: 'get', url: `${baseUrl}${common}/verify/course/tel/:tel` }, courseverify: { method: 'put', url: `${baseUrl}${common}/verify/course/:id` }, drawVerify: { method: 'put', url: `${baseUrl}${common}/luckdrawlist/verify/:id` }, drawVerifyList: { method: 'get', url: `${baseUrl}${common}/luckdrawlist/verify/:id` }, getCustomerName: { method: 'get', url: `${baseUrl}${common}/customer/tel/:id` }, flashbuyVerifyList: { method: 'get', url: `${baseUrl}${common}/flashbuy/verify/:id/:caseid` }, flashbuyVerify: { method: 'put', url: `${baseUrl}${common}/flashbuy/verify/:id` }, }, goodsOrder: { putPrintGoodsOrder: { method: 'put', url: `${baseUrl}${common}/order/goods/intimidate/:id` }, getOnlineOrder: { method: 'get', url: `${baseUrl}${common}/order/online/goods` }, getOrdersByRecord: { method: 'get', url: `${baseUrl}${common}/order/goods/record/:id` }, openBusiness: { method: 'put', url: `${baseUrl}${common}/case/open/:caseid` }, closeBusiness: { method: 'put', url: `${baseUrl}${common}/case/close/:caseid` }, getBusinessStatus: { method: 'get', url: `${baseUrl}${common}/case/conf/:id` }, checkOrder: { method: 'put', url: `${baseUrl}${common}/order/goods/finish/:id` }, cancelOrder: { method: 'put', url: `${baseUrl}${common}/order/goods/cancel/:id` } }, cardManager: { viplist: { method: 'get', url: `${baseUrl}${common}/vipcard` }, vipadd: { method: 'post', url: `${baseUrl}${common}/vipcard` }, vipcharge: { method: 'put', url: `${baseUrl}${common}/vipcard/:code` }, vipbycode: { method: 'get', url: `${baseUrl}${common}/vipcard/:code` }, cardList: { method: 'get', url: `${baseUrl}${common}/card` }, addCard: { method: 'post', url: `${baseUrl}${common}/card` }, editCard: { method: 'put', url: `${baseUrl}${common}/card/:id` }, getCardById: { method: 'get', url: `${baseUrl}${common}/card/:id` }, giveCard: { method: 'post', url: `${baseUrl}${common}/card/:id/to/:users` }, vipcardExcel: { method: 'get', url: `${baseUrl}${common}/vipcard/excel` }, }, couponManager: { couponList: { method: 'get', url: `${baseUrl}${common}/coupon` }, addCoupon: { method: 'post', url: `${baseUrl}${common}/coupon` }, editCoupon: { method: 'put', url: `${baseUrl}${common}/coupon/:id` }, getCouponById: { method: 'get', url: `${baseUrl}${common}/coupon/:id` }, giveCoupon: { method: 'post', url: `${baseUrl}${common}/coupon/:id/to/:users` }, }, gymCardManager: { gymCardList: { method: 'get', url: `${baseUrl}${common}/gymcard` }, addGymCard: { method: 'post', url: `${baseUrl}${common}/gymcard` }, editGymCard: { method: 'put', url: `${baseUrl}${common}/gymcard` }, getGymCardById: { method: 'get', url: `${baseUrl}${common}/gymcard/:id` }, giveCard: { method: 'post', url: `${baseUrl}${common}/gymcard/:id/to/:users` } }, customerManager: { getByTel: { method: 'get', url: `${baseUrl}${common}/customer/tel/:tel` }, getCustomerList: { // 获取会员列表 method: 'get', url: `${baseUrl}${common}/customer` } }, marketingActivities: { // 营销活动 getMarketingList: { // 查询所有 method: 'get', url: `${baseUrl}${common}/marketing` }, addMarketing: { // 添加 method: 'post', url: `${baseUrl}${common}/marketing` }, delMarketing: { // 删除 method: 'delete', url: `${baseUrl}${common}/marketing/:activityId` }, delMarketingNormal: { // 启用 method: 'put', url: `${baseUrl}${common}/marketing/normal/:activityId` }, delMarketingDisable: { // 停用 method: 'put', url: `${baseUrl}${common}/marketing/disable/:activityId` }, getCouponList: { // 获取赠券卡券类型 method: 'get', url: `${baseUrl}${common}/coupon/type/:type` } }, statistics: { goods: { method: 'get', url: `${baseUrl}${common}/statistics/goods` }, goodsExcel: { method: 'get', url: `${baseUrl}${common}/statistics/goods/excel` }, goodsOrder: { method: 'get', url: `${baseUrl}${common}/statistics/goodsorders` }, goodsOrderExcel: { method: 'get', url: `${baseUrl}${common}/statistics/goodsorders/excel` }, courseOrder: { method: 'get', url: `${baseUrl}${common}/statistics/courseorders` }, courseOrderExcel: { method: 'get', url: `${baseUrl}${common}/statistics/courseorders/excel` }, courseList: { method: 'get', url: `${baseUrl}${common}/statistics/courses` }, courseListExcel: { method: 'get', url: `${baseUrl}${common}/statistics/courses/excel` }, cardCouponList: { method: 'get', url: `${baseUrl}${common}/statistics/cardcoupon` }, cardCouponListExcel: { method: 'get', url: `${baseUrl}${common}/statistics/cardcoupon/excel` }, cardCouponUsedList: { method: 'get', url: `${baseUrl}${common}/statistics/cardcouponused` }, cardCouponUsedListExcel: { method: 'get', url: `${baseUrl}${common}/statistics/cardcouponused/excel` }, courseVerifyList: { method: 'get', url: `${baseUrl}${common}/statistics/cardcouponverify` }, courseVerifyListExcel: { method: 'get', url: `${baseUrl}${common}/statistics/cardcouponverify/excel` }, }, dashboard: { dashboardData: { method: 'get', url: `${baseUrl}${common}/dashboard` }, dashboardBottomData: { method: 'get', url: `${baseUrl}${common}/dashboard/charts` }, }, health: { healthList: { method: 'get', url: `${baseUrl}${common}/bodychecklist` } }, luckDraw: { luckDrawList: { method: 'get', url: `${baseUrl}${common}/luckdrawlist` }, luckDrawShareList: { method: 'get', url: `${baseUrl}${common}/luckdrawlist/share` } }, activityManager: { luckdrawList: { // 营销活动-抽奖活动列表 method: 'get', url: `${baseUrl}${common}/luckdraw` }, luckdrawInfoById: { // 营销活动-抽奖活动详情 method: 'get', url: `${baseUrl}${common}/luckdraw/:id` }, addLuckdraw: { // 营销活动-新增抽奖活动 method: 'post', url: `${baseUrl}${common}/luckdraw` }, editLuckdraw: { // 营销活动-编辑抽奖活动 method: 'put', url: `${baseUrl}${common}/luckdraw/:id` }, deleteLuckdraw: { // 营销活动-删除抽奖活动 method: 'delete', url: `${baseUrl}${common}/luckdraw/:id` }, getDrawTemplateList: { // 营销活动-获取抽奖模板列表 method: 'get', url: `${baseUrl}${common}/luckdrawtpl` }, getRecordsList: { // 营销活动-获取抽奖记录列表 method: 'get', url: `${baseUrl}${common}/luckdraw/records/:id` }, getShareList: { // 营销活动-获取分享记录列表 method: 'get', url: `${baseUrl}${common}/luckdraw/share/:id` }, openActivity: { // 开启活动 method: 'put', url: `${baseUrl}${common}/luckdraw/:id/open` }, stopActivity: { // 停用活动 method: 'put', url: `${baseUrl}${common}/luckdraw/:id/stop` }, excelActivity: { // 导出Excel method: 'get', url: `${baseUrl}${common}/luckdraw/excel/:id` }, getFlashbuyTemplateList: { // 营销活动-获取抢购模板列表 method: 'get', url: `${baseUrl}${common}/flashbuy/model` }, addFlashbuy: { // 营销活动-新增抢购活动 method: 'post', url: `${baseUrl}${common}/flashbuy` }, getFlashbuyList: { // 营销活动-获取抢购活动列表 method: 'get', url: `${baseUrl}${common}/flashbuy` }, getFlashbuyById: { // 营销活动-获取抢购活动信息 method: 'get', url: `${baseUrl}${common}/flashbuy/:id` }, editFlashbuy: { // 营销活动-更新抢购活动 method: 'put', url: `${baseUrl}${common}/flashbuy/edit` }, deleteFlashbuy: { // 营销活动-删除抢购活动 method: 'delete', url: `${baseUrl}${common}/flashbuy/:id` }, getFlashbuyRecordsById: { // 营销活动-获取抢购活动记录 method: 'get', url: `${baseUrl}${common}/flashbuy/customer/:id` }, updateFlashbuyStatus: { // 营销活动-更新抢购活动状态 method: 'put', url: `${baseUrl}${common}/flashbuy/:id/:status` }, excelFlashbuy: { method: 'get', url: `${baseUrl}${common}/flashbuy/excel/:id` }, getCardListByCaseId: { // 获取案场下卡列表 method: 'get', url: `${baseUrl}${common}/card/sys/:id` }, getCouponListByCaseId: { // 获取案场下券列表 method: 'get', url: `${baseUrl}${common}/coupon/sys/:id` }, getCalendarList: { method: 'get', url: `${baseUrl}${common}/calendar` }, calendarExcel: { method: 'get', url: `${baseUrl}${common}/calendar/excel` }, calendarStausChange: { method: 'put', url: `${baseUrl}${common}/calendar/:calendarIds` }, downCalendarPic: { method: 'get', url: `${baseUrl}${common}/calendar/:calendarId/:imgType` }, }, record: { getRecordList: { method: 'get', url: `${baseUrl}${common}/record` } }, borrow: { getBorrowList: { method: 'get', url: `${baseUrl}${common}/book/record` }, }, bookType: { list: { method: 'get', url: `${baseUrl}${common}/booktype` }, detail: { method: 'get', url: `${baseUrl}${common}/booktype/:id` }, save: { method: 'post', url: `${baseUrl}${common}/booktype` }, update: { method: 'post', url: `${baseUrl}${common}/booktype` }, delete: { method: 'delete', url: `${baseUrl}${common}/booktype/:id` }, }, book: { list: { method: 'get', url: `${baseUrl}${common}/book` }, detail: { method: 'get', url: `${baseUrl}${common}/book/:id` }, save: { method: 'post', url: `${baseUrl}${common}/book` }, update: { method: 'post', url: `${baseUrl}${common}/book` }, delete: { method: 'delete', url: `${baseUrl}${common}/book/:id` }, }, } export default $api