gaoluyang
2026-06-24 bfdc0e0e6d5e47aa501f9b6fadd143d9c97cf00a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import type { PageParam, PageResult } from '../../../packages/effects/request/src';
 
import { requestClient } from '#/api/request';
 
export namespace MpUserApi {
  /** 用户信息 */
  export interface User {
    id?: number;
    accountId: number;
    openid: string;
    nickname: string;
    avatar: string;
    sex: number;
    country: string;
    province: string;
    city: string;
    language: string;
    subscribe: boolean;
    subscribeTime?: Date;
    remark?: string;
    tagIds?: number[];
    createTime?: Date;
  }
}
 
/** 更新公众号粉丝 */
export function updateUser(data: MpUserApi.User) {
  return requestClient.put('/mp/user/update', data);
}
 
/** 获取公众号粉丝 */
export function getUser(id: number) {
  return requestClient.get<MpUserApi.User>('/mp/user/get', {
    params: { id },
  });
}
 
/** 获取公众号粉丝分页 */
export function getUserPage(params: PageParam) {
  return requestClient.get<PageResult<MpUserApi.User>>('/mp/user/page', {
    params,
  });
}
 
/** 同步公众号粉丝 */
export function syncUser(accountId: number) {
  return requestClient.post('/mp/user/sync', null, {
    params: { accountId },
  });
}