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
| /**
| * 企业信息相关数据接口
| */
|
| import { get, post } from '../baseRequset';
| import { getEnterpriseList, getEnterpriseCount } from '../../model/enterprise';
|
| const app = getApp();
|
| //查找企业
| function fetchEnterprise({
| page = 1,
| per_page = 30,
| data = { sceneTypes: [], townCodes: [], districtName: null, searchText: '' },
| }) {
| return post({
| url: `/userInfo/searchUser/${app.globalData.accessToken.userId}`,
| params: {
| page: page,
| per_page: per_page,
| },
| data: data,
| }).then(res => {
| res.data = getEnterpriseList(res.data);
| return res;
| });
| }
|
| // 获取企业数量统计
| function fetchEnterpriseCount({ data }) {
| return post({
| url: `/userInfo/count`,
| params: {
| userId: app.globalData.accessToken.userId,
| },
| data: data,
| }).then(res => {
| res.data.data = getEnterpriseCount(res.data.data);
| return res.data;
| });
| }
|
| export { fetchEnterprise, fetchEnterpriseCount };
|
|