user.js
1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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 carInfoEdit = (data) => http.post('/registration/edit', 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 userCancel = () => http.get('/system/user/deRegistration', {custom: {auth: true}})
// 获取验证码
export const getCodeImg = (data) => http.get('/captchaImage')
// 申请获取用户手机号
export const getPhome = (data) => http.post('/wechat/getUserPhoneNumber',data, {custom: {auth: true}})