| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- // @ts-ignore
- import request from '@/libs/request';
- import {UpdateInformationRequest,SendPhoneCodeRequest,CheckPhoneCodeRequest,PartnerIDParam,AddFriendMessageInfo,PersonParam,HomeInfo,PersonIDList,PersonDBReply,ListPageRequest,WxConfReq,WxConfResponse,FindTagListByGroupNameAndSex,TagListReply} from "../common/common_pb";
- import {UserInfo,KeyRequest} from "./user_pb";
- import {LookMessageReply,LookAndLikeListReply,LookAndLikeMessageReply} from "../statistics/statistics_pb";
- import {CheckUserPartnerIsRelationshipReply,CreateUserPartnerIsRelationshipReply} from "../chat/chat_pb";
- const UserService = {
- /** 更新用户信息 */
- UpdateUserInformation: async (req?: UpdateInformationRequest) => {
- const res = await request.post('/api/user/update/information', req);
- return res.data.data;
- },
- /** 获取用户详情 */
- GetUserInfo: async (req?: undefined) => {
- const res = await request.post<{ data: UserInfo, code: string, message: string }>('/api/user/info', req);
- return res.data.data;
- },
- /** 获取用户访问数详情 */
- GetUserLookNum: async (req?: undefined) => {
- const res = await request.post<{ data: LookMessageReply, code: string, message: string }>('/api/user/look/num', req);
- return res.data.data;
- },
- /** 用户发送验证码 */
- SendPhoneCode: async (req?: SendPhoneCodeRequest) => {
- const res = await request.post('/api/user/code/send', req);
- return res.data.data;
- },
- /** 用户验证验证码 */
- CheckPhoneCode: async (req?: CheckPhoneCodeRequest) => {
- const res = await request.post('/api/user/code/check', req);
- return res.data.data;
- },
- /** 检查用户是否与接待员关联 */
- CheckUserPartnerIsRelationship: async (req?: PartnerIDParam) => {
- const res = await request.post<{ data: CheckUserPartnerIsRelationshipReply, code: string, message: string }>('/api/user/check/relationship', req);
- return res.data.data;
- },
- /** 创建用户与接待员的关联 */
- CreateUserPartnerIsRelationship: async (req?: PartnerIDParam) => {
- const res = await request.post<{ data: CreateUserPartnerIsRelationshipReply, code: string, message: string }>('/api/user/create/relationship', req);
- return res.data.data;
- },
- /** 获取接待员的确认通过页面信息 */
- GetPartnerCircleInfo: async (req?: KeyRequest) => {
- const res = await request.post<{ data: AddFriendMessageInfo, code: string, message: string }>('/api/user/circle/info', req);
- return res.data.data;
- },
- /** 用户获取主页信息 */
- UserGetHomeInfo: async (req?: PersonParam) => {
- const res = await request.post<{ data: HomeInfo, code: string, message: string }>('/api/user/home', req);
- return res.data.data;
- },
- /** 查看看过我的列表 */
- FindLookList: async (req?: ListPageRequest) => {
- const res = await request.post<{ data: LookAndLikeListReply, code: string, message: string }>('/api/user/list/look', req);
- return res.data.data;
- },
- /** 查看我喜欢的列表 */
- FindLikeList: async (req?: ListPageRequest) => {
- const res = await request.post<{ data: LookAndLikeListReply, code: string, message: string }>('/api/user/list/like', req);
- return res.data.data;
- },
- /** 查看喜欢我的列表 */
- FindLikedList: async (req?: ListPageRequest) => {
- const res = await request.post<{ data: LookAndLikeListReply, code: string, message: string }>('/api/user/list/liked', req);
- return res.data.data;
- },
- /** 获取用户的访客数以及关注数 */
- GetLookAndLikeStatisticsMessage: async (req?: PersonParam) => {
- const res = await request.post<{ data: LookAndLikeMessageReply, code: string, message: string }>('/api/user/num/like_look', req);
- return res.data.data;
- },
- /** 微信SDK初始化 */
- WxConf: async (req?: WxConfReq) => {
- const res = await request.post<{ data: WxConfResponse, code: string, message: string }>('/api/wx/jssdk/config', req);
- return res.data.data;
- },
- /** 获取标签列表 */
- FindTagListByGroupNameAndSex: async (req?: FindTagListByGroupNameAndSex) => {
- const res = await request.post<{ data: TagListReply, code: string, message: string }>('/api/user/list/tag', req);
- return res.data.data;
- },
- };
- export default UserService;
|