(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-activity-poster-poster-index"],{1844:function(t,e,n){var a=n("24fb");e=a(!1),e.push([t.i,".posterCon[data-v-3da9728b]{position:fixed;top:0;width:100%;left:0;height:100%;background-color:var(--view-theme);bottom:0;overflow-y:auto}.poster-poster .tip[data-v-3da9728b]{height:%?80?%;font-size:%?26?%;color:#e8c787;text-align:center;line-height:%?80?%;-webkit-user-select:none;user-select:none}.poster-poster .tip .iconfont[data-v-3da9728b]{font-size:%?36?%;vertical-align:%?-4?%;margin-right:%?18?%}.canvas[data-v-3da9728b]{width:100%;height:%?1100?%}.poster-poster .pictrue[data-v-3da9728b]{width:%?700?%;\n\t/* height: 100%; */margin:0 auto %?50?% auto;display:flex;justify-content:center}.poster-poster .pictrue uni-image[data-v-3da9728b]{width:100%\n\t/* height: 100%; */}",""]),t.exports=e},"2d54":function(t,e,n){"use strict";var a=n("7b09"),i=n.n(a);i.a},"6a71":function(t,e,n){"use strict";n("7a82");var a=n("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.getBargainDetail=function(t,e){return i.default.get("bargain/detail/".concat(t,"?bargainUid=").concat(e))},e.getBargainList=function(t){return i.default.get("bargain/list",t,{noAuth:!0})},e.getBargainPoster=function(t){return i.default.post("bargain/poster",t)},e.getBargainPosterData=function(t){return i.default.get("bargain/poster_info/"+t)},e.getBargainUserCancel=function(t){return i.default.post("bargain/user/cancel",t)},e.getBargainUserList=function(t){return i.default.get("bargain/user/list",t)},e.getCombinationBannerList=function(t){return i.default.get("combination/banner_list",t,{noAuth:!0})},e.getCombinationDetail=function(t){return i.default.get("combination/detail/"+t)},e.getCombinationList=function(t){return i.default.get("combination/list",t,{noAuth:!0})},e.getCombinationPink=function(t){return i.default.get("combination/pink/"+t)},e.getCombinationPoster=function(t){return i.default.post("combination/poster",t)},e.getCombinationPosterData=function(t){return i.default.get("combination/poster_info/"+t)},e.getIntegralOrderList=function(t){return i.default.get("store_integral/order/list",t)},e.getIntegralProductDetail=function(t){return i.default.get("store_integral/detail/"+t,{},{noAuth:!0})},e.getLogisticsDetails=function(t){return i.default.get("store_integral/order/express/".concat(t))},e.getPink=function(t){return i.default.get("pink",t,{noAuth:!0})},e.getPresellList=function(t){return i.default.get("advance/list",t)},e.getSeckillDetail=function(t,e){return i.default.get("seckill/detail/"+t,e)},e.getSeckillIndexTime=function(){return i.default.get("seckill/index",{},{noAuth:!0})},e.getSeckillList=function(t,e){return i.default.get("seckill/list/"+t,e,{noAuth:!0})},e.getStoreIntegralList=function(t){return i.default.get("store_integral/list",t)},e.integralOrderConfirm=function(t){return i.default.post("store_integral/order/confirm",t)},e.integralOrderCreate=function(t){return i.default.post("store_integral/order/create",t)},e.integralOrderDetails=function(t){return i.default.get("store_integral/order/detail/".concat(t))},e.orderDel=function(t){return i.default.post("store_integral/order/del",t)},e.orderTake=function(t){return i.default.post("store_integral/order/take",t)},e.postBargainHelp=function(t){return i.default.post("bargain/help",t)},e.postBargainHelpCount=function(t){return i.default.post("bargain/help/count",t)},e.postBargainHelpList=function(t){return i.default.post("bargain/help/list",t)},e.postBargainHelpPrice=function(t){return i.default.post("bargain/help/price",t)},e.postBargainShare=function(t){return i.default.post("bargain/share",{bargainId:t})},e.postBargainStart=function(t){return i.default.post("bargain/start",{bargainId:t})},e.postBargainStartUser=function(t){return i.default.post("bargain/start/user",t)},e.postCombinationRemove=function(t){return i.default.post("combination/remove",t)},e.scombinationCode=function(t){return i.default.get("combination/code/"+t)},e.seckillCode=function(t,e){return i.default.get("seckill/code/"+t,e)},n("99af");var i=a(n("3160"))},"7b09":function(t,e,n){var a=n("1844");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var i=n("4f06").default;i("342b0e97",a,!0,{sourceMap:!1,shadowMode:!1})},8458:function(t,e,n){"use strict";n.r(e);var a=n("b53e"),i=n("8f19");for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);n("2d54");var o=n("f0c5"),u=Object(o["a"])(i["default"],a["b"],a["c"],!1,null,"3da9728b",null,!1,a["a"],void 0);e["default"]=u.exports},"8f19":function(t,e,n){"use strict";n.r(e);var a=n("d7c4"),i=n.n(a);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);e["default"]=i.a},b53e:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return a}));var a={zbCode:n("2173").default},i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"posterCon",style:t.colorStyle},[n("v-uni-view",{staticClass:"poster-poster"},[n("v-uni-view",{staticClass:"tip"},[n("v-uni-text",{staticClass:"iconfont icon-shuoming"}),t._v(t._s(t.$t("提示:点击图片即可保存至手机相册")))],1),n("v-uni-view",{staticClass:"pictrue"},[t.posterImage?n("v-uni-image",{staticClass:"canvas",attrs:{src:t.posterImage},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.savePosterPathMp(t.posterImage)}}}):n("v-uni-canvas",{staticClass:"canvas",attrs:{"canvas-id":"myCanvas"}})],1)],1),n("zb-code",{ref:"qrcode",attrs:{show:t.codeShow,cid:t.cid,val:t.val,size:t.size,unit:t.unit,background:t.background,foreground:t.foreground,pdground:t.pdground,icon:t.icon,iconSize:t.iconsize,onval:t.onval,loadMake:t.loadMake},on:{result:function(e){arguments[0]=e=t.$handleEvent(e),t.qrR.apply(void 0,arguments)}}})],1)},r=[]},d7c4:function(t,e,n){"use strict";n("7a82");var a=n("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=a(n("c7eb")),r=a(n("1da1"));n("ac1f"),n("d3b7"),n("d401"),n("25f0"),n("c975"),n("5319");var o=a(n("2173")),u=n("6a71"),s=n("8ba8"),c=a(n("66ca")),d={components:{zbCode:o.default},mixins:[c.default],data:function(){return{canvasStatus:!0,posterImage:"",parameter:{navbar:"1",return:"1",title:this.$t("拼团海报"),color:!0,class:"0"},type:0,id:0,bargain:0,image:"",from:"",uid:"",codeShow:!1,cid:"1",ifShow:!0,val:"",size:200,unit:"upx",background:"#FFF",foreground:"#000",pdground:"#000",icon:"",iconsize:40,lv:3,onval:!0,loadMake:!0,src:"",codeSrc:"",wd:0,hg:0,posterBag:"../static/posterBag.png",mpUrl:""}},onLoad:function(t){this.from="wechat";if(!t.hasOwnProperty("type")||!t.hasOwnProperty("id"))return app.Tips({title:this.$t("参数错误"),icon:"none"},{tab:3,url:1});this.type=t.type,this.id=t.id,1==t.type?(this.bargain=t.bargain,uni.setNavigationBarTitle({title:this.$t("砍价海报")})):uni.setNavigationBarTitle({title:this.$t("拼团海报")})},onReady:function(){var t=this;1==this.type?this.val=window.location.origin+"/pages/activity/goods_bargain_details/index?id="+this.id+"&bargain="+this.$store.state.app.uid+"&spread="+this.$store.state.app.uid:2==this.type&&(this.val=window.location.origin+"/pages/activity/goods_combination_status/index?id="+this.id+"&spread="+this.$store.state.app.uid),setTimeout((function(e){t.getPosterInfo()}),200),this.$nextTick((function(){var t=this,e=uni.createSelectorQuery().select(".pictrue");e.fields({size:!0},(function(e){t.wd=e.width,t.hg=e.height})).exec()})),this.routineCode()},methods:{getPosterInfo:function(){var t=this;return(0,r.default)((0,i.default)().mark((function e(){var n,a,r,o,c;return(0,i.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t,"",{id:n.id,from:n.from},e.next=4,(0,s.getUserInfo)();case 4:if(a=e.sent,t.uid=a.data.uid,uni.showLoading({title:n.$t("海报生成中"),mask:!0}),1!=n.type){e.next=12;break}return e.next=10,(0,u.getBargainPosterData)(n.id).then((function(t){r=t.data})).catch((function(t){n.$util.Tips({title:n.$t("海报图片获取失败")})}));case 10:e.next=14;break;case 12:return e.next=14,(0,u.getCombinationPosterData)(n.id).then((function(t){r=t.data})).catch((function(t){n.$util.Tips({title:n.$t("海报图片获取失败")})}));case 14:return e.next=16,t.imgToBase(r.image,r.url);case 16:c=e.sent,o=[t.posterBag,c.image,c.code||t.codeSrc],t.$nextTick((function(e){n.$util.bargainPosterCanvas(o,r.title,r.label,r.msg,r.price,t.wd,t.hg,(function(e){t.posterImage=e}))}));case 19:case"end":return e.stop()}}),e)})))()},routineCode:function(){var t=this;return(0,r.default)((0,i.default)().mark((function e(){var n;return(0,i.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,(0,s.routineCode)();case 2:n=e.sent,t.mpUrl=n.data.url;case 4:case"end":return e.stop()}}),e)})))()},downloadFilestoreImage:function(t){var e=this;return new Promise((function(n,a){var i=e;uni.downloadFile({url:t,success:function(t){n(t.tempFilePath)},fail:function(){return i.$util.Tips({title:""})}})}))},setDomain:function(t){return t=t?t.toString():"",t.indexOf("https://")>-1?t:t.replace("http://","https://")},imgToBase:function(t,e){return(0,r.default)((0,i.default)().mark((function n(){var a;return(0,i.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,(0,s.imgToBase)({image:t,code:e});case 2:return a=n.sent,n.abrupt("return",a.data);case 4:case"end":return n.stop()}}),n)})))()},downloadImg:function(){},savePosterPathMp:function(t){var e=document.createElement("a");e.download=this.$t("海报"),e.href=t,document.body.appendChild(e),e.click()},qrR:function(t){this.codeSrc=t}}};e.default=d}}]);