(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c7a7aa7e"],{"060e":function(t,e,o){var i=o("d058");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=o("499e").default;a("7dcd0342",i,!0,{sourceMap:!1,shadowMode:!1})},"0d69":function(t,e,o){"use strict";var i=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"shop-content flex-j-sb flex-a-c ",class:t.usClass?"shopListUs":""},[o("div",{staticClass:"address",on:{click:function(e){return e.stopPropagation(),t.storeNavigation(t.storeItem.id)}}},[o("div",{staticClass:"store-name ell"},[t._v(t._s(t.storeItem.store_name))]),o("div",{staticClass:"address-details"},[t._v(t._s(t.address))]),o("div",{staticClass:"location flex-a-c"},[o("img",{attrs:{src:"https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/plugin/consumption-coupons/location.png"}}),o("span",{staticClass:"distance"},[t._v("距您"+t._s(t._f("kmUnit")(t.storeItem.distance))+" ")]),o("div",{staticClass:"navigation flex-a-c",on:{click:function(e){return e.stopPropagation(),t.navigation(t.storeItem.latitude,t.storeItem.longitude,t.storeItem.store_name)}}},[o("div",[t._v("导航")]),o("span",{staticClass:"iconfont icon-advertise-next"})]),t._t("merchant")],2)]),t.isImg?o("div",{staticClass:"mobile",on:{click:function(e){return e.stopPropagation(),t.callStore(t.storeItem.store_mobile)}}},[o("img",{attrs:{src:"https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/plugin/consumption-coupons/mobile.png"}})]):t._e()])},a=[],s=(o("b680"),o("99af"),o("14d9"),{props:{usClass:{type:Boolean,default:!1},isImg:{type:Boolean,default:!1},storeItem:{type:Object,default:{}},address:{type:String,default:""}},data:function(){return{activeNames:[]}},filters:{kmUnit:function(t){var e;return e="number"!==typeof t||isNaN(t)?"0m":t>=1e3?(t/1e3).toFixed(2)+"km":t+"m",e}},activated:function(){},methods:{navigation:function(){for(var t=arguments.length,e=new Array(t),o=0;o=128&&"0.00"!==t.couponStoreGoods.offline_price?o("div",{staticClass:"discount-right flex-c discount-changes"},[o("div",{staticClass:"price"},[o("span",{staticClass:"sign"},[t._v("¥")]),o("span",{ref:"discountRight",attrs:{id:"goods-price"}},[t._v(t._s(t.toFixInt(t.couponStoreGoods.offline_price)))])]),o("div",{staticClass:"flex-d flex-a-c"},[o("div",{staticClass:"reach reach-margin"},[t._v("到店付")]),o("div",{staticClass:"flex at-discount flex-d"},[o("div",{staticClass:"discount-small"},[o("span",[t._v(t._s(t.toFixInt(t.couponStoreGoods.offline_percent)))]),t._v("折 ")]),o("span",{staticClass:"small-price"},[t._v("¥"+t._s(t.toFixInt(t.couponStoreGoods.offline_cost_price)))])])])]):t._e(),t.discountRightWidth<128&&"0.00"!==t.couponStoreGoods.offline_price?o("div",{staticClass:"discount-right flex-a-c "},[o("div",{staticClass:"reach"},[t._v("到店付")]),o("div",{staticClass:"price "},[o("span",{staticClass:"sign"},[t._v("¥")]),o("span",{ref:"discountRight",attrs:{id:"goods-price"}},[t._v(t._s(t.toFixInt(t.couponStoreGoods.offline_price)))])]),o("div",{staticClass:"flex at-discount"},[o("div",{staticClass:"discount-small"},[o("span",[t._v(t._s(t.toFixInt(t.couponStoreGoods.offline_percent)))]),t._v("折 ")]),o("span",{staticClass:"small-price"},[t._v("¥"+t._s(t.toFixInt(t.couponStoreGoods.offline_cost_price)))])])]):t._e()]),t.couponStoreGoods.fight_groups_id?o("div",{staticClass:"booking flex-j-sb flex-a-c"},[o("div",{staticClass:"booking-left flex-a-c"},[o("img",{attrs:{src:"https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/plugin/consumption-coupons/booking.png"}}),o("span",{staticClass:"booking-name"},[t._v("拼团")]),o("span",{staticClass:"bookin-line"},[t._v("|")]),o("span",[t._v(t._s(t.couponStoreGoods.fight_people_count)+"人拼团到店付仅需 ¥"+t._s(t.couponStoreGoods.offline_group_price))])]),o("div",{staticClass:"flex-a-c",on:{click:t.goodsGroup}},[t._v(" 去拼团 "),o("span",{staticClass:"iconfont icon-advertise-next"})])]):t._e(),o("div",{staticClass:"consumption"},[t.advertising.is_open?o("div",{staticClass:"course_details_name",style:{color:t.advertising.font_color,fontSize:t.advertising.font_size+"px"},domProps:{innerHTML:t._s(t.taglineText)},on:{click:function(e){return t.goAdvertisingLink(t.advertising.link)}}}):t._e(),o("div",{staticClass:"title-content "},[t.couponStoreGoods.is_free?o("span",{staticClass:"store-label orange"},[t._v("霸王餐")]):t._e(),t.couponStoreGoods.is_self?o("span",{staticClass:"store-label yellow"},[t._v("自营")]):t._e(),t.couponStoreGoods.is_new?o("span",{staticClass:"store-label blue"},[t._v("新品")]):t._e(),o("span",{staticClass:"consumption-span "},[t._v(t._s(t.getGoods.title))])]),o("div",{staticClass:"collect flex-j-sb flex-a-c"},[o("div",{staticClass:"left flex-a-c",on:{click:t.onFavorite}},[t.favorite?o("span",{staticClass:"iconfont icon-bc_like"}):o("span",{staticClass:"iconfont icon-bc_like_normal"}),o("div",[t._v("收藏")])]),o("div",{staticClass:"right"},[o("span",[t._v("已售 "+t._s(t.getGoods.show_sales)+" /")]),o("span",{staticClass:"residue"},[t._v("剩余 "+t._s(t.getGoods.stock))])])]),o("div",{staticClass:"goods-tagList "},t._l(t.couponStoreGoods.tag_list,(function(e,i){return o("block",{key:i},[o("div",{staticClass:"tag-item flex-a-c"},[o("img",{attrs:{src:"https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/plugin/consumption-coupons/succees.png"}}),o("div",[t._v(t._s(e))])])])})),1)]),o("div",{staticClass:"mb20"}),t.goodsPlugin.group_code&&1==t.goodsPlugin.group_code.goods_entrance?o("div",{staticClass:"add-group flex-a-c"},[o("img",{attrs:{src:t.goodsPlugin.group_code&&t.goodsPlugin.group_code.code_logo}}),o("div",{staticClass:"group-flex flex"},[o("span",[t._v(t._s(t.goodsPlugin.group_code&&t.goodsPlugin.group_code.code_title)+"邀请您添加专属福利群!")]),o("span",{staticClass:"gray"},[t._v(t._s(t.goodsPlugin.group_code&&t.goodsPlugin.group_code.citation_copy))])]),o("div",{staticClass:"group-btn",on:{click:t.toGroupCode}},[t._v("去加群")])]):t._e(),t.goodsPlugin.group_code&&1==t.goodsPlugin.group_code.goods_entrance?o("div",{staticClass:"mb20"}):t._e(),t.goodsPlugin.coupon_store_goods&&t.goodsPlugin.coupon_store_goods.process_image?o("div",{staticClass:"flow-path"},[o("div",{staticClass:"title"},[t._v("使用流程")]),o("div",{staticClass:"flow-content flex-j-sb"},[o("div",{staticClass:"flow-content-img"},[o("img",{attrs:{src:t.goodsPlugin.coupon_store_goods&&t.goodsPlugin.coupon_store_goods.process_image,mode:"widthFix"}})])])]):t._e(),o("div",{staticClass:"mb20"}),o("div",{staticClass:"shop"},[o("div",{staticClass:"shop-title flex-j-sb "},[o("div",{staticClass:"title-name"},[t._v("适用门店("+t._s(t.total)+"家店适用)")]),t.locationStatus?o("div",{staticClass:"flex-a-c amount",on:{click:t.shopNavTo}},[t._v("更多套餐"),o("span",{staticClass:"iconfont icon-advertise-next"})]):o("div",{staticClass:"flex-a-c amount",on:{click:t.locationOn}},[t._v("定位授权"),o("span",{staticClass:"iconfont icon-advertise-next"})])]),o("address-us",{attrs:{isImg:t.imageRight,address:t.addressDetail,storeItem:t.storeListByGoods[0]}},[o("div",{staticClass:"merchant flex-a-c",attrs:{slot:"merchant"},on:{click:function(e){return e.stopPropagation(),t.callStore.apply(null,arguments)}},slot:"merchant"},[o("div",{staticClass:"iconfont icon-zx_map_tel"}),o("div",[t._v("联系商家")])])])],1),o("div",{staticClass:"mb20"}),o("div",[o("purchase-notes",{attrs:{goodsNotes:t.couponStoreGoods.buy_notice,goodsDetail:t.couponStoreGoods.package_detail,noticeDesc:t.couponStoreGoods.notice_desc,priceDesc:t.couponStoreGoods.price_desc,pluginSetting:t.pluginSetting}})],1),o("div",{staticClass:"mb20"}),o("div",{staticClass:"goods-details",attrs:{id:"goods-details"}},[t._m(1),o("div",{staticClass:"details-content",attrs:{id:"details-content"},domProps:{innerHTML:t._s(t.getGoods.content)},on:{click:function(e){return t.handleHtml(e)}}})]),o("div",{staticClass:"mb160"}),o("div",{staticClass:"shop-footer flex-a-c"},[o("div",{staticClass:"shop-left flex-a-c"},[o("div",{staticClass:"shop-index ",on:{click:function(e){return e.stopPropagation(),t.tapIndex.apply(null,arguments)}}},[o("img",{attrs:{src:"https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/plugin/consumption-coupons/index.png"}}),o("div",[t._v("首页")])]),o("div",{staticClass:"shop-service",on:{click:t.clickChat}},[o("img",{attrs:{src:"https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/plugin/consumption-coupons/kefu.png"}}),o("div",[t._v("客服")])])]),o("div",{staticClass:"shop-right flex-a-c"},[o("button",{staticClass:"share-btn",on:{click:t.sharePopup}},[t._v("分享")]),0===t.beginStatus?o("div",{staticClass:"openGoods-btn flex-a-c flex-j-c"},[o("div",[t._v("¥"+t._s(t.getGoods.price))]),o("span",[t._v("即将开售")])]):t._e(),1===t.beginStatus?o("div",{staticClass:"openGoods-btn openGoods-bg flex-a-c flex-j-c",on:{click:t.onPreorder}},[o("div",[t._v("¥"+t._s(t.getGoods.price))]),o("span",[t._v("立即购买")])]):t._e(),2===t.beginStatus?o("div",{staticClass:"openGoods-btn flex-a-c flex-j-c"},[o("div",[t._v("¥"+t._s(t.getGoods.price))]),o("span",[t._v("活动结束")])]):t._e()])]),o("yz-service",{attrs:{url:t.cservice,mobile:t.serviceMobile,qr:t.serviceQRcode},model:{value:t.serviceShow,callback:function(e){t.serviceShow=e},expression:"serviceShow"}}),o("van-popup",{attrs:{position:"bottom"},on:{close:t.shareClose},model:{value:t.shareShow,callback:function(e){t.shareShow=e},expression:"shareShow"}},[o("div",{staticClass:"share-main flex-j-sb"},[o("div",{staticClass:"share-img flex-a-c"},[o("div",{staticClass:"weixin-bg flex-j-c flex-a-c",on:{click:function(e){return e.stopPropagation(),t.onMenuShare.apply(null,arguments)}}},[o("div",{staticClass:"iconfont icon-card_weixin"})]),o("span",[t._v("分享好友")])]),o("div",{staticClass:"share-img flex-a-c",on:{click:function(e){return e.stopPropagation(),t.copyWriting.apply(null,arguments)}}},[o("img",{attrs:{src:"https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/plugin/consumption-coupons/copy-share.png"}}),o("span",[t._v("文案分享")])]),o("div",{staticClass:"share-img flex-a-c",on:{click:function(e){return e.stopPropagation(),t.PosterPopup.apply(null,arguments)}}},[o("img",{attrs:{src:"https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/plugin/consumption-coupons/look-over.png"}}),o("span",[t._v("查看海报")])])])]),o("van-popup",{staticClass:"posterPopup_style",staticStyle:{"background-color":"transparent","background-image":"url('')"},attrs:{closeable:"","close-on-click-overlay":"true",position:"center"},on:{close:t.PosterClose},model:{value:t.posterShow,callback:function(e){t.posterShow=e},expression:"posterShow"}},[o("div",{staticClass:"code_box"},[o("img",{attrs:{src:t.posterImg,mode:"widthFix","show-menu-by-longpress":"true"}}),t.posterImg?t._e():o("img",{attrs:{src:"https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/img_default.png",mode:"widthFix"}})])])],1)},a=[function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"consumer flex"},[o("span",[t._v("消费券")])])},function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"details-title flex-a-c flex-j-c"},[o("div",{staticClass:"left-line left-mr"}),o("span",[t._v("商品详情")]),o("div",{staticClass:"left-line left-ml"})])}],s=(o("e7e5"),o("d399")),n=(o("a9e3"),o("14d9"),o("ac1f"),o("5319"),o("4d63"),o("c607"),o("2c3e"),o("25f0"),o("99af"),o("6968")),r=o("c992"),d=o("78bb"),c=o("0d69"),l=o("6e57"),p={data:function(){return{locationStatus:!1,couponName:"",beginStatus:0,storeName:"",storeDetail:{},goodsId:0,addressDetail:"",imageRight:!1,favorite:!1,shareShow:!1,posterImg:"",posterShow:!1,goodsDetails:{},goodsPlugin:{},goodsBanner:"",couponStoreGoods:{},getGoods:{},fightGroupsId:0,pluginSetting:{},customerOpen:!1,serviceShow:!1,serviceQRcode:"",serviceMobile:"",cservice:"",storeListByGoods:[],longitude:"",latitude:"",activity_id:"",discountLeftWidth:0,discountRightWidth:0,advertising:{},taglineText:"",showBigImg:!1,isMiniApp:!!window.isMiniprogram,total:0,bigImages:[],imgStart:0}},activated:function(){var t=this;this.goodsId=Number(this.$route.query.goodsId),this.serviceDetail(),this.fun.getLocation().then((function(e){var o=t.fun.bd_encrypt(e.point.lng,e.point.lat);t.latitude=o.lat,t.longitude=o.lng,t.getGoodsDetails(t.goodsId),t.getStoreListByGoods(),t.locationStatus=!0})).catch((function(e){t.locationStatus=!1})),this.initData()},computed:{setTimeStart:function(){var t=new Date(1e3*this.couponStoreGoods.start_time);return t.getTime()-(new Date).getTime()},setTimeEnd:function(){var t=new Date(1e3*this.couponStoreGoods.end_time);return t.getTime()-(new Date).getTime()},toFixInt:function(){return function(t){return parseFloat(t)||"0"}}},methods:{initData:function(){this.showBigImg=!1,this.$emit("setShowBigImg",this.showBigImg)},toGroupCode:function(){"home"===this.goodsPlugin.group_code.jump_mode?this.$router.push(this.fun.getUrl("groupCode")):this.goodsPlugin.group_code.code_url&&(window.location.href=this.goodsPlugin.group_code.code_url)},goAdvertisingLink:function(t){t&&(window.location.href=t)},onPreorder:function(){0!==this.getGoods.show_stock?this.$router.push(this.fun.getUrl("orderAffirm",{},{goodsId:this.goodsId,optionsId:"",total:1})):Object(s["a"])('"商品没有库存了')},locationOn:function(){var t=this;this.fun.getLocation().then((function(e){var o=t.fun.bd_encrypt(e.point.lng,e.point.lat);t.latitude=o.lng,t.longitude=o.lat,t.getGoodsDetails(t.goodsId),t.getStoreListByGoods(),t.locationStatus=!0})).catch((function(e){t.locationStatus=!1}))},shopNavTo:function(){var t={goodsId:this.goodsId,storeName:this.storeDetail.store_name,longitude:this.longitude,latitude:this.latitude};this.$router.push(this.fun.getUrl("shopList",{},t))},goodsGroup:function(){0!==this.getGoods.show_stock?this.$router.push(this.fun.getUrl("GroupGoods",{id:this.couponStoreGoods.fight_groups_id,name:"group"})):Object(s["a"])("商品没有库存了")},onFavorite:function(){var t=this,e=!this.favorite,o="";o=e?"member.member-favorite.store":"member.member-favorite.destroy",$http.get(o,{goods_id:this.goodsId},"正在获取").then((function(o){1==o.result?(t.favorite=e,Object(s["a"])(o.msg)):t.$dialog.alert({message:o.msg})}),(function(t){}))},onMenuShare:function(){this.$dialog.alert({message:"请点击右上角微信分享"})},goodsPoster:function(){var t=this,e={goods_id:this.goodsId};$http.post("plugin.coupon-store.frontend.poster.goodsPoster",e,"正在获取").then((function(e){if(1==e.result){var o=e.data;t.posterImg=o.url}else t.$dialog.alert({message:e.msg})}),(function(t){}))},tapIndex:function(){this.$router.replace(this.fun.getUrl("home",{},{}))},clickChat:function(){var t=this.fun.isTextEmpty(this.serviceMobile)&&this.fun.isTextEmpty(this.serviceQRcode);if(this.fun.isTextEmpty(this.cservice)&&t)return this.$toast("抱歉,暂未设置客服信息");this.fun.isTextEmpty(this.cservice)||!t?this.serviceShow=!0:this.cservice&&this.cservice.indexOf("chatWindow")>=0?window.location.href=this.cservice+"&goods_id="+this.$route.params.id:window.location.href=this.cservice},serviceDetail:function(){var t=this;$http.post("goods.customer-service.index",{goods_id:this.goodsId},"正在获取").then((function(e){if(1==e.result){var o=e.data;t.cservice=o.cservice,t.serviceQRcode=o.service_QRcode,t.serviceMobile=o.service_mobile}else t.$dialog.alert({message:e.msg})}),(function(t){}))},getGoodsDetails:function(t){var e=this,o={id:Number(t),basic_info:1};$http.post("goods.goods.get-goods-page",o,"正在获取").then((function(t){if(1==t.result){var o,i,a,s,n,r,d,c,l=t.data,p=null===(o=l.plugin)||void 0===o?void 0:o.coupon_store_goods,g=1e3*p.start_time,m=1e3*p.end_time,u=(new Date).getTime(),f=0;f=g>u?0:u>=g&&u"),t=null===(o=t)||void 0===o?void 0:o.replace(a,"
"),t=null===(i=t)||void 0===i?void 0:i.replace(n," "),t},getStoreListByGoods:function(){var t=this,e={goods_id:this.goodsId,store_name:"",longitude:this.longitude,latitude:this.latitude};$http.post("plugin.coupon-store.frontend.store.getStoreListByGoods",e,"正在获取").then((function(e){if(1==e.result){var o=e.data,i=o.data,a="".concat(i[0].city).concat(i[0].district).concat(i[0].street).concat(i[0].address);t.addressDetail=a,t.storeListByGoods=o.data,t.total=o.total}else t.$dialog.alert({message:e.msg})}),(function(t){}))},showPop:function(){var t=app._isTextEmpty(this.data.serviceQRcode)&&app._isTextEmpty(this.data.serviceMobile);if(app._isTextEmpty(this.data.cservice)&&t)return app.tips("抱歉,暂未设置客服信息");app._isTextEmpty(this.data.cservice)||!t?this.setData({serviceShow:!0}):this.gotoChat({currentTarget:{dataset:{cservice:this.data.cservice}}})},sharePopup:function(){this.shareShow=!0},closePop:function(){this.serviceShow=!1},PosterClose:function(){this.posterShow=!1},shareClose:function(){this.shareShow=!1},PosterPopup:function(){this.posterShow=!0,this.goodsPoster()},callPhone:function(){window.location.href="tel://"+this.serviceMobile},callStore:function(){window.location.href="tel://"+this.storeListByGoods[0].store_mobile},saveImg:function(){},copyWriting:function(){this.$router.push(this.fun.getUrl("copyWriting",{},{goodsId:this.goodsId}))},setShowBigImg:function(t){this.child_showBigImg=t,this.$emit("setShowBigImg",t)},handleHtml:function(){if($event.target&&"IMG"==$event.target.nodeName&&"A"!==$event.target.parentElement.nodeName)for(var t=0;t-1)return this.imgStart=t,this.showBigImg=!0,void this.$emit("setShowBigImg",this.showBigImg)},getImgSrc:function(t){var e=[];return t.replace(/]*src=['"]([^'"]+)[^>]*>/g,(function(t,o){e.push(o)})),e}},components:{purchaseNotes:d["a"],addressUs:c["a"],cTitle:n["a"],yzService:l["a"],cMyswipe:r["a"]}},g=p,m=g,u=(o("1d05"),o("428fe"),o("2877")),f=Object(u["a"])(m,i,a,!1,null,"5ed76d10",null);e["default"]=f.exports}}]);