Skip to content

Commit cde8b2c

Browse files
committed
feat:增加暗影千机百强榜
1 parent 9283885 commit cde8b2c

2 files changed

Lines changed: 114 additions & 2 deletions

File tree

src/assets/data/author/certificate.json

Lines changed: 109 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1166,5 +1166,113 @@
11661166
}
11671167
}
11681168
}
1169+
},
1170+
"23": {
1171+
"key": 23,
1172+
"element": {
1173+
"rank": {
1174+
"type": "rank",
1175+
"content": "",
1176+
"style": {
1177+
"fontName": "ALIMAMASHUHEITI-BOLD",
1178+
"topThreeStyle": {
1179+
"textAlign": "center",
1180+
"fontSize": 26,
1181+
"left": 640,
1182+
"top": 685,
1183+
"color": "#FFE9C4"
1184+
},
1185+
"otherStyle": {
1186+
"textAlign": "center",
1187+
"fontSize": 26,
1188+
"left": 640,
1189+
"top": 685,
1190+
"color": "#FFE9C4",
1191+
"content": "百强"
1192+
}
1193+
}
1194+
},
1195+
"subRank": {
1196+
"type": "text",
1197+
"content": "TOP {{rank}}",
1198+
"style": {
1199+
"fontName": "ALIMAMASHUHEITI-BOLD",
1200+
"textAlign": "center",
1201+
"fontSize": 18,
1202+
"left": 640,
1203+
"top": 655,
1204+
"color": "#FFE9C4"
1205+
}
1206+
},
1207+
"time": {
1208+
"type": "text",
1209+
"content": "通关用时 / hh时mm分ss秒",
1210+
"style": {
1211+
"textAlign": "center",
1212+
"fontSize": 22,
1213+
"left": 640,
1214+
"top": 800,
1215+
"color": "#000000"
1216+
}
1217+
},
1218+
"mapTime": {
1219+
"type": "text",
1220+
"content": "通关时间 / yyyy年MM月dd日hh时mm分ss秒",
1221+
"style": {
1222+
"textAlign": "center",
1223+
"fontSize": 22,
1224+
"left": 640,
1225+
"top": 840,
1226+
"color": "#000000"
1227+
}
1228+
},
1229+
"name": {
1230+
"type": "text",
1231+
"content": "",
1232+
"style": {
1233+
"textAlign": "center",
1234+
"fontSize": 32,
1235+
"left": 640,
1236+
"top": 1120,
1237+
"color": "#000000"
1238+
}
1239+
},
1240+
"colonel": {
1241+
"type": "text",
1242+
"content": "",
1243+
"style": {
1244+
"textAlign": "center",
1245+
"fontSize": 23,
1246+
"left": 640,
1247+
"top": 1170,
1248+
"color": "#666666"
1249+
}
1250+
},
1251+
"team": {
1252+
"type": "text",
1253+
"content": "",
1254+
"style": {
1255+
"textAlign": "center",
1256+
"fontSize": 15,
1257+
"left": 640,
1258+
"top": 1200,
1259+
"color": "#666666",
1260+
"width": 700,
1261+
"height": 25
1262+
}
1263+
},
1264+
"signTime": {
1265+
"type": "text",
1266+
"content": "签发日期:yyyy.MM.dd",
1267+
"addUrl": "",
1268+
"style": {
1269+
"textAlign": "left",
1270+
"fontSize": 20,
1271+
"left": 1000,
1272+
"top": 1760,
1273+
"color": "#3F5180"
1274+
}
1275+
}
1276+
}
11691277
}
1170-
}
1278+
}

src/views/author/certificate.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ export default {
151151
}
152152
},
153153
drawFontText(ctx, data) {
154-
let drawText = `${data.content}`;
154+
let drawText = ``;
155155
let drawStyle = data.style.otherStyle;
156156
if (data.content * 1 <= 3) {
157157
drawStyle = data.style.topThreeStyle;
@@ -162,6 +162,10 @@ export default {
162162
drawText = "亚军";
163163
} else if (data.content == 3) {
164164
drawText = "季军";
165+
} else if (drawStyle.content) {
166+
drawText = drawStyle.content;
167+
} else {
168+
drawText = `${data.content}`;
165169
}
166170
167171
const fontUrl = fontMap[data.style.fontName];

0 commit comments

Comments
 (0)