1 |
- import{d as u,c as t,m,q as l,ba as n}from"./index.5f7ffb46.js";import{I as d}from"./index.276a5d68.js";import{s as g}from"./function-call.aca3a7bc.js";import{S as A,a as _}from"./index.99e0cf1f.js";import{C as f}from"./index.052b3caa.js";import{C as p}from"./index.abd668f7.js";var k="./assets/member_bao-1.5356e9c8.png",y="./assets/member_bao-3.5c34f85e.png",ie=u({name:"member-bao",setup(){return()=>t("div",{style:{lineHeight:"0"}},[t(d,{src:k},null),t(d,{src:y},null)])}});const w="_swipeItemImg_egloy_1",C="_swipe_egloy_1",P="_goodsHead_egloy_17",S="_sectionTips_egloy_23",b="_iconGives_egloy_33",O="_priceGroup_egloy_38",D="_price_egloy_38",E="_delPrice_egloy_51",v="_stock_egloy_57",Q="_goodsName_egloy_61",B="_row_egloy_67",I="_col_egloy_71",T="_radio_egloy_75",N="_badge_egloy_110",G="_section_egloy_23",H="_detail_egloy_118",L="_photoDetail_egloy_143",J="_goodsDetail_egloy_150",X="_actionBar_egloy_154",F="_addCertBtn_egloy_175",R="_buyGroup_egloy_179",M="_selectWrap_egloy_189",W="_shareBtn_egloy_195",V="_shareWrap_egloy_201",Z="_sharePic_egloy_211",x="_shareLeft_egloy_216",z="_shareRight_egloy_219",j="_shareShopTitle_egloy_223",q="_shareShopDes_egloy_233",K="_shareShopValue_egloy_242",Y="_shareShopOldPrice_egloy_246",U="_imagesOverlayWrap_egloy_253";var o={swipeItemImg:w,swipe:C,"custom-indicator":"_custom-indicator_egloy_7",goodsHead:P,sectionTips:S,iconGives:b,priceGroup:O,price:D,delPrice:E,stock:v,goodsName:Q,row:B,col:I,"radio-group":"_radio-group_egloy_75",radio:T,badge:N,section:G,detail:H,photoDetail:L,goodsDetail:J,actionBar:X,addCertBtn:F,buyGroup:R,selectWrap:M,shareBtn:W,shareWrap:V,sharePic:Z,shareLeft:x,shareRight:z,shareShopTitle:j,shareShopDes:q,shareShopValue:K,shareShopOldPrice:Y,imagesOverlayWrap:U},$="data:image/png;base64,iVBORw0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59JYHa4+Az9eTwPwvNXEshBpVv/P/+DBPI5AWIBRS7HKeeV325zKrtVC0YI9a7ZCUEQ0nw39GdPs8vO+qOrMLL5xxfcBb5DshUpU8X6qy4Z1P8C4Udk+FZgFQQAAAAASUVORK5CYII=",ce=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 s=this.product,e=this.skuStockListTemp.length>0?this.skuStockListTemp:[{id:-1,price:s.price,pic:s.pic,stock:s.stock,spData:null}];return e.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"}),e},getPrice(){const s=this.skuStockList.filter(e=>e.id==this.radio);return s&&Array.isArray(s)&&s.length?s[0].price:0}},async mounted(){try{this.loading=!0;const s=await m.get(`/api-student/open/mall/product/detail/${this.id}`);this.loading=!1;const e=s.data||{};if(this.albumPics=[e.product.pic].concat(e.product.albumPics.split(",")).filter(r=>r),this.product=e.product,this.skuStockListTemp=e.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=e.product.detailMobileHtml||e.product.detailHtml}catch{}},methods:{onPreview(s){g({images:this.albumPics,startPosition:s,closeable:!0,className:o.imagesOverlayWrap})},onShowImg(s){const{localName:e}=s.srcElement;if(e!=="img")return;let r=0;const i=document.querySelectorAll(".msgWrap img"),a=Array.from(i).map((c,h)=>(s.srcElement==c&&(r=h),c.src));g({images:a,startPosition:r,closeable:!0,className:o.imagesOverlayWrap})},onShowCart(s="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=s,this.addGoodsShow=!0}},render(){const s=this.product;return this.skuStockList.find(e=>e.id===this.radio),t("div",{class:o.goodsDetail},[t(A,{class:o.swipe,lazyRender:!0},{default:()=>[this.albumPics.map((e,r)=>t(_,null,{default:()=>[t(d,{class:o.swipeItemImg,src:e,onClick:()=>this.onPreview(r),fit:"cover"},null)]}))],indicator:e=>e.total>1&&t("div",{class:o["custom-indicator"]},[(e.active||0)+1,l(" / "),e.total])}),t(f,{border:!1,class:[o.goodsHead,"mb12"]},{default:()=>[t(p,{center:!0,border:!1},{title:()=>t("div",{class:o.priceGroup},[t("span",{class:o.price},[t("i",null,[l("\xA5 ")]),n(this.groupPrice)]),t("del",{class:o.delPrice},[l("\xA5 "),n(s.originalPrice)])])}),t(p,{center:!0,border:!1,title:s.name,titleClass:[o.goodsName,"van-ellipsis"]},null),this.goodsInfo.showFree&&t("div",{class:o.sectionTips},[t(d,{src:$,class:o.iconGives},null),l("\u8D60\u4EF7\u503C"),this.goodsInfo.originalPrice,l("\u5143\u4E50\u5668\u7EF4\u4FDD\u670D\u52A1\u4E00\u5E74")])]}),this.detailMobileHtml&&t("div",{class:[o.section]},[t("div",{class:o.detail},[t("span",null,[l("\u56FE\u6587\u8BE6\u60C5")])]),t("div",{class:[o.photoDetail,"msgWrap"],onClick:this.onShowImg,innerHTML:this.detailMobileHtml},null)])])}});export{ce as G,ie as M};
|