|
@@ -1,7 +1,7 @@
|
1
|
1
|
import React, { useState, useEffect } from 'react';
|
2
|
2
|
import { Card, Form, Button, Image } from 'antd';
|
3
|
3
|
import { PageHeaderWrapper } from '@ant-design/pro-layout';
|
4
|
|
-import { getCardDetail } from '@/services/card'
|
|
4
|
+import { getCardDetail,getCardQRCode } from '@/services/card'
|
5
|
5
|
import { history } from 'umi';
|
6
|
6
|
|
7
|
7
|
const FormItem = Form.Item;
|
|
@@ -13,10 +13,13 @@ export default (props) => {
|
13
|
13
|
const { location } = props;
|
14
|
14
|
const { id } = location.query;
|
15
|
15
|
const [card, setCard] = useState({});
|
16
|
|
-
|
|
16
|
+ const [qrcode,setQrcode]=useState();
|
17
|
17
|
useEffect(() => {
|
18
|
18
|
getCardDetail(id).then((res) => {
|
19
|
19
|
setCard(res)
|
|
20
|
+ getCardQRCode(res.cardNo).then((res2)=>{
|
|
21
|
+ setQrcode(res2.qrImage)
|
|
22
|
+ })
|
20
|
23
|
}).catch((err) => {
|
21
|
24
|
console.log(err.message)
|
22
|
25
|
});
|
|
@@ -65,6 +68,11 @@ export default (props) => {
|
65
|
68
|
<FormItem label="狗证有效期">
|
66
|
69
|
{card?.startDate + '~' + card?.expireDate}
|
67
|
70
|
</FormItem>
|
|
71
|
+ <FormItem label="小程序码">
|
|
72
|
+ {
|
|
73
|
+ qrcode&&<Image src={qrcode} width={100} />
|
|
74
|
+ }
|
|
75
|
+ </FormItem>
|
68
|
76
|
<FormItem label=" " colon={false}>
|
69
|
77
|
<Button type="default" onClick={() => goBack()}>
|
70
|
78
|
返回
|