(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["spread-page-spread-poster"],{"132a":function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){}));var a=function(){var t=this.$createElement,e=this._self._c||t;return e("v-uni-view",[e("div",{staticClass:"main",staticStyle:{"padding-top":"40rpx","text-align":"center","padding-bottom":"160rpx"}},[e("v-uni-view",{staticStyle:{display:"flex",width:"100%","text-align":"center","justify-content":"center"}},[e("v-uni-canvas",{style:{height:this.height+"px",width:this.width+"px",marginTop:"10000px"},attrs:{id:"myCanvas",type:"2d"}})],1)],1)])},i=[]},"3e51":function(t,e,n){"use strict";n("6a54");var a=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.singleAgentData=e.setAccount=e.myApplyApi=e.multipleAgentData=e.getWithdrawalRecord=e.getSpreadWithdrawal=e.getSpreadPoster=e.getSpreadMyTeam=e.getSpreadIndex=e.getScanTipsInfo=e.getPosterGoodsApi=e.getCurrentLogList=e.getAccount=e.bindingPromotionRelationship=e.applyWithdrawal=e.applyApi=e.allGroupsApi=e.agentList=void 0;var i=a(n("7653"));e.getSpreadIndex=function(){return i.default.get("api/user.spread.index/index")};e.getSpreadWithdrawal=function(){return i.default.get("api/user.spread.get_cash/index")};e.getCurrentLogList=function(t){return i.default.get("api/user.spread.current_log/list",t)};e.getSpreadPoster=function(){return i.default.post("api/user.spread.poster/index")};e.getWithdrawalRecord=function(t){return i.default.get("api/user.spread.get_cash/list",t)};e.getSpreadMyTeam=function(t){return i.default.get("api/user.spread.index/down",t)};e.applyWithdrawal=function(t){return i.default.post("api/user.spread.get_cash/apply",t)};e.getScanTipsInfo=function(t){return i.default.get("api/user.spread.index/scanTipsInfo",t)};e.bindingPromotionRelationship=function(t){return i.default.get("api/user.spread.index/member_spread_bind",t)};e.getAccount=function(){return i.default.post("api/user.spread.get_cash/getAccount")};e.setAccount=function(t){return i.default.post("api/user.spread.get_cash/setAccount",t)};e.getPosterGoodsApi=function(t){return i.default.get("api/user.spread.service_provider/index",t)};e.allGroupsApi=function(){return i.default.get("api/user.spread.index/allGroups")};e.agentList=function(){return i.default.get("api/user.partner.index/agentList")};e.singleAgentData=function(t){return i.default.post("api/user.partner.index/singleAgentData",t)};e.multipleAgentData=function(t){return i.default.post("api/user.partner.index/multipleAgentData",t)};e.myApplyApi=function(t){return i.default.get("api/user.spread.apply/myApply",t)};e.applyApi=function(t){return i.default.post("api/user.spread.apply/apply",t)}},4461:function(t,e,n){"use strict";var a=n("4eaf8"),i=n.n(a);i.a},"4eaf8":function(t,e,n){var a=n("eeec");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var i=n("967d").default;i("285f79f3",a,!0,{sourceMap:!1,shadowMode:!1})},"9d0a":function(t,e,n){"use strict";n("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.showToast=e.showModal=e.showLoading=e.closeLoading=void 0;e.showToast=function(t){var e=t.title,n=t.icon,a=t.mask,i=t.callback;uni.showToast({icon:n||"none",title:e,mask:a||!0}),setTimeout((function(){i&&i()}),1500)};e.showModal=function(t){var e=t.title,n=t.content,a=t.showCancel,i=t.cancelText,o=t.confirmText,s=t.callback;uni.showModal({title:e||"操作提示",content:n,showCancel:a||!1,cancelText:i||"取消",confirmText:o||"确认",success:function(t){t.confirm&&s&&s(!0),t.cancel&&s&&s(!1)}})};e.showLoading=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.title,n=void 0===e?"":e,a=t.mask,i=void 0!==a&&a;uni.showLoading({title:n,mask:i})};e.closeLoading=function(){uni.hideLoading()}},a8a8:function(t,e,n){"use strict";n("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("5c47"),n("5ef2");n("419c");var a=n("9d0a"),i=n("3e51"),o={data:function(){return{cacheUrl:"",respon:"",settle:{},canvas:null,width:320,height:640,poster:{bg:"https://qny.wdsp666.com/uploads/images/20230926022252815f40381.png",qrcode:"https://qny.wdsp666.com/uploads/images/oI2atA2V2axtA8iTcTotqa2kGaVVkr.jpg",qrcode_position_x:380,qrcode_position_y:450,qrcode_size:150},ctx:null,windowObj:{}}},onLoad:function(){this.init()},onShow:function(){},onPullDownRefresh:function(){},computed:{},methods:{init:function(){var t=this;uni.showLoading({title:"生成海报中...."});var e=wx.createSelectorQuery();e.select("#myCanvas").fields({node:!0,size:!0}).exec((function(e){t.canvas=e[0].node,(0,i.getSpreadPoster)().then((function(e){t.poster=e,t.combineImages()})).catch((function(t){uni.hideLoading(),(0,a.showToast)({title:t.msg})}))}))},drawImage:function(t,e){var n=this.canvas.createImage();n.onload=function(t){e(n,n)},n.src=t},combineImages:function(){var t=this;console.log("this.pageData",this.pageData),this.ctx=this.canvas.getContext("2d"),this.drawImage(this.poster.bg,(function(e,n){t.width=n.width,t.height=n.height,t.canvas.width=n.width,t.canvas.height=n.height,t.ctx.clearRect(0,0,t.canvas.width,t.canvas.height),t.ctx.drawImage(e,0,0,t.canvas.width,t.canvas.height),t.drawImage(t.poster.qrcode,(function(e,n){t.ctx.drawImage(e,t.poster.qrcode_position_x,t.poster.qrcode_position_y,t.poster.qrcode_size,t.poster.qrcode_size),uni.hideLoading(),uni.canvasToTempFilePath({canvas:t.canvas,success:function(e){t.cacheUrl=e.tempFilePath,t.share(e.tempFilePath)}},t)}))}))},download:function(){},share:function(t){var e=this;wx.showShareImageMenu({path:t,success:function(t){uni.navigateBack()},fail:function(t){console.log("fail",t),-1!=t.errMsg.indexOf("fail auth deny")?uni.showModal({title:"提示",content:"需要您授权保存相册",success:function(t){t.confirm?uni.openSetting({success:function(t){console.log(t.authSetting),t.authSetting["scope.writePhotosAlbum"]?e.cacheUrl&&e.share(e.cacheUrl):uni.navigateBack()},fail:function(t){uni.navigateBack()}}):t.cancel&&uni.navigateBack()}}):uni.navigateBack()}})}}};e.default=o},b199:function(t,e,n){"use strict";n.r(e);var a=n("132a"),i=n("eb63");for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);n("4461");var s=n("828b"),r=Object(s["a"])(i["default"],a["b"],a["c"],!1,null,"440aadea",null,!1,a["a"],void 0);e["default"]=r.exports},eb63:function(t,e,n){"use strict";n.r(e);var a=n("a8a8"),i=n.n(a);for(var o in a)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);e["default"]=i.a},eeec:function(t,e,n){var a=n("c86c");e=a(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 下方引入的为Tuniao UI的集成样式文件,为scss预处理器,其中包含了一些"tn-"开头的自定义变量\n * 使用的时候,请将下面的一行复制到您的uniapp项目根目录的uni.scss中即可\n * Tuniao UI自定义的css类名和scss变量,均以"tn-"开头,不会造成冲突,请放心使用 \n */.btn-save[data-v-440aadea]{width:100%;height:auto;position:fixed;bottom:0;left:0;display:flex;justify-content:center;align-items:center;padding:15px 0 25px 0;background-color:#fbbd12;color:#fff;font-weight:700;font-size:%?30?%}',""]),t.exports=e}}]);