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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
| // pages/DetailPerson/index.js
| const $$ = require('../../utils/util');
|
| // 详情接口
| function getByIdApi(param) {
| return $$.request({
| url: 'casePerson/getById',
| type: 'get',
| submitData: param || {},
| service: 'mediate'
| })
| }
|
| function getByIdAgentApi(param) {
| return $$.request({
| url: 'caseAgent/getById',
| type: 'get',
| submitData: param || {},
| service: 'mediate'
| })
| }
| Page({
|
| /**
| * 页面的初始数据
| */
| data: {
| data: {}
| },
|
|
| //获取申请人详情
| async getById(id) {
| $$.showLoading();
| const res = await getByIdApi({
| id
| });
| $$.hideLoading();
| if (res.type) {
| let data = res.data || {};
| this.setData({
| data
| });
| }
| },
|
|
| //获取被申请人详情
| async getagenById(id) {
| $$.showLoading();
| const res = await getByIdAgentApi({
| id
| });
| $$.hideLoading();
| if (res.type) {
| let data = res.data || {};
| this.setData({
| data
| });
| }
| },
|
| /**
| * 生命周期函数--监听页面加载
| */
| onLoad(options) {
| let id = options.id;
| let perType = options.perType;
| // 15_020008-1申请方 24_00006-1 申请方代理人 15_020008-2被申请方 24_00006-2 被申请方代理人
| if (perType === '15_020008-1' || perType === '15_020008-2') {
| this.getById(id)
| }
| if (perType === '24_00006-1' || perType === '24_00006-2') {
| this.getagenById(id)
| }
| },
|
|
| })
|
|