(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-share-detail-share-detail"],{"0e5f":function(e,t,i){"use strict";(function(e){var n=i("4ea4");i("99af"),i("e25e"),i("ac1f"),i("5319"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i("6257"),o=(n(i("8696")),n(i("8366"))),r={data:function(){return{product:"",banner:[],allImg:0,current:0,shareShow:!1,canvasWidth:0,canvasHeight:0,store:"",poster:""}},onLoad:function(e){var t=this;e.id&&(this.getDetail(e.id),this.store=uni.getStorageSync("store")),wx.getSystemInfo({success:function(e){t.canvasWidth=e.windowWidth/375,t.canvasHeight=e.windowHeight}})},methods:{shareNow:function(){var e="http://weidian.woaidakele.cn/web/user#pages/share-detail/share-detail?sku_id=".concat(this.product.id,"&store_id=").concat(this.store.id);this.qrImg=o.default.createQrCodeImg(e,{size:parseInt(200)}),this.shareShow=!0,this.drawPoster()},getDetail:function(e){var t=this,i=this;(0,a.shareGoods)({sku_id:e}).then((function(e){200==e.code?(t.product=e.data[0],e.data[0].goods.banner&&(i.banner=JSON.parse(e.data[0].goods.banner),i.allImg=i.banner.length)):uni.showModal({content:e.data,showCancel:!1})}))},swiperChange:function(e){this.current=e.target.current},drawPoster:function(){var t=this,i=this;uni.showLoading({title:"图片加载中..."}),e.log(this.product);var n=uni.createCanvasContext("canvas"),a=i.canvasWidth;n.drawImage("../../static/imgs/shop/goods_share.png",0,0,286*a,470*a),n.setFontSize(uni.upx2px(36)),n.setFillStyle("#B4320B"),n.fillText(this.store.name,(uni.upx2px(572)-n.measureText(this.store.name).width)/2,uni.upx2px(180)),n.setFontSize(uni.upx2px(28)),n.setFillStyle("#B4320B"),n.fillText(this.store.phone,uni.upx2px(195),uni.upx2px(230)),n.drawImage(this.qrImg,uni.upx2px(135),uni.upx2px(410),uni.upx2px(302),uni.upx2px(302)),n.setFontSize(uni.upx2px(36)),n.fillText(this.product.goods.name,uni.upx2px(200),uni.upx2px(850)),n.setFontSize(uni.upx2px(28)),n.setFillStyle("#EA4A41"),n.fillText(this.product.type,uni.upx2px(200),uni.upx2px(900)),n.setFontSize(uni.upx2px(28)),n.setFillStyle("#EA4A41"),n.fillText(this.product.size,uni.upx2px(280),uni.upx2px(900)),n.setFontSize(uni.upx2px(28)),n.fillText(this.product.goods.price,uni.upx2px(400),uni.upx2px(900)),setTimeout((function(e){n.draw(!1,(function(){uni.canvasToTempFilePath({width:286*a,height:470*a,canvasId:"canvas",success:function(e){var i=e.tempFilePath;t.poster=i.replace(/[\r\n]/g,"")}})})),uni.hideLoading()}),1e3)}}};t.default=r}).call(this,i("5a52")["default"])},3568:function(e,t,i){"use strict";var n=i("95d3"),a=i.n(n);a.a},"5acc":function(e,t,i){var n=i("24fb");t=n(!1),t.push([e.i,'@charset "UTF-8";.app-item[data-v-3d16c2e4]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;font-size:%?32?%;position:relative;background:#fff;box-sizing:border-box;min-height:%?90?%;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;padding:0 %?30?%;margin-bottom:%?2?%}.app-item.item-space[data-v-3d16c2e4]{margin-top:%?10?%}.app-item uni-input[data-v-3d16c2e4], .app-item uni-picker[data-v-3d16c2e4], .app-item uni-textarea[data-v-3d16c2e4]{height:100%;width:%?521?%;font-size:%?26?%;text-align:left;color:#999}.kingkong[data-v-3d16c2e4]{height:%?346?%;margin-top:%?10?%}.kingkong uni-navigator[data-v-3d16c2e4]{width:25%;height:50%;float:left;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column}.kingkong uni-navigator uni-image[data-v-3d16c2e4]{width:%?88?%;height:%?88?%;margin-top:%?30?%;border-radius:50%}.kingkong uni-navigator uni-text[data-v-3d16c2e4]{font-size:%?32?%;margin-top:%?12?%}.big-btn[data-v-3d16c2e4]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;width:%?630?%;height:%?88?%;font-size:%?34?%;margin:%?88?% auto 0;border-radius:%?44?%;color:#f76454;border:2px solid #f76454}.big-btn.bg[data-v-3d16c2e4]{color:#fff;background:#f76454}.small-btn[data-v-3d16c2e4]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;padding:0 %?14?%;font-size:%?26?%;margin-left:%?10?%;color:#f76454;height:%?48?%!important;min-width:%?106?%!important;border:%?2?% solid #f76454}.small-btn.dank[data-v-3d16c2e4]{color:#999;border-color:#999}.login-btn[data-v-3d16c2e4]{-webkit-box-flex:1;-webkit-flex:1;flex:1;width:100%;height:100%;background:#fff}.login-btn uni-navigator[data-v-3d16c2e4]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;top:50%;left:50%;width:%?400?%;height:%?88?%;color:#fff;position:fixed;font-size:%?32?%;border-radius:%?10?%;background:#f76454;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ellipsis[data-v-3d16c2e4]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.icon-right[data-v-3d16c2e4]{margin-right:%?20?%}.border-right[data-v-3d16c2e4]{border-right:%?1?% solid #f2f2f2}.level-name[data-v-3d16c2e4]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;width:%?130?%;height:%?36?%;color:#fff;font-size:%?16?%!important;border-radius:%?18?%;background:#f76454}.level-name .cuIcon-crownfill[data-v-3d16c2e4]{margin-right:%?6?%}.position-center[data-v-3d16c2e4]{left:50%;top:50%;position:absolute;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.data-card[data-v-3d16c2e4]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;width:100%;height:%?336?%;position:relative;background:#f2f2f2}.data-card uni-image[data-v-3d16c2e4]{z-index:0;width:%?706?%;height:%?316?%}.data-card .data-card-text[data-v-3d16c2e4]{width:100%;height:100%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column}.data-card .data-card-text .text[data-v-3d16c2e4]{color:#fff;font-size:%?32?%}.data-card .data-card-text .num[data-v-3d16c2e4]{color:#fff;font-size:%?70?%;margin-top:%?60?%}.basecolor[data-v-3d16c2e4]{color:#f76454}.swiper-nav[data-v-3d16c2e4]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;width:100%;height:%?84?%;color:#666;font-size:%?32?%;position:relative;background:#fff;box-sizing:border-box;border-bottom:%?1?% solid #f2f2f2}.swiper-nav .item[data-v-3d16c2e4]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;-webkit-box-flex:1;-webkit-flex:1;flex:1;height:100%}.swiper-nav .item.active[data-v-3d16c2e4]{color:#f76454}.swiper-nav .moveBar[data-v-3d16c2e4]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;bottom:0;height:%?6?%;position:absolute}.swiper-nav .moveBar > uni-text[data-v-3d16c2e4]{width:100%;height:100%;border-radius:%?3?%;background:#f76454}.swiper-area[data-v-3d16c2e4]{-webkit-box-flex:1;-webkit-flex:1;flex:1;width:100%}.swiper-area uni-swiper[data-v-3d16c2e4]{width:100%;height:100%}.article-header[data-v-3d16c2e4]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;height:%?120?%;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;border-bottom:%?1?% solid #f2f2f2}.article-header .head-pic[data-v-3d16c2e4]{width:%?80?%;height:%?80?%;border-radius:50%}.article-header .name[data-v-3d16c2e4]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;-webkit-box-flex:1;-webkit-flex:1;flex:1;height:100%;margin-left:%?20?%;-webkit-box-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start}.article-header .name .identity[data-v-3d16c2e4]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;width:%?56?%;height:%?28?%;color:#fff;font-size:%?20?%;margin-left:%?20?%;border-radius:%?8?%;background:#f76454}.article-header .time[data-v-3d16c2e4]{font-size:%?24?%;color:#999}.article-header .time.justnow[data-v-3d16c2e4]{color:#f76454}.article-footer[data-v-3d16c2e4]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;height:%?90?%;border-top:%?1?% solid #f2f2f2}.article-footer .footer-item[data-v-3d16c2e4]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;-webkit-box-flex:1;-webkit-flex:1;flex:1;height:%?40?%}.article-footer .footer-item.center[data-v-3d16c2e4]{border-left:%?1?% solid #ccc;border-right:%?1?% solid #ccc}.article-footer .footer-item .icon-right[data-v-3d16c2e4]{font-size:%?40?%}.article-footer .footer-item .icon-right.fill[data-v-3d16c2e4]{color:#f76454}\r\n/*主题色及按钮渐变背景*/\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.richText[data-v-3d16c2e4]{width:%?690?%;margin:0 auto;padding:%?20?%;background-color:#fff;font-size:%?28?%}uni-rich-text img[data-v-3d16c2e4]{max-width:100%!important}.rg .rg_bug[data-v-3d16c2e4]{position:fixed;bottom:0;left:0;right:0;height:%?100?%;font-size:%?32?%;color:#fff;background:-webkit-linear-gradient(309deg,#f97c55,#f44545);background:linear-gradient(141deg,#f97c55,#f44545);text-align:center;line-height:%?100?%}.rg .rg_imgs[data-v-3d16c2e4]{width:100%;margin-bottom:%?100?%;text-align:center}.rg .rg_size[data-v-3d16c2e4]{width:100%;padding:%?30?%;box-sizing:border-box;background-color:#fff;border-bottom:%?2?% solid #e9e9e9}.rg .rg_size .T[data-v-3d16c2e4]{color:#999;font-size:%?28?%;margin-bottom:%?10?%}.rg .rg_size .B[data-v-3d16c2e4]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.rg .rg_size .B uni-text[data-v-3d16c2e4]{color:#333;font-size:%?28?%}.rg .rg_size .B .B_counter[data-v-3d16c2e4]{width:%?180?%;height:%?64?%}.rg .rg_info[data-v-3d16c2e4]{width:100%;padding:%?30?%;box-sizing:border-box;background-color:#fff;border-bottom:%?2?% solid #e9e9e9}.rg .rg_info .B[data-v-3d16c2e4]{width:100%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.rg .rg_info .B uni-text[data-v-3d16c2e4]:nth-of-type(1){color:#999;font-size:%?28?%}.rg .rg_info .B uni-text[data-v-3d16c2e4]:nth-last-of-type(1){color:#f76454;font-size:%?36?%}.rg .rg_info .T[data-v-3d16c2e4]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;align-items:center;margin-bottom:%?20?%}.rg .rg_info .T uni-text[data-v-3d16c2e4]:nth-of-type(1){color:#333;font-size:%?36?%;line-height:%?48?%}.rg .rg_info .T uni-text[data-v-3d16c2e4]:nth-of-type(2){color:#f76454;font-size:%?28?%;height:%?46?%;line-height:%?46?%;padding:0 %?16?%;width:-webkit-max-content;width:max-content;border-radius:%?46?%;background-color:#fff4f3;margin-right:%?20?%}.rg .rg_swiper[data-v-3d16c2e4]{width:100%;height:%?600?%;position:relative}.rg .rg_swiper uni-image[data-v-3d16c2e4],\r\n.rg .rg_swiper uni-swiper[data-v-3d16c2e4]{width:100%;height:%?600?%}.rg .rg_swiper .rg_swiper_page[data-v-3d16c2e4]{height:%?48?%;border-radius:%?48?%;background-color:rgba(0,0,0,.6);font-size:%?28?%;line-height:%?48?%;padding:0 %?36?%;position:absolute;right:%?30?%;bottom:%?30?%}.rg .rg_swiper .rg_swiper_page uni-text[data-v-3d16c2e4]{color:#fff}.rg .rg_swiper .rg_swiper_page uni-text[data-v-3d16c2e4]:nth-of-type(1){font-size:%?28?%}.rg .share_show[data-v-3d16c2e4]{width:100%;height:100vh;position:fixed;top:0;left:0;background-color:rgba(0,0,0,.7);z-index:99999}.rg .share_show .share_con[data-v-3d16c2e4]{width:80%;margin:0 auto;height:100%}.rg .share_show .share_con .canvas uni-image[data-v-3d16c2e4]{width:%?572?%;height:%?940?%;border-radius:%?24?%}.rg .share_show .share_con .canvas #canvas[data-v-3d16c2e4]{position:absolute;top:0;left:0;opacity:0}.rg .share_show .share_con .save_img[data-v-3d16c2e4]{color:#fff;width:100%;text-align:center;font-size:%?40?%;margin-top:%?20?%}.rg .share_show .iconfont[data-v-3d16c2e4]{position:absolute;top:4vh;right:%?25?%;color:#dedede;font-size:%?60?%;z-index:999}.rg .share_show .sub_btn[data-v-3d16c2e4]{margin-top:%?76?%}',""]),e.exports=t},"8c65":function(e,t,i){"use strict";i.r(t);var n=i("0e5f"),a=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,(function(){return n[e]}))}(o);t["default"]=a.a},"959d":function(e,t,i){"use strict";i.r(t);var n=i("f098"),a=i("8c65");for(var o in a)"default"!==o&&function(e){i.d(t,e,(function(){return a[e]}))}(o);i("3568");var r,c=i("f0c5"),s=Object(c["a"])(a["default"],n["b"],n["c"],!1,null,"3d16c2e4",null,!1,n["a"],r);t["default"]=s.exports},"95d3":function(e,t,i){var n=i("5acc");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var a=i("4f06").default;a("1248992a",n,!0,{sourceMap:!1,shadowMode:!1})},f098:function(e,t,i){"use strict";var n;i.d(t,"b",(function(){return a})),i.d(t,"c",(function(){return o})),i.d(t,"a",(function(){return n}));var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-view",{staticClass:"rg"},[i("v-uni-view",{staticClass:"rg_swiper"},[i("v-uni-swiper",{on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.swiperChange.apply(void 0,arguments)}}},e._l(e.banner,(function(e,t){return i("v-uni-swiper-item",{key:t},[i("v-uni-image",{attrs:{src:e,mode:"aspectFit"}})],1)})),1),i("v-uni-view",{staticClass:"rg_swiper_page"},[i("v-uni-text",[e._v(e._s(e.allImg?e.current+1:e.current)+"/"+e._s(e.allImg))])],1)],1),i("v-uni-view",{staticClass:"rg_info"},[i("v-uni-view",{staticClass:"T"},[e.product.goods?i("v-uni-text",[e._v(e._s(e.product.goods.name))]):e._e(),i("v-uni-text",{staticStyle:{"margin-left":"15rpx"}},[e._v("特享优惠价")])],1),i("v-uni-view",{staticClass:"B"},[i("v-uni-text",[e._v("销量"+e._s(e.product.sale_num))]),e.product.goods?i("v-uni-text",[e._v("¥"+e._s(e.product.goods.price))]):e._e()],1)],1),i("v-uni-view",{staticClass:"rg_size"},[i("v-uni-view",{staticClass:"T"},[e._v("规格")]),i("v-uni-view",{staticClass:"B"},[i("v-uni-text",[e._v(e._s(e.product.type)+":"+e._s(e.product.size))])],1)],1),e.product.goods?i("v-uni-view",{staticClass:"rg_imgs"},[i("v-uni-rich-text",{attrs:{nodes:e._f("formatRichText")(e.product.goods.content)}})],1):e._e(),i("v-uni-view",{staticClass:"rg_bug",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.shareNow()}}},[e._v("立即分享")]),e.shareShow?i("v-uni-view",{staticClass:"share_show"},[i("v-uni-view",{staticClass:"share_con flexCC"},[i("v-uni-text",{staticClass:"iconfont iconguanbi",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.shareShow=!1}}}),i("v-uni-view",{staticClass:"canvas"},[i("v-uni-canvas",{staticStyle:{width:"100%",height:"100%"},attrs:{"canvas-id":"canvas",id:"canvas"}}),i("v-uni-image",{attrs:{src:e.poster}})],1),i("v-uni-view",{staticClass:"save_img"},[e._v("长按保存图片")])],1)],1):e._e()],1)},o=[]}}]);