1 |
- !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(["./ResizeObserver.es-legacy.8d60aee1.js","./index-legacy.7e047c4c.js","./index-legacy.4a75d877.js","./index-legacy.fd89cccf.js","./index-legacy.610f0a70.js","./index-legacy.a082ee96.js","./index-legacy.df0bf034.js","./index-legacy.4e5c868b.js","./index-legacy.a85d660d.js","./index-legacy.f8f0c467.js","./index-legacy.02065493.js","./share-legacy.cd86940e.js","./index-legacy.57ab86c5.js","./index-legacy.bbc2b10e.js","./icon_discount-legacy.51763f3b.js","./share-vip-tips-legacy.0d425f76.js","./share-banner-legacy.3a0e6967.js","./wx_bg-legacy.a09a21f9.js","./index-legacy.b813135f.js","./bars-legacy.9085ff9b.js","./icon_album_active-legacy.4391adb4.js","./icon_music_active-legacy.51780227.js","./index-legacy.d9279c92.js","./index-legacy.3b8f07aa.js","./icon_teacher-legacy.42ba77b1.js","./icon_timer2-legacy.b6c78faa.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.f,r=e.g,o=e.v,a=e.n,c=e.D,s=e.y,d=e.j,l=e.A,_=e.bC,u=e.aw,f=e.B,p=e.$},function(e){m=e.S,g=e.a},function(e){y=e.I},function(e){b=e.C},function(e){h=e.C},function(e){v=e.I},function(e){w=e.R,x=e.a},function(){},function(e){k=e.T},function(e){j=e.R,z=e.C},function(e){S=e.C},function(e){D=e.s},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",A="_goodsName_i7yn2_47",B="_row_i7yn2_53",E="_col_i7yn2_57",G="_radio-group_i7yn2_61",R="_radio_i7yn2_61",q="_badge_i7yn2_96",M="_section_i7yn2_100",N="_detail_i7yn2_104",$="_photoDetail_i7yn2_129",O="_goodsDetail_i7yn2_133",J="_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(o.stringify(i))):(a({api:"openWebView",content:{url:"".concat(location.origin,"/student/#/goodsDetail?").concat(o.stringify(i)),orientation:1,isHideTitle:!1}}),a({api:"back"}))}else"TEACHER"===r.platformType&&c.alert({title:"提示",message:"请使用酷乐秀学生端扫码打开"}).then((function(){a({api:"back"})}));else{var n=location.origin,s=this.$route.query,d=n+"/student/#/goodsDetail?id=".concat(s.bizId,"&promoterId=").concat(s.userType&&"STUDENT"==s.userType?"":s.userId,"&p=").concat(s.p);D(d,{})}},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,s.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){v({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}));v({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,"&p=").concat(i.p);D(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 d("div",{class:O},[d(m,{class:P,lazyRender:!0},{default:function(){return[i.albumPics.map((function(e,n){return d(g,null,{default:function(){return[d(y,{class:T,src:e,onClick:function(){return i.onPreview(n)},fit:"cover"},null)]}})}))]},indicator:function(e){return e.total>1&&d("div",{class:C},[(e.active||0)+1,l(" / "),e.total])}}),d(b,{border:!1,class:[H,"mb12"]},{default:function(){return[d(h,{center:!0,border:!1},{title:function(){return d("div",{class:W},[d("span",{class:L},[d("i",null,[l("¥")]),_(i.getPrice)])])}}),d(h,{center:!0,border:!1,title:n.name,titleClass:[A,"van-ellipsis"]},null)]}}),d(j,{class:[B,"mb12"]},{default:function(){return[d(z,{span:4,class:E},{default:function(){return[l("规格")]}}),d(z,{span:20},{default:function(){return[d("div",{class:J},t?[t.stock<=0?"当前款式暂时缺货":"已选择 ".concat(t.spDataJson)]:[l("请选择 规格")]),d(w,{class:G,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 d(u,{position:"top-right",content:e.stock<=0?"缺货":"",color:"#999999",class:q,offset:[-20,0]},{default:function(){return[d(x,{class:R,name:e.id,disabled:e.stock<=0,onClick:function(){e.stock<=0||(i.radio=e.id)}},{default:function(){return[d(k,{size:"large",plain:n,type:t},{default:function(){return[e.spDataJson]}})]}})]}})})),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!p(n)?e:{default:function(){return[e]}}))];var n}})]}}),this.detailMobileHtml&&d("div",{class:[M]},[d("div",{class:N},[d("span",null,[l("图文详情")])]),d("div",{class:[$,"msgWrap"],onClick:this.onShowImg,innerHTML:this.detailMobileHtml},null)]),d(S,{position:"bottom"},{default:function(){return[d("div",{class:["btnGroup"],style:{paddingTop:"12px"}},[d(f,{block:!0,round:!0,type:"primary",onClick:i.onDetail},{default:function(){return[l("下载酷乐秀购买商品")]}})])]}}),this.wxStatus&&d("div",{class:U,onClick:function(){i.wxStatus=!1}},[d("img",{src:I("wx_bg.png"),alt:""},null)])])}}))}}}))}();
|