1 line
37 KiB
JavaScript
1 line
37 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-goods_detail-goods_detail"],{"07f4":function(e,t,i){"use strict";i("a9e3"),i("e25e"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={props:{poster:{type:[String,Boolean],default:""},url:{type:String,default:""},direction:{type:Number,default:0},width:{type:String,default:"750rpx"},height:{type:String,default:"450rpx"}},data:function(){return{VideoContext:{},state:!1,currentTime:0,duration:0,videoId:""}},computed:{posterUrl:function(){return this.poster?this.poster:this.url+"?x-oss-process=video/snapshot,t_"+parseInt(1e3*this.currentTime)+",f_jpg,w_800,m_fast"}},methods:{fullscreenchange:function(e){this.state=e.detail.fullScreen},timeupdate:function(e){this.duration=e.detail.duration,this.currentTime=e.detail.currentTime}},created:function(){this.videoId=Date.now()+Math.ceil(1e7*Math.random())+""},mounted:function(){this.VideoContext=uni.createVideoContext(this.videoId)},watch:{state:function(e,t){var i=this;e?(this.VideoContext.play(),setTimeout((function(){i.VideoContext.requestFullScreen({direction:i.direction})}),10)):this.VideoContext.pause()}}};t.default=o},"0bc9":function(e,t,i){var o=i("ac2b");"string"===typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);var n=i("4f06").default;n("3b3d12c0",o,!0,{sourceMap:!1,shadowMode:!1})},"0e35":function(e,t,i){var o=i("1572");"string"===typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);var n=i("4f06").default;n("e51859b2",o,!0,{sourceMap:!1,shadowMode:!1})},"14bb":function(e,t,i){"use strict";var o=i("4ea4");i("99af"),i("d81d"),i("a9e3"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i("2909")),a={data:function(){return{currentSwiperIndex:0,showPlay:!0,showControls:!1,autoplay:!0,videoContext:null}},props:{images:{type:Array,default:function(){return[]}},video:{type:[String,Boolean],default:!1},videoCover:{type:[String,Boolean],default:!1},circular:{type:Boolean,default:!0},interval:{type:Number,default:3e3},duration:{type:Number,default:500}},computed:{urls:function(){var e=this.images.map((function(e){return{uri:e.uri,type:"image"}}));return this.video?[{uri:this.video,type:"video"}].concat((0,n.default)(e)):e}},mounted:function(){this.videoContext=uni.createVideoContext("video",this)},methods:{changeSwiper:function(e){this.currentSwiperIndex=e.detail.current},videoErrorCallback:function(e){throw new Error(e)},previewSwiperItem:function(e){var t=this.urls[e].type,i=this.video?e-1:e;"video"===t?this.videoContext.requestFullScreen():uni.previewImage({index:i,urls:this.images})},playVideo:function(){},fullscreenchange:function(e){var t=e.detail.fullScreen;this.showPlay=!t,this.showControls=!!t,console.log(t),t&&this.videoContext.play(),!t&&this.videoContext.pause()}}};t.default=a},"14db":function(e,t,i){"use strict";i("a9e3"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i("a9eb"),n={name:"Price",props:{content:{type:String|Number,required:!0},prec:{type:Number,default:2},autoPrec:{type:Boolean,default:!0},color:{type:String,default:"inherit"},mainSize:{type:String,default:"inherit"},minorSize:{type:String,default:"inherit"},lineThrough:{type:Boolean,default:!1},fontWeight:{type:String|Number,default:"normal"},prefix:{type:String,default:"¥"},suffix:{type:String,default:""}},computed:{integer:function(){return(0,o.formatPrice)({price:this.content,take:"int"})},decimals:function(){var e=(0,o.formatPrice)({price:this.content,take:"dec",prec:this.prec});return this.autoPrec?1*e?"."+e:"":this.prec?"."+e:""}}};t.default=n},1572:function(e,t,i){var o=i("24fb");t=o(!1),t.push([e.i,"@charset \"UTF-8\";\n/* 颜色变量 */\n/** S Font's size **/\n/** E Font's size **/[data-v-38aff5e0]:export{red_theme:#ff2c3c;orange_theme:#f7971e;pink_theme:#fa444d;gold_theme:#e0a356;blue_theme:#2f80ed;green_theme:#2ec840}.root[data-v-38aff5e0]{position:relative;width:%?750?%;height:300px;overflow:hidden}.posterImg[data-v-38aff5e0],\n.video[data-v-38aff5e0],\n.box[data-v-38aff5e0]{display:flex;width:%?750?%;height:300px;position:absolute}.video[data-v-38aff5e0]{margin-left:-2000px}.box[data-v-38aff5e0]{justify-content:center;align-items:center}.playIcon[data-v-38aff5e0]{width:%?100?%}",""]),e.exports=t},1841:function(e,t,i){"use strict";var o=i("4ea4");i("99af"),i("caad"),i("c975"),i("acd8"),i("e25e"),i("ac1f"),i("2532"),i("466d"),i("5319"),i("841c"),i("1276"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=o(i("b85c")),r=uni.getSystemInfoSync(),s=r.windowWidth,c=(r.platform,i("8fd3")),d={name:"parser",data:function(){return{uid:this._uid,showAm:"",nodes:[]}},props:{html:String,autopause:{type:Boolean,default:!0},autoscroll:Boolean,autosetTitle:{type:Boolean,default:!0},domain:String,lazyLoad:Boolean,selectable:Boolean,tagStyle:Object,showWithAnimation:Boolean,useAnchor:Boolean},watch:{html:function(e){this.setContent(e)}},created:function(){this.imgList=[],this.imgList.each=function(e){for(var t=0,i=this.length;t<i;t++)this.setItem(t,e(this[t],t,this))},this.imgList.setItem=function(e,t){if(void 0!=e&&t){if(0==t.indexOf("http")&&this.includes(t)){for(var i,o=t.split("://")[0],n=o.length;i=t[n];n++){if("/"==i&&"/"!=t[n-1]&&"/"!=t[n+1])break;o+=Math.random()>.5?i.toUpperCase():i}return o+=t.substr(n),this[e]=o}if(this[e]=t,t.includes("data:image")){var a=t.match(/data:image\/(\S+?);(\S+?),(.+)/);if(!a)return}}}},mounted:function(){var e=this;this.document=document.getElementById("rtf"+this._uid),n&&(this.search=function(t){return n(e,t)}),this.html&&this.setContent(this.html)},beforeDestroy:function(){this._observer&&this._observer.disconnect(),this.imgList.each((function(e){})),clearInterval(this._timer)},methods:{setContent:function(e,t){var i=this;if(e){var o=document.createElement("div");t?this.rtf?this.rtf.appendChild(o):this.rtf=o:(this.rtf&&this.rtf.parentNode.removeChild(this.rtf),this.rtf=o),o.innerHTML=this._handleHtml(e,t);for(var n,r=this.rtf.getElementsByTagName("style"),d=0;n=r[d++];)n.innerHTML=n.innerHTML.replace(/body/g,"#rtf"+this._uid),n.setAttribute("scoped","true");!this._observer&&this.lazyLoad&&IntersectionObserver&&(this._observer=new IntersectionObserver((function(e){for(var t,o=0;t=e[o++];)t.isIntersecting&&(t.target.src=t.target.getAttribute("data-src"),t.target.removeAttribute("data-src"),i._observer.unobserve(t.target))}),{rootMargin:"500px 0px 500px 0px"}));var u=this,l=this.rtf.getElementsByTagName("title");l.length&&this.autosetTitle&&uni.setNavigationBarTitle({title:l[0].innerText});var f=function(e){var t=e.getAttribute("src");i.domain&&t&&("/"==t[0]?"/"==t[1]?e.src=(i.domain.includes("://")?i.domain.split("://")[0]:"")+":"+t:e.src=i.domain+t:t.includes("://")||0==t.indexOf("data:")||(e.src=i.domain+"/"+t))};this.imgList.length=0;for(var h,p=this.rtf.getElementsByTagName("img"),v=0,g=0;h=p[v];v++)parseInt(h.style.width||h.getAttribute("width"))>s&&(h.style.height="auto"),f(h),h.hasAttribute("ignore")||"A"==h.parentElement.nodeName||(h.i=g++,u.imgList.push(h.getAttribute("original-src")||h.src||h.getAttribute("data-src")),h.onclick=function(e){e.stopPropagation();var t=!0;this.ignore=function(){return t=!1},u.$emit("imgtap",this),t&&uni.previewImage({current:this.i,urls:u.imgList})}),h.onerror=function(){c.errorImg&&(u.imgList[this.i]=this.src=c.errorImg),u.$emit("error",{source:"img",target:this})},u.lazyLoad&&this._observer&&h.src&&0!=h.i&&(h.setAttribute("data-src",h.src),h.removeAttribute("src"),this._observer.observe(h));var m,b=this.rtf.getElementsByTagName("a"),w=(0,a.default)(b);try{for(w.s();!(m=w.n()).done;){var _=m.value;_.onclick=function(e){e.stopPropagation();var t=!0,i=this.getAttribute("href");if(u.$emit("linkpress",{href:i,ignore:function(){return t=!1}}),t&&i)if("#"==i[0])u.useAnchor&&u.navigateTo({id:i.substr(1)});else{if(0==i.indexOf("http")||0==i.indexOf("//"))return!0;uni.navigateTo({url:i})}return!1}}}catch(A){w.e(A)}finally{w.f()}var y=this.rtf.getElementsByTagName("video");u.videoContexts=y;for(var x,C=0;x=y[C++];)f(x),x.style.maxWidth="100%",x.onerror=function(){u.$emit("error",{source:"video",target:this})},x.onplay=function(){if(u.autopause)for(var e,t=0;e=u.videoContexts[t++];)e!=this&&e.pause()};var S,k,E=this.rtf.getElementsByTagName("audio"),I=(0,a.default)(E);try{for(I.s();!(S=I.n()).done;){var T=S.value;f(T),T.onerror=function(){u.$emit("error",{source:"audio",target:this})}}}catch(A){I.e(A)}finally{I.f()}if(this.autoscroll){var $,L=this.rtf.getElementsByTagName("table"),B=(0,a.default)(L);try{for(B.s();!($=B.n()).done;){var O=$.value,z=document.createElement("div");z.style.overflow="scroll",O.parentNode.replaceChild(z,O),z.appendChild(O)}}catch(A){B.e(A)}finally{B.f()}}t||this.document.appendChild(this.rtf),this.$nextTick((function(){i.nodes=[1],i.$emit("load")})),setTimeout((function(){return i.showAm=""}),500),clearInterval(this._timer),this._timer=setInterval((function(){i.rect=i.rtf.getBoundingClientRect(),i.rect.height==k&&(i.$emit("ready",i.rect),clearInterval(i._timer)),k=i.rect.height}),350),this.showWithAnimation&&!t&&(this.showAm="animation:_show .5s")}else this.rtf&&!t&&this.rtf.parentNode.removeChild(this.rtf)},getText:function(){arguments.length>0&&void 0!==arguments[0]||this.nodes;var e="";return e=this.rtf.innerText,e},in:function(e){e.page&&e.selector&&e.scrollTop&&(this._in=e)},navigateTo:function(e){var t=this;if(!this.useAnchor)return e.fail&&e.fail("Anchor is disabled");var i=" ",o=uni.createSelectorQuery().in(this._in?this._in.page:this).select((this._in?this._in.selector:"#_top")+(e.id?"".concat(i,"#").concat(e.id,",").concat(this._in?this._in.selector:"#_top").concat(i,".").concat(e.id):"")).boundingClientRect();this._in?o.select(this._in.selector).scrollOffset().select(this._in.selector).boundingClientRect():o.selectViewport().scrollOffset(),o.exec((function(i){if(!i[0])return e.fail&&e.fail("Label not found");var o=i[1].scrollTop+i[0].top-(i[2]?i[2].top:0)+(e.offset||0);t._in?t._in.page[t._in.scrollTop]=o:uni.pageScrollTo({scrollTop:o,duration:300}),e.success&&e.success()}))},getVideoContext:function(e){if(!e)return this.videoContexts;for(var t=this.videoContexts.length;t--;)if(this.videoContexts[t].id==e)return this.videoContexts[t]},_handleHtml:function(e,t){if(!t){var i="<style scoped>@keyframes _show{0%{opacity:0}100%{opacity:1}}img{max-width:100%}";for(var o in c.userAgentStyles)i+="".concat(o,"{").concat(c.userAgentStyles[o],"}");for(o in this.tagStyle)i+="".concat(o,"{").concat(this.tagStyle[o],"}");i+="</style>",e=i+e}return e.includes("rpx")&&(e=e.replace(/[0-9.]+\s*rpx/g,(function(e){return parseFloat(e)*s/750+"px"}))),e}}};t.default=d},"1cc7":function(e,t,i){var o=i("dfbe");"string"===typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);var n=i("4f06").default;n("1618735f",o,!0,{sourceMap:!1,shadowMode:!1})},2758:function(e,t,i){"use strict";i.r(t);var o=i("7a24"),n=i("f397");for(var a in n)"default"!==a&&function(e){i.d(t,e,(function(){return n[e]}))}(a);i("a9d2");var r,s=i("f0c5"),c=Object(s["a"])(n["default"],o["b"],o["c"],!1,null,"38aff5e0",null,!1,o["a"],r);t["default"]=c.exports},"2ccd":function(e,t,i){"use strict";i.r(t);var o=i("da7c"),n=i("e3aa");for(var a in n)"default"!==a&&function(e){i.d(t,e,(function(){return n[e]}))}(a);i("9d72");var r,s=i("f0c5"),c=Object(s["a"])(n["default"],o["b"],o["c"],!1,null,"2995d423",null,!1,o["a"],r);t["default"]=c.exports},"3d29":function(e,t,i){"use strict";i.r(t);var o=i("4563"),n=i("86d9");for(var a in n)"default"!==a&&function(e){i.d(t,e,(function(){return n[e]}))}(a);i("6b53");var r,s=i("f0c5"),c=Object(s["a"])(n["default"],o["b"],o["c"],!1,null,"1a6093e1",null,!1,o["a"],r);t["default"]=c.exports},4563:function(e,t,i){"use strict";i.d(t,"b",(function(){return n})),i.d(t,"c",(function(){return a})),i.d(t,"a",(function(){return o}));var o={uPopup:i("d0d8").default,uImage:i("4902").default,price:i("e84c").default},n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("u-popup",{attrs:{height:"70vh",mode:"bottom","border-radius":"14",closeable:!0,"safe-area-inset-bottom":!0},on:{close:function(t){arguments[0]=t=e.$handleEvent(t),e.onClose.apply(void 0,arguments)}},model:{value:e.showPop,callback:function(t){e.showPop=t},expression:"showPop"}},[i("v-uni-view",{staticClass:"bg-white spec-contain"},[i("v-uni-view",{staticClass:"spec-header flex"},[i("u-image",{staticClass:"m-r-20",attrs:{width:"180rpx",height:"180rpx","border-radius":"10rpx",src:e.checkedGoods.image},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.previewImage(e.checkedGoods.image)}}}),i("v-uni-view",{staticClass:"goods-info"},[i("v-uni-view",{staticClass:"primary flex"},[i("price",{attrs:{content:e.checkedGoods.price,"main-size":"46rpx","minor-size":"38rpx",color:"#FF2C3C"}})],1),i("v-uni-view",{staticClass:"sm m-t-120"},[e._v("库存:"+e._s(e.stock)+"件")])],1)],1),i("v-uni-view",{staticClass:"spec-main"},[i("v-uni-scroll-view",{staticStyle:{"min-height":"600rpx"},attrs:{"scroll-y":"true"}},[i("v-uni-view",{staticClass:"spec-list"},e._l(e.specList,(function(t,o){return i("v-uni-view",{key:o,staticClass:"spec"},[i("v-uni-view",{staticClass:"flex row-between"},[i("v-uni-view",{staticClass:"name m-b-30"},[e._v(e._s(t.name))])],1),i("v-uni-view",{staticClass:"flex wrap"},e._l(t.spec_value,(function(o,n){return i("v-uni-view",{key:n,class:"spec-item sm "+(o.checked?"checked":""),on:{click:function(i){arguments[0]=i=e.$handleEvent(i),e.choseSpecItem(t.id,o.id)}}},[e._v(e._s(o.value))])})),1)],1)})),1)],1)],1)],1)],1)},a=[]},4902:function(e,t,i){"use strict";i.r(t);var o=i("e22a"),n=i("b022");for(var a in n)"default"!==a&&function(e){i.d(t,e,(function(){return n[e]}))}(a);i("eef7");var r,s=i("f0c5"),c=Object(s["a"])(n["default"],o["b"],o["c"],!1,null,"c22e95ae",null,!1,o["a"],r);t["default"]=c.exports},"4edc":function(e,t,i){"use strict";i.r(t);var o=i("1841"),n=i.n(o);for(var a in o)"default"!==a&&function(e){i.d(t,e,(function(){return o[e]}))}(a);t["default"]=n.a},"69ee":function(e,t,i){var o=i("948c");"string"===typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);var n=i("4f06").default;n("175879a1",o,!0,{sourceMap:!1,shadowMode:!1})},"6b53":function(e,t,i){"use strict";var o=i("adae"),n=i.n(o);n.a},"7a24":function(e,t,i){"use strict";var o;i.d(t,"b",(function(){return n})),i.d(t,"c",(function(){return a})),i.d(t,"a",(function(){return o}));var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-view",{staticClass:"root",style:{width:e.width,height:e.height}},[i("v-uni-image",{staticClass:"posterImg",style:{width:e.width,height:e.height},attrs:{src:e.posterUrl,mode:"aspectFit"}}),i("v-uni-view",{staticClass:"box",style:{width:e.width,height:e.height},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.state=!e.state}}},[i("v-uni-image",{staticClass:"playIcon",attrs:{src:"/static/images/icon_play.png",mode:"widthFix"}})],1),i("v-uni-video",{staticClass:"video",style:{height:e.height,width:e.state?"750rpx":"1rpx"},attrs:{id:e.videoId,autoplay:!1,src:e.url},on:{timeupdate:function(t){arguments[0]=t=e.$handleEvent(t),e.timeupdate.apply(void 0,arguments)},fullscreenchange:function(t){arguments[0]=t=e.$handleEvent(t),e.fullscreenchange.apply(void 0,arguments)},pause:function(t){arguments[0]=t=e.$handleEvent(t),e.state=0}}})],1)},a=[]},"7f3c":function(e,t,i){"use strict";var o;i.d(t,"b",(function(){return n})),i.d(t,"c",(function(){return a})),i.d(t,"a",(function(){return o}));var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-view",{staticClass:"price-container"},[i("v-uni-view",{class:["price-wrap",{"price-wrap--disabled":e.lineThrough}],style:{color:e.color}},[i("v-uni-view",{staticClass:"fix-pre",style:{fontSize:e.minorSize}},[e._t("prefix",[e._v(e._s(e.prefix))])],2),i("v-uni-view",{staticClass:"content",style:{"font-weight":e.fontWeight}},[i("v-uni-text",{staticClass:"integer",style:{fontSize:e.mainSize}},[e._v(e._s(e.integer))]),i("v-uni-text",{staticClass:"decimals",style:{fontSize:e.minorSize}},[e._v(e._s(e.decimals))])],1),i("v-uni-view",{staticClass:"fix-suf",style:{fontSize:e.minorSize}},[e._t("suffix",[e._v(e._s(e.suffix))])],2)],1)],1)},a=[]},"86d9":function(e,t,i){"use strict";i.r(t);var o=i("b5cc"),n=i.n(o);for(var a in o)"default"!==a&&function(e){i.d(t,e,(function(){return o[e]}))}(a);t["default"]=n.a},"890d":function(e,t,i){"use strict";var o=i("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.apiGoodsEdit=t.apiGoodsDetail=t.apiGoodsOperation=t.apiGoodsLists=void 0;var n=o(i("04cb")),a=function(e){return n.default.get("goods/lists",{params:e})};t.apiGoodsLists=a;var r=function(e){return n.default.post("goods/operation",e)};t.apiGoodsOperation=r;var s=function(e){return n.default.get("goods/detail",{params:e})};t.apiGoodsDetail=s;var c=function(e){return n.default.post("goods/edit",e)};t.apiGoodsEdit=c},"8efe":function(e,t,i){"use strict";i.r(t);var o=i("14db"),n=i.n(o);for(var a in o)"default"!==a&&function(e){i.d(t,e,(function(){return o[e]}))}(a);t["default"]=n.a},"8fd3":function(e,t,i){i("ac1f"),i("1276");var o={errorImg:null,filter:null,highlight:null,onText:null,entities:{quot:'"',apos:"'",semi:";",nbsp:" ",ensp:" ",emsp:" ",ndash:"–",mdash:"—",middot:"·",lsquo:"‘",rsquo:"’",ldquo:"“",rdquo:"”",bull:"•",hellip:"…"},blankChar:n(" , ,\t,\r,\n,\f"),boolAttrs:n("allowfullscreen,autoplay,autostart,controls,ignore,loop,muted"),blockTags:n("address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section"),ignoreTags:n("area,base,canvas,frame,iframe,input,link,map,meta,param,script,source,style,svg,textarea,title,track,wbr"),richOnlyTags:n("a,colgroup,fieldset,legend"),selfClosingTags:n("area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr"),trustTags:n("a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video"),userAgentStyles:{address:"font-style:italic",big:"display:inline;font-size:1.2em",blockquote:"background-color:#f6f6f6;border-left:3px solid #dbdbdb;color:#6c6c6c;padding:5px 0 5px 10px",caption:"display:table-caption;text-align:center",center:"text-align:center",cite:"font-style:italic",dd:"margin-left:40px",mark:"background-color:yellow",pre:"font-family:monospace;white-space:pre;overflow:scroll",s:"text-decoration:line-through",small:"display:inline;font-size:0.8em",u:"text-decoration:underline"}};function n(e){for(var t=Object.create(null),i=e.split(","),o=i.length;o--;)t[i[o]]=!0;return t}e.exports=o},"948c":function(e,t,i){var o=i("24fb");t=o(!1),t.push([e.i,"@charset \"UTF-8\";\n/* 颜色变量 */\n/** S Font's size **/\n/** E Font's size **/[data-v-2995d423]:export{red_theme:#ff2c3c;orange_theme:#f7971e;pink_theme:#fa444d;gold_theme:#e0a356;blue_theme:#2f80ed;green_theme:#2ec840}.goods-detail[data-v-2995d423]{padding-bottom:calc(%?100?% + %?20?% + constant(safe-area-inset-bottom));padding-bottom:calc(%?100?% + %?20?% + env(safe-area-inset-bottom))}.goods-info[data-v-2995d423]{padding:%?20?% %?24?%;background-color:#fff}.goods-info .primary[data-v-2995d423]{color:#ff4141}.goods-info .share[data-v-2995d423]{display:flex;justify-content:center;align-items:center;width:%?134?%;height:%?60?%;margin-right:%?-24?%;border-radius:30px 0 0 30px;background-color:#f6f6f6}.goods-info .goods-name[data-v-2995d423]{padding:%?20?% 0 %?10?% 0;font-weight:500}.goods-info .btn[data-v-2995d423]{margin-left:10px;font-size:%?24?%;padding:%?6?% %?20?%;border-radius:%?8?%;color:#40affa;background:rgba(64,175,250,.1)}.specification[data-v-2995d423]{display:flex;padding:%?24?%;margin-top:%?20?%;background-color:#fff}.detail[data-v-2995d423]{padding:%?24?%;margin-top:%?20?%;background-color:#fff}.detail-title[data-v-2995d423]{text-align:center;font-weight:500;padding-bottom:%?24?%}",""]),e.exports=t},"95b6":function(e,t,i){"use strict";i.r(t);var o=i("14bb"),n=i.n(o);for(var a in o)"default"!==a&&function(e){i.d(t,e,(function(){return o[e]}))}(a);t["default"]=n.a},"97d7":function(e,t,i){var o=i("c9ae");"string"===typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);var n=i("4f06").default;n("17513031",o,!0,{sourceMap:!1,shadowMode:!1})},"9bd3":function(e,t,i){"use strict";var o;i.d(t,"b",(function(){return n})),i.d(t,"c",(function(){return a})),i.d(t,"a",(function(){return o}));var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-view",[e.nodes.length?e._e():e._t("default"),i("v-uni-view",{style:e.showAm+(e.selectable?";user-select:text;-webkit-user-select:text":""),attrs:{id:"_top"}},[i("div",{attrs:{id:"rtf"+e.uid}})])],2)},a=[]},"9d72":function(e,t,i){"use strict";var o=i("69ee"),n=i.n(o);n.a},"9e8a":function(e,t,i){"use strict";i.r(t);var o=i("c1b8"),n=i("95b6");for(var a in n)"default"!==a&&function(e){i.d(t,e,(function(){return n[e]}))}(a);i("be71");var r,s=i("f0c5"),c=Object(s["a"])(n["default"],o["b"],o["c"],!1,null,"3928eb22",null,!1,o["a"],r);t["default"]=c.exports},a9d2:function(e,t,i){"use strict";var o=i("0e35"),n=i.n(o);n.a},ac2b:function(e,t,i){var o=i("24fb");t=o(!1),t.push([e.i,"@-webkit-keyframes _show-data-v-132e0f5b{0%{opacity:0}100%{opacity:1}}@keyframes _show-data-v-132e0f5b{0%{opacity:0}100%{opacity:1}}\n\n\n\n",""]),e.exports=t},adae:function(e,t,i){var o=i("b910");"string"===typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);var n=i("4f06").default;n("2a97352d",o,!0,{sourceMap:!1,shadowMode:!1})},b022:function(e,t,i){"use strict";i.r(t);var o=i("bcbb"),n=i.n(o);for(var a in o)"default"!==a&&function(e){i.d(t,e,(function(){return o[e]}))}(a);t["default"]=n.a},b218:function(e,t,i){"use strict";i.r(t);var o=i("9bd3"),n=i("4edc");for(var a in n)"default"!==a&&function(e){i.d(t,e,(function(){return n[e]}))}(a);i("c8dc");var r,s=i("f0c5"),c=Object(s["a"])(n["default"],o["b"],o["c"],!1,null,"132e0f5b",null,!1,o["a"],r);t["default"]=c.exports},b499:function(e,t,i){var o=i("d405");"string"===typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);var n=i("4f06").default;n("52684936",o,!0,{sourceMap:!1,shadowMode:!1})},b5cc:function(e,t,i){"use strict";var o=i("4ea4");i("99af"),i("c740"),i("4160"),i("159b"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i("2909")),a={data:function(){return{stock:0,checkedGoods:{},specList:[],showPop:!1,isSelectedAll:!0,selectStr:"",specListAll:[]}},components:{},props:{show:{type:Boolean},goods:{type:Object}},mounted:function(){},watch:{goods:function(e){var t=this;this.stock=e.stock;var i=e.goods_spec||[],o=e.goods_item||[];i.forEach((function(e){e.spec_value&&e.spec_value.forEach((function(e,t){e.checked=1})),t.specListAll[e.id]=!0})),this.specList=i,this.checkedGoods=o.length?o[0]:{}},specList:function(e){var t=this,i=this.goods.goods_item,o=[],n=[],a=[];if(e.forEach((function(e){e.spec_value&&e.spec_value.forEach((function(i,r){i.checked&&(o.push(i.id),n.push(i.value),a.push(i.id)),r==e.spec_value.length-1&&(a.length==e.spec_value.length?t.specListAll[e.id]=!0:t.specListAll[e.id]=!1,a=[])}))})),this.selectStr=n.join("、"),o.length){var r=o[0],s=i.findIndex((function(e){return e.spec_value_ids==r}));-1!=s&&(this.checkedGoods=i[s],this.$emit("change",{detail:i[s]}))}},show:function(e){this.showPop=e}},methods:{onClose:function(){this.$emit("close")},choseSpecItem:function(e,t){this.specList.forEach((function(i){i.spec_value&&i.id==e&&i.spec_value.forEach((function(e){e.id==t&&(1==e.checked?e.checked=0:e.checked=1)}))})),this.specList=(0,n.default)(this.specList),this.getStock()},getStock:function(){var e=this,t=[];this.specList.forEach((function(e,i){t.push([]),e.spec_value.forEach((function(e){e.checked&&t[i].push(e.id)}))}));var i=this.dkej(t),o=0;i.forEach((function(t){var i=t.join(","),n=e.goods.goods_item.findIndex((function(e){return e.spec_value_ids==i}));-1!=n&&(o+=e.goods.goods_item[n].stock)})),this.stock=o},dkej:function(e){var t=[];for(var i in e){i=e[i];var o=[];for(var n in i)if(t.length)for(var a in t)o.push(t[a].concat(i[n]));else o.push([i[n]]);t=o}return t},previewImage:function(e){uni.previewImage({current:e,urls:[e]})}}};t.default=a},b910:function(e,t,i){var o=i("24fb");t=o(!1),t.push([e.i,'@charset "UTF-8";\n/* 颜色变量 */\n/** S Font\'s size **/\n/** E Font\'s size **/[data-v-1a6093e1]:export{red_theme:#ff2c3c;orange_theme:#f7971e;pink_theme:#fa444d;gold_theme:#e0a356;blue_theme:#2f80ed;green_theme:#2ec840}.spec-contain[data-v-1a6093e1]{border-radius:%?10?% %?10?% 0 0;overflow:hidden;position:relative}.spec-contain .close[data-v-1a6093e1]{position:absolute;right:%?10?%;top:%?10?%}.spec-contain .spec-header[data-v-1a6093e1]{padding:%?30?%;padding-right:%?70?%;align-items:flex-start;border:1px solid #e5e5e5}.spec-contain .spec-header .vip-price[data-v-1a6093e1]{margin:0 %?24?%;background-color:#ffe9ba;line-height:%?36?%;border-radius:%?6?%;overflow:hidden}.spec-contain .spec-header .vip-price .price-name[data-v-1a6093e1]{background-color:#101010;padding:%?3?% %?12?%;color:#ffd4b7;position:relative;overflow:hidden}.spec-contain .spec-header .vip-price .price-name[data-v-1a6093e1]::after{content:"";display:block;width:%?20?%;height:%?20?%;position:absolute;right:%?-15?%;background-color:#ffe9ba;border-radius:50%;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);box-sizing:border-box}.spec-contain .spec-main .spec-list[data-v-1a6093e1]{padding:%?30?% %?20?%}.spec-contain .spec-main .spec-list .spec-item[data-v-1a6093e1]{line-height:%?52?%;padding:0 %?30?%;background-color:#f6f6f6;border-radius:%?30?%;margin:0 %?20?% %?20?% 0;border:%?1?% solid #f6f6f6}.spec-contain .spec-main .spec-list .spec-item.checked[data-v-1a6093e1]{font-weight:500;border:%?1?% solid #40affa;color:#fff;background-color:#40affa}',""]),e.exports=t},bcbb:function(e,t,i){"use strict";i("a9e3"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={name:"u-image",props:{src:{type:String,default:""},mode:{type:String,default:"aspectFill"},width:{type:[String,Number],default:"100%"},height:{type:[String,Number],default:"auto"},shape:{type:String,default:"square"},borderRadius:{type:[String,Number],default:0},lazyLoad:{type:Boolean,default:!0},showMenuByLongpress:{type:Boolean,default:!0},loadingIcon:{type:String,default:"photo"},errorIcon:{type:String,default:"error-circle"},showLoading:{type:Boolean,default:!0},showError:{type:Boolean,default:!0},fade:{type:Boolean,default:!0},webp:{type:Boolean,default:!1},duration:{type:[String,Number],default:500},bgColor:{type:String,default:"#f3f4f6"}},data:function(){return{isError:!1,loading:!0,opacity:1,durationTime:this.duration,backgroundStyle:{}}},watch:{src:{immediate:!0,handler:function(e){e?this.isError=!1:(this.isError=!0,this.loading=!1)}}},computed:{wrapStyle:function(){var e={};return e.width=this.$u.addUnit(this.width),e.height=this.$u.addUnit(this.height),e.borderRadius="circle"==this.shape?"50%":this.$u.addUnit(this.borderRadius),e.overflow=this.borderRadius>0?"hidden":"visible",this.fade&&(e.opacity=this.opacity,e.transition="opacity ".concat(Number(this.durationTime)/1e3,"s ease-in-out")),e}},methods:{onClick:function(){this.$emit("click")},onErrorHandler:function(e){this.loading=!1,this.isError=!0,this.$emit("error",e)},onLoadHandler:function(){var e=this;if(this.loading=!1,this.isError=!1,this.$emit("load"),!this.fade)return this.removeBgColor();this.opacity=0,this.durationTime=0,setTimeout((function(){e.durationTime=e.duration,e.opacity=1,setTimeout((function(){e.removeBgColor()}),e.durationTime)}),50)},removeBgColor:function(){this.backgroundStyle={backgroundColor:"transparent"}}}};t.default=o},be71:function(e,t,i){"use strict";var o=i("b499"),n=i.n(o);n.a},c1b8:function(e,t,i){"use strict";i.d(t,"b",(function(){return n})),i.d(t,"c",(function(){return a})),i.d(t,"a",(function(){return o}));var o={jVideo:i("2758").default,uImage:i("4902").default},n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-view",{staticClass:"swiper-wrap"},[i("v-uni-swiper",{ref:"swiper",staticClass:"swiper",attrs:{autoplay:e.autoplay,circular:e.circular,interval:e.interval,duration:e.duration},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.changeSwiper.apply(void 0,arguments)}}},[e._l(e.urls,(function(t,o){return[i("v-uni-swiper-item",{key:o+"_0",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.previewSwiperItem(o)}}},["video"===t["type"]?i("v-uni-view",{staticClass:"video-wrap"},[i("j-video",{attrs:{width:"750rpx",height:"750rpx",url:t.url,poster:e.videoCover}})],1):e._e(),i("u-image",{attrs:{width:"750",height:"750",src:t.uri,mode:"scaleToFill"}})],1)]}))],2),i("v-uni-view",{staticClass:"dots black sm bg-white br60"},[e._v(e._s(e.currentSwiperIndex+1)+"/"+e._s(e.urls.length||0))])],1)},a=[]},c8dc:function(e,t,i){"use strict";var o=i("0bc9"),n=i.n(o);n.a},c9ae:function(e,t,i){var o=i("24fb");t=o(!1),t.push([e.i,'@charset "UTF-8";\n/* 颜色变量 */\n/** S Font\'s size **/\n/** E Font\'s size **/[data-v-86f2c644]:export{red_theme:#ff2c3c;orange_theme:#f7971e;pink_theme:#fa444d;gold_theme:#e0a356;blue_theme:#2f80ed;green_theme:#2ec840}.price-container[data-v-86f2c644]{display:inline-block;line-height:1em}.price-wrap[data-v-86f2c644]{display:flex;align-items:flex-end}.price-wrap--disabled[data-v-86f2c644]{position:relative}.price-wrap--disabled[data-v-86f2c644]::before{position:absolute;left:0;top:50%;right:0;-webkit-transform:translateY(-50%);transform:translateY(-50%);display:block;content:"";height:.05em;background-color:currentColor}',""]),e.exports=t},d405:function(e,t,i){var o=i("24fb");t=o(!1),t.push([e.i,".swiper-wrap[data-v-3928eb22]{width:100%;height:%?750?%;position:relative}.swiper-wrap .swiper[data-v-3928eb22]{width:100%;height:100%;position:relative}.swiper-wrap .swiper .slide-image[data-v-3928eb22]{width:100%;height:100%}.swiper-wrap .dots[data-v-3928eb22]{position:absolute;right:%?24?%;bottom:%?24?%;display:flex;height:%?34?%;padding:0 %?15?%}.swiper-wrap .video-wrap[data-v-3928eb22]{width:100%;height:100%;position:relative;overflow:hidden}.swiper-wrap .video[data-v-3928eb22]{width:100%;height:100%}.swiper-wrap .icon-play[data-v-3928eb22]{width:%?90?%;height:%?90?%;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);z-index:999}",""]),e.exports=t},da7c:function(e,t,i){"use strict";i.d(t,"b",(function(){return n})),i.d(t,"c",(function(){return a})),i.d(t,"a",(function(){return o}));var o={goodsSwiper:i("9e8a").default,uIcon:i("031d").default,goodsSpec:i("3d29").default,uParse:i("b218").default},n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-view",{staticClass:"goods-detail"},[i("goods-swiper",{attrs:{images:e.goodsInfo.goods_image,video:e.goodsInfo.video,"video-cover":e.goodsInfo.video_cover}}),i("v-uni-view",{staticClass:"goods-info"},[i("v-uni-view",{staticClass:"flex row-between"},[i("v-uni-view",{staticClass:"flex primary"},[i("v-uni-view",{staticStyle:{"font-size":"36rpx"}},[e._v("¥"+e._s(e.goodsInfo.min_price))]),2==e.goodsInfo.spec_type?i("v-uni-text",[e._v("~")]):e._e(),2==e.goodsInfo.spec_type?i("v-uni-view",{staticStyle:{"font-size":"36rpx"}},[e._v(e._s(e.goodsInfo.max_price))]):e._e(),e.goodsInfo.type?i("v-uni-view",{staticClass:"btn"},[e._v("虚拟商品")]):e._e()],1),i("v-uni-view",{staticClass:"muted xs"},[e._v("商品编号:"+e._s(e.goodsInfo.code))])],1),i("v-uni-view",{staticClass:"goods-name lg"},[e._v(e._s(e.goodsInfo.name))]),i("v-uni-view",{staticClass:"flex row-between muted xs"},[i("v-uni-view",[e._v("市场价: "+e._s(e.goodsInfo.market_price))]),i("v-uni-view",[e._v("库存: "+e._s(e.goodsInfo.stock))]),i("v-uni-view",[e._v("销量: "+e._s(e.goodsInfo.sales_actual))])],1)],1),i("v-uni-view",{staticClass:"nr specification",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.onGoodsOptions.apply(void 0,arguments)}}},[i("v-uni-text",{staticClass:"muted"},[e._v("查看商品规格")]),i("v-uni-text",{staticClass:"m-l-20"},[e._v(e._s(e.specValueStr))]),i("u-icon",{staticClass:"muted",staticStyle:{"margin-left":"auto"},attrs:{name:"arrow-right"}})],1),i("goods-spec",{attrs:{show:e.showGoodsSpec,goods:e.goodsInfo},on:{close:function(t){arguments[0]=t=e.$handleEvent(t),e.showGoodsSpec=!1}}}),i("v-uni-view",{staticClass:"detail"},[i("v-uni-view",{staticClass:"detail-title nr"},[e._v("商品详情")]),i("u-parse",{attrs:{html:e.goodsInfo.content,"show-with-animation":!0}})],1)],1)},a=[]},dfbe:function(e,t,i){var o=i("24fb");t=o(!1),t.push([e.i,"@charset \"UTF-8\";\n/* 颜色变量 */\n/** S Font's size **/\n/** E Font's size **/[data-v-c22e95ae]:export{red_theme:#ff2c3c;orange_theme:#f7971e;pink_theme:#fa444d;gold_theme:#e0a356;blue_theme:#2f80ed;green_theme:#2ec840}.u-image[data-v-c22e95ae]{position:relative;transition:opacity .5s ease-in-out}.u-image__image[data-v-c22e95ae]{width:100%;height:100%}.u-image__loading[data-v-c22e95ae], .u-image__error[data-v-c22e95ae]{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:row;align-items:center;justify-content:center;background-color:#f3f4f6;color:#909399;font-size:%?46?%}",""]),e.exports=t},e22a:function(e,t,i){"use strict";i.d(t,"b",(function(){return n})),i.d(t,"c",(function(){return a})),i.d(t,"a",(function(){return o}));var o={uIcon:i("031d").default},n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-view",{staticClass:"u-image",style:[e.wrapStyle,e.backgroundStyle],on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.onClick.apply(void 0,arguments)}}},[e.isError?e._e():i("v-uni-image",{staticClass:"u-image__image",style:{borderRadius:"circle"==e.shape?"50%":e.$u.addUnit(e.borderRadius)},attrs:{src:e.src,mode:e.mode,"lazy-load":e.lazyLoad,"show-menu-by-longpress":e.showMenuByLongpress},on:{error:function(t){arguments[0]=t=e.$handleEvent(t),e.onErrorHandler.apply(void 0,arguments)},load:function(t){arguments[0]=t=e.$handleEvent(t),e.onLoadHandler.apply(void 0,arguments)}}}),e.showLoading&&e.loading?i("v-uni-view",{staticClass:"u-image__loading",style:{borderRadius:"circle"==e.shape?"50%":e.$u.addUnit(e.borderRadius),backgroundColor:this.bgColor}},[e.$slots.loading?e._t("loading"):i("u-icon",{attrs:{name:e.loadingIcon,width:e.width,height:e.height}})],2):e._e(),e.showError&&e.isError&&!e.loading?i("v-uni-view",{staticClass:"u-image__error",style:{borderRadius:"circle"==e.shape?"50%":e.$u.addUnit(e.borderRadius)}},[e.$slots.error?e._t("error"):i("u-icon",{attrs:{name:e.errorIcon,width:e.width,height:e.height}})],2):e._e()],1)},a=[]},e2d5:function(e,t,i){"use strict";var o=i("97d7"),n=i.n(o);n.a},e3aa:function(e,t,i){"use strict";i.r(t);var o=i("ec79"),n=i.n(o);for(var a in o)"default"!==a&&function(e){i.d(t,e,(function(){return o[e]}))}(a);t["default"]=n.a},e84c:function(e,t,i){"use strict";i.r(t);var o=i("7f3c"),n=i("8efe");for(var a in n)"default"!==a&&function(e){i.d(t,e,(function(){return n[e]}))}(a);i("e2d5");var r,s=i("f0c5"),c=Object(s["a"])(n["default"],o["b"],o["c"],!1,null,"86f2c644",null,!1,o["a"],r);t["default"]=c.exports},ec79:function(e,t,i){"use strict";var o=i("4ea4");i("99af"),i("d3b7"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i("96cf");var n=o(i("1da1")),a=o(i("5530")),r=i("890d"),s=(i("2f97"),i("9641")),c=i("26cb"),d=i("a9eb"),u={name:"GoodsDetail",data:function(){return{pageStatus:s.PageStatusEnum["LOADING"],pagesData:[],pageErrorMsg:"",showShare:!1,goodsInfo:{},showGoodsSpec:!1,goodsSpecOptions:{},specButtonsList:[]}},computed:(0,a.default)((0,a.default)({},(0,c.mapGetters)(["isLogin"])),{},{specValueStr:function(){var e,t,i;return null!==(e=null===(t=this.goodsSpecOptions)||void 0===t||null===(i=t.spec)||void 0===i?void 0:i.spec_value_str)&&void 0!==e?e:""}}),methods:{changeGoodsSpec:function(e){this.goodsSpecOptions=e,console.log(e)},onGoodsOptions:function(){this.showGoodsSpec=!0,this.specButtonsList=[(0,a.default)((0,a.default)({},this.specButtonsGroups.cart),{},{style:{border:"solid 1px ".concat(this.themeColor),color:this.themeColor,backgroundColor:"#FFFFFF"}}),this.specButtonsGroups.buy]},initGoodsDetail:function(){var e=this;return new Promise((function(t,i){(0,r.apiGoodsDetail)({id:e.goods_id,visit:1}).then((function(t){e.goodsInfo=t;var i="[]"!==JSON.stringify(t.goods_comment);e.goodsComment=i?t.goods_comment:{},e.isGoodsCollect=!!t.is_collect})).then((function(i){e.$store.dispatch("setWxShare",{shareImage:null===i||void 0===i?void 0:i.image,shareDesc:null===i||void 0===i?void 0:i.name}),t(i)})).catch((function(e){i(e)}))}))}},onLoad:function(){var e=this;return(0,n.default)(regeneratorRuntime.mark((function t(){var i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(i=e.$Route.query,i["scene"]?e.goods_id=(0,d.strToParams)(i["scene"])["id"]:e.goods_id=i.id,t.prev=2,e.goods_id){t.next=5;break}throw new Error("该商品不存在");case 5:return t.next=7,e.initGoodsDetail();case 7:e.pageStatus=s.PageStatusEnum["NORMAL"],t.next=15;break;case 10:t.prev=10,t.t0=t["catch"](2),console.log(t.t0),e.pageErrorMsg=t.t0.message,e.pageStatus=s.PageStatusEnum["ERROR"];case 15:case"end":return t.stop()}}),t,null,[[2,10]])})))()},onShareAppMessage:function(){var e=this.goodsInfo,t=e.name,i=e.image;return{title:t,path:"/pages/goods_detail/goods_detail?id=".concat(this.goods_id,"&invite_code=").concat(this.userInfo.code),imageUrl:i}}};t.default=u},eef7:function(e,t,i){"use strict";var o=i("1cc7"),n=i.n(o);n.a},f397:function(e,t,i){"use strict";i.r(t);var o=i("07f4"),n=i.n(o);for(var a in o)"default"!==a&&function(e){i.d(t,e,(function(){return o[e]}))}(a);t["default"]=n.a}}]); |