user.js 480 B

1234567891011121314
  1. //请求工具参考https://ext.dcloud.net.cn/plugin?id=392
  2. const { http } = uni.$u
  3. //获取用户信息
  4. export const getUserInfo = params => http.get('/member/user/get', params)
  5. //修改用户头像
  6. export const updateAvatar = filePath =>
  7. http.upload('/member/user/update-avatar', {
  8. name: 'avatarFile',
  9. fileType: 'image',
  10. filePath: filePath
  11. })
  12. //修改用户昵称
  13. export const updateNickname = params => http.put('/member/user/update-nickname', {}, { params })