(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-user-thank"],{"129c":function(t,i,e){"use strict";var a=e("c4bc"),n=e.n(a);n.a},2828:function(t,i,e){"use strict";e.r(i);var a=e("8cda"),n=e.n(a);for(var o in a)"default"!==o&&function(t){e.d(i,t,(function(){return a[t]}))}(o);i["default"]=n.a},"74cce":function(t,i,e){"use strict";var a;e.d(i,"b",(function(){return n})),e.d(i,"c",(function(){return o})),e.d(i,"a",(function(){return a}));var n=function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("v-uni-view",{staticClass:"content"},[e("v-uni-view",{staticClass:"box"},[t.showcanvas?e("v-uni-canvas",{staticClass:"tki-qrcode-canvas",attrs:{id:"qrShareBox","canvas-id":"qrShareBox"}}):e("v-uni-image",{staticClass:"imgbox",attrs:{src:t.img}})],1)],1)},o=[]},"8cda":function(t,i,e){"use strict";e("fb6a"),e("ac1f"),Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var a=e("f529"),n={data:function(){return{money:"",url:"",img:"",showcanvas:!0,loading:!0,size:180,ratio:1,canHeight:"",canWeidth:"",playing:!0,current:{src:"../../static/audio/xx.mp3"},rotateIndex:"",animation:{},animationData:{},audioAction:{method:"pause"},ran:-1,isStop:!0,demo:0,userName:"沙市区XXX公司",time:0,itemName:"",pid:0}},computed:{showtime:function(){var t=new Date(1e3*this.time),i=t.getFullYear(),e=t.getMonth()+1,a=t.getDate();return i+"年"+e+"月"+a+"日"}},onReady:function(){var t=this,i=uni.createSelectorQuery(),e=this;console.log(999,e.money),i.select(".box").fields({size:!0},(function(i){console.log("获取页面比例",i),t.ratio=i.width/750})).exec(),i.select("#qrShareBox").fields({size:!0},(function(t){console.log("获取画布宽高信息",t),e.canHeight=t.height,e.canWeidth=t.width})).exec();var a="/static/img/zszs.png",n="/static/icon/erweima.jpg",o=uni.createCanvasContext("qrShareBox");console.log("插入背景图片",a,0,0,e.canWeidth,e.canHeight),o.drawImage(a,0,0,e.canWeidth,e.canHeight);var r=e.size*e.ratio,l=(750-e.size)*e.ratio/2,s=960*e.ratio,c=0,h=(e.ratio,r+c*e.ratio),f=(e.ratio,24*e.ratio),d="";d.length;o.setFontSize(38*e.ratio),o.setFillStyle("#000"),o.setFontSize(40*e.ratio),o.fillText("感谢 ",100*e.ratio,460*e.ratio);var g=e.userName;if(g.length<=12)o.fillText(g,200*e.ratio,460*e.ratio);else if(g.length<=18){var u=g.slice(0,9),x=g.slice(9);o.fillText(u,200*e.ratio,434*e.ratio),o.setTextAlign("center"),o.fillText(x,380*e.ratio,483*e.ratio),o.setTextAlign("left")}else if(g.length<=24){var m=g.slice(0,12),v=g.slice(12);o.fillText(m,200*e.ratio,434*e.ratio),o.setTextAlign("center"),o.fillText(v,438*e.ratio,483*e.ratio),o.setTextAlign("left")}else if(g.length<=30){var T=g.slice(0,12),p=g.slice(12,22),b=g.slice(22);o.fillText(T,200*e.ratio,400*e.ratio),o.setTextAlign("center"),o.fillText(p,438*e.ratio,450*e.ratio),o.fillText(b,438*e.ratio,500*e.ratio),o.setTextAlign("left")}else if(g.length<=36){var w=g.slice(0,12),A=g.slice(12,24),S=g.slice(24);o.fillText(w,200*e.ratio,400*e.ratio),o.setTextAlign("center"),o.fillText(A,438*e.ratio,450*e.ratio),o.fillText(S,438*e.ratio,500*e.ratio),o.setTextAlign("left")}o.setFontSize(38*e.ratio),o.fillText("感谢您于"+e.showtime+"对",180*e.ratio,560*e.ratio);var y="“"+e.itemName+"”的爱心捐赠。";if(y.length<15)o.fillText(y,90*e.ratio,615*e.ratio),o.setTextAlign("center"),o.fillText("特发此证书,以示感谢!",375*e.ratio,695*e.ratio),o.setTextAlign("left");else if(y.length<30)if(17==y.length)o.fillText(y,85*e.ratio,615*e.ratio),o.setTextAlign("center"),o.fillText("特发此证书,以示感谢!",375*e.ratio,695*e.ratio),o.setTextAlign("left");else{var z=y.slice(0,16),I=y.slice(16);o.fillText(z,85*e.ratio,615*e.ratio),o.fillText(I,100*e.ratio,670*e.ratio),o.setTextAlign("center"),o.fillText("特发此证书,以示感谢!",375*e.ratio,750*e.ratio),o.setTextAlign("left")}else if(y.length<48){var j=y.slice(0,16),k=y.slice(16,31),q=y.slice(31);o.fillText(j,85*e.ratio,615*e.ratio),o.fillText(k,100*e.ratio,670*e.ratio),o.fillText(q,100*e.ratio,725*e.ratio),o.setTextAlign("center"),o.fillText("特发此证书,以示感谢!",375*e.ratio,805*e.ratio),o.setTextAlign("left")}else if(y.length<63){var F=y.slice(0,16),H=y.slice(16,31),N=y.slice(31,46),C=y.slice(46);o.fillText(F,85*e.ratio,615*e.ratio),o.fillText(H,100*e.ratio,670*e.ratio),o.fillText(N,100*e.ratio,725*e.ratio),o.fillText(C,100*e.ratio,780*e.ratio),o.setTextAlign("center"),o.fillText("特发此证书,以示感谢!",375*e.ratio,860*e.ratio),o.setTextAlign("left")}o.drawImage(n,490*e.ratio,1140*e.ratio,r,r),o.draw(!1,(function(t){uni.canvasToTempFilePath({x:0,y:0,width:e.canWeidth,height:e.canHeight,destWidth:e.canWeidth,destHeight:e.canHeight,canvasId:"qrShareBox",success:function(t){console.log(333,t),e.showcanvas=!1,e.img=t.tempFilePath}})}))},onShow:function(){},onLoad:function(t){this.pid=t.project_id,this.userName=t.name,this.time=t.time,this.itemName=t.title,this.IndexShare()},onHide:function(){this.timer&&clearInterval(this.timer)},onUnload:function(){},methods:{IndexShare:function(){var t=this,i={link:"http://jz.red.igxys.com/ssq/#/pages/user/thank?project_id="+t.pid+"&name="+t.userName+"&time="+t.time+"&title="+t.itemName,imgUrl:"http://jz.red.igxys.com/static/img/22.jpg",desc:"感谢信",title:"沙市区红十字会",success:console.log("分享加载成功")};console.log("分享加",i),(0,a.weixindata)(i)},musicClick:function(){},play:function(){var t=this;this.playing=!this.playing,this.ScanAudio(this.playing),1==this.playing?this.timer=setInterval((function(){t.scaleAndScale(),console.log("每1秒执行一次")}),1e3):clearInterval(this.timer)},scaleAndScale:function(){this.animation.rotate(this.demo).step({duration:1e3}),this.animationData=this.animation.export(),this.demo+=360},noscaleAndScale:function(){this.animation.rotate(0).step({duration:1e3}),this.animationData=this.animation.export()}}};i.default=n},"9acb":function(t,i,e){"use strict";e.r(i);var a=e("74cce"),n=e("2828");for(var o in n)"default"!==o&&function(t){e.d(i,t,(function(){return n[t]}))}(o);e("129c");var r,l=e("f0c5"),s=Object(l["a"])(n["default"],a["b"],a["c"],!1,null,"7bc11b19",null,!1,a["a"],r);i["default"]=s.exports},c4bc:function(t,i,e){var a=e("f943");"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=e("4f06").default;n("5ee27af4",a,!0,{sourceMap:!1,shadowMode:!1})},f943:function(t,i,e){var a=e("24fb");i=a(!1),i.push([t.i,'@charset "UTF-8";\n/* 页面左右间距 */\n/* 文字尺寸 */\n/*文字颜色*/\n/* 边框颜色 */\n/*颜色*/\n/* 图片加载中颜色 */\n/* 行为相关颜色 */\n/* 功能栏字体大小 */\n/*功能栏左侧小图标*/uni-page-body[data-v-7bc11b19]{width:100%;height:100%}.content[data-v-7bc11b19]{width:100%;position:relative}.content .image[data-v-7bc11b19]{width:100%;height:100vh}.content .bgimg[data-v-7bc11b19]{width:100%;height:100%}.content .bgimg uni-image[data-v-7bc11b19]{width:100%;height:100%}.content .box[data-v-7bc11b19]{color:#fff;width:100%;height:100vh}.content .box .tki-qrcode-canvas[data-v-7bc11b19]{width:%?750?%;height:%?1350?%;margin:0 auto}.content .imgbox[data-v-7bc11b19]{height:%?1334?%;width:%?750?%}.image[data-v-7bc11b19]{width:100%;height:100%}',""]),t.exports=i}}]);