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
| /**
| * 守法承诺相关数据接口
| */
|
| import { get, post } from '../baseRequset';
| import { getPromiseList, getPromiseStat } from '../../model/promise';
|
| function _fetchCommitment({ userId, page = 1, per_page = 30 }) {
| return get({
| url: `/commitment/letter/`,
| params: {
| userId: userId,
| page: page,
| per_page: per_page,
| },
| });
| }
|
| //获取用户承诺书历史记录
| function fetchCommitmentList({ userId, page, per_page }) {
| return _fetchCommitment({ userId, page, per_page }).then(res => {
| res.data = getPromiseList(res.data);
| return res;
| });
| }
|
| // 获取用户最新一期承诺情况
| function fetchCommitmentStat({ userId, page = 1, per_page = 1 }) {
| return _fetchCommitment({ userId, page, per_page }).then(res => {
| res.data = getPromiseStat(res.data);
| return res;
| });
| }
|
| export { fetchCommitmentList, fetchCommitmentStat };
|
|