| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- import { request } from '/@/utils/service';
- const apiPrefix = '/api/choice/competitor_monitor/';
- export function getTableData(query: any) {
- return request({
- url: apiPrefix,
- method: 'GET',
- params: query
- });
- }
- export function createProductMonitor(body: any) {
- return request({
- url: '/api/choice/reviews_monitor/',
- method: 'POST',
- data: body
- });
- }
- export function getGroupOptions(query: any) {
- return request({
- url: '/api/choice/goods/tags/',
- method: 'GET',
- params: query
- });
- }
- export function getBrandsOptions(query: any) {
- return request({
- url: '/api/choice/goods/brands/',
- method: 'GET',
- params: query
- });
- }
- export function getShopsOptions(query: any) {
- return request({
- url: '/api/choice/marketplace_shops/select/',
- method: 'GET',
- params: query
- });
- }
- export function updateRow(body: any) {
- return request({
- url: apiPrefix + `${body.id}/` ,
- method: 'PUT',
- params: { partial: 1 },
- data: body
- });
- }
- export function deleteRow(body: any) {
- return request({
- url: apiPrefix + `${body.id}/` ,
- method: 'DELETE',
- data: body
- });
- }
- export function batchDeleteRow(body: any) {
- return request({
- url: apiPrefix + 'multiple_delete/',
- method: 'DELETE',
- data: body
- });
- }
- // 导入
- export function upload(body: any){
- return request({
- url: '/api/choice/reviews_monitor/import_data/',
- method: 'POST',
- data: body,
- });
- }
- // 导出
- export function exportData(query: any) {
- return request({
- url: '/api/choice/reviews_monitor/export_data/',
- method: 'GET',
- params: query,
- responseType: 'blob'
- });
- }
|