!function(){function e(e,i,n,t,r,o,a){try{var c=e[o](a),s=c.value}catch(d){return void n(d)}c.done?i(s):Promise.resolve(s).then(t,r)}var i=document.createElement("style");i.innerHTML='._swipeItemImg_i7yn2_1,._swipe_i7yn2_1{width:100%;height:10rem;vertical-align:middle}._custom-indicator_i7yn2_7{position:absolute;right:.13333rem;bottom:.13333rem;padding:.10667rem .21333rem;font-size:.37333rem;color:#fff;background:rgba(0,0,0,.5);border-radius:.32rem}._goodsHead_i7yn2_17{padding:.21333rem 0}._goodsHead_i7yn2_17 .van-cell{padding-top:.13333rem;padding-bottom:.13333rem}._priceGroup_i7yn2_24{display:flex;align-items:center}._priceGroup_i7yn2_24 ._price_i7yn2_24{color:#ff4e19;font-size:.64rem;font-weight:700}._priceGroup_i7yn2_24 ._price_i7yn2_24 i{font-size:.42667rem;font-style:normal}._priceGroup_i7yn2_24 ._delPrice_i7yn2_37{font-size:.37333rem;color:#999;margin-left:.32rem;line-height:.53333rem}._priceGroup_i7yn2_24 ._stock_i7yn2_43{font-size:.37333rem;color:#999}._goodsName_i7yn2_47{font-size:.42667rem;font-weight:500;color:#333;line-height:.58667rem}._row_i7yn2_53{background-color:#fff;padding:var(--van-cell-vertical-padding) var(--van-cell-horizontal-padding)}._row_i7yn2_53 ._col_i7yn2_57{font-size:.42667rem;color:#333}._radio-group_i7yn2_61{display:flex;flex-wrap:wrap}._radio_i7yn2_61{margin-right:.21333rem;margin-bottom:.21333rem;min-width:1.6rem}._radio_i7yn2_61 .van-radio__label--disabled{opacity:.5}._radio_i7yn2_61 .van-radio__icon{display:none}._radio_i7yn2_61 .van-tag--large{height:.72rem;font-size:.34667rem;text-align:center;display:flex;align-items:center;justify-content:center}._radio_i7yn2_61 .van-tag{box-sizing:border-box}._radio_i7yn2_61 .van-tag--default{color:#999}._radio_i7yn2_61 .van-tag--primary{background-color:#f7f8f9}._radio_i7yn2_61 .van-radio__label{margin-left:0}._badge_i7yn2_96 .van-badge{border-radius:.16rem 0;font-size:.32rem}._section_i7yn2_100{background:#fff;padding:.32rem 0 0}._detail_i7yn2_104{display:flex;align-items:center;justify-content:center;font-size:.37333rem;color:#999;line-height:.53333rem;margin-bottom:.32rem}._detail_i7yn2_104 span{padding:0 .26667rem}._detail_i7yn2_104:before,._detail_i7yn2_104:after{display:inline-block;content:" ";width:1.06667rem;height:.08rem}._detail_i7yn2_104:before{background:linear-gradient(90deg,rgba(238,238,238,0) 0%,#d8d8d8 100%)}._detail_i7yn2_104:after{background:linear-gradient(270deg,rgba(238,238,238,0) 0%,#d8d8d8 100%)}._photoDetail_i7yn2_129 img{width:100%;vertical-align:middle}._goodsDetail_i7yn2_133{margin-bottom:var(--van-action-bar-height)}._actionBar_i7yn2_136{padding-left:.13333rem;padding-right:.13333rem;justify-content:space-between;box-shadow:0 -.26667rem .26667rem var(--box-shadow-color);box-sizing:border-box}._actionBar_i7yn2_136 .van-submit-bar__bar{justify-content:space-between;padding:0}._actionBar_i7yn2_136 .van-action-bar-icon{align-items:center}._actionBar_i7yn2_136 .van-action-bar-icon__icon{margin-bottom:0;line-height:0}._actionBar_i7yn2_136 .van-badge{background:#ff4e19}._addCertBtn_i7yn2_157{background:#fff;color:var(--van-primary)}._buyGroup_i7yn2_161{flex-basis:60%;display:flex;justify-content:center;border:var(--van-button-border-width) solid var(--van-button-primary-border-color)!important;border-radius:.53333rem;background-color:var(--van-primary);overflow:hidden;box-sizing:border-box}._selectWrap_i7yn2_171{padding-top:.04rem;font-size:.37333rem;color:#666;padding-bottom:.32rem}._shareBtn_i7yn2_177{display:flex;align-items:center;font-size:.37333rem;color:#666}._shareWrap_i7yn2_183{display:flex;border-radius:.26667rem;border:.02667rem solid var(--van-primary);overflow:hidden;padding:.37333rem;align-items:center;background-color:#fff;margin-top:.42667rem}._shareWrap_i7yn2_183 ._sharePic_i7yn2_193{width:2.66667rem;height:2.66667rem;border-radius:.21333rem}._shareWrap_i7yn2_183 ._shareLeft_i7yn2_198{margin-right:.26667rem}._shareWrap_i7yn2_183 ._shareShopTitle_i7yn2_201{font-size:.42667rem;font-weight:400;color:#333}._shareWrap_i7yn2_183 ._shareShopDes_i7yn2_206{font-size:.37333rem;font-weight:400;color:#999;margin:.26667rem 0 .53333rem}._shareWrap_i7yn2_183 ._shareShopValue_i7yn2_212{font-size:.42667rem;color:#ff4e19}._shareWrap_i7yn2_183 ._shareShopOldPrice_i7yn2_216{color:#e5e5e5;margin-left:.13333rem}._wxpopup_i7yn2_220{width:100%;height:100vh;position:fixed;top:0;left:0;background:rgba(0,0,0,.5);z-index:9999}._wxpopup_i7yn2_220 img{width:88%;margin:0 6%}\n',document.head.appendChild(i),System.register(["./index-legacy.b2528a15.js","./index-legacy.3f4943f0.js","./index-legacy.ca42ae97.js","./index-legacy.a7e74731.js","./index-legacy.207dc8c2.js","./index-legacy.70f6e2fc.js","./index-legacy.5147af42.js","./index-legacy.7d3d7cf1.js","./index-legacy.edff980f.js","./index-legacy.d3645f16.js","./index-legacy.c99e8e49.js","./share-legacy.6cf7d519.js","./index-legacy.c610561c.js","./index-legacy.a07c6442.js","./icon_discount-legacy.51763f3b.js","./share-vip-tips-legacy.0d425f76.js","./share-banner-legacy.3a0e6967.js","./wx_bg-legacy.a09a21f9.js","./index-legacy.6c52edfe.js","./bars-legacy.9085ff9b.js","./icon_album_active-legacy.d2829e23.js","./icon_music_active-legacy.cc68af68.js","./index-legacy.f6bcdf82.js","./index-legacy.b6d96b2d.js","./icon_teacher-legacy.42ba77b1.js","./icon_timer2-legacy.b6c78faa.js","./icon-jiaozi-legacy.dd5ed0e2.js"],(function(i){"use strict";var n,t,r,o,a,c,s,d,l,u,_,f,p,m,g,y,b,h,v,w,x,k,j,z,S,D,I;return{setters:[function(e){n=e.d,t=e.b,r=e.s,o=e.p,a=e.D,c=e.e,s=e.i,d=e.A,l=e.by,u=e.aw,_=e.B,f=e.$},function(e){p=e.S,m=e.a},function(e){g=e.I},function(e){y=e.C},function(e){b=e.C},function(e){h=e.I},function(e){v=e.R,w=e.a},function(){},function(e){x=e.T},function(e){k=e.R,j=e.C},function(e){z=e.C},function(e){S=e.s},function(e){D=e.q},function(e){I=e.getAssetsHomeFile},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var T="_swipeItemImg_i7yn2_1",P="_swipe_i7yn2_1",C="_custom-indicator_i7yn2_7",H="_goodsHead_i7yn2_17",W="_priceGroup_i7yn2_24",L="_price_i7yn2_24",q="_goodsName_i7yn2_47",A="_row_i7yn2_53",B="_col_i7yn2_57",E="_radio-group_i7yn2_61",G="_radio_i7yn2_61",M="_badge_i7yn2_96",N="_section_i7yn2_100",R="_detail_i7yn2_104",$="_photoDetail_i7yn2_129",J="_goodsDetail_i7yn2_133",O="_selectWrap_i7yn2_171",U="_wxpopup_i7yn2_220";i("default",n({name:"goods-detail",data:function(){return{id:this.$route.query.id,albumPics:[],product:{},radio:0,skuStockList:[],detailMobileHtml:"",loading:!1,wxStatus:!1}},computed:{getPrice:function(){var e=this,i=this.skuStockList.filter((function(i){return i.id==e.radio}));return i&&Array.isArray(i)&&i.length?i[0].price:this.product.price}},created:function(){if(t().isApp)if("STUDENT"===r.platformType){var e=this.$route.query,i=Object.assign({id:e.bizId,promoterId:e.userId},e);i.promoterId=e.userType&&"STUDENT"==e.userType?"":i.promoterId,t().ios?window.location.replace("".concat(location.origin,"/student/#/goodsDetail?").concat(D.stringify(i))):(o({api:"openWebView",content:{url:"".concat(location.origin,"/student/#/goodsDetail?").concat(D.stringify(i)),orientation:1,isHideTitle:!1}}),o({api:"back"}))}else"TEACHER"===r.platformType&&a.alert({title:"提示",message:"请使用酷乐秀学生端扫码打开"}).then((function(){o({api:"back"})}));else{var n=location.origin,c=this.$route.query,s=n+"/student/#/goodsDetail?id=".concat(c.bizId,"&promoterId=").concat(c.userType&&"STUDENT"==c.userType?"":c.userId);S(s,{})}},mounted:function(){this.getProduct()},methods:{locationReplace:function(e){history.replaceState?(history.replaceState(null,document.title,e),window.location.reload()):location.replace(e)},getProduct:function(){var i,n=this;return(i=regeneratorRuntime.mark((function e(){var i,t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.loading=!0,i={},t=[],e.prev=3,e.next=6,c.post("/api-mall-portal/open/productProfit",{data:{bizId:n.$route.query.bizId,userId:n.$route.query.userId}});case 6:(r=e.sent).data&&r.data.productDetail&&(i=r.data.productDetail.product,t=r.data.productDetail.skuStockList||[]),e.next=12;break;case 10:e.prev=10,e.t0=e.catch(3);case 12:n.product=i,n.skuStockList=t.map((function(e){if(e.spData){var i=JSON.parse(e.spData);e.spDataJson=i.reduce((function(e,i){return e+=i.value}),""),e.sku=i.reduce((function(e,i){return e.push("".concat(i.key,": ").concat(i.value)),e}),[]).join(",")}else e.spDataJson="默认";return e})),n.albumPics=[i.pic].concat(i.albumPics.split(",")).filter((function(e){return e})),n.detailMobileHtml=i.detailMobileHtml,n.loading=!1;case 17:case"end":return e.stop()}}),e,null,[[3,10]])})),function(){var n=this,t=arguments;return new Promise((function(r,o){var a=i.apply(n,t);function c(i){e(a,r,o,c,s,"next",i)}function s(i){e(a,r,o,c,s,"throw",i)}c(void 0)}))})()},onPreview:function(e){h({images:this.albumPics,startPosition:e,closeable:!0})},onShowImg:function(e){if("img"===e.srcElement.localName){var i=0,n=document.querySelectorAll(".msgWrap img"),t=Array.from(n).map((function(n,t){return e.srcElement==n&&(i=t),n.src}));h({images:t,startPosition:i,closeable:!0})}},onDetail:function(){if(t().weixin)this.wxStatus=!0;else{var e=location.origin,i=this.$route.query,n=e+"/student/#/goodsDetail?id=".concat(i.bizId,"&promoterId=").concat(i.userId);S(n,{}),setTimeout((function(){location.href=e+"/student/#/download"}),3e3)}}},render:function(){var e,i=this,n=this.product,t=this.skuStockList.find((function(e){return e.id===i.radio}));return s("div",{class:J},[s(p,{class:P,lazyRender:!0},{default:function(){return[i.albumPics.map((function(e,n){return s(m,null,{default:function(){return[s(g,{class:T,src:e,onClick:function(){return i.onPreview(n)},fit:"cover"},null)]}})}))]},indicator:function(e){return e.total>1&&s("div",{class:C},[(e.active||0)+1,d(" / "),e.total])}}),s(y,{border:!1,class:[H,"mb12"]},{default:function(){return[s(b,{center:!0,border:!1},{title:function(){return s("div",{class:W},[s("span",{class:L},[s("i",null,[d("¥")]),l(i.getPrice)])])}}),s(b,{center:!0,border:!1,title:n.name,titleClass:[q,"van-ellipsis"]},null)]}}),s(k,{class:[A,"mb12"]},{default:function(){return[s(j,{span:4,class:B},{default:function(){return[d("规格")]}}),s(j,{span:20},{default:function(){return[s("div",{class:O},t?[t.stock<=0?"当前款式暂时缺货":"已选择 ".concat(t.spDataJson)]:[d("请选择 规格")]),s(v,{class:E,modelValue:i.radio,"onUpdate:modelValue":function(e){return i.radio=e}},(n=e=i.skuStockList.map((function(e){var n=e.id===i.radio,t=n?"primary":"default";return s(u,{position:"top-right",content:e.stock<=0?"缺货":"",color:"#999999",class:M,offset:[-20,0]},{default:function(){return[s(w,{class:G,name:e.id,disabled:e.stock<=0,onClick:function(){e.stock<=0||(i.radio=e.id)}},{default:function(){return[s(x,{size:"large",plain:n,type:t},{default:function(){return[e.spDataJson]}})]}})]}})})),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!f(n)?e:{default:function(){return[e]}}))];var n}})]}}),this.detailMobileHtml&&s("div",{class:[N]},[s("div",{class:R},[s("span",null,[d("图文详情")])]),s("div",{class:[$,"msgWrap"],onClick:this.onShowImg,innerHTML:this.detailMobileHtml},null)]),s(z,{position:"bottom"},{default:function(){return[s("div",{class:["btnGroup"],style:{paddingTop:"12px"}},[s(_,{block:!0,round:!0,type:"primary",onClick:i.onDetail},{default:function(){return[d("下载酷乐秀购买商品")]}})])]}}),this.wxStatus&&s("div",{class:U,onClick:function(){i.wxStatus=!1}},[s("img",{src:I("wx_bg.png"),alt:""},null)])])}}))}}}))}();