|
@@ -12,7 +12,7 @@ const { Meta } = Card
|
12
|
12
|
const H5Card = props => {
|
13
|
13
|
const { h5Data } = props
|
14
|
14
|
|
15
|
|
- const colerArr = ["#2db7f5","#87d068","#108ee9","magenta","red","volcano","orange","green","geekblue","purple"]
|
|
15
|
+ const colerArr = ["#2db7f5", "#87d068", "#108ee9", "magenta", "red", "volcano", "orange", "green", "geekblue", "purple"]
|
16
|
16
|
const toEdit = () => {
|
17
|
17
|
router.push({
|
18
|
18
|
pathname: '/sample/h5/edit',
|
|
@@ -29,7 +29,7 @@ const H5Card = props => {
|
29
|
29
|
okText: '确认',
|
30
|
30
|
cancelText: '取消',
|
31
|
31
|
onOk() {
|
32
|
|
- request({ ...apis.sample.puth5, urlData: { id: h5Data.sampleId }}).then((data) => {
|
|
32
|
+ request({ ...apis.sample.puth5, urlData: { id: h5Data.sampleId } }).then((data) => {
|
33
|
33
|
message.info('操作成功!')
|
34
|
34
|
props.onChange()
|
35
|
35
|
}).catch((err) => {
|
|
@@ -40,24 +40,35 @@ const H5Card = props => {
|
40
|
40
|
});
|
41
|
41
|
}
|
42
|
42
|
|
43
|
|
- return (
|
44
|
|
- <>
|
|
43
|
+ return (
|
|
44
|
+ <>
|
45
|
45
|
<Card
|
46
|
46
|
hoverable
|
47
|
|
- style={{ width: 480,height: 450,marginTop: 50,position: "relative" }}
|
48
|
|
- cover={<img height="335px" alt="example" onClick={toEdit} src={h5Data.coverImg} />}
|
|
47
|
+ style={{
|
|
48
|
+ minWidth: '240px',
|
|
49
|
+ marginRight: '0.1rem',
|
|
50
|
+ height: '2.1rem',
|
|
51
|
+ background: 'rgba(255, 255, 255, 1)',
|
|
52
|
+ boxShadow: '0px 0px 16px 2px rgba(0, 0, 0, 0.12)',
|
|
53
|
+ borderRadius: '12px',
|
|
54
|
+ marginBottom: '0.1rem',
|
|
55
|
+ position: 'relative',
|
|
56
|
+ padding: '0.1rem'
|
|
57
|
+ }}
|
|
58
|
+ // style={{ width: 480,height: 450,marginTop: 50,position: "relative" }}
|
|
59
|
+ cover={<img width="100%" style={{height:'1.3rem'}} alt="example" onClick={toEdit} src={h5Data.coverImg} />}
|
49
|
60
|
extra={<a onClick={deleteSample}>删除</a>}
|
50
|
61
|
title={h5Data.status == 1 ? '已发布' : h5Data.status == 0 ? '未发布' : ''}
|
51
|
62
|
>
|
52
|
63
|
<Meta onClick={toEdit} title={h5Data.sampleName} />
|
53
|
|
- <div style={{position: "absolute", bottom: "50px", right: "20px", margin: '20px 0'}}>
|
54
|
|
- {(h5Data.tags || []).map((x,i) => {
|
|
64
|
+ <div style={{ position: "absolute", bottom: "50px", right: "20px", margin: '20px 0' }}>
|
|
65
|
+ {(h5Data.tags || []).map((x, i) => {
|
55
|
66
|
return <Tag color={colerArr[i]}>{x}</Tag>
|
56
|
67
|
})}
|
57
|
68
|
</div>
|
58
|
69
|
</Card>
|
59
|
70
|
</>
|
60
|
|
- )
|
61
|
|
- }
|
62
|
|
-
|
63
|
|
- export default H5Card
|
|
71
|
+ )
|
|
72
|
+}
|
|
73
|
+
|
|
74
|
+export default H5Card
|