bztang-admin/addons/yun_shop/static/app/js/chunk-905843ae.3bb05b0d.js

1 line
6.1 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-905843ae"],{"388d":function(t,e,o){var i=o("9c69");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var s=o("499e").default;s("3e1d429a",i,!0,{sourceMap:!1,shadowMode:!1})},"9c69":function(t,e,o){var i=o("24fb");e=i(!1),e.push([t.i,".mb20[data-v-60161fc0]{height:.625rem;clear:both}.shop-title[data-v-60161fc0]{background-color:#fff;padding:0 0 .9375rem .875rem}.shop-title .nationwide[data-v-60161fc0]{font-size:.9375rem;color:#222;margin-right:.1875rem}.shop-title .nationwide-num[data-v-60161fc0]{color:#555;font-size:.875rem}.storeListBy[data-v-60161fc0]{margin-bottom:.625rem}.address-list[data-v-60161fc0]{margin:.625rem .625rem 0 .625rem}.ell[data-v-60161fc0]{text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.shopListUs[data-v-60161fc0]{padding:.8438rem .75rem .8125rem .7813rem}.shop-content[data-v-60161fc0]{width:100%;background-color:#fff}.location img[data-v-60161fc0],.shop-content .location img[data-v-60161fc0]{width:.5625rem;height:.6875rem;margin:0 .4375rem 0 0}.shop-content .mobile[data-v-60161fc0],.shop-content .mobile img[data-v-60161fc0]{width:1.875rem;height:1.875rem}.address .store-name[data-v-60161fc0]{font-size:.9375rem}.address .address-details[data-v-60161fc0],.address .store-name[data-v-60161fc0]{color:#222;margin:0 0 .4688rem 0;text-align:left}.address .address-details[data-v-60161fc0]{font-size:.8125rem}.location .distance[data-v-60161fc0]{font-size:.75rem;color:#555;margin:0 .875rem 0 0}.location .navigation[data-v-60161fc0]{font-size:.75rem;color:#ff3a00;cursor:pointer}",""]),t.exports=e},ac0d:function(t,e,o){"use strict";o.d(e,"a",(function(){return a}));var i=document.documentElement,s=document.body,a={data:function(){return{}},activated:function(){window.addEventListener("scroll",this.handleScroll)},deactivated:function(){window.removeEventListener("scroll",this.handleScroll)},methods:{getScrollTop:function(){var t=0;return i&&i.scrollTop?t=i.scrollTop:s&&(t=s.scrollTop),t},getClientHeight:function(){var t=0;return t=s.clientHeight&&i.clientHeight?Math.min(s.clientHeight,i.clientHeight):Math.max(s.clientHeight,i.clientHeight),t},getScrollHeight:function(){return Math.max(s.scrollHeight,i.scrollHeight)},handleScroll:function(){this.otherScroll();var t=document.documentElement.scrollTop||document.body.scrollTop;this.btnFlag=t>60,this.getScrollTop()+this.getClientHeight()+105>this.getScrollHeight()?(this.isLoadMore&&this.getMoreData(),this.isBottom=!0):this.isBottom=!1},otherScroll:function(){}}}},c781:function(t,e,o){"use strict";o("388d")},e29d:function(t,e,o){"use strict";o.r(e);var i=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("c-title",{attrs:{hide:!1,text:"适用门店"}}),o("van-search",{attrs:{shape:"round",placeholder:"请输入搜索关键词","use-action-slot":""},on:{input:t.searchChange},model:{value:t.storeName,callback:function(e){t.storeName=e},expression:"storeName"}}),o("div",{staticClass:"shop-title flex-a-c"},[o("div",{staticClass:"nationwide"},[t._v("全国")]),o("div",{staticClass:"nationwide-num"},[t._v("·"+t._s(t.storeListByGoods.length)+"家适用门店")])]),o("div",{staticClass:"address-list"},[t.storeListByGoods.length>0?o("div",t._l(t.storeListByGoods,(function(e,i){return o("block",{key:i,staticClass:"storeListBy"},[o("div",{staticClass:"shop-content flex-j-sb flex-a-c shopListUs"},[o("div",{staticClass:"address"},[o("div",{staticClass:"store-name ell"},[t._v(t._s(e.name))]),o("div",{staticClass:"address-details"},[t._v(t._s(e.address))]),o("div",{staticClass:"location flex-a-c"},[t.locationStatus?o("img",{attrs:{src:"https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/plugin/consumption-coupons/location.png"}}):t._e(),t.locationStatus?o("span",{staticClass:"distance"},[t._v("距您"+t._s(t._f("kmUnit")(e.distance))+" ")]):t._e(),o("div",{staticClass:"navigation flex-a-c",on:{click:function(o){return o.stopPropagation(),t.navigation(e.latitude,e.longitude,e.name)}}},[o("div",[t._v("导航")]),o("span",{staticClass:"iconfont icon-advertise-next"})])])]),o("div",{staticClass:"mobile",on:{click:function(o){return o.stopPropagation(),t.callStore(e.phoneNumber)}}},[o("img",{attrs:{src:"https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/plugin/consumption-coupons/mobile.png"}})])]),o("div",{staticClass:"mb20"})])})),1):o("van-empty",{attrs:{description:"空空如也"}})],1)],1)},s=[],a=(o("a9e3"),o("b680"),o("99af"),o("ac0d")),n={components:{},mixins:[a["a"]],data:function(){return{locationStatus:!1,goodsId:null,storeName:"",longitude:"",latitude:"",timer:"",storeListByGoods:[]}},activated:function(){this.goodsId=Number(this.$route.query.goodsId),this.longitude=this.$route.query.longitude,this.latitude=this.$route.query.latitude,""===this.longitude&&""===this.latitude?this.locationStatus=!1:this.locationStatus=!0,this.getStoreListByGoods()},filters:{kmUnit:function(t){var e,o=parseInt(t);return e="number"!==typeof o||isNaN(o)?"0m":o>=1e3?(o/1e3).toFixed(2)+"km":o+"m",e}},methods:{searchChange:function(t){var e=this;this.storeName=t,this.timer&&clearTimeout(this.timer),this.timer=setTimeout((function(){e.debounce(e.getStoreListByGoods())}),500)},navigation:function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];var i=[].concat(e),s=i[0],a=i[1],n=i[2],r=this.fun.bd_decrypt(a,s);this.fun.goToWXAdress(r,n)},debounce:function(t,e){var o,i;return function(s){var a=this,n=arguments,r=+new Date;o&&r<o+e?(clearTimeout(i),i=setTimeout((function(){o=r,t.apply(a,n)}),e)):(o=r,t.apply(a,n))}},callStore:function(t){window.location.href="tel://"+t},getStoreListByGoods:function(){var t=this,e={goods_id:this.goodsId,longitude:this.longitude,latitude:this.latitude,name:this.storeName};$http.post("plugin.travel-around.frontend.goods.goods.getShopAddressByGoods",e,"正在获取").then((function(e){if(1==e.result){var o=e.data;t.storeListByGoods=o}else t.$dialog.alert({message:e.msg})}),(function(t){}))}}},r=n,c=r,l=(o("c781"),o("2877")),d=Object(l["a"])(c,i,s,!1,null,"60161fc0",null);e["default"]=d.exports}}]);