2022-04-21 01:47:01 +08:00
|
|
|
//请求工具参考https://ext.dcloud.net.cn/plugin?id=392
|
2022-04-10 01:21:21 +08:00
|
|
|
const { http } = uni.$u
|
|
|
|
|
2022-04-10 20:31:45 +08:00
|
|
|
/* login */
|
|
|
|
//使用手机 + 密码登录
|
2022-04-20 03:08:59 +08:00
|
|
|
export const passwordLogin = params => http.post('/app-api/member/login', params)
|
2022-04-21 00:01:24 +08:00
|
|
|
//退出登录
|
|
|
|
export const logout = params => http.post('/app-api/member/logout', params)
|
2022-04-10 20:31:45 +08:00
|
|
|
//发送手机验证码
|
|
|
|
export const sendSmsCode = params => http.post('/app-api/member/send-sms-code', params)
|
|
|
|
//使用手机 + 验证码登录
|
|
|
|
export const smsLogin = params => http.post('/app-api/member/sms-login', params)
|
|
|
|
|
2022-04-20 03:08:59 +08:00
|
|
|
//获取用户信息
|
|
|
|
export const getUserInfo = params => http.get('/app-api/member/user/get', params)
|
2022-04-21 00:01:24 +08:00
|
|
|
//修改用户头像
|
|
|
|
export const updateAvatar = filePath =>
|
|
|
|
http.upload('/app-api/member/user/update-avatar', {
|
|
|
|
name: 'avatarFile',
|
|
|
|
fileType: 'image',
|
|
|
|
filePath: filePath
|
|
|
|
})
|
2022-04-21 01:47:01 +08:00
|
|
|
//修改用户昵称
|
|
|
|
export const updateNickname = params =>
|
|
|
|
http.put('/app-api/member/user/update-nickname', {}, {
|
|
|
|
params
|
|
|
|
})
|
2022-04-20 03:08:59 +08:00
|
|
|
|
2022-04-10 01:21:21 +08:00
|
|
|
/* index */
|
|
|
|
// 获取滚动图数据
|
2022-04-10 20:31:45 +08:00
|
|
|
export const getBannerData = params => http.get('/app-api/index', params)
|
2022-04-10 01:21:21 +08:00
|
|
|
// 获取滚动通知数据
|
2022-04-10 20:31:45 +08:00
|
|
|
export const getNoticeData = params => http.get('/app-api/notice', params)
|