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

import { req } from "../request"

// 健康分类
const healthNav = () => req({
    url: "cms/categories"
})

// 健康列表
const healthList = data => req({
    url: "cms/articles",
    data: data
})

// 健康详情
const healthSee = (article_id) => req({
    url: "cms/articles/" + article_id
})

// 健康收藏
const favorite = (article_id) => req({
    url: "cms/articles/favorite/" + article_id
})

// 健康点赞
const subscribe = (article_id) => req({
    url: "cms/articles/subscribe/" + article_id
})

// 我的-健康收藏
const myFavorite = data => req({
    url: "user/favorites",
    data: data
})

// 我的-健康点赞
const mySubscribe = data => req({
    url: "user/subscriptions",
    data: data

})

// 我的-检测结果列表
const aiList = data => req({
    url: "ai/images",
    data: data
})

// 我的-检测结果
const aiSee = (image_id) => req({
    url: "ai/images/" + image_id
})

export default ({
    healthNav,
    healthList,
    healthSee,
    favorite,
    subscribe,
    myFavorite,
    mySubscribe,
    aiList,
    aiSee
})