Commit 959a1fa1 by dos

init

parent 437153ac
......@@ -174,11 +174,11 @@ function checkInfo() {
$('.tip').hide();
$('.tip' + phase).show()
$('.company').html('中信保诚人寿  ' + company + '');
if (fyp == 0) {
$('.perf').html('<span>个人累计承保</span><br/>' + perf + '件')
} else {
$('.perf').html('<span>个人累计承保</span><br/>FYP' + perf + '元')
}
// if (fyp == 0) {
// $('.perf').html('<span>个人累计承保</span><br/>' + perf + '件')
// } else {
// $('.perf').html('<span>个人累计承保</span><br/>FYP' + perf + '元')
// }
// setShare();
......@@ -248,8 +248,10 @@ function initPage() {
top: 'auto',
bottom: -displacement - 5 + 'px'
});
$('.username').css('top', 'auto').css('bottom', 352 + (-displacement - 5) + 'px')
$('.company').css('top', 'auto').css('bottom', 318 + (-displacement - 5) + 'px')
username_bottom = 352 + (-displacement - 5)
company_bottom = 318 + (-displacement - 5)
$('.username').css('top', 'auto').css('bottom', username_bottom + 'px')
$('.company').css('top', 'auto').css('bottom', company_bottom + 'px')
}
}
......@@ -327,9 +329,9 @@ function createPoster() {
// txtDraw(posterCtx, username, '#464646', 215 * 2, 360 * 2, 45 * 2, 'bolder');
// txtDraw(posterCtx, '中信保诚人寿', '#464646', 215 * 2, 390 * 2, 20 * 2);
// txtDraw(posterCtx, company + '', '#464646', 215 * 2, 413 * 2, 20 * 2);
txtDraw(posterCtx, username, '#ffffff', 215 * 2, 240 * 2, 45 * 2, 'bolder');
txtDraw(posterCtx, '中信保诚人寿', '#ffffff', 215 * 2, 280 * 2, 20 * 2);
txtDraw(posterCtx, company + '', '#ffffff', 215 * 2, 308 * 2, 20 * 2);
txtDraw(posterCtx, username, '#ffffff', 350 * 2, canvasHeight - username_bottom * 2, 45 * 2, 'bolder');
txtDraw(posterCtx, '中信保诚人寿 ' + company, '#ffffff', 350 * 2, canvasHeight - company_bottom * 2, 20 * 2);
// txtDraw(posterCtx, company + '', '#ffffff', 215 * 2, 308 * 2, 20 * 2);
setTimeout(function () {
......@@ -586,7 +588,7 @@ function getX(name, business) {
function txtDraw(ctx, content, color, x, y, fontsize, fontWeight = 'normal') {
ctx.font = fontWeight + ' ' + fontsize + 'px zkkh';
var width = ctx.measureText(content).width;
var cx = x - width;
var cx = x - width / 2;
ctx.fillStyle = color;
ctx.fillText(content, cx, y);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment