1 |
- import{d as u,c as e,m,f as A,aj as f,q as l,b6 as n}from"./index.332c7f08.js";import{I as d}from"./index.96a8db5e.js";import{s as g}from"./function-call.3db51140.js";import{S as _,a as k}from"./index.1e2dfe6e.js";import{C as y}from"./index.324108a5.js";import{C as p}from"./index.91135ff9.js";var w="./assets/member_bao-1.5356e9c8.png",C="./assets/member_bao-3.5c34f85e.png",le=u({name:"member-bao",setup(){return()=>e("div",{style:{lineHeight:"0"}},[e(d,{src:w},null),e(d,{src:C},null)])}});const b="_swipeItemImg_egloy_1",P="_swipe_egloy_1",S="_goodsHead_egloy_17",O="_sectionTips_egloy_23",D="_iconGives_egloy_33",E="_priceGroup_egloy_38",v="_price_egloy_38",Q="_delPrice_egloy_51",B="_stock_egloy_57",I="_goodsName_egloy_61",T="_row_egloy_67",N="_col_egloy_71",G="_radio_egloy_75",H="_badge_egloy_110",L="_section_egloy_23",J="_detail_egloy_118",X="_photoDetail_egloy_143",F="_goodsDetail_egloy_150",R="_actionBar_egloy_154",M="_addCertBtn_egloy_175",W="_buyGroup_egloy_179",V="_selectWrap_egloy_189",Z="_shareBtn_egloy_195",j="_shareWrap_egloy_201",x="_sharePic_egloy_211",z="_shareLeft_egloy_216",q="_shareRight_egloy_219",K="_shareShopTitle_egloy_223",Y="_shareShopDes_egloy_233",U="_shareShopValue_egloy_242",$="_shareShopOldPrice_egloy_246",ee="_imagesOverlayWrap_egloy_253";var o={swipeItemImg:b,swipe:P,"custom-indicator":"_custom-indicator_egloy_7",goodsHead:S,sectionTips:O,iconGives:D,priceGroup:E,price:v,delPrice:Q,stock:B,goodsName:I,row:T,col:N,"radio-group":"_radio-group_egloy_75",radio:G,badge:H,section:L,detail:J,photoDetail:X,goodsDetail:F,actionBar:R,addCertBtn:M,buyGroup:W,selectWrap:V,shareBtn:Z,shareWrap:j,sharePic:x,shareLeft:z,shareRight:q,shareShopTitle:K,shareShopDes:Y,shareShopValue:U,shareShopOldPrice:$,imagesOverlayWrap:ee},se="data:image/png;base64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Vnx+HFj59JYHa4+Az9eTwPwvNXEshBpVv/P/+DBPI5AWIBRS7HKeeV325zKrtVC0YI9a7ZCUEQ0nw39GdPs8vO+qOrMLL5xxfcBb5DshUpU8X6qy4Z1P8C4Udk+FZgFQQAAAAASUVORK5CYII=",de=u({name:"goods-detail",props:{groupPrice:{type:Number,default:0},goodsInfo:{type:Object,default:()=>({})},id:{type:String,defualt:""}},data(){return{albumPics:[],product:{},radio:0,skuStockListTemp:[],detailMobileHtml:"",loading:!1,addGoodsShow:!1,selectGoodsItem:{},cartCount:0,showType:"cart",shareShow:!1}},computed:{skuStockList(){const t=this.product,s=this.skuStockListTemp.length>0?this.skuStockListTemp:[{id:-1,price:t.price,pic:t.pic,stock:t.stock,spData:null}];return s.forEach(r=>{if(r.spData){const i=JSON.parse(r.spData);r.spDataJson=i.reduce((a,c)=>(a+=c.value,a),""),r.sku=i.reduce((a,c)=>(a.push(`${c.key}: ${c.value}`),a),[]).join(",")}else r.spDataJson="\u9ED8\u8BA4"}),s},getPrice(){const t=this.skuStockList.filter(s=>s.id==this.radio);return t&&Array.isArray(t)&&t.length?t[0].price:0}},async mounted(){try{this.loading=!0;const t=await m.get(`/api-student/open/mall/product/detail/${this.id}`);this.loading=!1;const s=t.data||{};if(this.albumPics=[s.product.pic].concat(s.product.albumPics.split(",")).filter(r=>r),this.product=s.product,this.skuStockListTemp=s.skuStockList||[],this.skuStockListTemp.length){const r=this.skuStockListTemp.length;for(let i=0;i<r;i++){const a=this.skuStockListTemp[i];if(a.stock>=0){this.radio=a.id;break}}}this.detailMobileHtml=s.product.detailMobileHtml||s.product.detailHtml}catch{}},methods:{onPreview(t){g({images:this.albumPics,startPosition:t,closeable:!0,className:o.imagesOverlayWrap})},onShowImg(t){const{localName:s}=t.srcElement;if(s!=="img")return;let r=0;const i=document.querySelectorAll(".msgWrap img"),a=Array.from(i).map((c,h)=>(t.srcElement==c&&(r=h),c.src));g({images:a,startPosition:r,closeable:!0,className:o.imagesOverlayWrap})},onShowCart(t="cart"){this.selectGoodsItem={price:this.product.pic,stock:this.product.stock,skuStockList:this.skuStockListTemp.length?this.skuStockListTemp:void 0,brandName:this.product.brandName,productCategoryId:this.product.productCategoryId,name:this.product.name,productSn:this.product.productSn,productSubTitle:this.product.subTitle,id:this.product.id},this.showType=t,this.addGoodsShow=!0}},render(){const t=this.product;return this.skuStockList.find(s=>s.id===this.radio),e("div",{class:o.goodsDetail},[A().isApp&&e(f,{border:!1},null),e(_,{class:o.swipe,lazyRender:!0},{default:()=>[this.albumPics.map((s,r)=>e(k,null,{default:()=>[e(d,{class:o.swipeItemImg,src:s,onClick:()=>this.onPreview(r),fit:"cover"},null)]}))],indicator:s=>s.total>1&&e("div",{class:o["custom-indicator"]},[(s.active||0)+1,l(" / "),s.total])}),e(y,{border:!1,class:[o.goodsHead,"mb12"]},{default:()=>[e(p,{center:!0,border:!1},{title:()=>e("div",{class:o.priceGroup},[e("span",{class:o.price},[e("i",null,[l("\xA5 ")]),n(this.groupPrice)]),e("del",{class:o.delPrice},[l("\xA5 "),n(t.originalPrice)])])}),e(p,{center:!0,border:!1,title:t.name,titleClass:[o.goodsName,"van-ellipsis"]},null),this.goodsInfo.showFree&&e("div",{class:o.sectionTips},[e(d,{src:se,class:o.iconGives},null),l("\u8D60\u4EF7\u503C"),this.goodsInfo.originalPrice,l("\u5143\u4E50\u5668\u7EF4\u4FDD\u670D\u52A1\u4E00\u5E74")])]}),this.detailMobileHtml&&e("div",{class:[o.section]},[e("div",{class:o.detail},[e("span",null,[l("\u56FE\u6587\u8BE6\u60C5")])]),e("div",{class:[o.photoDetail,"msgWrap"],onClick:this.onShowImg,innerHTML:this.detailMobileHtml},null)])])}});export{de as G,le as M};
|