import upload from '@/utils/upload'
import request from '@/utils/request'

// 查询任务列表
export function getTaskList(params) {
    return request({
        url: '/applet/mall/task/list',
        headers: {
            "isToken": true
        },
        method: 'get',
        params
    })
}

// 查询任务详情
export function getTaskDetail(params) {
    return request({
        url: '/applet/mall/task/taskDetail/' + params,
        headers: {
            "isToken": true
        },
        method: 'get',
    })
}

// 接受任务
export function acceptTask(params) {
    return request({
        url: '/applet/mall/task/acceptTask',
        headers: {
            "isToken": true
        },
        method: 'get',
        params
    })
}

// 提交任务
export function submitTask(data) {
    return request({
        url: '/applet/mall/task/submitTask',
        headers: {
            "isToken": true
        },
        method: 'post',
        data
    })
}