bztang-admin/addons/yun_shop/static/app/js/chunk-5964fb6f.c5d1fae8.js

1 line
11 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5964fb6f"],{"2c66":function(e,t,i){"use strict";i("bb77")},38358:function(e,t,i){"use strict";i("5665")},5665:function(e,t,i){var o=i("f2a2");o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);var r=i("499e").default;r("98df6b48",o,!0,{sourceMap:!1,shadowMode:!1})},9671:function(e,t,i){"use strict";i.r(t);var o=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("c-title",{attrs:{hide:!1,text:"搜索"}}),i("div",{staticClass:"head"},[i("div",{staticClass:"inpbox"},[i("i",{staticClass:"iconfont icon-sousuo1",on:{click:function(t){return t.stopPropagation(),e.searchClick.apply(null,arguments)}}}),i("input",{directives:[{name:"model",rawName:"v-model",value:e.query.title,expression:"query.title"}],attrs:{type:"text",placeholder:"请输入搜索内容"},domProps:{value:e.query.title},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.searchClick.apply(null,arguments)},input:function(t){t.target.composing||e.$set(e.query,"title",t.target.value)}}})])]),i("div",{staticClass:"search-main"},[i("div",{staticClass:"title"}),e.goodsList.length>0?i("div",{staticClass:"search-goods flex-j-sb"},e._l(e.goodsList,(function(t,o){return i("block",{key:o},[i("div",{staticClass:"goods-item flex",on:{click:function(i){return e.goodsNavTo(t.id)}}},[i("div",{staticClass:"goods-img"},[i("img",{attrs:{src:t.thumb}}),i("div",{staticClass:"number"},[e._v("已售"+e._s(t.show_sales))])]),i("div",{staticClass:"fine-food flex-j-sb flex-a-c"},[i("div",{staticClass:"fine"},[e._v(e._s(t.title))]),i("div",{staticClass:"long-title"},[e._v(e._s(t.long_title))])]),i("div",{staticClass:"flex-a-c"},[i("div",{staticClass:"s3-price"},[i("small",[e._v("¥")]),i("span",[e._v(e._s(t.price)+" ")])]),i("div",{staticClass:"s2"},[i("span",[e._v("原价 ¥"+e._s(t.market_price))])])])])])})),1):i("van-empty",{attrs:{description:"空空如也"}})],1)],1)},r=[],a=i("2909"),n=(i("4056"),i("44bf")),s=(i("498a"),i("b64b"),i("3c65"),i("4de4"),i("d3b7"),i("c740"),i("b0c0"),i("e9c4"),i("14d9"),i("99af"),i("ac0d")),l={components:{VanImage:n["a"]},mixins:[s["a"]],data:function(){return{goodsList:[],query:{page:1,longitude:"",latitude:"",city:"",cityCode:"",travel_around_goods_type:0,is_recommand:0,category:0,title:"",basic_info:1},isLoadMore:!0,page:1,total_page:0}},activated:function(){var e,t=this;""!==(null!==(e=this.$route.query.keyword)&&void 0!==e?e:"")&&(this.query.title=this.$route.query.keyword.trim()),this.query.city=this.$route.query.city,this.query.latitude=this.$route.query.latitude,this.query.longitude=this.$route.query.longitude,this.query.cityCode=this.$route.query.cityCode,this.page=1;var i=localStorage.getItem("searchHistory")||[],o=[];if(i.length>0){i=JSON.parse(i);var r=i.length;r>=10&&i.pop()}var a=Date.parse(new Date);i.unshift({name:this.query.title,key:a}),o=i.filter((function(e,t,i){return i.findIndex((function(t){return t.name===e.name}))===t})),localStorage.setItem("searchHistory",JSON.stringify(o)),this.getGoodsList(),this.$route.query.cityCode||setTimeout((function(){t.fun.getLocation().then((function(e){var i=t.fun.bd_encrypt(e.point.lng,e.point.lat);t.query.latitude=i.lat,t.query.longitude=i.lng,t.city=e.addressComponent.city,t.getGoodsList()})).catch((function(e){t.locationStatus=!1,t.getGoodsList()}))}),2e3)},methods:{storeInput:function(e){this.storeName=e},goodsNavTo:function(e){this.$router.push(this.fun.getUrl("tourAroundGoodsDetails",{},{goodsId:e,latitude:this.query.latitude,longitude:this.query.longitude}))},searchClick:function(){if(this.page=1,this.$route.query.keyword==this.query.title)this.getGoodsList();else{var e=JSON.parse(JSON.stringify(this.$route.query));e.keyword=this.query.title,this.$router.push({path:this.$route.path,query:e})}},getGoodsList:function(){var e=this;""===this.query.latitude&&""===this.query.longitude&&(this.locationMore=!1),$http.post("plugin.travel-around.frontend.goods.goods.getGoodsList",this.query,"加载中..").then((function(t){if(1==t.result){var i=t.data,o=t.basic_info;e.isLoadMore=!0,e.total_page=i.last_page,e.total_page||(e.query.page=0),e.goodsList=i.data,e.$nextTick((function(){var t,i;e.fun.wxShare("",{mid:e.fun.getKeyByMid()},{link:window.location.href,title:"周边游-"+(null===o||void 0===o||null===(t=o.home.mailInfo)||void 0===t?void 0:t.name),imgUrl:null===o||void 0===o||null===(i=o.home.mailInfo)||void 0===i?void 0:i.logo_url,description:"全国周边吃喝玩乐特惠套餐!"})}),50)}else e.query.page=e.query.page-1,e.isLoadMore=!1,e.$dialog.alert({message:t.msg})}))},getMoreData:function(){var e=this;this.isLoadMore=!1,this.query.page>=this.total_page||(this.query.page=this.query.page+1,$http.post("plugin.travel-around.frontend.goods.goods.getGoodsList",this.query,"加载中").then((function(t){if(e.isLoadMore=!0,1===t.result){var i=t.data.data;e.goodsList=[].concat(Object(a["a"])(e.goodsList),Object(a["a"])(i))}else e.query.page=e.query.page-1,e.isLoadMore=!1}),(function(e){})))}}},d=l,c=d,f=(i("2c66"),i("38358"),i("2877")),u=Object(f["a"])(c,o,r,!1,null,"b8fd6b52",null);t["default"]=u.exports},a674:function(e,t,i){var o=i("24fb");t=o(!1),t.push([e.i,".inpbox[data-v-b8fd6b52] .van-cell{background:transparent;padding:0}",""]),e.exports=t},ac0d:function(e,t,i){"use strict";i.d(t,"a",(function(){return a}));var o=document.documentElement,r=document.body,a={data:function(){return{}},activated:function(){window.addEventListener("scroll",this.handleScroll)},deactivated:function(){window.removeEventListener("scroll",this.handleScroll)},methods:{getScrollTop:function(){var e=0;return o&&o.scrollTop?e=o.scrollTop:r&&(e=r.scrollTop),e},getClientHeight:function(){var e=0;return e=r.clientHeight&&o.clientHeight?Math.min(r.clientHeight,o.clientHeight):Math.max(r.clientHeight,o.clientHeight),e},getScrollHeight:function(){return Math.max(r.scrollHeight,o.scrollHeight)},handleScroll:function(){this.otherScroll();var e=document.documentElement.scrollTop||document.body.scrollTop;this.btnFlag=e>60,this.getScrollTop()+this.getClientHeight()+105>this.getScrollHeight()?(this.isLoadMore&&this.getMoreData(),this.isBottom=!0):this.isBottom=!1},otherScroll:function(){}}}},bb77:function(e,t,i){var o=i("a674");o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);var r=i("499e").default;r("32474836",o,!0,{sourceMap:!1,shadowMode:!1})},f2a2:function(e,t,i){var o=i("24fb");t=o(!1),t.push([e.i,".mb20[data-v-b8fd6b52]{height:.625rem;clear:both}.head[data-v-b8fd6b52]{width:100%;padding:.9375rem .9375rem .625rem 1.125rem;-webkit-box-sizing:border-box;box-sizing:border-box}.head[data-v-b8fd6b52],.inpbox[data-v-b8fd6b52]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.inpbox[data-v-b8fd6b52]{width:21.4375rem;height:1.9375rem;border-radius:1.0313rem;background:#fff;border:1px solid var(--themeBaseColor)}.head span[data-v-b8fd6b52]{font-size:.875rem;margin-left:.6875rem}.inpbox .iconfont[data-v-b8fd6b52]{margin-left:1.0625rem;margin-right:.4375rem;color:var(--themeBaseColor)}.inpbox input[data-v-b8fd6b52]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;border:none}.mb-20[data-v-b8fd6b52]{margin-bottom:.625rem}.f-wrap[data-v-b8fd6b52]{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.search-main .title[data-v-b8fd6b52]{margin:.9375rem 0 1rem .625rem;font-size:.875rem;color:#222;text-align:left}.look-over[data-v-b8fd6b52]{font-size:.75rem;color:#979797}.commercial-title[data-v-b8fd6b52]{font-size:.8462rem;color:#222;margin:1.5625rem 0 1rem .625rem;text-align:left}.address .mean-tag[data-v-b8fd6b52]{font-size:.625rem;color:#222;white-space:nowrap;padding:.2188rem .375rem .1875rem .2813rem;background-color:#f3f3f5;margin-right:.3438rem}.mean-line[data-v-b8fd6b52]{font-size:.9375rem;margin-right:.3438rem}.search-goods[data-v-b8fd6b52]{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;margin:0 .625rem}.goods-item[data-v-b8fd6b52]{width:10.7813rem;background-color:#fff;border-radius:30rpx;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:0 0 .625rem 0;margin-bottom:.625rem}.goods-item .goods-img[data-v-b8fd6b52]{width:10.7813rem;height:10.7813rem;border-radius:.4688rem .4688rem 0 0;position:relative}.goods-item .goods-img img[data-v-b8fd6b52]{width:100%;right:0;height:100%;position:absolute;border-top-left-radius:.5rem;border-top-right-radius:.5rem}.goods-item .goods-img .number[data-v-b8fd6b52]{width:100%;text-align:left;padding:.1875rem 0 .1875rem .625rem;position:absolute;bottom:0;font-size:11px;color:#fff;background-color:hsla(0,0%,100%,.5)}.goods-item .s3-price[data-v-b8fd6b52]{line-height:1.5625rem;height:1.375rem;margin-left:10px;overflow:hidden;color:#fb4a4a;text-align:left}.goods-item .s2[data-v-b8fd6b52]{text-decoration:line-through;vertical-align:middle;color:#999;font-size:12px;height:1rem;line-height:1.25rem;margin-left:.375rem}.goods-img .label[data-v-b8fd6b52]{position:absolute;left:0;top:0;z-index:99;font-size:.75rem;color:#fff;background:-webkit-gradient(linear,left top,right top,from(#ff6a3f),to(#ff3b01));background:-webkit-linear-gradient(left,#ff6a3f,#ff3b01);background:linear-gradient(90deg,#ff6a3f,#ff3b01);padding:0 .2188rem;border-radius:.4688rem 0 .4688rem 0}.goods-img .store-name[data-v-b8fd6b52]{width:100%;height:1.6563rem;position:absolute;left:0;bottom:0;z-index:5;background-color:hsla(0,0%,100%,.5);-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.goods-img .store-name[data-v-b8fd6b52],.store-name .icon-service_n[data-v-b8fd6b52]{font-size:.6875rem;color:#fff}.store-name .units[data-v-b8fd6b52]{margin-right:.25rem}.goods-name[data-v-b8fd6b52]{margin:.625rem 1.125rem .7188rem .4688rem}.goods-name .goods-title[data-v-b8fd6b52]{font-size:.8125rem;color:#35314a}.fine-food[data-v-b8fd6b52]{margin:.625rem .625rem 0 .625rem;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.fine[data-v-b8fd6b52]{font-size:.9rem;line-height:1.625rem;color:#35314a;font-weight:700;text-align:left;width:100%}.long-title[data-v-b8fd6b52]{font-size:.8rem;color:#818181;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:1;display:-webkit-box;-webkit-box-orient:vertical;text-align:left;margin:.1rem 0 .2rem 0}.fine-food .number[data-v-b8fd6b52]{font-size:.625rem;color:#b5b5b5}",""]),e.exports=t}}]);