riku
2023-10-31 2d3d56ff801b73afdb779267004d740f9beafe57
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 { $clue } from '../index';
 
export default {
  /**
   * 查询线索清单
   * @param {object} param0
   * @returns
   */
  getClue({ sTime, eTime, pageNum = 1, pageSize = 30 }) {
    let url = 'clue/fetch?';
    if (sTime) {
      url += `sTime=${sTime}&`;
    }
    if (eTime) {
      url += `eTime=${eTime}&`;
    }
    return $clue.get(
      `${url}pageNum=${pageNum}&pageSize=${pageSize}`
    );
  },
 
  /**
   * 从第三方远程拉取线索清单
   * @param {string} updateTime 更新时间,获取该时间之后的线索
   * @returns
   */
  fetchRemoteClue(updateTime) {
    return $clue.get(`clue/fetch/remote?updateTime=${updateTime}`);
  },
 
  fetchRemoteClueFileUrl(clueId) {
    return `${$clue.defaults.baseURL}clue/fetch/remote/file?clueId=${clueId}`;
  },
 
  /**
   * 推送线索的结论与问题
   * @param {string} clueId 
   * @returns 
   */
  pushClue(clueId) {
    return $clue.post(`clue/push?clueId=${clueId}`);
  }
};