// 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` }, }, 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: { 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` } }, 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` } }, 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: { 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` }, }, goodsOrder: { 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` }, }, 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` }, }, 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/list` }, 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` } } } export default $api