|  |  |  | 
|---|
|  |  |  | import request from '../../utils/request' | 
|---|
|  |  |  | import { encryptData } from '@/utils/request/decryption.js' | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 查询 | 
|---|
|  |  |  | export function fetchList (data) { | 
|---|
|  |  |  | return request.post('/visitsAdmin/cloudService/business/category/page', data, { | 
|---|
|  |  |  | return request.post('/business/category/page', encryptData(data), { | 
|---|
|  |  |  | trim: true | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 一级分类查询 | 
|---|
|  |  |  | export function fetchCateList (data) { | 
|---|
|  |  |  | return request.post('/visitsAdmin/cloudService/business/category/list', data, { | 
|---|
|  |  |  | export function allList (data) { | 
|---|
|  |  |  | return request.post('/business/category/list', encryptData(data), { | 
|---|
|  |  |  | trim: true | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | export function treeList (data) { | 
|---|
|  |  |  | return request.post('/business/category/tree', encryptData(data), { | 
|---|
|  |  |  | trim: true | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 导出Excel | 
|---|
|  |  |  | export function exportExcel (data) { | 
|---|
|  |  |  | return request.post('/visitsAdmin/cloudService/business/category/exportChildExcel', data, { | 
|---|
|  |  |  | return request.post('/business/category/exportExcel', encryptData(data), { | 
|---|
|  |  |  | trim: true, | 
|---|
|  |  |  | download: true | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | export function importDcaExcel (data) { | 
|---|
|  |  |  | return request.post('/business/category/importDcaExcel', data) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | export function exportDcaExcel (data) { | 
|---|
|  |  |  | return request.post('/business/category/exportDcaExcel', encryptData(data), { | 
|---|
|  |  |  | trim: true, | 
|---|
|  |  |  | download: true | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 创建 | 
|---|
|  |  |  | export function create (data) { | 
|---|
|  |  |  | return request.post('/visitsAdmin/cloudService/business/category/create', data) | 
|---|
|  |  |  | return request.post('/business/category/create', encryptData(data)) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 详情 | 
|---|
|  |  |  | export function getInfoById (id) { | 
|---|
|  |  |  | return request.get('/visitsAdmin/cloudService/business/category/' + id) | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 修改 | 
|---|
|  |  |  | export function updateById (data) { | 
|---|
|  |  |  | return request.post('/visitsAdmin/cloudService/business/category/updateById', data) | 
|---|
|  |  |  | return request.post('/business/category/updateById', encryptData(data)) | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 删除 | 
|---|
|  |  |  | export function deleteById (id) { | 
|---|
|  |  |  | return request.get(`/visitsAdmin/cloudService/business/category/delete/${id}`) | 
|---|
|  |  |  | return request.get(`/business/category/delete/${id}`) | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 批量删除 | 
|---|