import http from '@/utils/request' /** 注册 */ export const userRegister = data => { return http({ url: '/api/register', method: 'post', data }) } /** 登录 */ export const userLogin = data => { return http({ url: '/api/login', method: 'post', data }) } /** 退出登录 */ export const userLogout = () => { return http({ url: '/api/mobile/out', method: 'get' }) } /** 获取用户信息 */ export const getUserData = () => { return http({ url: '/api/userInfo', method: 'get' }) } /** 修改用户信息 */ export const updateUserData = data => { return http({ url: '/api/user/edit', method: 'put', data }) } /** 获取用户地址列表 */ export const getUserAddress = (data, loading = true) => { return http({ url: '/api/service/userAddress/list', method: 'get', loading, data }) } /** 获取用户地址详情 */ export const getUserAddressDetail = id => { return http({ url: `/api/service/userAddress/${id}`, method: 'get' }) } /** 添加地址 */ export const addUserAddress = data => { return http({ url: '/api/service/userAddress', method: 'post', data }) } /** 修改地址 */ export const updateUserAddress = data => { return http({ url: '/api/service/userAddress', method: 'put', data }) } /** 删除地址 */ export const deleteUserAddress = id => { return http({ url: `/api/service/userAddress/${id}`, method: 'delete' }) } /** 获取全国省市区县辖区街道 */ export const getRegion = data => { return http({ url: '/api/third/area/list', method: 'get', data }) } /** 用户积分排行榜 */ export const getUserIntegralRank = data => { return http({ url: '/api/system/userPoints/list', method: 'get', data }) } /** 签到列表 */ export const getSignList = data => { return http({ url: '/api/system/signRecord/list', method: 'get', data }) } /** 签到 */ export const signIn = () => { return http({ url: '/api/system/signRecord', method: 'post' }) } /** 根据id获取文章详细信息 */ export const getArticleDetail = id => { return http({ url: `/api/service/articleContent/type/${id}`, method: 'get' }) } /** 获取腾讯usersig */ export const getTencentUserSig = () => { return http({ url: '/api/user/usersig', method: 'get' }) } /** 根据ip判断是否黑名单 */ export const getIpBlack = (loading = true) => { return http({ url: '/api/free/black/isBlack', method: 'get', loading }) } /** 获取随机群号 */ export const getRandomGroup = () => { return http({ url: '/api/service/customerStaff/generateGroupId', method: 'get' }) } /** 获取融云的登录信息 */ export const getRongYunLoginInfo = () => { return http({ url: '/api/user/usersig/ry', method: 'get' }) } /** 获取直播间禁言列表 */ export const getUserBanList = roomId => { return http({ url: `/api/service/imLiveRoom/biddenMembers/${roomId} `, method: 'get' }) } /** 获取直播间管理员列表 */ export const getUserAdminList = roomId => { return http({ url: `/api/service/imLiveRoom/administrators/${roomId}`, method: 'get' }) } /** 禁言直播间成员 */ export const banUser = data => { const { roomId, memberAccount, MuteTime } = data return http({ url: `/api/service/imLiveRoom/forbidMember/${roomId}/${memberAccount}/${MuteTime}`, method: 'post' }) } /** 群禁言列表 */ export const getGroupBanList = id => { return http({ url: `/api/service/imGroup/muted/account/${id}`, method: 'get' }) } /** 获取应用版本信息 */ export const getAppVersion = () => { return uni.request({ url: 'https://s3.yxdim.com/app-version.json', method: 'get' }) }