canvas.js
1.66 KB
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
80
81
82
83
84
85
// canvas.js
module.exports = data => {
return ({
"width": "210px",
"height": "168px",
"views": [{
"type": "image",
"url": data.imgUrl,
"css": {
"width": "210px",
"height": "168px",
"top": "0px",
"left": "0px",
"mode": "aspectFill"
}
},
{
"type": "image",
"url": 'https://nosqn.colorcun.com/rectangleBj.png',
"css": {
"width": "210px",
"height": "168px",
"top": "0px",
"left": "0px",
"mode": "aspectFill"
}
},
{
"type": "text",
"text": data.sellerName,
"css": {
"color": "#fff",
"width": "190px",
"top": "10px",
"left": "10px",
"right": "10px",
"borderColor": "#000000",
"fontSize": "12px",
"fontWeight": "normal",
"maxLines": "2",
"textStyle": "fill",
"textDecoration": "none",
"fontFamily": "PingFang SC",
"textAlign": "center",
}
},
{
"type": "text",
"text": data.date,
"css": {
"color": "#fff",
"width": "210px",
"height": "168px",
"top": "70px",
"borderColor": "#000000",
"fontSize": "20px",
"fontWeight": "bold",
"maxLines": "3",
"textStyle": "fill",
"textDecoration": "none",
"fontFamily": "PingFang SC",
"textAlign": "center",
}
},
{
"type": "text",
"text": data.time,
"css": {
"color": "#fff",
"width": "210px",
"height": "168px",
"top": "100px",
"borderColor": "#000000",
"fontSize": "18px",
"fontWeight": "bold",
"maxLines": "3",
"textStyle": "fill",
"textDecoration": "none",
"fontFamily": "PingFang SC",
"textAlign": "center",
}
},
]
});
}