chunk-2dcf3890.0c4fda91.js 17 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2dcf3890"],{2267:function(t,e,s){t.exports=s.p+"h5/img/share-info.fa0bedf8.png"},"5f10":function(t,e,s){t.exports=s.p+"h5/img/noCoupon.e524084b.png"},"68d8":function(t,e,s){t.exports=s.p+"h5/img/red-packets.6a5bac43.png"},"6c32":function(t,e,s){},"8f99":function(t,e,s){"use strict";s.r(e);var a=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{class:[t.posterImageStatus?"noscroll product-con":"product-con"]},[a("product-con-swiper",{attrs:{"img-urls":t.storeInfo.slider_image}}),a("div",{staticClass:"wrapper"},[a("div",{staticClass:"share acea-row row-between row-bottom"},[a("div",{staticClass:"money font-color-orange"},[t._v("\n ¥"),a("span",{staticClass:"num"},[t._v(t._s(t.storeInfo.price))]),t.storeInfo.vip_price&&t.storeInfo.vip_price>0?a("span",{staticClass:"vip-money"},[t._v("¥"+t._s(t.storeInfo.vip_price))]):t._e(),t.storeInfo.vip_price&&t.storeInfo.vip_price>0?a("img",{staticClass:"image",attrs:{src:s("69ed")}}):t._e()]),a("div",{staticClass:"iconfont icon-fenxiang",on:{click:t.listenerActionSheet}})]),a("div",{staticClass:"introduce"},[t._v(t._s(t.storeInfo.store_name))]),a("div",{staticClass:"label acea-row row-between-wrapper"},[a("div",[t._v("原价:¥"+t._s(t.storeInfo.ot_price))]),a("div",[t._v("库存:"+t._s(t.storeInfo.stock)+t._s(t.storeInfo.unit_name))]),a("div",[t._v("销量:"+t._s(t.storeInfo.fsales)+t._s(t.storeInfo.unit_name))])]),t.couponList.length?a("div",{staticClass:"coupon acea-row row-between-wrapper",on:{click:t.couponTap}},[a("div",{staticClass:"hide line1 acea-row"},[t._v("\n 优惠券:\n "),t._l(t.couponList,function(e,s){return a("div",{key:s,staticClass:"activity"},[t._v("\n 满"+t._s(e.use_min_price)+"减"+t._s(e.coupon_price)+"\n ")])})],2),a("div",{staticClass:"iconfont icon-jiantou"})]):t._e()]),a("div",{staticClass:"attribute acea-row row-between-wrapper",on:{click:t.selecAttrTap}},[a("div",[t._v("\n "+t._s(t.attrTxt)+":"),a("span",{staticClass:"atterTxt"},[t._v(t._s(t.attrValue))])]),a("div",{staticClass:"iconfont icon-jiantou"})]),t.replyCount?a("div",{staticClass:"userEvaluation"},[a("div",{staticClass:"title acea-row row-between-wrapper"},[a("div",[t._v("用户评价("+t._s(t.replyCount)+")")]),a("router-link",{staticClass:"praise",attrs:{to:{path:"/evaluate_list/"+t.id}}},[a("span",{staticClass:"font-color-orange"},[t._v(t._s(t.replyChance)+"%")]),t._v("好评率"),a("span",{staticClass:"iconfont icon-jiantou"})])],1),a("user-evaluation",{attrs:{reply:t.reply}})],1):t._e(),a("div",{staticClass:"product-intro"},[a("div",{staticClass:"title"},[t._v("产品介绍")]),a("div",{staticClass:"conter",domProps:{innerHTML:t._s(t.storeInfo.description)}})]),a("div",{staticStyle:{height:"1.2rem"}}),a("div",{staticClass:"footer acea-row row-between-wrapper"},[a("div",{staticClass:"item",on:{click:function(e){return t.$router.push({path:"/customer/list"})}}},[a("div",{staticClass:"iconfont icon-kefu"}),a("div",[t._v("客服")])]),a("div",{staticClass:"item",on:{click:t.setCollect}},[a("div",{staticClass:"iconfont",class:t.storeInfo.userCollect?"icon-shoucang1":"icon-shoucang"}),a("div",[t._v("收藏")])]),a("router-link",{staticClass:"item animated",class:!0===t.animated?"bounceIn":"",attrs:{to:"/cart"}},[a("div",{staticClass:"iconfont icon-gouwuche1"},[t.CartCount>0?a("span",{staticClass:"num bg-color-orange"},[t._v(t._s(t.CartCount))]):t._e()]),a("div",[t._v("购物车")])]),a("div",{staticClass:"bnt acea-row"},[a("div",{staticClass:"joinCart",on:{click:t.joinCart}},[t._v("加入购物车")]),a("div",{staticClass:"buy",on:{click:t.tapBuy}},[t._v("立即购买")])])],1),0!==t.priceName?a("Share-red-packets",{attrs:{priceName:t.priceName},on:{changeFun:t.changeFun}}):t._e(),a("CouponPop",{attrs:{coupon:t.coupon},on:{changeFun:t.changeFun}}),a("Product-window",{attrs:{attr:t.attr},on:{changeFun:t.changeFun}}),a("StorePoster",{attrs:{posterImageStatus:t.posterImageStatus,posterData:t.posterData},on:{setPosterImageStatus:t.setPosterImageStatus}}),a("ShareInfo",{attrs:{shareInfoStatus:t.shareInfoStatus},on:{setShareInfoStatus:t.setShareInfoStatus}}),a("div",{staticClass:"generate-posters acea-row row-middle",class:t.posters?"on":""},[!0===t.weixinStatus?a("div",{staticClass:"item",on:{click:t.setShareInfoStatus}},[a("div",{staticClass:"iconfont icon-weixin3"}),a("div",{},[t._v("发送给朋友")])]):t._e(),a("div",{staticClass:"item",on:{click:t.setPosterImageStatus}},[a("div",{staticClass:"iconfont icon-haibao"}),a("div",{},[t._v("生成海报")])])]),a("div",{directives:[{name:"show",rawName:"v-show",value:t.posters,expression:"posters"}],staticClass:"mask",on:{touchmove:function(t){t.preventDefault()},click:t.listenerActionClose}})],1)},i=[],o=s("7618"),n=(s("55dd"),s("c5f8")),r=s("edc3"),c=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"sharing-packets",class:!0===t.state?"on":""},[a("div",{staticClass:"iconfont icon-guanbi acea-row row-center-wrapper",on:{click:t.closeShare}}),a("div",{staticClass:"line"}),a("div",{staticClass:"sharing-con",on:{click:t.goShare}},[a("img",{staticClass:"image",attrs:{src:s("68d8")}}),a("div",{staticClass:"text font-color-red"},[a("div",[t._v("会员分享返")]),a("div",{staticClass:"money"},[a("span",{staticClass:"label"},[t._v("¥")]),t._v(t._s(t.priceName))]),a("div",{staticClass:"tip"},[t._v("下单即返佣金")]),a("div",{staticClass:"shareBut"},[t._v("立即分享")])])])])},u=[],l=(s("c5f6"),{name:"ShareRedPackets",props:{priceName:{type:[String,Number],default:""}},data:function(){return{state:!1}},mounted:function(){},methods:{goShare:function(){this.$emit("changeFun",{action:"shareCode",value:!1})},closeShare:function(){this.state=!0}}}),p=l,d=s("2877"),h=Object(d["a"])(p,c,u,!1,null,null,null),f=h.exports,v=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"coupon-list-window",class:!0===t.coupon.coupon?"on":""},[a("div",{staticClass:"title"},[t._v("\n 优惠券"),a("span",{staticClass:"iconfont icon-guanbi",on:{click:t.close}})]),t.coupon.list.length>0?a("div",{staticClass:"coupon-list"},t._l(t.coupon.list,function(e,s){return a("div",{key:s,staticClass:"item acea-row row-center-wrapper",on:{click:function(a){return t.getCouponUser(s,e.id)}}},[a("div",{staticClass:"money"},[t._v("\n ¥"),a("span",{staticClass:"num"},[t._v(t._s(e.coupon_price))])]),a("div",{staticClass:"text"},[a("div",{staticClass:"condition line1"},[t._v("\n 购物满"+t._s(e.use_min_price)+"元可用\n ")]),a("div",{staticClass:"data acea-row row-between-wrapper"},[0===e.end_time?a("div",[t._v("不限时")]):a("div",[t._v(t._s(e.start_time)+"-"+t._s(e.end_time))]),a("div",{staticClass:"bnt acea-row row-center-wrapper",class:e.is_use?"gray":"bg-color-orange"},[t._v("\n "+t._s(e.is_use?"已领取":"立即领取")+"\n ")])])])])}),0):a("div",{staticClass:"pictrue"},[a("img",{staticClass:"image",attrs:{src:s("5f10")}})])]),a("div",{staticClass:"mask",attrs:{hidden:!1===t.coupon.coupon},on:{touchmove:function(t){t.preventDefault()},click:t.close}})])},m=[],_=s("c24f"),C={name:"CouponPop",props:{coupon:{type:Object,default:function(){}}},data:function(){return{}},mounted:function(){},methods:{close:function(){this.$emit("changeFun",{action:"changecoupon",value:!1})},getCouponUser:function(t,e){var s=this,a=s.coupon.list;!0!==a[t].is_use&&Object(_["p"])(e).then(function(){s.$dialog.toast({mes:"已领取"}),s.$set(a[t],"is_use",!0),s.$emit("changefun",{action:"currentcoupon",value:t}),s.$emit("changeFun",{action:"changecoupon",value:!1})})}}},g=C,S=Object(d["a"])(g,v,m,!1,null,null,null),I=S.exports,w=s("c6da"),$=s("cbd6"),b=function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.shareInfoStatus?a("div",{staticClass:"poster-first"},[a("div",{staticClass:"mask-share"},[a("img",{attrs:{src:s("2267")},on:{click:t.shareInfoClose}})])]):t._e()},k=[],y={name:"ShareInfo",props:{shareInfoStatus:Boolean},data:function(){return{}},mounted:function(){},methods:{shareInfoClose:function(){this.$emit("setShareInfoStatus")}}},O=y,j=(s("c0f6"),Object(d["a"])(O,b,k,!1,null,"f3067a28",null)),x=j.exports,A=s("73f5"),D=s("ed08"),T=s("2f62"),V=s("e876"),P=s("74f9"),N={name:"GoodsCon",components:{ProductConSwiper:n["a"],UserEvaluation:r["a"],ShareRedPackets:f,CouponPop:I,ProductWindow:w["a"],StorePoster:$["a"],ShareInfo:x},data:function(){return{shareInfoStatus:!1,weixinStatus:!1,posterData:{image:"",title:"",price:"",code:""},posterImageStatus:!1,animated:!1,coupon:{coupon:!1,list:[]},attr:{cartAttr:!1,productAttr:[],productSelect:{}},isOpen:!1,productValue:[],id:0,storeInfo:{},couponList:[],attrTxt:"请选择",attrValue:"",cart_num:1,replyCount:"",replyChance:"",reply:[],priceName:0,CartCount:0,posters:!1}},computed:Object(T["b"])(["isLogin"]),mounted:function(){this.id=this.$route.params.id,this.productCon(),this.coupons()},methods:{updateTitle:function(){document.title=this.storeInfo.store_name||this.$route.meta.title},setShareInfoStatus:function(){this.shareInfoStatus=!this.shareInfoStatus,this.posters=!1},shareCode:function(){var t=this;Object(A["g"])(t.id).then(function(e){t.posterData.code=e.data.code,t.listenerActionSheet()})},setPosterImageStatus:function(){var t=document.body||document.documentElement;t.scrollTop=0,this.posterImageStatus=!this.posterImageStatus,this.posters=!1},productCon:function(){var t=this;Object(A["h"])(t.id,"").then(function(e){t.$set(t,"storeInfo",e.data.storeInfo),t.$set(t.attr,"productAttr",e.data.productAttr),t.$set(t,"productValue",e.data.productValue),t.$set(t,"replyCount",e.data.replyCount),t.$set(t,"replyChance",e.data.replyChance),t.reply=e.data.reply?[e.data.reply]:[],t.$set(t,"reply",t.reply),t.$set(t,"priceName",e.data.priceName),t.posterData.image=t.storeInfo.image_base,t.storeInfo.store_name.length>30?t.posterData.title=t.storeInfo.store_name.substring(0,30)+"...":t.posterData.title=t.storeInfo.store_name,t.posterData.price=t.storeInfo.price,t.posterData.code=t.storeInfo.code_base,t.updateTitle(),t.DefaultSelect(),t.getCartCount(),t.getImageBase64()}).catch(function(e){t.$dialog.error(e.msg),t.$router.go(-1)})},getImageBase64:function(){var t=this;Object(V["j"])(this.posterData.image,t.posterData.code).then(function(e){t.posterData.image=e.data.image,t.posterData.code=e.data.code}).catch(function(){})},DefaultSelect:function(){for(var t=this.attr.productAttr,e=[],s=0;s<t.length;s++)this.$set(t[s],"index",0),e.push(t[s].attr_values[0]);var a=this.productValue[e.sort().join(",")];a&&t.length?(this.$set(this.attr.productSelect,"store_name",this.storeInfo.store_name),this.$set(this.attr.productSelect,"image",a.image),this.$set(this.attr.productSelect,"price",a.price),this.$set(this.attr.productSelect,"stock",a.stock),this.$set(this.attr.productSelect,"unique",a.unique),this.$set(this.attr.productSelect,"cart_num",1),this.$set(this,"attrValue",e.sort().join(",")),this.$set(this,"attrTxt","已选择")):!a&&t.length?(this.$set(this.attr.productSelect,"store_name",this.storeInfo.store_name),this.$set(this.attr.productSelect,"image",this.storeInfo.image),this.$set(this.attr.productSelect,"price",this.storeInfo.price),this.$set(this.attr.productSelect,"stock",0),this.$set(this.attr.productSelect,"unique",""),this.$set(this.attr.productSelect,"cart_num",0),this.$set(this,"attrValue",""),this.$set(this,"attrTxt","请选择")):a||t.length||(this.$set(this.attr.productSelect,"store_name",this.storeInfo.store_name),this.$set(this.attr.productSelect,"image",this.storeInfo.image),this.$set(this.attr.productSelect,"price",this.storeInfo.price),this.$set(this.attr.productSelect,"stock",this.storeInfo.stock),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","请选择"))},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.stock||0,a=this.attr.productSelect;t?(a.cart_num++,a.cart_num>s&&(this.$set(this.attr.productSelect,"cart_num",s),this.$set(this,"cart_num",s))):(a.cart_num--,a.cart_num<1&&(this.$set(this.attr.productSelect,"cart_num",1),this.$set(this,"cart_num",1)))}},changeFun:function(t){"object"!==Object(o["a"])(t)&&(t={});var e=t.action||"",s=void 0===t.value?"":t.value;this[e]&&this[e](s)},couponTap:function(){var t=this;t.coupons(),t.coupon.coupon=!0},changecoupon:function(t){this.coupon.coupon=t,this.coupons()},currentcoupon:function(t){var e=this;e.coupon.coupon=!1,e.$set(e.coupon.list[t],"is_use",!0)},coupons:function(){var t=this,e={page:1,limit:20};Object(_["o"])(e).then(function(e){t.$set(t,"couponList",e.data||[]),t.$set(t.coupon,"list",e.data)})},selecAttrTap:function(){this.attr.cartAttr=!0,this.isOpen=!0},changeattr:function(t){this.attr.cartAttr=t,this.isOpen=!1},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,"stock",e.stock),this.$set(this.attr.productSelect,"unique",e.unique),this.$set(this.attr.productSelect,"cart_num",1),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,"stock",0),this.$set(this.attr.productSelect,"unique",""),this.$set(this.attr.productSelect,"cart_num",0),this.$set(this,"attrValue",""),this.$set(this,"attrTxt","请选择"))},setCollect:function(){var t=this,e=t.storeInfo.id,s="product";t.storeInfo.userCollect?Object(_["l"])(e,s).then(function(){t.storeInfo.userCollect=!t.storeInfo.userCollect}):Object(_["k"])(e,s).then(function(){t.storeInfo.userCollect=!t.storeInfo.userCollect})},joinCart:function(){this.goCat(0)},goCat:function(t){var e=this,s=e.productValue[this.attrValue];if(e.attrValue?e.attr.cartAttr=!e.isOpen:e.isOpen?e.attr.cartAttr=!0:e.attr.cartAttr=!e.attr.cartAttr,!0===e.attr.cartAttr&&!1===e.isOpen)return e.isOpen=!0;if(e.attr.productAttr.length&&void 0===s&&!0===e.isOpen)return e.$dialog.toast({mes:"产品库存不足,请选择其它"});var a={productId:e.id,cartNum:e.attr.productSelect.cart_num,new:t,uniqueId:void 0!==e.attr.productSelect?e.attr.productSelect.unique:""};Object(A["m"])(a).then(function(s){e.isOpen=!1,e.attr.cartAttr=!1,t?e.$router.push({path:"/order/submit/"+s.data.cartId}):e.$dialog.toast({mes:"添加购物车成功",callback:function(){e.getCartCount(!0)}})}).catch(function(t){return e.isOpen=!1,e.$dialog.toast({mes:t.msg})})},getCartCount:function(t){var e=this,s=e.isLogin;s&&Object(A["b"])({numType:0}).then(function(s){e.CartCount=s.data.count,t&&(e.animated=!0,setTimeout(function(){e.animated=!1},500))})},tapBuy:function(){this.goCat(1)},listenerActionSheet:function(){!0===Object(D["d"])()&&(this.weixinStatus=!0),this.posters=!0},listenerActionClose:function(){this.posters=!1},setOpenShare:function(){var t=this.storeInfo,e=location.href;if(Object(D["d"])())if(this.isLogin)Object(_["C"])().then(function(s){e=-1===e.indexOf("?")?e+"?spread="+s.data.uid:e+"&spread="+s.data.uid;var a={desc:t.store_info,title:t.store_name,link:e,imgUrl:t.image};Object(P["wechatEvevt"])(["updateAppMessageShareData","updateTimelineShareData"],a).then(function(t){console.log(t)}).catch(function(t){console.log(t),t.is_ready&&(t.wx.updateAppMessageShareData(a),t.wx.updateTimelineShareData(a))})});else{var s={desc:t.store_info,title:t.store_name,link:e,imgUrl:t.image};Object(P["wechatEvevt"])(["updateAppMessageShareData","updateTimelineShareData"],s).then(function(t){console.log(t)}).catch(function(t){console.log(t),t.is_ready&&(t.wx.updateAppMessageShareData(s),t.wx.updateTimelineShareData(s))})}}}},E=N,q=(s("f23d"),Object(d["a"])(E,a,i,!1,null,null,null));e["default"]=q.exports},c0f6:function(t,e,s){"use strict";var a=s("ff26"),i=s.n(a);i.a},edc3:function(t,e,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"evaluateWtapper"},t._l(t.reply,function(e,a){return s("div",{key:a,staticClass:"evaluateItem"},[s("div",{staticClass:"pic-text acea-row row-middle"},[s("div",{staticClass:"pictrue"},[s("img",{staticClass:"image",attrs:{src:e.avatar}})]),s("div",{staticClass:"acea-row row-middle"},[s("div",{staticClass:"name line1"},[t._v(t._s(e.nickname))]),s("div",{staticClass:"start",class:"star"+e.star})])]),s("div",{staticClass:"time"},[t._v(t._s(e.add_time)+" "+t._s(e.suk))]),s("div",{staticClass:"evaluate-infor"},[t._v(t._s(e.comment))]),s("div",{staticClass:"imgList acea-row"},t._l(e.pics,function(t,e){return s("div",{key:e,staticClass:"pictrue"},[s("img",{staticClass:"image",attrs:{src:t}})])}),0),e.merchant_reply_content?s("div",{staticClass:"reply"},[s("span",{staticClass:"font-color-orange"},[t._v("店小二")]),t._v(":"+t._s(e.merchant_reply_content)+"\n ")]):t._e()])}),0)},i=[],o={name:"UserEvaluation",props:{reply:{type:Array,default:function(){return[]}}},data:function(){return{}},mounted:function(){},methods:{}},n=o,r=s("2877"),c=Object(r["a"])(n,a,i,!1,null,null,null);e["a"]=c.exports},f23d:function(t,e,s){"use strict";var a=s("6c32"),i=s.n(a);i.a},ff26:function(t,e,s){}}]);
  2. //# sourceMappingURL=chunk-2dcf3890.0c4fda91.js.map