import { http } from '@/uni_modules/uview-plus'

// 用户登录
export const userLogin = (data) => http.post('/login', data)

// 用户微信登录
export const userWxLogin = (data, config = {}) => http.post('/wechat/login', data, config)

// 发起登记流程
export const carInfoAdd = (data) => http.post('/registration/add', data, {custom: {auth: true}})

// 办理一个用户任务
export const disposeUser = (taskId) => http.post(`​/registration/completeTask/${taskId}`, {}, {custom: {auth: true}})

// 获取广告列表
export const getAdverList = (data) => http.get(`​/system/notice/list`, {params: data, custom: {auth: true}})

// 获取广告详情
export const getNotice = (noticeId) => http.get(`/system/notice/${noticeId}`, {custom: {auth: true}})

// 获取本人登记信息
export const getUserCarInfo = (data) => http.get(`/registration/listRegistration`, {params: data, custom: {auth: true}})

// 获取用户信息
export const getUserInfo = (data) => http.get('/system/user/profile', {custom: {auth: true}})

// 修改用户信息
export const updateUserInfo = (data) => http.put('/system/user/profile', data, {custom: {auth: true}})

// 获取验证码
export const getCodeImg = (data) => http.get('/captchaImage')