import request from '@/utils/request'; /** 权限转增*/ export function getLessons(data) { return request({ url: '/api/distribute/getLessons', method: 'get', data: data }); } /** 权限分发*/ export function giveLessons(data) { return request({ url: '/api/distribute/distribute', method: 'post', data: data }); } /** 权限转增*/ export function permissionTurnAdd(data) { return request({ url: '/api/distribute/transfer', method: 'post', data: data }); } /** 从订单分发权限(获取二维码)*/ export function postDistribute(data) { return request({ url: `/api/distribute/${data.code}/distribute`, method: 'post', data: data }); } /** 权限获取*/ export function getPermission(state) { return request({ url: `/api/distribute/getPermission?state=${state}`, method: 'get' }); } /** 接收课程权限*/ export function receiveLessons(data) { return request({ url: '/api/distribute/receiveLessons', method: 'get', data: data }); } /** 考试权限分发*/ export function giveExams(data) { return request({ url: `/api/distribute/giveExams`, method: 'post', data: data }); } /** 权限打包分页查询*/ export function listPackagePermission(params) { return request({ url: '/api/distribute', method: 'get', params: params }); } /** 打包权限*/ export function packagePermissionDistribute(data) { return request({ url: `/api/distribute/givePermission/package`, method: 'post', data: data }); } /** 权限回收*/ export function restorePackagePermission(id) { return request({ url: `/api/distribute/${id}/restore`, method: 'put' }); } /** 生成打包权限二维码*/ export function getPackageQrCode(params) { return request({ url: `/api/distribute/package/qrCode`, method: 'get', params: params }); } /** 权限分发打包详情*/ export function getPermissionPackageDetail(id, params) { return request({ url: `/api/distribute/package/${id}/detail`, method: 'get', params: params }); } /** 权限分发打包*/ export function permissionDistributePackage(data) { return request({ url: `/api/distribute/package`, method: 'post', data: data }); } /** 权限分发解包*/ export function permissionDistributeUnPackage(permissionId) { return request({ url: `/api/distribute/${permissionId}/unPackage`, method: 'delete' }); } /** 查询可打包的权限分发*/ export function listCanPackagePermission(params) { return request({ url: `/api/distribute/package`, method: 'get', params: params }); }