|
@@ -5,6 +5,7 @@ import RatioItem from '@/components/RatioItem';
|
5
|
5
|
import withBasic from '@/layouts/withBasic'
|
6
|
6
|
import PageLoading from '@/components/PageLoading'
|
7
|
7
|
import { getDogCardInfo } from '@/services/dogAPI';
|
|
8
|
+import NoData from '../../components/NoData';
|
8
|
9
|
|
9
|
10
|
import './style.less'
|
10
|
11
|
|
|
@@ -14,9 +15,11 @@ const CardDetailPage = (props) => {
|
14
|
15
|
const [applicationInfoDate, setApplicationInfoDate] = useState()
|
15
|
16
|
useEffect(() => {
|
16
|
17
|
if (cardNo) {
|
17
|
|
- getDogCardInfo(cardNo).then((e) => {
|
|
18
|
+ getDogCardInfo(cardNo, true).then((e) => {
|
18
|
19
|
setApplicationInfoDate(e)
|
19
|
20
|
|
|
21
|
+ }).catch(() => {
|
|
22
|
+
|
20
|
23
|
})
|
21
|
24
|
} else {
|
22
|
25
|
Taro.showToast({
|
|
@@ -35,91 +38,97 @@ const CardDetailPage = (props) => {
|
35
|
38
|
}
|
36
|
39
|
|
37
|
40
|
return (
|
|
41
|
+
|
38
|
42
|
<>
|
39
|
|
- <View className='dogCardDetail'>
|
40
|
|
- <View className='card'>
|
41
|
|
- <View className='title'>电 子 版 犬 证</View>
|
42
|
|
- <View className='body'>
|
43
|
|
- <View className='cardLeft'>
|
|
43
|
+ {
|
|
44
|
+ !applicationInfoDate ? <NoData title='暂无此狗狗证件详情哦~' />
|
|
45
|
+ :
|
|
46
|
+ <View className='dogCardDetail'>
|
|
47
|
+ <View className='card'>
|
|
48
|
+ <View className='title'>电 子 版 犬 证</View>
|
|
49
|
+ <View className='body'>
|
|
50
|
+ <View className='cardLeft'>
|
|
51
|
+ {
|
|
52
|
+ !applicationInfoDate?.isOrg ? <></> :
|
|
53
|
+ <View className='cell'>
|
|
54
|
+ <View className='lable'>是否企业</View>:
|
|
55
|
+ <View className='content'>{applicationInfoDate?.orgName}</View>
|
|
56
|
+ </View>
|
|
57
|
+ }
|
|
58
|
+
|
|
59
|
+ <View className='cell'>
|
|
60
|
+ <View className='lable'>犬主</View>:
|
|
61
|
+ <View className='content'>{applicationInfoDate?.personName}</View>
|
|
62
|
+ </View>
|
|
63
|
+ <View className='cell'>
|
|
64
|
+ <View className='lable'>电话</View>:
|
|
65
|
+ <View className='content'>{applicationInfoDate?.phone}</View>
|
|
66
|
+ </View>
|
|
67
|
+ <View className='cell'>
|
|
68
|
+ <View className='lable'>犬名</View>:
|
|
69
|
+ <View className='content'>{applicationInfoDate?.petName}</View>
|
|
70
|
+ </View>
|
|
71
|
+ <View className='cell'>
|
|
72
|
+ <View className='lable'>性别</View>:
|
|
73
|
+ <View className='content'>{applicationInfoDate?.petSex == 1 ? '雄' : '雌'}</View>
|
|
74
|
+ </View>
|
|
75
|
+ </View>
|
|
76
|
+ <View className='cardRight'>
|
|
77
|
+ <RatioItem ratio='109:151'>
|
|
78
|
+ <Image
|
|
79
|
+ style={{ width: '100%', height: '100%' }}
|
|
80
|
+ src={applicationInfoDate?.petImg1}
|
|
81
|
+ ></Image>
|
|
82
|
+ </RatioItem>
|
|
83
|
+ </View >
|
|
84
|
+ </View >
|
|
85
|
+ <View className='cell' style={{ marginTop: '0' }}>
|
|
86
|
+ <View className='lable'>状态</View>:
|
|
87
|
+ <View className={['state', 'color' + applicationInfoDate?.status]}>{applicationInfoDate?.status == 1 ? '正常' : applicationInfoDate?.status == 2 ? '挂失' : '过期'}</View>
|
|
88
|
+ </View>
|
|
89
|
+ <View className='cell'>
|
|
90
|
+ <View className='lable'>犬种</View>:
|
|
91
|
+ <View className='content'>{applicationInfoDate?.petType}</View>
|
|
92
|
+ </View>
|
44
|
93
|
{
|
45
|
|
- !applicationInfoDate?.isOrg ? <></> :
|
|
94
|
+ applicationInfoDate?.criminalInfo == null ? <></> :
|
|
95
|
+
|
46
|
96
|
<View className='cell'>
|
47
|
|
- <View className='lable'>是否企业</View>:
|
48
|
|
- <View className='content'>{applicationInfoDate?.orgName}</View>
|
|
97
|
+ <View className='lable'>伤人信息</View>:
|
|
98
|
+ {/* <View className='content'>{applicationInfoDate?.criminalInfo}</View> */}
|
|
99
|
+ <Image onClick={() => { lookImage(applicationInfoDate?.criminalInfo) }} src={applicationInfoDate?.criminalInfo} style={{ width: '90px', height: '90px' }} />
|
|
100
|
+
|
49
|
101
|
</View>
|
50
|
102
|
}
|
|
103
|
+ {
|
|
104
|
+ applicationInfoDate?.penaltyInfo == null ? <></> :
|
51
|
105
|
|
|
106
|
+ <View className='cell'>
|
|
107
|
+ <View className='lable'>伤人信息</View>:
|
|
108
|
+ {/* <View className='content'>{applicationInfoDate?.criminalInfo}</View> */}
|
|
109
|
+ <Image onClick={() => { lookImage(applicationInfoDate?.penaltyInfo) }} src={applicationInfoDate?.penaltyInfo} style={{ width: '90px', height: '90px' }} />
|
|
110
|
+ </View>
|
|
111
|
+ }
|
52
|
112
|
<View className='cell'>
|
53
|
|
- <View className='lable'>犬主</View>:
|
54
|
|
- <View className='content'>{applicationInfoDate?.personName}</View>
|
|
113
|
+ <View className='lable'>毛色</View>:
|
|
114
|
+ <View className='content'>{applicationInfoDate?.petColor}</View>
|
55
|
115
|
</View>
|
56
|
116
|
<View className='cell'>
|
57
|
|
- <View className='lable'>电话</View>:
|
58
|
|
- <View className='content'>{applicationInfoDate?.phone}</View>
|
|
117
|
+ <View className='lable'>证件号</View>:
|
|
118
|
+ <View className='content'>{applicationInfoDate?.cardNo}</View>
|
59
|
119
|
</View>
|
60
|
120
|
<View className='cell'>
|
61
|
|
- <View className='lable'>犬名</View>:
|
62
|
|
- <View className='content'>{applicationInfoDate?.petName}</View>
|
|
121
|
+ <View className='lable'>有效期</View>:
|
|
122
|
+ <View className='content'>{applicationInfoDate?.startDate}~{applicationInfoDate?.expireDate}</View>
|
63
|
123
|
</View>
|
64
|
124
|
<View className='cell'>
|
65
|
|
- <View className='lable'>性别</View>:
|
66
|
|
- <View className='content'>{applicationInfoDate?.petSex == 1 ? '雄' : '雌'}</View>
|
|
125
|
+ <View className='lable'>住址</View>:
|
|
126
|
+ <View className='content'>{applicationInfoDate?.address}</View>
|
67
|
127
|
</View>
|
68
|
|
- </View>
|
69
|
|
- <View className='cardRight'>
|
70
|
|
- <RatioItem ratio='109:151'>
|
71
|
|
- <Image
|
72
|
|
- style={{ width: '100%', height: '100%' }}
|
73
|
|
- src={applicationInfoDate?.petImg1}
|
74
|
|
- ></Image>
|
75
|
|
- </RatioItem>
|
76
|
128
|
</View >
|
77
|
129
|
</View >
|
78
|
|
- <View className='cell' style={{ marginTop: '0' }}>
|
79
|
|
- <View className='lable'>状态</View>:
|
80
|
|
- <View className={['state', 'color' + applicationInfoDate?.status]}>{applicationInfoDate?.status == 1 ? '正常' : applicationInfoDate?.status == 2 ? '挂失' : '过期'}</View>
|
81
|
|
- </View>
|
82
|
|
- <View className='cell'>
|
83
|
|
- <View className='lable'>犬种</View>:
|
84
|
|
- <View className='content'>{applicationInfoDate?.petType}</View>
|
85
|
|
- </View>
|
86
|
|
- {
|
87
|
|
- applicationInfoDate?.criminalInfo == null ? <></> :
|
|
130
|
+ }
|
88
|
131
|
|
89
|
|
- <View className='cell'>
|
90
|
|
- <View className='lable'>伤人信息</View>:
|
91
|
|
- {/* <View className='content'>{applicationInfoDate?.criminalInfo}</View> */}
|
92
|
|
- <Image onClick={() => { lookImage(applicationInfoDate?.criminalInfo) }} src={applicationInfoDate?.criminalInfo} style={{ width: '90px', height: '90px' }} />
|
93
|
|
-
|
94
|
|
- </View>
|
95
|
|
- }
|
96
|
|
- {
|
97
|
|
- applicationInfoDate?.penaltyInfo == null ? <></> :
|
98
|
|
-
|
99
|
|
- <View className='cell'>
|
100
|
|
- <View className='lable'>伤人信息</View>:
|
101
|
|
- {/* <View className='content'>{applicationInfoDate?.criminalInfo}</View> */}
|
102
|
|
- <Image onClick={() => { lookImage(applicationInfoDate?.penaltyInfo) }} src={applicationInfoDate?.penaltyInfo} style={{ width: '90px', height: '90px' }} />
|
103
|
|
- </View>
|
104
|
|
- }
|
105
|
|
- <View className='cell'>
|
106
|
|
- <View className='lable'>毛色</View>:
|
107
|
|
- <View className='content'>{applicationInfoDate?.petColor}</View>
|
108
|
|
- </View>
|
109
|
|
- <View className='cell'>
|
110
|
|
- <View className='lable'>证件号</View>:
|
111
|
|
- <View className='content'>{applicationInfoDate?.cardNo}</View>
|
112
|
|
- </View>
|
113
|
|
- <View className='cell'>
|
114
|
|
- <View className='lable'>有效期</View>:
|
115
|
|
- <View className='content'>{applicationInfoDate?.startDate}~{applicationInfoDate?.expireDate}</View>
|
116
|
|
- </View>
|
117
|
|
- <View className='cell'>
|
118
|
|
- <View className='lable'>住址</View>:
|
119
|
|
- <View className='content'>{applicationInfoDate?.address}</View>
|
120
|
|
- </View>
|
121
|
|
- </View >
|
122
|
|
- </View >
|
123
|
132
|
</>
|
124
|
133
|
)
|
125
|
134
|
}
|