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
| // pages/urgingList/index.js
| const $$ = require('../../utils/util');
|
| function listByCaseIdApi(param) {
| return $$.request({
| url: 'caseUrging/listByCaseId',
| type: 'get',
| submitData: param || {},
| service: 'mediate',
| });
| }
|
| Page({
|
| /**
| * 页面的初始数据
| */
| data: {
| data: [],
| },
|
| // 获取回复列表
| async listByCaseId(caseId) {
| $$.showLoading();
| const res = await listByCaseIdApi({
| caseId
| });
| $$.hideLoading();
| if (res.type) {
| this.setData({
| data: res.data || [],
| });
| }
| },
|
| /**
| * 生命周期函数--监听页面加载
| */
| onLoad(options) {
| this.listByCaseId(options.caseId);
| },
|
|
| })
|
|