| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401 |
- // @ts-ignore
- import request from '@/libs/request';
- import {UserInfo,UserBalance,UserFindChatListReply,CreateScripRequest,DeleteScripRequest,UserFindScripRequest,PersonLookScripRequest,ReplyScripRequest,KeyRequest,InformationStatus,UserRechargeRequest,PayInfo,RechargeList,VipRechargeList,FindPayOrderListRequest,PayOrderList,FindMatchingAvatarAndNumReply,UserFreeNum,GetRandomMatchingRequest,SendMessageRequest,VipInfo,GetUserLookHandPickNumReply,IsCanGetReturnRewordReply,UserPrivacyStatusInfo,FindRecommendHighQualityUserRequest,FindRecommendHighQualityUserReply,GetUserDBMsgFromWebsocketReply,SendMsgReduceCreditRequest,UpdateUserMatchedNumRequest,UpdateUserMatchedNumAndReturnUserMsgReply,GetRecommendUserDBRequest,ReportUserBlackRequest,AddUserCreditRequest,UserGetInformationAwardByActivityRequest,UserGetInformationAwardByActivityReply,FindUserVipListDBReply,MatchUserDBWithoutMapRequest,UpdateTodayRequest,UpdateLastSendTemplateTimeRequest} from "./user_pb";
- import {SendPhoneCodeRequest,CheckPhoneCodeRequest,UpdateInformationRequest,CreateChatRoomParam,PersonParam,HomeInfo,LookedAndLikedNum,ListPageRequest,SexReq,TagListReply,ListPage2Request,RecommendPersonListReply,FindChatRecordListRequest,ChatRecordListReply,FindChatRoomMsgRequest,ChatRoomMsg,IsLike,MemeRequest,MemeList,FindChatTopicRequest,ChatTopicList,RandomNum,CommonTextList,RandomNumAndSex,MemeTitleList,ChatCardInfo,ReportChatRequest,FindOverSevenDayAvatarReply,UpdateLastScripIDRequest,ScripID,ScripReply,FindScripRequest,ScripInfo,ChatRecordInfo,RoomIDRequest,PartnerIDParam,AddFriendMessageInfo,SendMessageReply,HandpickPersonListReply,PersonIDParam,ScripIdRequest,PersonMsg,PersonIDList,PersonDBReply,UpdateLastScripIDDBRequest,IDParam,PersonDB,GetUserDBAndInitReq,PersonDBDetails} from "../common/common_pb";
- import {RoomReply,UnreadNumReply,UserRoomInfo,CheckUserPartnerIsRelationshipReply,WindowInfo,GetRandomMatchingReply} from "../chat/chat_pb";
- import {LookAndLikeListReply,LookAndLikeMessageReply,LookMessageReply} from "../statistics/statistics_pb";
- const UserService = {
- /** 1、获取用户详情 */
- GetUserInfo: async (req?: undefined) => {
- const res = await request.post<{ data: UserInfo, code: string, message: string }>('/api/user/info', req);
- return res.data.data;
- },
- GetUserInfo1: async (req?: undefined) => {
- const res = await request.post<{ data: UserInfo, code: string, message: string }>('/api/user/info1', req);
- return res.data.data;
- },
- /** 2、用户发送验证码 */
- SendPhoneCode: async (req?: SendPhoneCodeRequest) => {
- const res = await request.post('/api/user/code/send', req);
- return res.data.data;
- },
- /** 3、用户验证验证码 */
- CheckPhoneCode: async (req?: CheckPhoneCodeRequest) => {
- const res = await request.post('/api/user/code/check', req);
- return res.data.data;
- },
- /** 4、更新用户信息 */
- UpdateUserInformation: async (req?: UpdateInformationRequest) => {
- const res = await request.post('/api/user/update/information', req);
- return res.data.data;
- },
- /** 5、创建用户与某人的关联 */
- CreateUserPersonRoom: async (req?: CreateChatRoomParam) => {
- const res = await request.post<{ data: RoomReply, code: string, message: string }>('/api/user/create/room', req);
- return res.data.data;
- },
- /** 6、获取用户的金额信息 */
- GetUserBalance: async (req?: undefined) => {
- const res = await request.post<{ data: UserBalance, code: string, message: string }>('/api/user/balance', req);
- return res.data.data;
- },
- /** 7、用户获取ta的主页信息 */
- UserGetHomeInfo: async (req?: PersonParam) => {
- const res = await request.post<{ data: HomeInfo, code: string, message: string }>('/api/user/home', req);
- return res.data.data;
- },
- /** 8、用户获取ta的主页访客、关注数 */
- UserGetPersonLikedAndLooked: async (req?: PersonParam) => {
- const res = await request.post<{ data: LookedAndLikedNum, code: string, message: string }>('/api/user/num', req);
- return res.data.data;
- },
- /** 9、查看看过我的列表 */
- FindLookList: async (req?: ListPageRequest) => {
- const res = await request.post<{ data: LookAndLikeListReply, code: string, message: string }>('/api/user/list/look', req);
- return res.data.data;
- },
- /** 11、获取标签列表 */
- FindTagListBySex: async (req?: SexReq) => {
- const res = await request.post<{ data: TagListReply, code: string, message: string }>('/api/user/list/tag', req);
- return res.data.data;
- },
- /** 12、获取在线列表 */
- FindOnlineList: async (req?: ListPage2Request) => {
- const res = await request.post<{ data: RecommendPersonListReply, code: string, message: string }>('/api/user/list/online', req);
- return res.data.data;
- },
- /** 13、七天内列表(当前会话) */
- FindWithinSevenDayRoomList: async (req?: ListPageRequest) => {
- const res = await request.post<{ data: UserFindChatListReply, code: string, message: string }>('/api/user/list/chat/within', req);
- return res.data.data;
- },
- /** 14、七天外列表(更早的聊天记录) */
- FindOverSevenDayRoomList: async (req?: ListPageRequest) => {
- const res = await request.post<{ data: UserFindChatListReply, code: string, message: string }>('/api/user/list/chat/over', req);
- return res.data.data;
- },
- /** 15、密友列表 */
- FindCloseFriendRoomList: async (req?: ListPageRequest) => {
- const res = await request.post<{ data: UserFindChatListReply, code: string, message: string }>('/api/user/list/chat/friend', req);
- return res.data.data;
- },
- /** 16、用户查询聊天记录 */
- FindChatRecordList: async (req?: FindChatRecordListRequest) => {
- const res = await request.post<{ data: ChatRecordListReply, code: string, message: string }>('/api/user/chat/record', req);
- return res.data.data;
- },
- /** 17、用户查询房间信息 */
- FindChatRoomMsg: async (req?: FindChatRoomMsgRequest) => {
- const res = await request.post<{ data: ChatRoomMsg, code: string, message: string }>('/api/user/chat/room/msg', req);
- return res.data.data;
- },
- /** 18、用户查询是否关注某人 */
- GetUserIsLike: async (req?: PersonParam) => {
- const res = await request.post<{ data: IsLike, code: string, message: string }>('/api/user/islike', req);
- return res.data.data;
- },
- /** 19、通过类型获取表情包列表 */
- FindMemeByType: async (req?: MemeRequest) => {
- const res = await request.post<{ data: MemeList, code: string, message: string }>('/api/user/find/meme/type', req);
- return res.data.data;
- },
- /** 20、获取对方性别的聊天话题 */
- FindChatTopic: async (req?: FindChatTopicRequest) => {
- const res = await request.post<{ data: ChatTopicList, code: string, message: string }>('/api/user/find/topic', req);
- return res.data.data;
- },
- /** 21、随机表情包 */
- RandomMeme: async (req?: RandomNum) => {
- const res = await request.post<{ data: CommonTextList, code: string, message: string }>('/api/user/find/meme/random', req);
- return res.data.data;
- },
- /** 22、随机打招呼 */
- RandomSwiftMessage: async (req?: RandomNumAndSex) => {
- const res = await request.post<{ data: CommonTextList, code: string, message: string }>('/api/user/find/topic/random', req);
- return res.data.data;
- },
- /** 23、表情包分类名 */
- FindMemeTitle: async (req?: undefined) => {
- const res = await request.post<{ data: MemeTitleList, code: string, message: string }>('/api/user/find/meme/title', req);
- return res.data.data;
- },
- /** 24、用户获取聊天对象的资料卡片 */
- UserGetChatCard: async (req?: PersonParam) => {
- const res = await request.post<{ data: ChatCardInfo, code: string, message: string }>('/api/user/chat/card', req);
- return res.data.data;
- },
- /** 25、聊天话题分类名 */
- FindChatTopicTitle: async (req?: undefined) => {
- const res = await request.post<{ data: MemeTitleList, code: string, message: string }>('/api/user/find/chat/title', req);
- return res.data.data;
- },
- /** 26、用户关注某人 */
- UserLike: async (req?: PersonParam) => {
- const res = await request.post('/api/user/like', req);
- return res.data.data;
- },
- /** 27、用户取关某人 */
- UserUnLike: async (req?: PersonParam) => {
- const res = await request.post('/api/user/unlike', req);
- return res.data.data;
- },
- /** 28、举报某人 */
- Report: async (req?: ReportChatRequest) => {
- const res = await request.post('/api/user/report', req);
- return res.data.data;
- },
- /** 29、超过七天的头像列表 */
- FindOverSevenDayAvatar: async (req?: undefined) => {
- const res = await request.post<{ data: FindOverSevenDayAvatarReply, code: string, message: string }>('/api/user/over/avatar/list', req);
- return res.data.data;
- },
- /** 30、更新上次访问的小纸条 */
- UpdateLastScripID: async (req?: UpdateLastScripIDRequest) => {
- const res = await request.post('/api/user/scrip/last/update', req);
- return res.data.data;
- },
- /** 31、创建纸条 */
- CreateScrip: async (req?: CreateScripRequest) => {
- const res = await request.post<{ data: ScripID, code: string, message: string }>('/api/user/scrip/create', req);
- return res.data.data;
- },
- /** 32、删除纸条 */
- DeleteScrip: async (req?: DeleteScripRequest) => {
- const res = await request.post('/api/user/scrip/delete', req);
- return res.data.data;
- },
- /** 33、查询自己的小纸条 */
- FindMyScrip: async (req?: UserFindScripRequest) => {
- const res = await request.post<{ data: ScripReply, code: string, message: string }>('/api/user/scrip/find/self', req);
- return res.data.data;
- },
- /** 34、查询别人的小纸条 */
- FindOtherScrip: async (req?: FindScripRequest) => {
- const res = await request.post<{ data: ScripReply, code: string, message: string }>('/api/user/scrip/find/other', req);
- return res.data.data;
- },
- /** 35、查询随机纸条列表 */
- FindRecommendScrip: async (req?: UserFindScripRequest) => {
- const res = await request.post<{ data: ScripReply, code: string, message: string }>('/api/user/scrip/find/recommend', req);
- return res.data.data;
- },
- /** 36、用户查看纸条 */
- PersonLookScrip: async (req?: PersonLookScripRequest) => {
- const res = await request.post('/api/user/scrip/look', req);
- return res.data.data;
- },
- /** 37、用户点击回看 */
- PersonClickLookBack: async (req?: undefined) => {
- const res = await request.post<{ data: ScripInfo, code: string, message: string }>('/api/user/scrip/look/back', req);
- return res.data.data;
- },
- /** 38、用户回复小纸条 */
- PersonReplyScrip: async (req?: ReplyScripRequest) => {
- const res = await request.post<{ data: ChatRecordInfo, code: string, message: string }>('/api/user/scrip/reply', req);
- return res.data.data;
- },
- /** 39、用户删除房间 */
- UserDeleteChat: async (req?: RoomIDRequest) => {
- const res = await request.post('/api/user/chat/delete', req);
- return res.data.data;
- },
- /** 40、获取用户的总未读数 */
- GetUserAllUnreadNum: async (req?: undefined) => {
- const res = await request.post<{ data: UnreadNumReply, code: string, message: string }>('/api/user/chat/unread/num', req);
- return res.data.data;
- },
- /** 41、用户查询与某人的房间 */
- GetUserRoomByPerson: async (req?: PersonParam) => {
- const res = await request.post<{ data: UserRoomInfo, code: string, message: string }>('/api/user/room/info', req);
- return res.data.data;
- },
- /** 42、查看我喜欢的列表 */
- FindLikeList: async (req?: ListPageRequest) => {
- const res = await request.post<{ data: LookAndLikeListReply, code: string, message: string }>('/api/user/list/like', req);
- return res.data.data;
- },
- /** 43、查看喜欢我的列表 */
- FindLikedList: async (req?: ListPageRequest) => {
- const res = await request.post<{ data: LookAndLikeListReply, code: string, message: string }>('/api/user/list/liked', req);
- return res.data.data;
- },
- /** 44、用户拉黑某人 */
- UserSetBlackChat: async (req?: RoomIDRequest) => {
- const res = await request.post('/api/user/set/black', req);
- return res.data.data;
- },
- /** 45、检查用户是否与接待员关联 */
- CheckUserPartnerIsRelationship: async (req?: PartnerIDParam) => {
- const res = await request.post<{ data: CheckUserPartnerIsRelationshipReply, code: string, message: string }>('/api/user/check/relationship', req);
- return res.data.data;
- },
- /** 46、获取接待员的确认通过页面信息 */
- GetPartnerCircleInfo: async (req?: KeyRequest) => {
- const res = await request.post<{ data: AddFriendMessageInfo, code: string, message: string }>('/api/user/circle/info', req);
- return res.data.data;
- },
- /** 47、获取用户的访客数以及关注数 */
- GetLookAndLikeStatisticsMessage: async (req?: undefined) => {
- const res = await request.post<{ data: LookAndLikeMessageReply, code: string, message: string }>('/api/user/num/like_look', req);
- return res.data.data;
- },
- /** 48、获取用户访问数详情 */
- GetUserLookNum: async (req?: undefined) => {
- const res = await request.post<{ data: LookMessageReply, code: string, message: string }>('/api/user/look/num', req);
- return res.data.data;
- },
- /** 49、用户完善资料 */
- UserFinishInformation: async (req?: undefined) => {
- const res = await request.post('/api/user/information/finish', req);
- return res.data.data;
- },
- /** 50、用户完善情况 */
- UserInformationStatus: async (req?: undefined) => {
- const res = await request.post<{ data: InformationStatus, code: string, message: string }>('/api/user/information/status', req);
- return res.data.data;
- },
- /** 51、用户获取完善资料奖励 */
- UserGetInformationAward: async (req?: undefined) => {
- const res = await request.post('/api/user/information/award', req);
- return res.data.data;
- },
- /** 52、解锁"看过我的"的记录 */
- UnlockLookRecord: async (req?: PersonParam) => {
- const res = await request.post('/api/user/look/unlock', req);
- return res.data.data;
- },
- /** 53、用户充值 */
- UserRecharge: async (req?: UserRechargeRequest) => {
- const res = await request.post<{ data: PayInfo, code: string, message: string }>('/api/user/recharge', req);
- return res.data.data;
- },
- /** 54、用户充值vip */
- UserRechargeVip: async (req?: UserRechargeRequest) => {
- const res = await request.post<{ data: PayInfo, code: string, message: string }>('/api/user/recharge/vip', req);
- return res.data.data;
- },
- /** 55、充值套餐列表 */
- FindRechargeList: async (req?: undefined) => {
- const res = await request.post<{ data: RechargeList, code: string, message: string }>('/api/user/recharge/list', req);
- return res.data.data;
- },
- /** 56、充值Vip套餐列表 */
- FindVipRechargeList: async (req?: undefined) => {
- const res = await request.post<{ data: VipRechargeList, code: string, message: string }>('/api/user/recharge/vip/list', req);
- return res.data.data;
- },
- /** 57、用户充值记录列表 */
- FindPayList: async (req?: FindPayOrderListRequest) => {
- const res = await request.post<{ data: PayOrderList, code: string, message: string }>('/api/user/pay/list', req);
- return res.data.data;
- },
- /** 58、查询推荐人的列表 */
- FindRecommendPersonList: async (req?: undefined) => {
- const res = await request.post<{ data: RecommendPersonListReply, code: string, message: string }>('/api/user/list/recommend', req);
- return res.data.data;
- },
- /** 59、获取匹配的头像数组以及数量 */
- FindMatchingAvatarAndNum: async (req?: undefined) => {
- const res = await request.post<{ data: FindMatchingAvatarAndNumReply, code: string, message: string }>('/api/user/matching/message', req);
- return res.data.data;
- },
- /** 60、获取假弹窗 */
- GetWindowInfo: async (req?: undefined) => {
- const res = await request.post<{ data: WindowInfo, code: string, message: string }>('/api/user/chat/window/get', req);
- return res.data.data;
- },
- /** 61、用户的每日免费数 */
- GetUserFreeNum: async (req?: undefined) => {
- const res = await request.post<{ data: UserFreeNum, code: string, message: string }>('/api/user/free/num', req);
- return res.data.data;
- },
- /** 62、随机速配 */
- GetRandomMatching: async (req?: GetRandomMatchingRequest) => {
- const res = await request.post<{ data: GetRandomMatchingReply, code: string, message: string }>('/api/user/random/matching', req);
- return res.data.data;
- },
- /** 63、解锁语音扣费 */
- UnlockVoice: async (req?: RoomIDRequest) => {
- const res = await request.post('/api/user/unlock/voice', req);
- return res.data.data;
- },
- /** 64、解锁图片扣费 */
- UnlockPicture: async (req?: RoomIDRequest) => {
- const res = await request.post('/api/user/unlock/picture', req);
- return res.data.data;
- },
- /** 65、更新用户注册状态 */
- UpdateUserIsRegister: async (req?: undefined) => {
- const res = await request.post('/api/user/update/register', req);
- return res.data.data;
- },
- /** 66、创建用户与接待员的关联 */
- CreateUserPartnerRoom: async (req?: CreateChatRoomParam) => {
- const res = await request.post<{ data: RoomReply, code: string, message: string }>('/api/user/create/room/partner', req);
- return res.data.data;
- },
- /** 67、用户发送消息 */
- SendMessage: async (req?: SendMessageRequest) => {
- const res = await request.post<{ data: SendMessageReply, code: string, message: string }>('/api/user/message/send', req);
- return res.data.data;
- },
- /** 68、获取用户vip信息 */
- GetVipInfo: async (req?: undefined) => {
- const res = await request.post<{ data: VipInfo, code: string, message: string }>('/api/vip/info', req);
- return res.data.data;
- },
- /** 69、精选列表 */
- FindHandpickUser: async (req?: undefined) => {
- const res = await request.post<{ data: HandpickPersonListReply, code: string, message: string }>('/api/handpick/list', req);
- return res.data.data;
- },
- /** 70、查询用户查看精选表的次数 */
- GetUserLookHandPickNum: async (req?: undefined) => {
- const res = await request.post<{ data: GetUserLookHandPickNumReply, code: string, message: string }>('/api/user/look/handpick/num', req);
- return res.data.data;
- },
- /** 71、设置用户查看精选表的次数 */
- SetUserLookHandPickNum: async (req?: PersonIDParam) => {
- const res = await request.post('/api/user/look/handpick/num/set', req);
- return res.data.data;
- },
- /** 72、获取用户是能否领取回归奖励 */
- IsCanGetReturnReword: async (req?: undefined) => {
- const res = await request.post<{ data: IsCanGetReturnRewordReply, code: string, message: string }>('/api/user/return/reword/status', req);
- return res.data.data;
- },
- /** 73、用户领取回归奖励 */
- UserGetReturnReword: async (req?: undefined) => {
- const res = await request.post('/api/user/return/reword/get', req);
- return res.data.data;
- },
- /** 74、用户隐私状态 */
- UserPrivacyStatus: async (req?: undefined) => {
- const res = await request.post<{ data: UserPrivacyStatusInfo, code: string, message: string }>('/api/user/privacy/status', req);
- return res.data.data;
- },
- /** 75、用户设置隐私状态 */
- UserSetPrivacyStatus: async (req?: UserPrivacyStatusInfo) => {
- const res = await request.post('/api/user/privacy/set', req);
- return res.data.data;
- },
- /** 用户点赞小纸条 */
- PersonStarScrip: async (req?: ScripIdRequest) => {
- const res = await request.post<{ data: ChatRecordInfo, code: string, message: string }>('/api/user/scrip/star', req);
- return res.data.data;
- },
- /** 用户更新手机号 */
- UpdateUserPhone: async (req?: CheckPhoneCodeRequest) => {
- const res = await request.post('/api/user/update/phone', req);
- return res.data.data;
- },
- /** 清除用户的未读数 */
- CleanUserUnReadNum: async (req?: undefined) => {
- const res = await request.post('/api/user/chat/clean/unread', req);
- return res.data.data;
- },
- };
- export default UserService;
|