Files
Friendship-and-chat-uniapp/src/sheep/api/member/recent.ts
T
2025-12-11 11:49:57 +08:00

511 lines
11 KiB
TypeScript

// @ts-ignore
import request from '@/sheep/request';
const RecentApi = {
// 更新用户位置
updateUserLocation: (data: any) => {
return request({
url: '/member/location/create',
method: 'POST',
data,
custom: {
showLoading: false,
},
});
},
// 获取首页顶部导航栏的tab菜单
getSquareTabMenu: () => {
return request({
url: '/view/get-square-classify',
method: 'GET',
custom: {
showLoading: false,
},
});
},
// 获取动态页顶部导航栏的tab菜单
getDynamicTabMenu: () => {
return request({
url: '/view/get-dynamic-classify',
method: 'GET',
custom: {
showLoading: false,
},
});
},
// 查询附近/广场
quickPage: (data: any) => {
return request({
url: '/member/recent/quick-page',
method: 'POST',
data,
custom: {
showLoading: true,
},
});
},
// 创建朋友圈
createMoment: (data: any) => {
return request({
url: '/member/recent/create',
method: 'POST',
data,
custom: {
showLoading: true,
showSuccess: true,
loadingMsg: '提交中',
successMsg: '提交成功',
},
});
},
// 获取用户详情页
getRecentDetail: (params: { id: string | number }) => {
return request({
url: '/member/recent/getById',
method: 'GET',
params,
custom: {
showLoading: true,
loadingMsg: '加载中',
},
});
},
// 查看我喜欢
likeIt: (data: any) => {
return request({
url: '/member/recent/like/it-page',
method: 'POST',
data,
custom: {
showLoading: true,
loadingMsg: '加载中',
},
});
},
// 查看喜欢我
likeMe: (data: any) => {
return request({
url: '/member/recent/like/me-page',
method: 'POST',
data,
custom: {
showLoading: true,
loadingMsg: '加载中',
},
});
},
// 我喜欢、喜欢我 总数统计
recentTotal: () => {
return request({
url: '/member/recent/total',
method: 'GET',
custom: {
showLoading: false,
},
});
},
// 查看我的动态
myMomentList: (data: any) => {
return request({
url: '/member/recent/dynamic-page',
method: 'POST',
data,
custom: {
showLoading: true,
loadingMsg: '加载中',
},
});
},
// 动态页面的轮播图
getBannerList: (params?: any) => {
return request({
url: '/promotion/banner/list',
method: 'GET',
params: { position: '6' }, // 轮播图位置写死6代表动态页面的轮播图
custom: {
showLoading: true,
loadingMsg: '加载中',
},
});
},
// 查看我的评价
myEvaluate: () => {
return request({
url: '/member/recent/evaluate-detail',
method: 'POST',
custom: {
showLoading: true,
loadingMsg: '加载中',
},
});
},
// 用户朋友圈操作
recentOperate: (data: any) => {
return request({
url: '/member/recent/operate',
method: 'POST',
data,
custom: {
showLoading: true,
loadingMsg: '操作中',
},
});
},
// 获取用户相册
getUserAlbum: (params: any) => {
return request({
url: '/member/photo/page',
method: 'GET',
params,
custom: {
showLoading: true,
loadingMsg: '加载中',
},
});
},
// 保存用户相册单个照片资源
saveUserAlbum: (data: any) => {
return request({
url: '/member/photo/upload',
method: 'POST',
data,
custom: {
showLoading: true,
loadingMsg: '保存中',
},
});
},
// 删除用户相册单个照片
deleteUserAlbum: (id: any) => {
return request({
url: '/member/photo/delete',
method: 'DELETE',
params: { id },
custom: {
showLoading: true,
loadingMsg: '删除中',
},
});
},
// 获取开通的会员类型列表
getMemberOpenTypeList: () => {
return request({
url: '/member/open-type/list',
method: 'GET',
custom: {
showLoading: true,
loadingMsg: '加载中',
},
});
},
// 开通会员
memberOpenTypePay: (data: any) => {
return request({
url: '/member/open-type/pay',
method: 'POST',
data,
custom: {
showLoading: true,
loadingMsg: '加载中',
},
});
},
// 提交反馈
feedback: (data: any) => {
return request({
url: '/member/feedback/create',
method: 'POST',
data,
custom: {
showLoading: true,
loadingMsg: '提交中',
},
});
},
// 添加用户详情页面的查看和访问记录
createViewRecord: (data: {
bizType: 'CLASSIFY' | 'RECENT' | 'USER';
viewStartTime: string;
viewEndTime: string;
}) => {
return request({
url: '/member/recent/create/view-record',
method: 'POST',
data,
custom: {
showLoading: false,
},
});
},
// 查询我看过的
getSeenIt: (data: any) => {
return request({
url: '/member/recent/look/it-page',
method: 'POST',
data,
custom: {
showLoading: true,
loadingMsg: '加载中',
},
});
},
// 查询看过我的
getSeenMe: (data: any) => {
return request({
url: '/member/recent/look/me-page',
method: 'POST',
data,
custom: {
showLoading: true,
loadingMsg: '加载中',
},
});
},
// 获得用户协议或隐私政策文章
getPromotionArticle: (params: any) => {
return request({
url: '/promotion/article/get',
method: 'GET',
params,
custom: {
showLoading: true,
loadingMsg: '加载中',
},
});
},
// 获得用户协议或隐私政策文章
chatAddFriend: (params: { friendUserId: string }) => {
return request({
url: '/chat/add-friend',
method: 'GET',
params,
custom: {
showLoading: true,
loadingMsg: '加载中',
},
});
},
// 获得钱包余额
getWallet: () => {
return request({
url: '/pay/wallet/get',
method: 'GET',
custom: {
showLoading: true,
loadingMsg: '加载中',
},
});
},
// 获得宝石购买套餐列表
getWalletRechargePackage: () => {
return request({
url: '/pay/wallet-recharge-package/list',
method: 'GET',
custom: {
showLoading: true,
loadingMsg: '加载中',
},
});
},
// 购买宝石套餐
walletRecharge: (data: { packageId: string | number }) => {
return request({
url: '/pay/wallet-recharge/create',
method: 'POST',
data,
custom: {
showLoading: true,
loadingMsg: '支付中',
},
});
},
// 钱包充值记录
walletRechargeRecord: (params: any) => {
return request({
url: '/pay/wallet-recharge/page',
method: 'GET',
params,
custom: {
showLoading: true,
loadingMsg: '加载中',
},
});
},
// 查询用户设置
getSetting: () => {
return request({
url: '/member/recent-cfg/get-or-create',
method: 'GET',
custom: {
showLoading: true,
loadingMsg: '加载中',
},
});
},
// 更新用户设置
updateSetting: (data: any) => {
return request({
url: '/member/recent-cfg/create-or-update',
method: 'POST',
data,
custom: {
showLoading: true,
loadingMsg: '加载中',
},
});
},
// 获取黑名单列表
getBlackList: (params: any) => {
return request({
url: '/member/recent/black/list',
method: 'GET',
params,
custom: {
showLoading: true,
loadingMsg: '加载中',
},
});
},
// 移除黑名单
removeBlackList: (params: any) => {
return request({
url: '/member/recent/black/remove',
method: 'DELETE',
params,
custom: {
showLoading: true,
loadingMsg: '操作中',
},
});
},
// 查询举报类型
reportType: () => {
return request({
url: '/member/config/get',
method: 'GET',
custom: {
showLoading: true,
loadingMsg: '加载中',
},
});
},
// 更新微信信息
updateWeChatInfo: (data: any) => {
return request({
url: '/member/user/update-wechat',
method: 'PUT',
data,
custom: {
showLoading: true,
loadingMsg: '保存中',
},
});
},
// 解锁微信信息
unlockWeChat: (data: any) => {
return request({
url: '/member/recent/look-wechat',
method: 'GET',
data,
custom: {
showLoading: true,
loadingMsg: '加载中',
},
});
},
// 获取礼物列表
getGiftList: () => {
return request({
url: '/trade/gift/list',
method: 'GET',
custom: {
showLoading: true,
},
});
},
// 赠送礼物给某人
giveGift: (data: { targetMemberId: number; giftId: number }) => {
return request({
url: '/pay/wallet-recharge/send-gift',
method: 'POST',
data,
custom: {
showLoading: true,
loadingMsg: '赠送中',
},
});
},
// 私聊有会员次数限制
sendPrivateMsg: (data: any) => {
return request({
url: '/chat/send-private-msg',
method: 'POST',
data,
custom: {
showLoading: false,
},
});
},
// 创建男性人脸认证
createBoyFaceVerify: (data: any) => {
return request({
url: '/member/com-auth/create-man-auth',
method: 'POST',
data,
custom: {
showLoading: true,
loadingMsg: '加载中',
},
});
},
// 创建女性人脸认证
createGirlFaceVerify: (data: any) => {
return request({
url: '/member/com-auth/create-woman-auth',
method: 'POST',
data,
custom: {
showLoading: true,
loadingMsg: '加载中',
},
});
},
// 查询用户人脸认证
getFaceVerify: () => {
return request({
url: '/member/com-auth/get',
method: 'GET',
custom: {
showLoading: true,
loadingMsg: '加载中',
},
});
},
// 取消用户人脸认证
cancelFaceVerify: (params: { authId: string | number }) => {
return request({
url: '/member/com-auth/cancel',
method: 'GET',
params,
custom: {
showLoading: true,
loadingMsg: '正在取消',
},
});
},
// 创建微信认证
createWecahtAuth: (data: { wechatNumber: string; wechatQrcode: string }) => {
return request({
url: '/member/com-auth/create-wecaht-auth',
method: 'POST',
data,
custom: {
showLoading: true,
loadingMsg: '保存中',
},
});
},
};
export default RecentApi;