| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- import request from '@/common/request'
- const TaskApi = {
- // 刷新令牌
- taskType: () => {
- return request({
- url: `/call/api/call-task-type/findListByPage?page=1&pageCount=1000`,
- method: 'POST',
- data:{},
- custom: {
- showLoading: false, // 不用加载中
- showError: false, // 不展示错误提示
- },
- })
- },
-
- //创建任务
- addTask: (data) => {
- return request({
- url: `/call/api/task/add`,
- method: 'POST',
- data,
- custom: {
- showSuccess: true,
- loadingMsg: '新建中',
- successMsg: '新建成功',
- },
- })
- },
-
- //测试话术
- addTest: (data) => {
- return request({
- url: `/call/api/call-user-call-test-record/add`,
- method: 'POST',
- data,
- custom: {
- showSuccess: false,
- showLoading: false,
- },
- })
- },
- taskList: (data) => {
- return request({
- url: `/call/api/task/findListByPage?page=${data.page}&pageCount=${data.pageCount}`,
- method: 'POST',
- data,
- custom: {
- showLoading: false, // 加载中
- showError: true, // 展示错误提示
- },
- })
- },
- taskDetail: (id) => {
- return request({
- url: `/call/api/task/findById`,
- method: 'get',
- params: {
- id
- },
- custom: {
- showLoading: true, // 加载中
- showError: true, // 展示错误提示
- },
- })
- },
- intentionList: (id) => {
- return request({
- url: `/call/api/task/intention-options?taskId=${id}`,
- method: 'post',
- custom: {
- showLoading: false, // 加载中
- showError: true, // 展示错误提示
- },
- })
- },
- phoneList: (data) => {
- return request({
- url: `/call/api/task/phone/findListByPage`,
- method: 'post',
- data,
- custom: {
- showLoading: false, // 加载中
- showError: true, // 展示错误提示
- },
- })
- },
- lastTaskDetail: () => {
- return request({
- url: `/call/api/task/lastTask`,
- method: 'get',
- custom: {
- showLoading: false, // 加载中
- showError: false, // 展示错误提示
- },
- })
- },
- taskDel: (data) => {
- return request({
- url: `/call/api/task/del?id=${data.id}`,
- method: 'POST',
- data,
- custom: {
- showLoading: false, // 加载中
- showError: true, // 展示错误提示
- },
- })
- },
- phoneExport: (data) => {
- return request({
- url: `/call/api/task/phone/export`,
- method: 'POST',
- data,
- custom: {
- showLoading: false, // 加载中
- showError: true, // 展示错误提示
- },
- })
- },
- }
- export default TaskApi;
|