123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- import request from '@/sheep/request';
- const UserApi = {
- // 获得基本信息
- getUserInfo: () => {
- return request({
- url: '/member/user/get',
- method: 'GET',
- custom: {
- showLoading: false,
- auth: true,
- },
- });
- },
-
- // 修改基本信息
- updateUser: (data) => {
- return request({
- url: '/member/user/update',
- method: 'PUT',
- data,
- custom: {
- auth: true,
- showSuccess: true,
- successMsg: '更新成功'
- },
- });
- },
- updateUserAlipayAccount: (data) => {
- return request({
- url: '/member/user/updateByAlipayAccount',
- method: 'PUT',
- data,
- custom: {
- auth: true,
- showSuccess: true,
- successMsg: '更新成功'
- },
- });
- },
- updateUserBankAccount: (data) => {
- return request({
- url: '/member/user/updateByBankAccount',
- method: 'PUT',
- data,
- custom: {
- auth: true,
- showSuccess: true,
- successMsg: '更新成功'
- },
- });
- },
- // 修改用户手机
- updateUserMobile: (data) => {
- return request({
- url: '/member/user/update-mobile',
- method: 'PUT',
- data,
- custom: {
- loadingMsg: '验证中',
- showSuccess: true,
- successMsg: '修改成功'
- },
- });
- },
- // 基于微信小程序的授权码,修改用户手机
- updateUserMobileByWeixin: (code) => {
- return request({
- url: '/member/user/update-mobile-by-weixin',
- method: 'PUT',
- data: {
- code
- },
- custom: {
- showSuccess: true,
- loadingMsg: '获取中',
- successMsg: '修改成功'
- },
- });
- },
- // 修改密码
- updateUserPassword: (data) => {
- return request({
- url: '/member/user/update-password',
- method: 'PUT',
- data,
- custom: {
- loadingMsg: '验证中',
- showSuccess: true,
- successMsg: '修改成功'
- },
- });
- },
- // 重置密码
- resetUserPassword: (data) => {
- return request({
- url: '/member/user/reset-password',
- method: 'PUT',
- data,
- custom: {
- loadingMsg: '验证中',
- showSuccess: true,
- successMsg: '修改成功'
- }
- });
- },
- // 更新安卓用户的极光id
- updateAndroidJiGuangId: (registerId) => {
- return request({
- url: '/member/user/addRegisterId?registerId='+registerId,
- method: 'PUT',
-
- custom: {
- showSuccess: false,
- }
- });
- },
- };
- export default UserApi;
|