import request from '../utils/request.js'

import config from '../utils/config'

// 获取任务列表
export const getTaskList = data => {
	return request.post('/data/api.task/getTasks', data)
}

// 获取任务详情
export const getTaskDetails = data => {
	return request.post('/data/api.auth.task/getTask', data)
}
//生成分享二维码

export const makeErCode = data => {
	return request.post('/wechat/wxapp/qrcode', data)
}


// 获取任务详情 不带token
export const getTaskDetailsNoToken = data => {
	return request.post('/data/api.task/getTask', data)
}

// 商单任务报名
export const postTaskEnroll = data => {
	return request.post('/data/api.auth.task/enroll', data)
}


// 我的商单任务报名
export const getMyTaskEnrollList = data => {
	return request.post('/data/api.auth.task/myEnrolls', data)
}

// 修改我的商单任务报名
export const postTaskEnrollUpdate = data => {
	return request.post('/data/api.auth.task/editEnroll', data)
}

// 获取我的商单任务详情
export const getMyTaskEnrollDetail = data => {
	return request.post('/data/api.auth.task/getEnroll', data)
}

// 我的商单任务交付
export const submitTask = data => {
	return request.post('/data/api.auth.task/submit', data)
}



// 我的商单任务取消合作
export const cancelTask = data => {
	return request.post('/data/api.auth.task/cancel', data)
}


// 提交推广合作
export const addPeace = data => {
	return request.post('/data/api.auth.promotion/add', data)
}

// 足迹-任务
export const getHistoryOne = data => {
	return request.post('/data/api.auth.task/getHistory', data)
}


// 足迹-带货
export const getHistoryTwo = data => {
	return request.post('/data/api.auth.commerce/getHistory', data)
}
