1 line
34 KiB
JavaScript
Executable File
1 line
34 KiB
JavaScript
Executable File
(window.webpackJsonp=window.webpackJsonp||[]).push([[26,8,14,15,16,17],{404:function(t,e,o){"use strict";var n=o(11),r=o(5),c=o(116),l=o(23),d=o(15),m=o(52),f=o(251),h=o(81),v=o(7),x=o(83),w=o(82).f,_=o(42).f,y=o(22).f,C=o(405).trim,A="Number",k=r.Number,S=k.prototype,V=m(x(S))==A,N=function(t){var e,o,n,r,c,l,d,code,m=h(t,!1);if("string"==typeof m&&m.length>2)if(43===(e=(m=C(m)).charCodeAt(0))||45===e){if(88===(o=m.charCodeAt(2))||120===o)return NaN}else if(48===e){switch(m.charCodeAt(1)){case 66:case 98:n=2,r=49;break;case 79:case 111:n=8,r=55;break;default:return+m}for(l=(c=m.slice(2)).length,d=0;d<l;d++)if((code=c.charCodeAt(d))<48||code>r)return NaN;return parseInt(c,n)}return+m};if(c(A,!k(" 0o1")||!k("0b1")||k("+0x1"))){for(var I,D=function(t){var e=arguments.length<1?0:t,o=this;return o instanceof D&&(V?v((function(){S.valueOf.call(o)})):m(o)!=A)?f(new k(N(e)),o,D):N(e)},E=n?w(k):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),O=0;E.length>O;O++)d(k,I=E[O])&&!d(D,I)&&y(D,I,_(k,I));D.prototype=S,S.constructor=D,l(r,A,D)}},405:function(t,e,o){var n=o(27),r="["+o(406)+"]",c=RegExp("^"+r+r+"*"),l=RegExp(r+r+"*$"),d=function(t){return function(e){var o=String(n(e));return 1&t&&(o=o.replace(c,"")),2&t&&(o=o.replace(l,"")),o}};t.exports={start:d(1),end:d(2),trim:d(3)}},406:function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},407:function(t,e,o){var content=o(409);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(14).default)("03051d40",content,!0,{sourceMap:!1})},408:function(t,e,o){"use strict";o(407)},409:function(t,e,o){var n=o(13)(!1);n.push([t.i,".price-format{display:flex;align-items:baseline}",""]),t.exports=n},410:function(t,e,o){"use strict";o.r(e);o(404),o(68),o(252);var n={data:function(){return{priceSlice:{}}},components:{},props:{firstSize:{type:Number,default:14},secondSize:{type:Number,default:14},color:{type:String},weight:{type:[String,Number],default:500},price:{type:[String,Number],default:""},showSubscript:{type:Boolean,default:!0},subscriptSize:{type:Number,default:14},lineThrough:{type:Boolean,default:!1}},created:function(){this.priceFormat()},watch:{price:function(t){this.priceFormat()}},methods:{priceFormat:function(){var t=this.price,e={};null!==t&&(t=parseFloat(t),t=String(t).split("."),e.first=t[0],e.second=t[1],this.priceSlice=e)}}},r=(o(408),o(8)),component=Object(r.a)(n,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("span",{class:(t.lineThrough?"line-through":"")+"price-format",style:{color:t.color,"font-weight":t.weight}},[t.showSubscript?o("span",{style:{"font-size":t.subscriptSize+"px","margin-right":"1px"}},[t._v("¥")]):t._e(),t._v(" "),o("span",{style:{"font-size":t.firstSize+"px","margin-right":"1px"}},[t._v(t._s(t.priceSlice.first))]),t._v(" "),t.priceSlice.second?o("span",{style:{"font-size":t.secondSize+"px"}},[t._v("."+t._s(t.priceSlice.second))]):t._e()])}),[],!1,null,null,null);e.default=component.exports},411:function(t,e,o){var content=o(413);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(14).default)("7277513c",content,!0,{sourceMap:!1})},412:function(t,e,o){"use strict";o(411)},413:function(t,e,o){var n=o(13)(!1);n.push([t.i,".null-data[data-v-7fa0e58c]{padding:100px}.null-data .img-null[data-v-7fa0e58c]{width:150px;height:150px}",""]),t.exports=n},414:function(t,e,o){"use strict";o.r(e);var n={components:{},props:{img:{type:String},text:{type:String,default:"暂无数据"},imgStyle:{type:String,default:""}},methods:{}},r=(o(412),o(8)),component=Object(r.a)(n,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"bg-white column-center null-data"},[o("img",{staticClass:"img-null",style:t.imgStyle,attrs:{src:t.img,alt:""}}),t._v(" "),o("div",{staticClass:"muted mt8"},[t._v(t._s(t.text))])])}),[],!1,null,"7fa0e58c",null);e.default=component.exports},417:function(t,e,o){"use strict";o.r(e);o(404),o(69),o(53),o(18),o(85),o(68),o(84);var n=6e4,r=36e5,c=24*r;function l(t){return(0+t.toString()).slice(-2)}var d={components:{},props:{isSlot:{type:Boolean,default:!1},time:{type:Number,default:0},format:{type:String,default:"hh:mm:ss"},autoStart:{type:Boolean,default:!0}},watch:{time:{immediate:!0,handler:function(t){t&&this.reset()}}},data:function(){return{timeObj:{},formateTime:0}},created:function(){},computed:{},methods:{createTimer:function(t){return setTimeout(t,100)},isSameSecond:function(t,e){return Math.floor(t)===Math.floor(e)},start:function(){this.counting||(this.counting=!0,this.endTime=Date.now()+1e3*this.remain,this.setTimer())},setTimer:function(){var t=this;this.tid=this.createTimer((function(){var e=t.getRemain();t.isSameSecond(e,t.remain)&&0!==e||t.setRemain(e),0!==t.remain&&t.setTimer()}))},getRemain:function(){return Math.max(this.endTime-Date.now(),0)},pause:function(){this.counting=!1,clearTimeout(this.tid)},reset:function(){this.pause(),this.remain=this.time,this.setRemain(this.remain),this.autoStart&&this.start()},setRemain:function(t){var e=this.format;this.remain=t;var time,o=(time=t,{days:Math.floor(time/c),hours:l(Math.floor(time%c/r)),minutes:l(Math.floor(time%r/n)),seconds:l(Math.floor(time%n/1e3))});this.formateTime=function(t,e){var o=e.days,n=e.hours,r=e.minutes,c=e.seconds;return-1!==t.indexOf("dd")&&(t=t.replace("dd",o)),-1!==t.indexOf("hh")&&(t=t.replace("hh",l(n))),-1!==t.indexOf("mm")&&(t=t.replace("mm",l(r))),-1!==t.indexOf("ss")&&(t=t.replace("ss",l(c))),t}(e,o),this.$emit("change",o),0===t&&(this.pause(),this.$emit("finish"))}}},m=o(8),component=Object(m.a)(d,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return t.time>=0?o("div",[o("client-only",[t.isSlot?t._t("default"):o("span",[t._v(t._s(t.formateTime))])],2)],1):t._e()}),[],!1,null,null,null);e.default=component.exports},427:function(t,e,o){t.exports=o.p+"img/news_null.ba9ba23.png"},435:function(t,e,o){"use strict";o.d(e,"a",(function(){return c}));var n=o(117);var r=o(171);function c(t){return function(t){if(Array.isArray(t))return Object(n.a)(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Object(r.a)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},436:function(t,e,o){var content=o(452);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(14).default)("9935c90c",content,!0,{sourceMap:!1})},448:function(t,e,o){"use strict";var n=o(2),r=o(86).findIndex,c=o(168),l="findIndex",d=!0;l in[]&&Array(1).findIndex((function(){d=!1})),n({target:"Array",proto:!0,forced:d},{findIndex:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),c(l)},449:function(t,e,o){"use strict";var n=o(2),r=o(58),c=o(450),l=o(253),d=o(7),m=1..toFixed,f=Math.floor,h=function(t,e,o){return 0===e?o:e%2==1?h(t,e-1,o*t):h(t*t,e/2,o)},v=function(data,t,e){for(var o=-1,n=e;++o<6;)n+=t*data[o],data[o]=n%1e7,n=f(n/1e7)},x=function(data,t){for(var e=6,o=0;--e>=0;)o+=data[e],data[e]=f(o/t),o=o%t*1e7},w=function(data){for(var t=6,s="";--t>=0;)if(""!==s||0===t||0!==data[t]){var e=String(data[t]);s=""===s?e:s+l.call("0",7-e.length)+e}return s};n({target:"Number",proto:!0,forced:m&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!d((function(){m.call({})}))},{toFixed:function(t){var e,o,n,d,m=c(this),f=r(t),data=[0,0,0,0,0,0],_="",y="0";if(f<0||f>20)throw RangeError("Incorrect fraction digits");if(m!=m)return"NaN";if(m<=-1e21||m>=1e21)return String(m);if(m<0&&(_="-",m=-m),m>1e-21)if(o=(e=function(t){for(var e=0,o=t;o>=4096;)e+=12,o/=4096;for(;o>=2;)e+=1,o/=2;return e}(m*h(2,69,1))-69)<0?m*h(2,-e,1):m/h(2,e,1),o*=4503599627370496,(e=52-e)>0){for(v(data,0,o),n=f;n>=7;)v(data,1e7,0),n-=7;for(v(data,h(10,n,1),0),n=e-1;n>=23;)x(data,1<<23),n-=23;x(data,1<<n),v(data,1,1),x(data,2),y=w(data)}else v(data,0,o),v(data,1<<-e,0),y=w(data)+l.call("0",f);return y=f>0?_+((d=y.length)<=f?"0."+l.call("0",f-d)+y:y.slice(0,d-f)+"."+y.slice(d-f)):_+y}})},450:function(t,e,o){var n=o(52);t.exports=function(t){if("number"!=typeof t&&"Number"!=n(t))throw TypeError("Incorrect invocation");return+t}},451:function(t,e,o){"use strict";o(436)},452:function(t,e,o){var n=o(13)(!1);n.push([t.i,".number-box[data-v-0f3bdeec]{display:inline-flex;align-items:center}.number-box .number-input[data-v-0f3bdeec]{position:relative;text-align:center;padding:0;margin:0 6px;align-items:center;justify-content:center}.number-box .minus[data-v-0f3bdeec],.number-box .plus[data-v-0f3bdeec]{width:32px;display:flex;justify-content:center;align-items:center;cursor:pointer}.number-box .plus[data-v-0f3bdeec]{border-radius:0 2px 2px 0}.number-box .minus[data-v-0f3bdeec]{border-radius:2px 0 0 2px}.number-box .disabled[data-v-0f3bdeec]{color:#c8c9cc!important;background:#f7f8fa!important}.number-box .input-disabled[data-v-0f3bdeec]{color:#c8c9cc!important;background-color:#f2f3f5!important}",""]),t.exports=n},460:function(t,e,o){var content=o(476);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(14).default)("75275508",content,!0,{sourceMap:!1})},462:function(t,e,o){"use strict";o.r(e);o(404),o(68),o(252),o(18),o(85),o(449),o(69);var n={components:{},props:{value:{type:Number,default:1},bgColor:{type:String,default:" #F2F3F5"},min:{type:Number,default:0},max:{type:Number,default:99999},step:{type:Number,default:1},disabled:{type:Boolean,default:!1},size:{type:[Number,String],default:14},inputWidth:{type:[Number,String],default:64},color:{type:String,default:"#333"},inputHeight:{type:[Number,String],default:32},index:{type:[Number,String],default:""},disabledInput:{type:Boolean,default:!1},positiveInteger:{type:Boolean,default:!0},asyncChange:{type:Boolean,default:!1}},watch:{value:function(t,e){this.changeFromInner||(this.inputVal=t,this.$nextTick((function(){this.changeFromInner=!1})))},inputVal:function(t,e){var o=this;if(""!=t){var n=0;n=/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(t)&&t>=this.min&&t<=this.max?t:e,this.positiveInteger&&(t<0||-1!==String(t).indexOf("."))&&(n=e,this.$nextTick((function(){o.inputVal=e}))),this.asyncChange||this.handleChange(n,"change")}}},data:function(){return{inputVal:1,timer:null,changeFromInner:!1,innerChangeTimer:null}},created:function(){this.inputVal=Number(this.value)},computed:{},methods:{btnTouchStart:function(t){this[t]()},minus:function(){this.computeVal("minus")},plus:function(){this.computeVal("plus")},calcPlus:function(t,e){var o,n,r;try{n=t.toString().split(".")[1].length}catch(t){n=0}try{r=e.toString().split(".")[1].length}catch(t){r=0}return((t*(o=Math.pow(10,Math.max(n,r)))+e*o)/o).toFixed(n>=r?n:r)},calcMinus:function(t,e){var o,n,r;try{n=t.toString().split(".")[1].length}catch(t){n=0}try{r=e.toString().split(".")[1].length}catch(t){r=0}return((t*(o=Math.pow(10,Math.max(n,r)))-e*o)/o).toFixed(n>=r?n:r)},computeVal:function(t){if(!this.disabled){var e=0;"minus"===t?e=this.calcMinus(this.inputVal,this.step):"plus"===t&&(e=this.calcPlus(this.inputVal,this.step)),e<this.min||e>this.max||(this.asyncChange?this.$emit("change",e):(this.inputVal=e,this.handleChange(e,t)))}},onBlur:function(t){var e=this,o=0,n=t.target.value;console.log(n),(o=/(^\d+$)/.test(n)?+n:this.min)>this.max?o=this.max:o<this.min&&(o=this.min),this.$nextTick((function(){e.inputVal=o})),this.handleChange(o,"blur")},onFocus:function(){this.$emit("focus")},handleChange:function(t,e){var o=this;this.disabled||(this.innerChangeTimer&&(clearTimeout(this.innerChangeTimer),this.innerChangeTimer=null),this.changeFromInner=!0,this.innerChangeTimer=setTimeout((function(){o.changeFromInner=!1}),150),this.$emit("input",Number(t)),this.$emit(e,{value:Number(t),index:this.index}))}}},r=(o(451),o(8)),component=Object(r.a)(n,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"number-box"},[o("div",{class:{minus:!0,disabled:t.disabled||t.inputVal<=t.min},style:{background:t.bgColor,height:t.inputHeight+"px",color:t.color},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.btnTouchStart("minus")}}},[o("div",{style:{fontSize:t.size+"px"}},[t._v("-")])]),t._v(" "),o("input",{directives:[{name:"model",rawName:"v-model",value:t.inputVal,expression:"inputVal"}],class:{"number-input":!0,"input-disabled":t.disabled},style:{color:t.color,fontSize:t.size+"px",background:t.bgColor,height:t.inputHeight+"px",width:t.inputWidth+"px"},attrs:{disabled:t.disabledInput||t.disabled,type:"text"},domProps:{value:t.inputVal},on:{blur:t.onBlur,focus:t.onFocus,input:function(e){e.target.composing||(t.inputVal=e.target.value)}}}),t._v(" "),o("div",{staticClass:"plus",class:{disabled:t.disabled||t.inputVal>=t.max},style:{background:t.bgColor,height:t.inputHeight+"px",color:t.color},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.btnTouchStart("plus")}}},[o("div",{style:{fontSize:t.size+"px"}},[t._v("+")])])])}),[],!1,null,"0f3bdeec",null);e.default=component.exports},475:function(t,e,o){"use strict";o(460)},476:function(t,e,o){var n=o(13)(!1);n.push([t.i,".comment-list .comment-con>.item[data-v-780b4851]{padding:20px;border-bottom:1px dashed #e5e5e5;align-items:flex-start}.comment-list .comment-con>.item .avatar img[data-v-780b4851]{border-radius:50%;width:44px;height:44px}.comment-list .comment-con>.item .comment-imglist[data-v-780b4851]{margin-top:10px}.comment-list .comment-con>.item .comment-imglist .item[data-v-780b4851]{width:80px;height:80px;margin-right:6px}.comment-list .comment-con>.item .reply[data-v-780b4851]{background-color:#f2f2f2;align-items:flex-start;padding:10px}",""]),t.exports=n},504:function(t,e,o){var content=o(582);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(14).default)("6ab4852a",content,!0,{sourceMap:!1})},512:function(t,e,o){"use strict";o.r(e);var n=o(3),r=(o(47),o(404),{components:{},props:{list:{type:Array,default:function(){return[]}},type:Number,goodsId:[String,Number]},data:function(){return{commentList:[],count:0,page:1}},created:function(){this.getCommentList()},methods:{getCommentList:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){var o,data;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$get("goods_comment/lists",{params:{id:t.type,goods_id:t.goodsId,page_size:10,page_no:t.page}});case 2:o=e.sent,data=o.data,1==o.code&&(t.commentList=data.list,t.count=data.count);case 6:case"end":return e.stop()}}),e)})))()},changePage:function(t){this.page=t,this.getCommentList()}}}),c=(o(475),o(8)),component=Object(c.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"comment-list"},[n("div",{staticClass:"comment-con"},[t.commentList.length?[t._l(t.commentList,(function(e,o){return n("div",{key:o,staticClass:"item row"},[n("div",{staticClass:"avatar mr8"},[n("img",{attrs:{src:e.avatar,alt:""}})]),t._v(" "),n("div",{staticClass:"content flex1"},[n("div",[t._v(t._s(e.nickname))]),t._v(" "),n("div",{staticClass:"lighter",staticStyle:{margin:"5px 0 10px"}},[n("span",[t._v(t._s(e.create_time))]),t._v(" "),n("span",[t._v("|")]),t._v(" "),n("span",[t._v("规格:"+t._s(e.spec_value_str))])]),t._v(" "),n("div",[t._v("\n "+t._s(e.comment)+"\n ")]),t._v(" "),n("div",{staticClass:"comment-imglist row"},t._l(e.image,(function(img,t){return n("div",{key:t,staticClass:"item"},[n("el-image",{staticStyle:{height:"100%",width:"100%"},attrs:{"preview-src-list":e.image,src:img,fit:"contain"}})],1)})),0),t._v(" "),e.reply?n("div",{staticClass:"row reply mt16"},[n("div",{staticClass:"primary flexnone"},[t._v("商家回复:")]),t._v(" "),n("div",{staticClass:"lighter"},[t._v("\n "+t._s(e.reply)+"\n ")])]):t._e()])])})),t._v(" "),t.count?n("div",{staticClass:"pagination row-center",staticStyle:{padding:"38px 0"}},[n("el-pagination",{attrs:{background:"","hide-on-single-page":"",layout:"prev, pager, next",total:t.count,"prev-text":"上一页","next-text":"下一页","page-size":10},on:{"current-change":t.changePage}})],1):t._e()]:n("null-data",{attrs:{img:o(427),text:"暂无评价~"}})],2)])}),[],!1,null,"780b4851",null);e.default=component.exports;installComponents(component,{NullData:o(414).default})},578:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACUAAAAkCAMAAAA5HAOUAAAAQlBMVEUAAAD/IDD/KDj/Kjr/LDz/KTn/Kzv/Kjr/Kzv/LDz/Kzv/Kzv/Kzv/LDz/Kzv/LDz/LDz/Kzv/Kzv/LDz/LDv/LDyPingBAAAAFXRSTlMAECAwQFBfYHCAj5+gr7C/wNDf7/B6g4n4AAAAvUlEQVQ4y8XUyRKDIBAEUBZlUYxs8/+/mmiMWtQwkFzS51cFtF0y9v9w3oE0gG4iCa/Illo3tTaQgT2Gvnl6q0S+YIEjC4EGODPUz4uXiviZQk0JbkmTEkVJao6AJM7qrM4kIJLM1TYV2a+Yp5E/CggUCp9KeK6jfPUmqyzfRzTW1FguFEu5WochR8yBGEafspgyXcr+ph5db/TEh0aU19o3VHb71oXLuNq6D/ocANcBuxcztviHSGu+/Kc9AXSSLqTq6c2LAAAAAElFTkSuQmCC"},579:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACUAAAAkCAMAAAA5HAOUAAAAS1BMVEUAAABQUFBQUFBVVVVUVFRTU1NTU1NVVVVUVFRUVFRUVFRVVVVVVVVUVFRVVVVUVFRUVFRVVVVVVVVVVVVVVVVUVFRUVFRVVVVVVVUmEHPwAAAAGHRSTlMAECAwQFBfYHCAj5CfoK+wv8DP0N/g7/AGrtdjAAABEUlEQVQ4y8WUy5aDIBBEeUQeUVTUwP3/L53FaJIR1MxsxhX2udBdRakQ//9I+QFkwV5CGkBfUSNty3gBOR5SZtz55IlGiIZ0qqBnEEKISH8C3chKCCFU5nbcb9kG8iz1nsrcE/P2NpPuRu1MMt0CEJ8HyAiwdOZpnUsAefA/zNR+yADJbW4/gqvard3wWG9Ck9SxbJXW+4pMhybKibiuZqYjamLeTpCZrg515FcbnfE1yJPfVTXV6FlodoVSqErF1lD29IQyDnFfimUwPqM87b7UlsH2tbn+WBpW1dL0vZGrO6E+qu4SQOrUsSAzAtHaCIymTvUJcvj+hkKG1JdUAGb7yr2doZxLOL8Ltfbul/+0Lw1XEXqaPu71AAAAAElFTkSuQmCC"},580:function(t,e,o){t.exports=o.p+"img/goods_like.2007d91.png"},581:function(t,e,o){"use strict";o(504)},582:function(t,e,o){var n=o(13),r=o(169),c=o(583),l=o(584),d=n(!1),m=r(c),f=r(l);d.push([t.i,".goods-details{padding:16px 0 44px}.goods-details .goods-info{align-items:flex-start}.goods-details .goods-info .goods-swiper{width:400px;border-radius:4px}.goods-details .goods-info .goods-swiper .swiper{margin:10px 0;padding:0 25px;--swiper-navigation-size:15px;--swiper-navigation-color:#888}.goods-details .goods-info .goods-swiper .swiper .swiper-button-next,.goods-details .goods-info .goods-swiper .swiper .swiper-button-prev{top:0;width:25px;height:100%;margin-top:0;background-size:12px 22px}.goods-details .goods-info .goods-swiper .swiper .swiper-button-prev{left:0}.goods-details .goods-info .goods-swiper .swiper .swiper-button-next{right:0}.goods-details .goods-info .goods-swiper .swiper .swiper-item{cursor:pointer;height:66px;width:66px;border:2px solid transparent}.goods-details .goods-info .goods-swiper .swiper .swiper-item~.swiper-item{margin-left:10px}.goods-details .goods-info .goods-swiper .swiper .swiper-item.active{border-color:#ff2c3c}.goods-details .goods-info .goods-swiper .current-img{width:100%;height:400px}.goods-details .goods-info .info-wrap{min-height:486px;border-radius:4px;padding:20px}.goods-details .goods-info .info-wrap .name{font-size:20px}.goods-details .goods-info .info-wrap .price-wrap{background:url("+m+") no-repeat;background-size:100%;height:80px;padding:0 50px 0 20px;margin-bottom:26px}.goods-details .goods-info .info-wrap .price-wrap.seckill{background-image:url("+f+")}.goods-details .goods-info .info-wrap .price-wrap.seckill .count-down .item{width:30px;height:30px;background:rgba(0,0,0,.5);text-align:center;line-height:30px;border-radius:4px}.goods-details .goods-info .info-wrap .spec-wrap .spec{align-items:flex-start}.goods-details .goods-info .info-wrap .spec-wrap .spec .spec-name{margin-right:20px;margin-top:6px;flex:none}.goods-details .goods-info .info-wrap .spec-wrap .spec .spec-item{padding:0 20px;line-height:32px;border:1px solid #e5e5e5;border-radius:2px;margin-right:10px;margin-bottom:10px;cursor:pointer}.goods-details .goods-info .info-wrap .spec-wrap .spec .spec-item.active{color:#ff2c3c;background-color:#ffeeef;border-color:currentColor}.goods-details .goods-info .info-wrap .goods-num{margin-bottom:30px}.goods-details .goods-info .info-wrap .goods-num .num{margin-right:20px}.goods-details .goods-info .info-wrap .goods-btns .btn{line-height:42px;border-radius:2px;margin-right:14px;text-align:center;width:120px;border:1px solid #ff2c3c;cursor:pointer}.goods-details .goods-info .info-wrap .goods-btns .btn.addcart{color:#ff2c3c;background-color:#ffeeef;border-color:currentColor}.goods-details .goods-info .info-wrap .goods-btns .btn.collection{width:146px;color:#555;background-color:transparent;border-color:#e5e5e5}.goods-details .goods-info .info-wrap .goods-btns .btn.collection .start-icon{width:18.5px;height:18px}.goods-details .details-wrap{align-items:stretch}.goods-details .details-wrap .details{padding:10px 0;overflow:hidden}.goods-details .details-wrap .details .rich-text{padding:0 10px;width:100%;overflow:hidden}.goods-details .details-wrap .details .rich-text img{width:100%}.goods-details .details-wrap .details .rich-text p{margin:0}.goods-details .details-wrap .details .evaluation .evaluation-hd{background-color:#f2f2f2;height:80px;margin:0 10px}.goods-details .details-wrap .details .evaluation .evaluation-hd .rate{height:60px;width:220px;border-right:1px solid #e5e5e5;padding-left:10px;margin-right:40px}.goods-details .details-wrap .details .evaluation .evaluation-tab{margin:16px 20px}.goods-details .details-wrap .details .evaluation .evaluation-tab .item{border-radius:2px;cursor:pointer;height:32px;padding:6px 20px;color:#555;background-color:#f2f2f2;margin-right:10px}.goods-details .details-wrap .details .evaluation .evaluation-tab .item.active{color:#fff;background-color:#ff2c3c}.goods-details .goods-like{width:264px}.goods-details .goods-like .title{border-bottom:1px solid #e5e5e5}.goods-details .goods-like .title>img{width:100%;height:100%}.goods-details .goods-like .goods-list .item{padding:10px;display:block}.goods-details .goods-like .goods-list .item .goods-img{width:244px;height:244px;margin-bottom:10px}",""]),t.exports=d},583:function(t,e,o){t.exports=o.p+"img/bg_price.48336c4.png"},584:function(t,e,o){t.exports=o.p+"img/bg_activity.9a3064a.png"},623:function(t,e,o){"use strict";o.r(e);var n=[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"title bg-white"},[e("img",{attrs:{src:o(580),alt:""}})])}],r=(o(20),o(16),o(19),o(28),o(29),o(435)),c=o(6),l=o(3),d=(o(47),o(69),o(17),o(53),o(173),o(448),o(462)),m=o(417),f=o(10),h=o(112);function v(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(object);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,o)}return e}function x(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?v(Object(source),!0).forEach((function(e){Object(c.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):v(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}var w={head:function(){return{title:this.$store.getters.headTitle,link:[{rel:"icon",type:"image/x-icon",href:this.$store.getters.favicon}]}},components:{NumberBox:d.default,CountDown:m.default},asyncData:function(t){return Object(l.a)(regeneratorRuntime.mark((function e(){var o,n,r,c,data,code,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.params,n=t.$get,r=t.app,e.next=3,n("goods/getGoodsDetail",{params:{id:o.id}});case 3:return c=e.sent,data=c.data,code=c.code,l=c.msg,0==code&&(Object(h.Message)({message:l,type:"error"}),setTimeout((function(){return r.router.back()}),1500)),e.abrupt("return",{goodsDetails:data,goodsImage:data.goods_image,activity:data.activity});case 9:case"end":return e.stop()}}),e)})))()},data:function(){return{goodsDetails:{},goodsImage:[],activity:{},swiperOptions:{pagination:{el:".swiper-pagination",clickable:!0},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},preventClicks:!0,slidesPerView:"auto"},active:"0",commentActive:0,swiperIndex:0,checkedGoods:{},comment:{},goodsNum:1,goodsSpec:[],id:"",timeData:{}}},created:function(){this.id=this.$route.params.id,this.getComment(this.id)},methods:x(x({},Object(f.b)(["getPublicData"])),{},{onClickSlide:function(t){this.swiperIndex=t},onChoseSpecItem:function(t,e){var o=this.goodsSpec;o.forEach((function(o){o.spec_value&&o.id==t&&o.spec_value.forEach((function(t){t.checked=0,t.id==e&&(t.checked=1)}))})),this.goodsSpec=Object(r.a)(o)},onAddCart:function(){var t=this;return Object(l.a)(regeneratorRuntime.mark((function e(){var o,n,r,code,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.goodsNum,n=t.checkedGoods.id,e.next=3,t.$post("/cart/add",{item_id:n,goods_num:o});case 3:r=e.sent,code=r.code,r.data,c=r.msg,1==code&&(t.getPublicData(),t.$message({message:c,type:"success"}));case 8:case"end":return e.stop()}}),e)})))()},onBuyNow:function(){var t=this.goodsNum,e=[{item_id:this.checkedGoods.id,num:t}];this.$router.push({path:"/confirm_order",query:{data:encodeURIComponent(JSON.stringify({goods:e}))}})},getGoodsDetail:function(){var t=this;return Object(l.a)(regeneratorRuntime.mark((function e(){var o,data;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$get("goods/getGoodsDetail",{params:{id:t.id}});case 2:o=e.sent,data=o.data,1==o.code&&(t.goodsDetails=data);case 6:case"end":return e.stop()}}),e)})))()},onCollectionGoods:function(){var t=this;return Object(l.a)(regeneratorRuntime.mark((function e(){var o,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.goodsDetails.is_collect,e.next=3,t.$post("collect/handleCollectGoods",{is_collect:0==o?1:0,goods_id:t.id});case 3:n=e.sent,n.data,1==n.code&&(0==o?t.$message({message:"收藏成功",type:"success"}):t.$message({message:"取消收藏成功",type:"success"}),t.getGoodsDetail());case 7:case"end":return e.stop()}}),e)})))()},getComment:function(){var t=this;return Object(l.a)(regeneratorRuntime.mark((function e(){var o,data;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$get("/goods_comment/category",{params:{goods_id:t.id}});case 2:o=e.sent,data=o.data,1==o.code&&(t.comment=data,t.commentActive=data.comment[0].id);case 6:case"end":return e.stop()}}),e)})))()},onChangeDate:function(t){var e={};for(var o in t)"milliseconds"!==o&&(e[o]=("0"+t[o]).slice(-2));this.timeData=e}}),watch:{goodsSpec:{immediate:!0,handler:function(t){var e=this.goodsDetails.goods_item,o=[];if(t.forEach((function(t){t.spec_value&&t.spec_value.forEach((function(t){t.checked&&o.push(t.id)}))})),o.length){var n=o.join(","),r=e.findIndex((function(t){return t.spec_value_ids==n}));-1==r&&(r=0),this.checkedGoods=e[r],console.log(this.checkedGoods)}}},goodsDetails:{immediate:!0,handler:function(t){t.goods_spec&&(t.goods_spec.forEach((function(t){t.spec_value.forEach((function(t,e){t.checked=0==e?1:0}))})),this.goodsSpec=Object(r.a)(t.goods_spec))}}},computed:{countTime:function(){var t=this.activity.info;return t?t.end_time-Date.now()/1e3:0}}},_=(o(581),o(8)),component=Object(_.a)(w,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.goodsDetails.id?n("div",{staticClass:"goods-details"},[n("div",{staticClass:"goods-info row"},[n("div",{staticClass:"goods-swiper mr16 bg-white column"},[n("el-image",{staticClass:"current-img",attrs:{"preview-src-list":t.goodsImage.map((function(t){return t.uri})),src:t.goodsImage[t.swiperIndex].uri}}),t._v(" "),n("client-only",[n("swiper",{ref:"mySwiper",staticClass:"swiper",attrs:{options:t.swiperOptions}},[t._l(t.goodsImage,(function(e,o){return n("swiper-slide",{key:o,class:{"swiper-item":!0,active:o===t.swiperIndex}},[n("div",{staticStyle:{width:"100%",height:"100%"},on:{mouseover:function(e){t.swiperIndex=o}}},[n("el-image",{staticStyle:{width:"100%",height:"100%"},attrs:{src:e.uri}})],1)])})),t._v(" "),n("div",{staticClass:"swiper-button-prev",attrs:{slot:"button-prev"},slot:"button-prev"}),t._v(" "),n("div",{staticClass:"swiper-button-next",attrs:{slot:"button-next"},slot:"button-next"})],2)],1)],1),t._v(" "),n("div",{staticClass:"info-wrap bg-white flex1"},[n("div",{staticClass:"name bold mb16"},[t._v("\n "+t._s(t.goodsDetails.name)+"\n ")]),t._v(" "),1==t.activity.type?n("div",{staticClass:"price-wrap row-between white seckill"},[n("div",{staticClass:"price row",staticStyle:{"align-items":"baseline"}},[n("div",{staticClass:"mr8"},[t._v("价格")]),t._v(" "),n("div",[n("price-formate",{attrs:{price:t.checkedGoods.price||t.goodsDetails.price,"subscript-size":16,"first-size":30,"second-size":16}})],1),t._v(" "),n("div",{staticClass:"line-through ml8 row"},[t._v("\n 原价\n "),n("price-formate",{attrs:{price:t.checkedGoods.market_price||t.goodsDetails.market_price}})],1)]),t._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"white mr16"},[t._v("距离结束还有")]),t._v(" "),n("count-down",{attrs:{time:t.countTime,"is-slot":!0},on:{change:t.onChangeDate}},[n("div",{staticClass:"row-center count-down xxl"},[n("div",{staticClass:"item white"},[t._v(t._s(t.timeData.hours))]),t._v(" "),n("div",{staticClass:"white",staticStyle:{margin:"0 4px"}},[t._v(":")]),t._v(" "),n("div",{staticClass:"item white"},[t._v("\n "+t._s(t.timeData.minutes)+"\n ")]),t._v(" "),n("div",{staticClass:"white",staticStyle:{margin:"0 4px"}},[t._v(":")]),t._v(" "),n("div",{staticClass:"item white"},[t._v("\n "+t._s(t.timeData.seconds)+"\n ")])])])],1)]):n("div",{staticClass:"price-wrap row-between lighter"},[n("div",{staticClass:"price row",staticStyle:{"align-items":"baseline"}},[n("div",{staticClass:"mr8"},[t._v("价格")]),t._v(" "),n("div",{staticClass:"primary"},[n("price-formate",{attrs:{price:t.checkedGoods.price||t.goodsDetails.price,"subscript-size":16,"first-size":30,"second-size":16}})],1),t._v(" "),n("div",{staticClass:"line-through ml8 muted"},[n("price-formate",{attrs:{price:t.checkedGoods.market_price||t.goodsDetails.market_price}})],1)]),t._v(" "),n("div",{staticClass:"row"},[!0!==t.goodsDetails.stock?n("div",{staticStyle:{"margin-right":"60px"}},[n("div",{staticClass:"mb8"},[t._v("库存")]),t._v(" "),n("div",[t._v(t._s(t.checkedGoods.stock||t.goodsDetails.stock))])]):t._e(),t._v(" "),n("div",[n("div",{staticClass:"mb8"},[t._v("销量")]),t._v(" "),n("div",[t._v(t._s(t.goodsDetails.sales_sum))])])])]),t._v(" "),n("div",{staticClass:"spec-wrap"},t._l(t.goodsSpec,(function(e,o){return n("div",{key:o,staticClass:"spec row mb16"},[n("div",{staticClass:"lighter spec-name"},[t._v(t._s(e.name))]),t._v(" "),n("div",{staticClass:"spec-list row wrap"},t._l(e.spec_value,(function(o,r){return n("div",{key:r,class:["spec-item lighter",{active:o.checked}],on:{click:function(n){return t.onChoseSpecItem(e.id,o.id)}}},[t._v("\n "+t._s(o.value)+"\n ")])})),0)])})),0),t._v(" "),n("div",{staticClass:"goods-num row"},[n("div",{staticClass:"num lighter"},[t._v("数量")]),t._v(" "),n("number-box",{attrs:{min:1,max:t.checkedGoods.stock},model:{value:t.goodsNum,callback:function(e){t.goodsNum=e},expression:"goodsNum"}})],1),t._v(" "),n("div",{staticClass:"goods-btns row lg"},[n("div",{staticClass:"btn bg-primary white",on:{click:t.onBuyNow}},[t._v("立即购买")]),t._v(" "),1!=t.activity.type?n("div",{staticClass:"btn primary addcart",on:{click:t.onAddCart}},[t._v("加入购物车")]):t._e(),t._v(" "),n("div",{staticClass:"btn lighter collection row-center",on:{click:t.onCollectionGoods}},[n("img",{staticClass:"start-icon mr8",attrs:{src:t.goodsDetails.is_collect?o(578):o(579)}}),t._v(" "),n("div",[t._v("收藏该商品")])])])])]),t._v(" "),n("div",{staticClass:"details-wrap row mt16"},[n("div",{staticClass:"details bg-white flex1"},[n("el-tabs",{model:{value:t.active,callback:function(e){t.active=e},expression:"active"}},[n("el-tab-pane",{attrs:{label:"商品详情"}},[n("div",{staticClass:"rich-text",domProps:{innerHTML:t._s(t.goodsDetails.content)}})]),t._v(" "),n("el-tab-pane",{attrs:{label:"商品评价"}},[n("div",{staticClass:"evaluation"},[n("div",{staticClass:"evaluation-hd row"},[n("div",{staticClass:"rate row"},[n("div",{staticClass:"lighter mr8"},[t._v("好评率")]),t._v(" "),n("div",{staticClass:"primary",staticStyle:{"font-size":"30px"}},[t._v("\n "+t._s(t.comment.percent)+"\n ")])]),t._v(" "),n("div",{staticClass:"score lighter row"},[n("span",{staticClass:"mr8"},[t._v("评分")]),t._v(" "),n("el-rate",{attrs:{disabled:"","allow-half":""},model:{value:t.comment.avg_score,callback:function(e){t.$set(t.comment,"avg_score",e)},expression:"comment.avg_score"}})],1)]),t._v(" "),n("div",{staticClass:"evaluation-tab row"},t._l(t.comment.comment,(function(e,o){return n("div",{key:o,class:["item",{active:t.commentActive==e.id}],on:{click:function(o){t.commentActive=e.id}}},[t._v("\n "+t._s(e.name)+"("+t._s(e.count)+")\n ")])})),0)]),t._v(" "),n("div",[t._l(t.comment.comment,(function(e,o){return[n("comment-list",{directives:[{name:"show",rawName:"v-show",value:t.commentActive==e.id,expression:"commentActive == item.id"}],key:o,attrs:{"goods-id":t.id,type:e.id}})]}))],2)])],1)],1),t._v(" "),n("div",{staticClass:"goods-like ml16"},[t._m(0),t._v(" "),n("div",{staticClass:"goods-list"},[t._l(t.goodsDetails.like,(function(e,o){return[o<5?n("nuxt-link",{key:o,staticClass:"item bg-white mb16",attrs:{to:"/goods_details/"+e.id}},[n("el-image",{staticClass:"goods-img",attrs:{src:e.image}}),t._v(" "),n("div",{staticClass:"goods-name line2"},[t._v("\n "+t._s(e.name)+"\n ")]),t._v(" "),n("div",{staticClass:"price row mt8"},[n("div",{staticClass:"primary mr8"},[n("price-formate",{attrs:{price:e.price,"first-size":16}})],1),t._v(" "),n("div",{staticClass:"muted sm line-through"},[n("price-formate",{attrs:{price:e.market_price}})],1)])],1):t._e()]}))],2)])])]):t._e()}),n,!1,null,null,null);e.default=component.exports;installComponents(component,{PriceFormate:o(410).default,CommentList:o(512).default})}}]); |