12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-28249a0d"],{"06a2":function(t,e,s){"use strict";var o=s("fc81")(!0);s("492d")(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,s=this._i;return s>=e.length?{value:void 0,done:!0}:(t=o(e,s),this._i+=t.length,{value:t,done:!1})}))},5608:function(t,e,s){"use strict";var o=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"time"},[t._v("\n "+t._s(t.tipText)),!0===t.isDay?s("span",{staticClass:"styleAll"},[t._v(t._s(t.day))]):t._e(),s("span",{staticClass:"timeTxt"},[t._v(t._s(t.dayText))]),s("span",{staticClass:"styleAll"},[t._v(t._s(t.hour))]),s("span",{staticClass:"timeTxt"},[t._v(t._s(t.hourText))]),s("span",{staticClass:"styleAll"},[t._v(t._s(t.minute))]),s("span",{staticClass:"timeTxt"},[t._v(t._s(t.minuteText))]),s("span",{staticClass:"styleAll"},[t._v(t._s(t.second))]),s("span",{staticClass:"timeTxt"},[t._v(t._s(t.secondText))])])},r=[],i=(s("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,s=0,o=0,r=0,i=0;e>0?(s=!0===t.isDay?Math.floor(e/86400):0,o=Math.floor(e/3600)-24*s,r=Math.floor(e/60)-24*s*60-60*o,i=Math.floor(e)-24*s*60*60-60*o*60-60*r,o<=9&&(o="0"+o),r<=9&&(r="0"+r),i<=9&&(i="0"+i),t.day=s,t.hour=o,t.minute=r,t.second=i):(t.day="00",t.hour="00",t.minute="00",t.second="00")}e(),setInterval(e,1e3)}}}),a=i,n=s("623f"),c=Object(n["a"])(a,o,r,!1,null,null,null);e["a"]=c.exports},"64c5":function(t,e,s){"use strict";s.r(e);var o=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("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)}}},[s("div",{ref:"header",staticClass:"header acea-row row-center-wrapper",style:"opacity:"+t.opacity},t._l(t.navList,(function(e,o){return s("div",{key:o,staticClass:"item",class:t.navActive===o?"on":"",on:{click:function(e){return t.asideTap(o)}}},[t._v("\n "+t._s(e)+"\n ")])})),0),s("div",{attrs:{id:"title0"}},[s("ProductConSwiper",{attrs:{imgUrls:t.imgUrls}}),s("div",{staticClass:"wrapper"},[s("div",{staticClass:"share acea-row row-between row-bottom"},[s("div",{staticClass:"money font-color-red"},[t._v("\n ¥"),s("span",{staticClass:"num",domProps:{textContent:t._s(t.storeInfo.price)}}),s("span",{staticClass:"y-money",domProps:{textContent:t._s("¥"+t.storeInfo.product_price)}})]),s("div",{staticClass:"iconfont icon-fenxiang",on:{click:t.setPosterImageStatus}})]),s("div",{staticClass:"introduce",domProps:{textContent:t._s(t.storeInfo.title)}}),s("div",{staticClass:"label acea-row row-between-wrapper"},[s("div",{domProps:{textContent:t._s("类型:"+t.storeInfo.people+"人团")}}),s("div",[t._v("累计销量:"+t._s(t.storeInfo.total?t.storeInfo.total:0)+" 件")]),s("div",[t._v("\n 限量: "+t._s(t.storeInfo.quota_show?t.storeInfo.quota_show:0)+"件\n ")])])]),0!==t.attr.productAttr.length?s("div",{staticClass:"attribute acea-row row-between-wrapper",on:{click:t.selecAttrTap}},[s("div",[t._v("\n "+t._s(t.attrTxt)+":"),s("span",{staticClass:"atterTxt"},[t._v(t._s(t.attrValue))])]),s("div",{staticClass:"iconfont icon-jiantou"})]):t._e(),s("div",{staticClass:"notice acea-row row-middle"},[s("div",{staticClass:"num font-color-red"},[s("span",{staticClass:"iconfont icon-laba"}),t._v("已拼"+t._s(t.storeInfo.sales)+t._s(t.storeInfo.unit_name)),s("span",{staticClass:"line"},[t._v("|")])]),s("div",{staticClass:"swiper-no-swiping swiper"},[s("swiper",{staticClass:"swiper-wrapper",attrs:{options:t.swiperTip}},t._l(t.itemNew,(function(e,o){return s("swiperSlide",{key:o,staticClass:"swiper-slide"},[s("div",{staticClass:"line1"},[t._v(t._s(e))])])})),1)],1)]),s("div",{staticClass:"assemble"},[t.groupList?s("div",t._l(t.groupList,(function(e,o){return s("div",{key:o},[o<t.groupListCount?s("div",{staticClass:"item acea-row row-between-wrapper"},[s("div",{staticClass:"pictxt acea-row row-between-wrapper"},[s("div",{staticClass:"pictrue"},[s("img",{staticClass:"image",attrs:{src:e.avatar}})]),s("div",{staticClass:"text line1",domProps:{textContent:t._s(e.nickname)}})]),s("div",{staticClass:"right acea-row row-middle"},[s("div",[s("div",{staticClass:"lack"},[t._v("\n 还差"),s("span",{staticClass:"font-color-red",domProps:{textContent:t._s(e.count)}}),t._v("人成团\n ")]),s("CountDown",{attrs:{"is-day":!1,"tip-text":"剩余 ","day-text":"","hour-text":":","minute-text":":","second-text":"",datatime:e.stop_time}})],1),s("div",{staticClass:"spellBnt",on:{click:function(s){return t.groupRule(e.id)}}},[t._v("\n 去拼单"),s("span",{staticClass:"iconfont icon-jiantou"})])])]):t._e()])})),0):t._e(),t.groupList.length>t.groupListCount?s("div",{staticClass:"more",on:{click:t.setGroupListCount}},[t._v("\n 查看更多"),s("span",{staticClass:"iconfont icon-xiangxia"})]):t._e()]),t._m(0)],1),s("div",{staticClass:"userEvaluation",attrs:{id:"title1"}},[s("div",{staticClass:"title acea-row row-between-wrapper"},[s("div",{domProps:{textContent:t._s("用户评价("+t.replyCount+")")}}),s("div",{staticClass:"praise",on:{click:t.goReply}},[s("span",{staticClass:"font-color-red",domProps:{textContent:t._s(t.replyChance+"%")}}),t._v("好评率"),s("span",{staticClass:"iconfont icon-jiantou"})])]),0!==t.reply.length?s("UserEvaluation",{attrs:{reply:t.reply}}):t._e()],1),s("div",{staticClass:"product-intro",attrs:{id:"title2"}},[s("div",{staticClass:"title"},[t._v("产品介绍")]),s("div",{staticClass:"conter",domProps:{innerHTML:t._s(t.storeInfo.description)}})]),s("div",{staticStyle:{height:"1.2rem"}}),s("div",{staticClass:"footer-group product-con acea-row row-between-wrapper"},[s("div",{staticClass:"customerSer acea-row row-center-wrapper row-column",on:{click:function(e){return t.$router.push({path:"/customer/list"})}}},[s("div",{staticClass:"iconfont icon-kefu"}),s("div",[t._v("客服")])]),s("div",{staticClass:"item acea-row row-center-wrapper row-column",on:{click:t.setCollect}},[s("div",{staticClass:"iconfont",class:t.storeInfo.userCollect?"icon-shoucang1":"icon-shoucang"}),s("div",[t._v("收藏")])]),t.attr.productSelect.quota>0&&t.attr.productSelect.product_stock>0?s("div",{staticClass:"bnt acea-row"},[s("div",{staticClass:"joinCart",on:{click:t.openAlone}},[t._v("单独购买")]),s("div",{staticClass:"buy",on:{click:t.openTeam}},[t._v("立即开团")])]):t._e(),t.attr.productSelect.quota<=0||t.attr.productSelect.product_stock<=0?s("div",{staticClass:"bnt acea-row"},[s("div",{staticClass:"joinCart",on:{click:t.openAlone}},[t._v("单独购买")]),s("div",{staticClass:"buy bg-color-hui"},[t._v("已售罄")])]):t._e()]),s("ProductWindow",{attrs:{attr:t.attr},on:{changeFun:t.changeFun}}),s("StorePoster",{attrs:{posterImageStatus:t.posterImageStatus,posterData:t.posterData},on:{setPosterImageStatus:t.setPosterImageStatus}})],1)},r=[function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"playWay"},[s("div",{staticClass:"title acea-row row-between-wrapper"},[s("div",[t._v("拼团玩法")])]),s("div",{staticClass:"way acea-row row-middle"},[s("div",{staticClass:"item way_font"},[s("span",{staticClass:"num"},[t._v("①")]),t._v("开团/参团")]),s("div",{staticClass:"iconfont icon-arrow"}),s("div",{staticClass:"item way_font"},[s("span",{staticClass:"num"},[t._v("②")]),t._v("邀请好友")]),s("div",{staticClass:"iconfont icon-arrow"}),s("div",{staticClass:"item way_font"},[s("div",[s("span",{staticClass:"num"},[t._v("③")]),t._v("满员发货")])])])])}],i=s("3bf2"),a=(s("c904"),s("9a33"),s("06a2"),s("ec25"),s("cc57"),s("6fe8")),n=(s("e5d0"),s("c5f8")),c=s("5608"),u=s("edc3"),l=s("c6da"),d=s("cbd6"),p=s("ca41"),h=s("73f5"),f=s("e876"),v=s("ed08"),m=s("74f9"),_=s("c24f"),g=s("4d7d"),w=s.n(g),C="GroupDetails",S={name:"GroupDetails",components:{ProductConSwiper:n["a"],CountDown:c["a"],UserEvaluation:u["a"],swiper:a["swiper"],swiperSlide:a["swiperSlide"],ProductWindow:l["a"],StorePoster:d["a"]},props:{},data:function(){return{domStatus:!1,posterData:{image:"",title:"",price:"",code:""},posterImageStatus:!1,reply:[],replyCount:0,replyChance:0,imgUrls:[],storeInfo:{},itemNew:{},groupListCount:2,groupList:{},swiperTip:{direction:"vertical",autoplay:{disableOnInteraction:!1,delay:2e3},loop:!0,speed:1e3,observer:!0,observeParents:!0},attr:{cartAttr:!1,productSelect:{image:"",store_name:"",price:"",quota:0,quota_show:0,unique:"",cart_num:1,product_stock:0},productAttr:[]},attrTxt:"请选择",isOpen:!1,attrValue:"",productValue:[],navList:[],lock:!1,navActive:0,opacity:0,storeSelfMention:!0,storeItems:{},activity:[]}},watch:{$route:function(t){var e=this;t.name===C&&e.mountedStart()}},mounted:function(){document.addEventListener("scroll",this.onScroll,!1),window.addEventListener("scroll",this.handleScroll),this.mountedStart()},methods:{setCollect:function(){var t=this,e=t.storeInfo.product_id,s="product";t.storeInfo.userCollect?Object(_["n"])(e,s).then((function(){t.storeInfo.userCollect=!t.storeInfo.userCollect})):Object(_["m"])(e,s).then((function(){t.storeInfo.userCollect=!t.storeInfo.userCollect}))},selecAttrTap:function(){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;Object(p["m"])(e).then((function(e){t.$set(t,"storeInfo",e.data.storeInfo),t.$set(t,"imgUrls",e.data.storeInfo.images),t.$set(t,"itemNew",e.data.pink_ok_list),t.$set(t,"groupList",e.data.pink),e.data.reply&&t.$set(t,"reply",Array.from(e.data.reply)||[]),t.$set(t,"replyCount",e.data.replyCount),t.$set(t,"replyChance",e.data.replyChance),t.setProductSelect(),t.posterData.image=t.storeInfo.image_base,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.attr.productAttr=e.data.productAttr,t.productValue=e.data.productValue,t.domStatus=!0;var s=["商品","评价","详情"];t.navList=s,t.getImageBase64(),t.setShare(),t.updateTitle(),0!=t.attr.productAttr&&t.DefaultSelect()})).catch((function(e){t.$dialog.error(e.msg),t.$router.go(-1)}))},DefaultSelect:function(){var t=this.attr.productAttr,e=[];for(var s in this.productValue)if(this.productValue[s].quota>0){e=this.attr.productAttr.length?s.split(","):[];break}for(var o=0;o<t.length;o++)this.$set(t[o],"index",e[o]);var r=this.productValue[e.sort().join(",")];r&&t.length?(this.$set(this.attr.productSelect,"store_name",this.storeInfo.title),this.$set(this.attr.productSelect,"image",r.image),this.$set(this.attr.productSelect,"price",r.price),this.$set(this.attr.productSelect,"quota",r.quota),this.$set(this.attr.productSelect,"unique",r.unique),this.$set(this.attr.productSelect,"cart_num",1),this.$set(this.attr.productSelect,"product_stock",r.product_stock),this.$set(this.attr.productSelect,"quota_show",r.quota_show),this.$set(this,"attrValue",e.sort().join(",")),this.$set(this,"attrTxt","已选择")):!r&&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","请选择")):r||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","请选择"))},updateTitle:function(){document.title=this.storeInfo.title||this.$route.meta.title},setShare:function(){Object(v["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(f["m"])(this.posterData.image,t.posterData.code).then((function(e){t.posterData.image=e.data.image,t.posterData.code=e.data.code}))},setPosterImageStatus:function(){var t=document.body||document.documentElement;t.scrollTop=0,this.posterImageStatus=!this.posterImageStatus},groupRule:function(t){var e=this;e.$router.push({path:"/activity/group_rule/"+t})},goReply:function(){var t=this;t.$router.push({path:"/evaluate_list/"+t.storeInfo.product_id})},setGroupListCount:function(){this.groupListCount=this.groupListCount+2},changeFun:function(t){"object"!==Object(i["a"])(t)&&(t={});var e=t.action||"",s=void 0===t.value?"":t.value;this[e]&&this[e](s)},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 s=e.quota||0,o=this.attr.productSelect;t?(o.cart_num++,o.cart_num>s&&(this.$set(this.attr.productSelect,"cart_num",s),this.$set(this,"cart_num",s))):(o.cart_num--,o.cart_num<1&&(this.$set(this.attr.productSelect,"cart_num",1),this.$set(this,"cart_num",1)))}},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.quota_show=0,e.productSelect.product_stock=0,e.cartAttr=!1,t.$set(t,"attr",e)},openTeam:function(){var t=this,e=this;if(0==e.attr.cartAttr)e.attr.cartAttr=!this.attr.cartAttr;else{var s={};s.productId=e.storeInfo.product_id,s.cartNum=e.attr.productSelect.cart_num,s.uniqueId=e.attr.productSelect.unique,s.combinationId=e.storeInfo.id,s.new=1,Object(h["m"])(s).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 s=t;e.navActive=s;var o=document.querySelector("#title"+s),r=o.offsetTop-e.$refs.header.offsetHeight-window.scrollY;e.lock=!0,window.scrollBy({top:r,left:0,behavior:"smooth"})}))},onScroll:w()((function(){var t=this;if(this.lock)this.lock=!1;else{var e=this.$refs.header.offsetHeight,s=window,o=s.scrollY,r=[];r.push(document.querySelector("#title0")),r.push(document.querySelector("#title1")),r.push(document.querySelector("#title2")),r.reduce((function(s,r,i){if(document.querySelector("#title0")||document.querySelector("#title1")||document.querySelector("#title2"))return s||(o+e<r.offsetTop+r.offsetHeight&&(s=!0,t.navActive=i),s)}),!1),this.lock=!0}}),500)},beforeDestroy:function(){document.removeEventListener("scroll",this.onScroll,!1),window.removeEventListener("scroll",this.handleScroll)}},y=S,$=(s("bb59"),s("623f")),b=Object($["a"])(y,o,r,!1,null,"a09320ce",null);e["default"]=b.exports},bb59:function(t,e,s){"use strict";var o=s("c720"),r=s.n(o);r.a},c720:function(t,e,s){},ca41:function(t,e,s){"use strict";s.d(e,"n",(function(){return r})),s.d(e,"m",(function(){return i})),s.d(e,"o",(function(){return a})),s.d(e,"q",(function(){return n})),s.d(e,"p",(function(){return c})),s.d(e,"r",(function(){return u})),s.d(e,"t",(function(){return l})),s.d(e,"s",(function(){return d})),s.d(e,"f",(function(){return p})),s.d(e,"a",(function(){return h})),s.d(e,"h",(function(){return f})),s.d(e,"i",(function(){return v})),s.d(e,"b",(function(){return m})),s.d(e,"e",(function(){return _})),s.d(e,"c",(function(){return g})),s.d(e,"j",(function(){return w})),s.d(e,"d",(function(){return C})),s.d(e,"g",(function(){return S})),s.d(e,"l",(function(){return y})),s.d(e,"k",(function(){return $}));var o=s("b775");function r(t){return o["a"].get("/combination/list",t,{login:!1})}function i(t){return o["a"].get("/combination/detail/"+t,{},{login:!1})}function a(t){return o["a"].get("/combination/pink/"+t)}function n(t){return o["a"].post("/combination/remove",t)}function c(t){return o["a"].post("/combination/poster",t)}function u(){return o["a"].get("/seckill/index",{},{login:!1})}function l(t,e){return o["a"].get("/seckill/list/"+t,e,{login:!1})}function d(t){return o["a"].get("/seckill/detail/"+t,{},{login:!1})}function p(t){return o["a"].get("/bargain/list",t,{login:!1})}function h(t){return o["a"].get("/bargain/detail/"+t)}function f(t){return o["a"].post("/bargain/share",t)}function v(t){return o["a"].post("/bargain/start",t)}function m(t){return o["a"].post("/bargain/help",t)}function _(t){return o["a"].post("/bargain/help/price",t)}function g(t){return o["a"].post("/bargain/help/count",t)}function w(t){return o["a"].post("/bargain/start/user",t)}function C(t){return o["a"].post("/bargain/help/list",t)}function S(t){return o["a"].post("/bargain/poster",t)}function y(t){return o["a"].get("/bargain/user/list",t)}function $(t){return o["a"].post("/bargain/user/cancel",t)}},ec25:function(t,e,s){"use strict";var o=s("4ce5"),r=s("e46b"),i=s("008a"),a=s("d0bc"),n=s("2285"),c=s("eafa"),u=s("ebc3"),l=s("f878");r(r.S+r.F*!s("d0c5")((function(t){Array.from(t)})),"Array",{from:function(t){var e,s,r,d,p=i(t),h="function"==typeof this?this:Array,f=arguments.length,v=f>1?arguments[1]:void 0,m=void 0!==v,_=0,g=l(p);if(m&&(v=o(v,f>2?arguments[2]:void 0,2)),void 0==g||h==Array&&n(g))for(e=c(p.length),s=new h(e);e>_;_++)u(s,_,m?v(p[_],_):p[_]);else for(d=g.call(p),s=new h;!(r=d.next()).done;_++)u(s,_,m?a(d,v,[r.value,_],!0):r.value);return s.length=_,s}})}}]);
- //# sourceMappingURL=chunk-28249a0d.0a3651b5.js.map
|