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

import { req } from "../request"

// 用户中心
const userIndex = () => req({
    url: "user"
})

// 用户设置
const userSetup = () => req({
    url: "user/setting"
})

//修改用户信息
const setting = (key, data) => req({
    url: "user/setting/" + key,
    method: "PUT",
    data: data
})

// 我的推广码
const invitesCode = data => req({
    url: "user/invite",
    data: data
})

// 小程序码
const miniShare = data => req({
    url: "user/mini_share",
    data: data
})

// 帮助分类
const helpsNav = () => req({
    url: "cms/categories/helps"
})

export default ({
    userIndex,
    userSetup,
    setting,
    invitesCode,
    miniShare,
    helpsNav
})