 /*
  * 手太欠
  * 愿这世界都如故事里一样 美好而动人~
*/

import { req } from "../request"

// 体验官首页
const index = data => req({
    url : "experiences",
    data: data
})

// 申请前置接口
const Enroll = (experience_id, data) => req({
    url : "experiences/enroll/" + experience_id,
    data: data
})

// 申请前置接口-提交
const recruitAdd = (data) => req({
    url : "experiences/enroll",
    method: "POST",
    data: data
})

// 编辑报名前置接口
const Edit = (enroll_id) => req({
    url : "experiences/enroll/" + enroll_id + "/edit"
})

// 编辑报名资料-提交
const EditPut = (enroll_id, data) => req({
    url : "experiences/enroll/" + enroll_id,
    method: "PUT",
    data: data
})

//小程序入库用户数据(微信授权)
const wechatMini = (data) => req({
    url : "user/socialite/login/wechat/mini/add",
    method: "POST",
    data: data
})

// 活动打卡日历
const signCalendar = (data) => req({
    url : "experiences/sign_calendar",
    data: data
})

// 活动打卡操作
const signLabor = (data) => req({
    url : "experiences/signs",
    method: "POST",
    data: data
})

// 打卡记录
const signList = (data) => req({
    url : "experiences/signs",
    data: data
})

// 体验官第一次和第二次比对
const skinDiff = (data) => req({
    url : "ai/skin/diff",
    data: data
})

// 打卡列表用户信息
const signUser = (experience_id) => req({
    url : "experiences/sign_user/" + experience_id,
})

// 分享前置
const dailyCreate = () => req({
    url : "experiences/daily/create"
})

// 我的分享任务
const dailyList = (data) => req({
    url : "experiences/daily",
    data: data
})

// 我的分享任务-提交
const dailyPost = (data) => req({
    url : "experiences/daily",
    method: "POST",
    data: data
})

//水滴账户
const score = (data) => req({
    url : "user/account/score",
    data: data
})

//水滴账户
const kuaiDi = (experience_id) => req({
    url : "experiences/express_track/" + experience_id
})

export default ({
    index,
    Enroll,
    recruitAdd,
    Edit,
    EditPut,
    wechatMini,
    signCalendar,
    signLabor,
    signList,
    skinDiff,
    signUser,
    dailyCreate,
    dailyList,
    dailyPost,
    score,
    kuaiDi
})