function getImage(t,i){var o=new XMLHttpRequest;o.open("get",t,!0),o.responseType="blob",o.onload=function(){this.status==200&&i&&i(URL.createObjectURL(this.response))},o.send(null)}CanvasRenderingContext2D.prototype.roundRect=function(t,i,o,d,c,n,r,h){c&&!n&&!r&&!h&&(n=c,r=c,h=c);var l=Math.min(o,d);return c>l/2&&(c=l/2),n>l/2&&(n=l/2),r>l/2&&(r=l/2),h>l/2&&(h=l/2),this.beginPath(),this.moveTo(t+c,i),this.arcTo(t+o,i,t+o,i+d,c),this.arcTo(t+o,i+d,t,i+d,n),this.arcTo(t,i+d,t,i,r),this.arcTo(t,i,t+o,i,h),this},CanvasRenderingContext2D.prototype.wrapText=function(t,i,o,d,c,n){if(!(typeof t!="string"||typeof i!="number"||typeof o!="number")){var r=this,h=r.canvas;typeof d=="undefined"&&(d=h&&h.width||300),typeof n=="undefined"&&(n=h&&parseInt(window.getComputedStyle(h).lineHeight)||parseInt(window.getComputedStyle(document.body).lineHeight));for(var l=t.split(""),e="",g=0;gd&&g>0?(r.fillText(e,i,o),e=l[g],o+=n):e=s}r.fillText(e,i,o)}};function shareMsg(t){var i='
';$("body").append(i),$(".share-msg").html(t),$(".share-msg").show(),setTimeout(function(){$(".share-msg").hide(),$(".share-msg").remove()},2e3)}var drawImg=function(t,i){var o=t.find(function(e){return e.code==="qrCode"});if(o){if(o.text||(o.text=window.location.href),!document.getElementById("code"))return;var d=new QRCode(document.getElementById("code"),{text:o.text,width:104,height:104,correctLevel:QRCode.CorrectLevel.L});d.makeCode(o.text)}var c=document.getElementById("canvas"),n=c.getContext("2d");n.textBaseline="top",n.save();function r(e,g,s,x,a,f,v){if(e){v&&v.type==="circle"&&(n.save(),n.beginPath());var u=new Image;u.setAttribute("crossOrigin","Anonymous"),u.src=e,u.onload=function(){if(v&&v.type==="circle"){var w=v.r,b=2*w,y=g+w,p=s+w;n.arc(y,p,w,0,2*Math.PI),n.clip(),n.drawImage(u,g,s,x,a),n.restore()}else n.drawImage(u,g,s,x,a);f&&f()},u.onerror=function(){shareMsg("\u56FE\u7247\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5\uFF01"),f&&f()}}else f&&f()}var h=0;function l(e){if(h++,h<=t.length)if(e.code=="course")try{var g=new Image;g.setAttribute("crossOrigin","Anonymous"),g.src=e.text,g.width=e.width,g.height=e.height,g.onload=function(){e.rotate?(n.save(),n.beginPath(),n.rotate(-e.rotate*Math.PI/180),r(e.text,e.x,e.y,e.width,e.height,function(){n.restore(),l(t[h])})):(typeof e.radius!="object"&&(e.radius={}),n.roundRect(e.x,e.y,e.width,e.height,e.radius.right||0,e.radius.bottom||0,e.radius.left||0,e.radius.top||0),n.clip(),r(e.text,e.x,e.y,e.width,e.height,function(){n.restore(),l(t[h])}))}}catch(a){l(t[h]),console.log(a)}else if(e.code==="avatar")try{e.radius?(n.save(),n.beginPath(),typeof e.radius=="number"&&e.radius!==NaN?e.radius={top:e.radius,right:e.radius,bottom:e.radius,left:e.radius}:(typeof e.radius!="object"||e.radius===null||e.radius instanceof Array)&&(e.radius={}),n.roundRect(e.x,e.y,e.width,e.height,e.radius.right||0,e.radius.bottom||0,e.radius.left||0,e.radius.top||0),n.clip(),r(e.text,e.x,e.y,e.width,e.height,function(){n.restore(),l(t[h])})):r(e.text,e.x,e.y,e.width,e.height,function(){l(t[h])},{type:"circle",r:e.width/2})}catch(a){l(t[h]),console.log(a)}else if(e.code==="qrCode"){var s="";if($("#code img").attr("src"))s=$("#code img").attr("src");else{var x=document.querySelector("#code canvas");s=x&&x.toDataURL("image/png")}try{r(s,e.x,e.y,e.width,e.height,function(){l(t[h])})}catch(a){l(t[h]),console.log(a)}}else if(e.code==="block")n.rect(e.x,e.y,e.width,e.height),n.fillStyle="#"+e.color,n.fillRect(e.x,e.y,e.width,e.height),l(t[h]);else if(e.font)n.font=e.size+"px "+e.font,e.bold&&(n.font=n.font+" bold"),n.fillStyle="#"+e.color,e["text-align"]==="left"?n.textAlign="left":e["text-align"]==="center"?n.textAlign="center":e["text-align"]==="right"?n.textAlign="right":e["text-align"]==="start"?n.textAlign="start":e["text-align"]==="end"?n.textAlign="end":n.textAlign="start",e.rotate?(n.save(),n.beginPath(),n.rotate(-e.rotate*Math.PI/180),e.lineHeight?(n.wrapText(e.text,e.x,e.y,e.width,e.height,e.lineHeight),n.restore()):(n.fillText(e.text,e.x,e.y,e.width,e.height),n.restore())):e.lineHeight?n.wrapText(e.text,e.x,e.y,e.width,e.height,e.lineHeight):n.fillText(e.text,e.x,e.y,e.width,e.height),l(t[h]);else try{r(e.text,e.x,e.y,e.width,e.height,function(){l(t[h])})}catch(a){l(t[h]),console.log(a)}else i&&i.call(this)}l(t[0])};function mergeConfig(t,i){return i&&i.map(function(o){var d=t.filter(function(c){return c.code===o.code});d&&d.length>0?o.text?d.map(function(c){c.text=o.text}):o.text="":t.push(o)}),t}function getShortString(t,i){if(t||(t=""),t.length5?o=158-7*(t.length-5):o=158+7*(5-t.length),o}else{var d=60;return t.length>5?d=60+13*(t.length-5):d=60-13*(5-t.length),d}}function getLineX(t,i){t||(t="");var o=121;return i==="left"?t.length>5?o=121-7*(t.length-5):o=121+7*(5-t.length):i==="right"&&(t.length>5?o=227+7*(t.length-5):o=227-7*(5-t.length)),o}var shareType={A:function(t,i){var o=[{code:"background",id:"",width:375,height:667,x:0,y:0,level:0,text:"/design/designstatic/common/image/share/share_typeA_bg1.png"},{code:"subBackground",width:353,height:396,x:11,y:241,level:1,text:"/design/designstatic/common/image/share/share_typeA_ContentBg.png"},{code:"course",id:30108,width:353,height:199,x:11,y:42,level:1,text:"/design/designstatic/common/image/course/defult.jpg",radius:{right:5,top:5}},{code:"block",width:3,height:18,color:"D04165",x:32,y:270,level:2},{code:"courseTitle",width:283,height:46,lineHeight:19,x:46,y:269,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:19,rowSpacing:12,color:"000000",text:"\u89C6\u9891\u7EC4123"},{code:"courseIntroduce",width:283,height:70,lineHeight:15,x:46,y:325,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:14,rowSpacing:6,color:"414141",text:"\u6682\u65E0\u7B80\u4ECB"},{code:"avatar",width:58,height:58,x:26,y:486,level:2,text:"/design/designstatic/common/image/head/boy.png"},{code:"name",width:130,height:18,x:92,y:489,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:17,color:"636363",text:"\u9ED8\u8BA4\u5206\u4EAB\u4EBA"},{code:"content",width:130,height:90,lineHeight:15,x:92,y:512,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",color:"636363",size:13,rowSpacing:6,text:i||"\u9080\u8BF7\u60A8\u4E00\u8D77\u5B66\u4E60\u597D\u77E5\u8BC6\u957F\u6309\u626B\u7801"+(location.href.indexOf("lookpic")>-1?"\u770B\u56FE":"\u542C\u8BFE")},{code:"qrCode",width:104,height:104,x:243,y:463,level:2,text:"http://28256.ebh.net:81/pages/wap/info.html?cid=30108&uid=30258&diliater=Lte2zTJqrZmrO1MTnmK0qg=="},{code:"school",width:86,height:12,x:187,y:607,level:2,font:"\u9ED1\u4F53",size:12,color:"FACA86",bold:!0,text:"","text-align":"center"},{code:"block",width:30,height:1,color:"F0ECE3",x:107,y:613,level:2},{code:"block",width:30,height:1,color:"F0ECE3",x:237,y:613,level:2}];return o=mergeConfig(o,t),o},B:function(t,i){var o=[{code:"background",id:"",width:375,height:667,x:0,y:0,level:0,text:"/design/designstatic/common/image/share/share_typeB_bg.png"},{code:"subBackground",width:343,height:535,x:17,y:91,level:1,text:"/design/designstatic/common/image/share/share_typeB_contentBg.png"},{code:"course",id:30108,width:279,height:162,x:49,y:221,level:1,text:"/design/designstatic/common/image/course/defult.jpg"},{code:"courseTitle",width:279,height:42,lineHeight:18,x:187,y:163,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:18,rowSpacing:100,color:"000000",text:"\u89C6\u9891\u7EC4123\u5E08\u5085\u7684\u5E08\u5085\u5E08\u5085\u7684\u5E08\u5085\u5E08\u5085\u7684\u5E08\u5085\u5E08\u5085\u7684","text-align":"center"},{code:"courseIntroduce",width:264,height:31,lineHeight:14,x:52,y:398,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:13,rowSpacing:20,color:"414141",text:"\u6682\u65E0\u7B80\u4ECB"},{code:"avatar",width:64,height:64,x:156,y:60,level:2,text:"/design/designstatic/common/image/head/boy.png"},{code:"name",width:163,height:12,x:187,y:138,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:12,color:"636363",text:"\u9ED8\u8BA4\u5206\u4EAB\u4EBA \u7ED9\u4F60\u63A8\u8350\u4E00\u4E2A\u5F88\u68D2\u7684\u8BFE","text-align":"center"},{code:"content",width:85,height:12,x:187,y:450,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",color:"636363",size:12,rowSpacing:20,text:i?"\u957F\u6309\u626B\u7801\u89C2\u770B":"\u957F\u6309\u626B\u7801"+(location.href.indexOf("lookpic")>-1?"\u770B\u56FE":"\u542C\u8BFE"),"text-align":"center"},{code:"qrCode",width:109,height:109,x:133,y:472,level:2,text:"http://28256.ebh.net:81/pages/wap/info.html?cid=30108&uid=30258&diliater=Lte2zTJqrZmrO1MTnmK0qg=="},{code:"school",width:86,height:12,x:187,y:605,level:2,font:"\u9ED1\u4F53",size:12,color:"717171",bold:!0,text:"","text-align":"center"},{code:"block",width:30,height:1,color:"E1E1E1",x:107,y:611,level:2},{code:"block",width:30,height:1,color:"E1E1E1",x:237,y:611,level:2}];return o=mergeConfig(o,t),o},C:function(t,i){var o=[{code:"background",id:"",width:375,height:667,x:0,y:0,level:0,text:"/design/designstatic/common/image/share/share_typeC_bg.png"},{code:"course",id:30108,width:232,height:136,x:71,y:114,level:1,text:"/design/designstatic/common/image/course/defult.jpg"},{code:"courseTitle",width:260,height:42,lineHeight:18,x:187,y:272,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:18,color:"1B1B1B",text:"\u6570\u5B66\u5DEE\u600E\u4E48\u529E\u2014\u5B66\u9738\u6559\u4F60\u600E\u6837\u624D \u80FD\u5B66\u597D\u6570\u5B66","text-align":"center"},{code:"courseIntroduce",width:278,height:31,x:49,y:421,lineHeight:13,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:13,color:"414141",text:"\u6682\u65E0\u7B80\u4ECB"},{code:"avatar",width:58,height:58,x:27,y:528,level:2,text:"/design/designstatic/common/image/head/boy.png"},{code:"name",width:130,height:15,x:93,y:532,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:12,color:"636363",text:"\u9ED8\u8BA4\u5206\u4EAB\u4EBA"},{code:"content",width:130,height:35,x:94,y:555,lineHeight:13,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",color:"636363",size:13,rowSpacing:20,text:i||"\u9080\u8BF7\u60A8\u4E00\u8D77\u5B66\u4E60\u597D\u77E5\u8BC6 \u957F\u6309\u626B\u7801"+(location.href.indexOf("lookpic")>-1?"\u770B\u56FE":"\u542C\u8BFE")},{code:"qrCode",width:104,height:104,x:243,y:506,level:2,text:"http://28256.ebh.net:81/pages/wap/info.html?cid=30108&uid=30258&diliater=Lte2zTJqrZmrO1MTnmK0qg=="},{code:"school",width:60,height:12,x:187,y:643,level:2,font:"\u9ED1\u4F53",size:12,color:"717171",bold:!0,text:"","text-align":"center"},{code:"block",width:30,height:1,color:"796C2D",x:115,y:649,level:2},{code:"block",width:30,height:1,color:"796C2D",x:231,y:649,level:2}];return o=mergeConfig(o,t),o},D:function(t){var i=[{code:"background",id:"",width:375,height:667,x:0,y:0,level:0,text:"/design/designstatic/common/image/share/share_typeD_bg.png"},{code:"course",id:30108,width:296,height:164,x:40,y:92,level:1,text:"/design/designstatic/common/image/course/defult.jpg"},{code:"courseTitle",width:216,height:20,lineHeight:18,x:80,y:374,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:18,color:"1B1B1B",text:"\u521D\u4E2D\u6570\u5B66\u6691\u5047\u8BFE\u7A0B"},{code:"courseIntroduce",width:216,height:30,x:80,y:421,lineHeight:16,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:12,color:"414141",text:"\u6682\u65E0\u7B80\u4ECB"},{code:"avatar",width:34,height:34,x:80,y:496,level:2,text:"/design/designstatic/common/image/head/boy.png"},{code:"name",width:108,height:13,x:121,y:499,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:12,color:"636363",text:"\u9ED8\u8BA4\u5206\u4EAB\u4EBA"},{code:"content",width:120,height:12,x:121,y:517,lineHeight:13,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",color:"636363",size:13,rowSpacing:5,text:"\u9080\u60A8\u4E00\u8D77\u5B66\u4E60\u597D\u77E5\u8BC6"},{code:"qrCode",width:50,height:50,x:247,y:488,level:2,text:"http://28256.ebh.net:81/pages/wap/info.html?cid=30108&uid=30258&diliater=Lte2zTJqrZmrO1MTnmK0qg=="},{code:"school",width:300,height:12,x:187,y:570,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:12,color:"667CE3",text:"","text-align":"center"}];return i=mergeConfig(i,t),i[2].text=getShortString(i[2].text,24),i[3].text=getShortString(i[3].text,54),i},E:function(t){var i=[{code:"background",id:"",width:375,height:667,x:0,y:0,level:0,text:"/design/designstatic/common/image/share/share_typeE_bg.png"},{code:"course",id:30108,width:280,height:168,x:48,y:211,level:1,text:"/design/designstatic/common/image/course/defult.jpg"},{code:"courseTitle",width:280,height:15,x:187,y:392,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:16,color:"000000",text:"\u4E03\u5E74\u7EA7\u8BED\u6587\u8BFE\u7A0B","text-align":"center"},{code:"courseIntroduce",width:230,height:30,x:187,y:420,lineHeight:16,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:12,color:"000000",text:"\u6682\u65E0\u7B80\u4ECB","text-align":"center"},{code:"avatar",width:46,height:46,x:165,y:20,level:2,text:"/design/designstatic/common/image/head/boy.png"},{code:"name",width:200,height:15,x:187,y:72,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:12,color:"000000",text:"\u9ED8\u8BA4\u5206\u4EAB\u4EBA","text-align":"center"},{code:"content",width:220,height:18,x:187,y:98,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",color:"FFFFFF",size:18,rowSpacing:20,text:"\u9080\u60A8\u4E00\u8D77\u5B66\u4E60\u597D\u77E5\u8BC6","text-align":"center"},{code:"qrCode",width:76,height:76,x:150,y:513,level:2,text:"http://28256.ebh.net:81/pages/wap/info.html?cid=30108&uid=30258&diliater=Lte2zTJqrZmrO1MTnmK0qg=="},{code:"school",width:300,height:12,x:187,y:628,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:15,color:"000000",text:"","text-align":"center"}];return i=mergeConfig(i,t),i[2].text=getShortString(i[2].text,18),i},F:function(t,i){var o=[{code:"background",id:"",width:375,height:667,x:0,y:0,level:0,text:"/design/designstatic/common/image/share/share_typeF_bg.png"},{code:"course",id:30108,width:105,height:63,x:59,y:127,level:1,text:"/design/designstatic/common/image/course/defult.jpg"},{code:"courseTitle",width:16,height:200,x:134,y:209,lineHeight:18,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:18,color:"000000",bold:!0,text:"\u9AD8\u4E2D\u56FD\u5B66\u8BFE\u7A0B\u5305"},{code:"courseIntroduce",width:12,height:30,x:117,y:209,lineHeight:12,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:12,color:"000000",text:"\u6682\u65E0\u7B80\u4ECB","text-align":"right"},{code:"avatar",width:48,height:48,x:44,y:23,level:2,text:"/design/designstatic/common/image/head/boy.png"},{code:"name",width:50,height:15,x:109,y:39,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:15,color:"FFFFFF",text:"\u9ED8\u8BA4\u5206\u4EAB\u4EBA"},{code:"content",width:30,height:350,x:281,y:131,level:2,lineHeight:30,font:"\u5FAE\u8F6F\u96C5\u9ED1",color:"FFFFFF",size:30,rowSpacing:20,text:"\u9080\u60A8\u4E00\u8D77\u5B66\u4E60\u597D\u77E5\u8BC6"},{code:"content",width:78,height:12,x:78,y:615,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",color:"FFFFFF",size:12,text:i?"\u957F\u6309\u626B\u7801\u89C2\u770B":"\u957F\u6309\u626B\u7801"+(location.href.indexOf("lookpic")>-1?"\u770B\u56FE":"\u542C\u8BFE"),"text-align":"center"},{code:"qrCode",width:64,height:64,x:47,y:541,level:2,text:"http://28256.ebh.net:81/pages/wap/info.html?cid=30108&uid=30258&diliater=Lte2zTJqrZmrO1MTnmK0qg=="},{code:"school",width:100,height:12,x:312,y:616,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:12,color:"FFFFFF",text:"","text-align":"end"}];if(o=mergeConfig(o,t),o[2].text=getShortString(o[2].text,12),o[3].text=getShortString(o[3].text,30),o[3].text.length>16){var d=o[3].text;o[3].text=d.substr(0,16);var c=d.substr(16,d.length);o.push({code:"courseIntroduce",width:12,height:30,x:102,y:209,lineHeight:12,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:12,color:"000000",text:c,"text-align":"right"})}return o},G:function(t,i){var o=[{code:"background",id:"",width:375,height:667,x:0,y:0,level:0,text:"/design/designstatic/common/image/share/share_typeG_bg.png"},{code:"course",id:30108,rotate:4,width:124,height:77,x:37,y:378,level:1,text:"/design/designstatic/common/image/course/defult.jpg"},{code:"courseTitle",rotate:4,width:200,height:20,x:42,y:330,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:15,color:"FFFFFF",text:"\u4E03\u5E74\u7EA7\u8BED\u6587\u8BFE\u7A0B"},{code:"courseIntroduce",rotate:4,width:108,height:203,x:170,y:392,lineHeight:13,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:11,color:"FFFFFF",text:"\u6682\u65E0\u7B80\u4ECB"},{code:"avatar",width:38,height:38,x:21,y:17,level:2,text:"/design/designstatic/common/image/head/boy.png"},{code:"name",width:50,height:15,x:63,y:28,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:15,color:"FFFFFF",text:"\u9ED8\u8BA4\u5206\u4EAB\u4EBA"},{code:"content",width:220,height:12,x:187,y:614,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",color:"FFFFFF",size:11,rowSpacing:20,text:i?"\u957F\u6309\u626B\u7801\u89C2\u770B":"\u957F\u6309\u626B\u7801"+(location.href.indexOf("lookpic")>-1?"\u770B\u56FE":"\u542C\u8BFE"),"text-align":"center"},{code:"qrCode",width:64,height:64,x:155,y:541,level:2,text:"http://28256.ebh.net:81/pages/wap/info.html?cid=30108&uid=30258&diliater=Lte2zTJqrZmrO1MTnmK0qg=="},{code:"school",width:300,height:12,x:364,y:645,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:12,color:"FFFFFF",text:"","text-align":"end"}];return o=mergeConfig(o,t),o[2].text=getShortString(o[2].text,18),o[3].text=getShortString(o[3].text,36),o},H:function(t){var i=[{code:"background",id:"",width:375,height:667,x:0,y:0,level:0,text:"/design/designstatic/common/image/share/share_typeH_bg.png"},{code:"course",id:30108,width:175,height:105,x:82,y:220,level:1,text:"/design/designstatic/common/image/course/defult.jpg",radius:{right:5,top:5,bottom:5,left:5}},{code:"courseTitle",width:148,height:14,x:76,y:352,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:10,color:"1B1B1B",text:"\u521D\u4E2D\u6570\u5B66\u6691\u5047\u8BFE\u7A0B"},{code:"courseIntroduce",width:148,height:30,x:76,y:370,lineHeight:12,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:10,color:"414141",text:"\u6682\u65E0\u7B80\u4ECB\uFF01"},{code:"avatar",width:20,height:20,x:177,y:44,level:2,text:"/design/designstatic/common/image/head/boy.png"},{code:"name",width:100,height:15,x:187,y:72,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:12,color:"333333",text:"\u9ED8\u8BA4\u5206\u4EAB\u4EBA","text-align":"center"},{code:"qrCode",width:54,height:54,x:77,y:432,level:2,text:"http://28256.ebh.net:81/pages/wap/info.html?cid=30108&uid=30258&diliater=Lte2zTJqrZmrO1MTnmK0qg=="},{code:"school",width:300,height:25,x:187,y:640,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:17,color:"FFFFFF",text:"","text-align":"center"}];return i=mergeConfig(i,t),i[2].text=getShortString(i[2].text,15),i[3].text=getShortString("\u7B80\u4ECB\uFF1A"+i[3].text,28),i[7].text="\u2014\u2014\u2014 "+i[7].text+" \u2014\u2014\u2014",i},I:function(t){var i=[{code:"background",id:"",width:375,height:667,x:0,y:0,level:0,text:"/design/designstatic/common/image/share/share_typeI_bg.png"},{code:"course",id:30108,width:202,height:106,x:102,y:178,level:1,text:"/design/designstatic/common/image/course/defult.jpg"},{code:"courseTitle",width:200,height:12,x:102,y:288,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:11,color:"1B1B1B",text:"\u521D\u4E2D\u6570\u5B66\u6691\u5047\u8BFE\u7A0B"},{code:"courseIntroduce",width:198,height:10,lineHeight:12,x:103,y:304,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:10,color:"414141",text:"\u6682\u65E0\u7B80\u4ECB"},{code:"avatar",width:30,height:30,x:60,y:153,level:2,text:"/design/designstatic/common/image/head/boy.png",radius:{right:3,top:3,bottom:3,left:3}},{code:"avatar",width:40,height:40,x:271,y:93,level:2,text:"/design/designstatic/common/image/head/boy.png",radius:{right:3,top:3,bottom:3,left:3}},{code:"name",width:210,height:15,x:97,y:151,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:13,color:"333333",text:"\u9ED8\u8BA4\u5206\u4EAB\u4EBA"},{code:"qrCode",width:58,height:58,x:104,y:467,level:2,text:"http://28256.ebh.net:81/pages/wap/info.html?cid=30108&uid=30258&diliater=Lte2zTJqrZmrO1MTnmK0qg=="},{code:"school",width:300,height:25,x:187,y:590,level:2,font:"\u5FAE\u8F6F\u96C5\u9ED1",size:15,color:"595959",text:"","text-align":"center"}];return i=mergeConfig(i,t),i[2].text=getShortString(i[2].text,18),i[3].text=getShortString("\u7B80\u4ECB\uFF1A"+i[3].text,52),i}};function clear(){var t=document.getElementById("canvas");if(!!t){var i=t.getContext("2d");i.clearRect(0,0,t.width,t.height),document.getElementById("code").innerHTML=""}}var params={},callToImg={},dicNumber={A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73},type="image/jpeg",createCallToImgFunc=function(t){callToImg[t]=function(){var i=document.getElementById("canvas")&&document.getElementById("canvas").toDataURL(type);$("#image-"+t).attr("src",i),t!="I"&&(clear(),drawImg(params["params"+String.fromCharCode(dicNumber[t]+1)],callToImg[String.fromCharCode(dicNumber[t]+1)]))}};function commonPicShare(t,i){for(var o=i=="shortvideo"||i=="information"||i=="lookpic",d=o?i=="lookpic"?"\u9080\u8BF7\u60A8\u4E00\u8D77\u4EAB\u53D7\u597D\u56FE\u7247\uFF0C\u957F\u6309\u626B\u7801\u770B\u56FE":i=="information"?"\u9080\u8BF7\u60A8\u4E00\u8D77\u4EAB\u53D7\u597D\u6587\u7AE0 \u957F\u6309\u626B\u7801\u9605\u8BFB":"\u9080\u8BF7\u60A8\u4E00\u8D77\u4EAB\u53D7\u597D\u89C6\u9891\uFF0C\u957F\u6309\u626B\u7801\u89C2\u770B":"",c=Object.keys(shareType),n=c.length-1;n>=0;n--){var r=c[n];params["params"+r]=shareType[r](t,d),params["params"+r].map(function(h){if("x"in h&&(h.x=h.x*4),"y"in h&&(h.y=h.y*4),"width"in h&&(h.width=h.width*4),"height"in h&&(h.height=h.height*4),"lineHeight"in h&&(h.lineHeight=h.lineHeight*4*1.25),"size"in h&&(h.size=h.size*4),"rowSpacing"in h&&(h.rowSpacing=h.rowSpacing*4),"radius"in h)for(var l in h.radius)h.radius[l]=h.radius[l]*4}),createCallToImgFunc(r)}drawImg(params.paramsA,callToImg.A)}function test(t){return commonPicShare(t),$(".share-card-container").html()}