12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7c26c7a8"],{"06a2":function(t,e,r){"use strict";var s=r("fc81")(!0);r("492d")(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,r=this._i;return r>=e.length?{value:void 0,done:!0}:(t=s(e,r),this._i+=t.length,{value:t,done:!1})}))},5608:function(t,e,r){"use strict";var s=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"time"},[t._v("\n "+t._s(t.tipText)),!0===t.isDay?r("span",{staticClass:"styleAll"},[t._v(t._s(t.day))]):t._e(),r("span",{staticClass:"timeTxt"},[t._v(t._s(t.dayText))]),r("span",{staticClass:"styleAll"},[t._v(t._s(t.hour))]),r("span",{staticClass:"timeTxt"},[t._v(t._s(t.hourText))]),r("span",{staticClass:"styleAll"},[t._v(t._s(t.minute))]),r("span",{staticClass:"timeTxt"},[t._v(t._s(t.minuteText))]),r("span",{staticClass:"styleAll"},[t._v(t._s(t.second))]),r("span",{staticClass:"timeTxt"},[t._v(t._s(t.secondText))])])},o=[],a=(r("163d"),{name:"CountDown",props:{tipText:{type:String,default:"倒计时"},dayText:{type:String,default:"天"},hourText:{type:String,default:"时"},minuteText:{type:String,default:"分"},secondText:{type:String,default:"秒"},datatime:{type:Number,default:0},isDay:{type:Boolean,default:!0}},data:function(){return{day:"00",hour:"00",minute:"00",second:"00"}},created:function(){this.show_time()},mounted:function(){},methods:{show_time:function(){var t=this;function e(){var e=t.datatime-Date.parse(new Date)/1e3,r=0,s=0,o=0,a=0;e>0?(r=!0===t.isDay?Math.floor(e/86400):0,s=Math.floor(e/3600)-24*r,o=Math.floor(e/60)-24*r*60-60*s,a=Math.floor(e)-24*r*60*60-60*s*60-60*o,s<=9&&(s="0"+s),o<=9&&(o="0"+o),a<=9&&(a="0"+a),t.day=r,t.hour=s,t.minute=o,t.second=a):(t.day="00",t.hour="00",t.minute="00",t.second="00")}e(),setInterval(e,1e3)}}}),i=a,n=r("623f"),c=Object(n["a"])(i,s,o,!1,null,null,null);e["a"]=c.exports},"899d":function(t,e,r){},adbf:function(t,e,r){"use strict";r.r(e);var s=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{directives:[{name:"show",rawName:"v-show",value:t.domStatus,expression:"domStatus"}],class:[t.posterImageStatus?"noscroll product-con":"product-con"],nativeOn:{scroll:function(e){return t.onScroll(e)}}},[r("div",{ref:"header",staticClass:"header acea-row row-center-wrapper",style:"opacity:"+t.opacity},t._l(t.navList,(function(e,s){return r("div",{key:s,staticClass:"item",class:t.navActive===s?"on":"",on:{click:function(e){return t.asideTap(s)}}},[t._v("\n "+t._s(e)+"\n ")])})),0),r("div",{attrs:{id:"title0"}},[r("ProductConSwiper",{attrs:{imgUrls:t.imgUrls}}),r("div",{staticClass:"nav acea-row row-between-wrapper"},[r("div",{staticClass:"money"},[t._v("\n ¥"),r("span",{staticClass:"num",domProps:{textContent:t._s(t.storeInfo.price)}}),r("span",{staticClass:"y-money",domProps:{textContent:t._s("¥"+t.storeInfo.ot_price)}})]),"1"===t.$route.params.status?r("div",{staticClass:"acea-row row-middle"},[r("div",{staticClass:"times"},[r("div",[t._v("距秒杀结束仅剩")]),r("CountDown",{attrs:{"is-day":!1,"tip-text":"","day-text":"","hour-text":" : ","minute-text":" : ","second-text":"",datatime:t.datatime}})],1)]):t._e()]),r("div",{staticClass:"wrapperRush"},[r("div",{staticClass:"introduce acea-row row-between"},[r("div",{staticClass:"infor",domProps:{textContent:t._s(t.storeInfo.title)}}),r("div",{staticClass:"iconfont icon-fenxiang",on:{click:t.setPosterImageStatus}})]),r("div",{staticClass:"label acea-row row-middle"},[r("div",{staticClass:"stock"},[t._v("\n 累计销售:"+t._s(t.storeInfo.total?t.storeInfo.total:0)+" 件\n ")]),r("div",[t._v("\n 限量: "+t._s(t.storeInfo.quota_show?t.storeInfo.quota_show:0)+" 件\n ")])])]),t.attr.productAttr.length?r("div",{staticClass:"attribute acea-row row-between-wrapper",on:{click:t.selecAttrTap}},[r("div",[t._v("\n "+t._s(t.attrTxt)+":"),r("span",{staticClass:"atterTxt"},[t._v(t._s(t.attrValue))])]),r("div",{staticClass:"iconfont icon-jiantou"})]):t._e()],1),r("div",{staticClass:"userEvaluation",attrs:{id:"title1"}},[r("div",{staticClass:"title acea-row row-between-wrapper"},[r("div",{domProps:{textContent:t._s("用户评价("+t.replyCount+")")}}),r("div",{staticClass:"praise",on:{click:t.goReply}},[r("span",{staticClass:"font-color-red",domProps:{textContent:t._s(t.replyChance+"%")}}),t._v("好评率"),r("span",{staticClass:"iconfont icon-jiantou"})])]),0!==t.reply.length?r("UserEvaluation",{attrs:{reply:t.reply}}):t._e()],1),r("div",{staticClass:"product-intro",attrs:{id:"title2"}},[r("div",{staticClass:"title"},[t._v("产品介绍")]),r("div",{staticClass:"conter",domProps:{innerHTML:t._s(t.storeInfo.description)}})]),r("div",{staticStyle:{height:"1.2rem"}}),r("div",{staticClass:"footerRush acea-row row-between-wrapper"},[r("div",{staticClass:"customerSer acea-row row-center-wrapper row-column",on:{click:function(e){return t.$router.push({path:"/customer/list"})}}},[r("div",{staticClass:"iconfont icon-kefu"}),r("div",[t._v("客服")])]),r("div",{staticClass:"item acea-row row-center-wrapper row-column",on:{click:t.setCollect}},[r("div",{staticClass:"iconfont",class:t.storeInfo.userCollect?"icon-shoucang1":"icon-shoucang"}),r("div",[t._v("收藏")])]),"1"===t.$route.params.status&&t.attr.productSelect.quota>0&&t.attr.productSelect.product_stock>0?r("div",{staticClass:"bnt acea-row"},[r("div",{staticClass:"joinCart",on:{click:t.openAlone}},[t._v("原价购买")]),r("div",{staticClass:"buy",on:{click:t.tapBuy}},[t._v("立即抢购")])]):t._e(),"1"===t.$route.params.status&&(t.attr.productSelect.quota<=0||t.attr.productSelect.product_stock<=0)?r("div",{staticClass:"bnt acea-row"},[r("div",{staticClass:"joinCart",on:{click:t.openAlone}},[t._v("原价购买")]),r("div",{staticClass:"buy bg-color-hui"},[t._v("已售罄")])]):t._e(),"2"===t.$route.params.status?r("div",{staticClass:"bnt acea-row"},[r("div",{staticClass:"joinCart",on:{click:t.openAlone}},[t._v("原价购买")]),r("div",{staticClass:"buy bg-color-hui"},[t._v("未开始")])]):t._e(),"0"===t.$route.params.status?r("div",{staticClass:"bnt acea-row"},[r("div",{staticClass:"joinCart",on:{click:t.openAlone}},[t._v("原价购买")]),r("div",{staticClass:"buy bg-color-hui"},[t._v("已结束")])]):t._e()]),r("ProductWindow",{attrs:{attr:t.attr},on:{changeFun:t.changeFun}}),r("StorePoster",{attrs:{posterImageStatus:t.posterImageStatus,posterData:t.posterData},on:{setPosterImageStatus:t.setPosterImageStatus}})],1)},o=[],a=(r("c904"),r("9a33"),r("3bf2")),i=(r("06a2"),r("ec25"),r("cc57"),r("c5f8")),n=r("5608"),c=r("c6da"),u=r("cbd6"),l=r("edc3"),d=r("ca41"),h=r("73f5"),p=r("e876"),f=r("ed08"),m=r("74f9"),v=r("c24f"),_=r("4d7d"),g=r.n(_),S="SeckillDetails",C={name:"SeckillDetails",components:{ProductConSwiper:i["a"],CountDown:n["a"],ProductWindow:c["a"],StorePoster:u["a"],UserEvaluation:l["a"]},props:{},data:function(){return{domStatus:!1,posterData:{image:"",title:"",price:"",code:""},posterImageStatus:!1,action:"",imgUrls:[],storeInfo:[],replyCount:0,replyChance:0,reply:[],cartNum:1,attr:{cartAttr:!1,productSelect:{image:"",store_name:"",price:"",quota:0,unique:"",cart_num:1,quota_show:0,product_stock:0},productAttr:[]},datatime:0,attrTxt:"请选择",isOpen:!1,attrValue:"",cart_num:1,productValue:[],navList:[],lock:!1,navActive:0,opacity:0,storeSelfMention:!0,storeItems:{},activity:[]}},watch:{$route:function(t){var e=this;t.name===S&&e.mountedStart()}},mounted:function(){document.addEventListener("scroll",this.onScroll,!1),window.addEventListener("scroll",this.handleScroll),this.mountedStart()},methods:{goReply:function(){var t=this;t.$router.push({path:"/evaluate_list/"+t.storeInfo.product_id})},setCollect:function(){var t=this,e=t.storeInfo.product_id,r="product";t.storeInfo.userCollect?Object(v["n"])(e,r).then((function(){t.storeInfo.userCollect=!t.storeInfo.userCollect})):Object(v["m"])(e,r).then((function(){t.storeInfo.userCollect=!t.storeInfo.userCollect}))},selecAttrTap:function(){"1"===this.$route.params.status&&(this.attr.cartAttr=!0,this.isOpen=!0)},openAlone:function(){this.$router.push({path:"/detail/"+this.storeInfo.product_id})},mountedStart:function(){var t=this,e=t.$route.params.id;t.datatime=parseInt(t.$route.params.time),Object(d["s"])(e).then((function(e){t.$set(t,"storeInfo",e.data.storeInfo),t.$set(t,"imgUrls",e.data.storeInfo.images),t.$set(t,"replyCount",e.data.replyCount),t.$set(t,"replyChance",e.data.replyChance),e.data.reply&&t.$set(t,"reply",Array.from(e.data.reply)||[]),t.posterData.image=t.storeInfo.image_base,t.attr.productAttr=e.data.productAttr,t.productValue=e.data.productValue;var r=["商品","评价","详情"];t.navList=r,t.updateTitle(),t.storeInfo.title.length>30?t.posterData.title=t.storeInfo.title.substring(0,30)+"...":t.posterData.title=t.storeInfo.title,t.posterData.price=t.storeInfo.price,t.posterData.code=t.storeInfo.code_base,t.setProductSelect(),t.domStatus=!0,t.getImageBase64(),t.setShare(),0!=t.attr.productAttr&&t.DefaultSelect()})).catch((function(e){t.$dialog.error(e.msg),t.$router.go(-1)}))},setShare:function(){Object(f["d"])()&&Object(m["openShareAll"])({desc:this.storeInfo.info,title:this.storeInfo.title,link:location.href,imgUrl:this.storeInfo.image})},getImageBase64:function(){var t=this;Object(p["m"])(this.posterData.image,t.posterData.code).then((function(e){t.posterData.image=e.data.image,t.posterData.code=e.data.code}))},updateTitle:function(){document.title=this.storeInfo.title||this.$route.meta.title},setPosterImageStatus:function(){var t=document.body||document.documentElement;t.scrollTop=0,this.posterImageStatus=!this.posterImageStatus},changeFun:function(t){"object"!==Object(a["a"])(t)&&(t={});var e=t.action||"",r=void 0===t.value?"":t.value;this[e]&&this[e](r)},changeattr:function(t){var e=this;e.attr.cartAttr=t},ChangeAttr:function(t){var e=this.productValue[t];e?(this.$set(this.attr.productSelect,"image",e.image),this.$set(this.attr.productSelect,"price",e.price),this.$set(this.attr.productSelect,"quota",e.quota),this.$set(this.attr.productSelect,"unique",e.unique),this.$set(this.attr.productSelect,"cart_num",1),this.$set(this.attr.productSelect,"product_stock",e.product_stock),this.$set(this.attr.productSelect,"quota_show",e.quota_show),this.$set(this,"attrValue",t),this.$set(this,"attrTxt","已选择")):(this.$set(this.attr.productSelect,"image",this.storeInfo.image),this.$set(this.attr.productSelect,"price",this.storeInfo.price),this.$set(this.attr.productSelect,"quota",0),this.$set(this.attr.productSelect,"unique",""),this.$set(this.attr.productSelect,"cart_num",0),this.$set(this.attr.productSelect,"quota_show",0),this.$set(this.attr.productSelect,"product_stock",0),this.$set(this,"attrValue",""),this.$set(this,"attrTxt","请选择"))},ChangeCartNum:function(t){var e=this.productValue[this.attrValue];if(void 0!==e||this.attr.productAttr.length||(e=this.attr.productSelect),void 0!==e){var r=e.quota||0,s=this.attr.productSelect;t?(s.cart_num++,s.cart_num>r&&(this.$set(this.attr.productSelect,"cart_num",r),this.$set(this,"cart_num",r))):(s.cart_num--,s.cart_num<1&&(this.$set(this.attr.productSelect,"cart_num",1),this.$set(this,"cart_num",1)))}},DefaultSelect:function(){var t=this.attr.productAttr,e=[];for(var r in this.productValue)if(this.productValue[r].quota>0){e=this.attr.productAttr.length?r.split(","):[];break}for(var s=0;s<t.length;s++)this.$set(t[s],"index",e[s]);var o=this.productValue[e.sort().join(",")];o&&t.length?(this.$set(this.attr.productSelect,"store_name",this.storeInfo.title),this.$set(this.attr.productSelect,"image",o.image),this.$set(this.attr.productSelect,"price",o.price),this.$set(this.attr.productSelect,"quota",o.quota),this.$set(this.attr.productSelect,"unique",o.unique),this.$set(this.attr.productSelect,"cart_num",1),this.$set(this.attr.productSelect,"product_stock",o.product_stock),this.$set(this.attr.productSelect,"quota_show",o.quota_show),this.$set(this,"attrValue",e.sort().join(",")),this.$set(this,"attrTxt","已选择")):!o&&t.length?(this.$set(this.attr.productSelect,"store_name",this.storeInfo.title),this.$set(this.attr.productSelect,"image",this.storeInfo.image),this.$set(this.attr.productSelect,"price",this.storeInfo.price),this.$set(this.attr.productSelect,"quota",0),this.$set(this.attr.productSelect,"unique",""),this.$set(this.attr.productSelect,"cart_num",0),this.$set(this.attr.productSelect,"quota_show",0),this.$set(this.attr.productSelect,"product_stock",0),this.$set(this,"attrValue",""),this.$set(this,"attrTxt","请选择")):o||t.length||(this.$set(this.attr.productSelect,"store_name",this.storeInfo.title),this.$set(this.attr.productSelect,"image",this.storeInfo.image),this.$set(this.attr.productSelect,"price",this.storeInfo.price),this.$set(this.attr.productSelect,"quota",0),this.$set(this.attr.productSelect,"quota_show",0),this.$set(this.attr.productSelect,"product_stock",0),this.$set(this.attr.productSelect,"unique",this.storeInfo.unique||""),this.$set(this.attr.productSelect,"cart_num",1),this.$set(this,"attrValue",""),this.$set(this,"attrTxt","请选择"))},setProductSelect:function(){var t=this,e=t.attr;e.productSelect.image=t.storeInfo.image,e.productSelect.store_name=t.storeInfo.title,e.productSelect.price=t.storeInfo.price,e.productSelect.quota=0,e.productSelect.product_stock=0,e.cartAttr=!1,t.$set(t,"attr",e)},tapBuy:function(){var t=this,e=this;if(0==e.attr.cartAttr)e.attr.cartAttr=!this.attr.attrcartAttr;else{var r={};r.productId=e.storeInfo.product_id,r.cartNum=e.attr.productSelect.cart_num,r.uniqueId=e.attr.productSelect.unique,r.secKillId=e.storeInfo.id,r.new=1,Object(h["m"])(r).then((function(t){e.$router.push({path:"/order/submit/"+t.data.cartId})})).catch((function(e){t.$dialog.error(e.msg)}))}},handleScroll:function(){var t=document.body.scrollTop||document.documentElement.scrollTop,e=t/350;e=e>1?1:e,this.opacity=e},asideTap:function(t){var e=this;this.$nextTick((function(){var r=t;e.navActive=r;var s=document.querySelector("#title"+r),o=s.offsetTop-e.$refs.header.offsetHeight-window.scrollY;e.lock=!0,window.scrollBy({top:o,left:0,behavior:"smooth"})}))},onScroll:g()((function(){var t=this;if(this.lock)this.lock=!1;else{var e=this.$refs.header.offsetHeight,r=window,s=r.scrollY,o=[];o.push(document.querySelector("#title0")),o.push(document.querySelector("#title1")),o.push(document.querySelector("#title2")),o.reduce((function(r,o,a){if(document.querySelector("#title0")||document.querySelector("#title1")||document.querySelector("#title2"))return r||(s+e<o.offsetTop+o.offsetHeight&&(r=!0,t.navActive=a),r)}),!1)}}),500)},beforeDestroy:function(){document.removeEventListener("scroll",this.onScroll,!1),window.removeEventListener("scroll",this.handleScroll)}},w=C,$=(r("c614"),r("623f")),y=Object($["a"])(w,s,o,!1,null,"0ac04126",null);e["default"]=y.exports},c614:function(t,e,r){"use strict";var s=r("899d"),o=r.n(s);o.a},ca41:function(t,e,r){"use strict";r.d(e,"n",(function(){return o})),r.d(e,"m",(function(){return a})),r.d(e,"o",(function(){return i})),r.d(e,"q",(function(){return n})),r.d(e,"p",(function(){return c})),r.d(e,"r",(function(){return u})),r.d(e,"t",(function(){return l})),r.d(e,"s",(function(){return d})),r.d(e,"f",(function(){return h})),r.d(e,"a",(function(){return p})),r.d(e,"h",(function(){return f})),r.d(e,"i",(function(){return m})),r.d(e,"b",(function(){return v})),r.d(e,"e",(function(){return _})),r.d(e,"c",(function(){return g})),r.d(e,"j",(function(){return S})),r.d(e,"d",(function(){return C})),r.d(e,"g",(function(){return w})),r.d(e,"l",(function(){return $})),r.d(e,"k",(function(){return y}));var s=r("b775");function o(t){return s["a"].get("/combination/list",t,{login:!1})}function a(t){return s["a"].get("/combination/detail/"+t,{},{login:!1})}function i(t){return s["a"].get("/combination/pink/"+t)}function n(t){return s["a"].post("/combination/remove",t)}function c(t){return s["a"].post("/combination/poster",t)}function u(){return s["a"].get("/seckill/index",{},{login:!1})}function l(t,e){return s["a"].get("/seckill/list/"+t,e,{login:!1})}function d(t){return s["a"].get("/seckill/detail/"+t,{},{login:!1})}function h(t){return s["a"].get("/bargain/list",t,{login:!1})}function p(t){return s["a"].get("/bargain/detail/"+t)}function f(t){return s["a"].post("/bargain/share",t)}function m(t){return s["a"].post("/bargain/start",t)}function v(t){return s["a"].post("/bargain/help",t)}function _(t){return s["a"].post("/bargain/help/price",t)}function g(t){return s["a"].post("/bargain/help/count",t)}function S(t){return s["a"].post("/bargain/start/user",t)}function C(t){return s["a"].post("/bargain/help/list",t)}function w(t){return s["a"].post("/bargain/poster",t)}function $(t){return s["a"].get("/bargain/user/list",t)}function y(t){return s["a"].post("/bargain/user/cancel",t)}},ec25:function(t,e,r){"use strict";var s=r("4ce5"),o=r("e46b"),a=r("008a"),i=r("d0bc"),n=r("2285"),c=r("eafa"),u=r("ebc3"),l=r("f878");o(o.S+o.F*!r("d0c5")((function(t){Array.from(t)})),"Array",{from:function(t){var e,r,o,d,h=a(t),p="function"==typeof this?this:Array,f=arguments.length,m=f>1?arguments[1]:void 0,v=void 0!==m,_=0,g=l(h);if(v&&(m=s(m,f>2?arguments[2]:void 0,2)),void 0==g||p==Array&&n(g))for(e=c(h.length),r=new p(e);e>_;_++)u(r,_,v?m(h[_],_):h[_]);else for(d=g.call(h),r=new p;!(o=d.next()).done;_++)u(r,_,v?i(d,m,[o.value,_],!0):o.value);return r.length=_,r}})}}]);
- //# sourceMappingURL=chunk-7c26c7a8.c2c01ca5.js.map
|