1 line
15 KiB
JavaScript
1 line
15 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1d6c0431"],{"1ce0":function(t,o,e){"use strict";e.r(o);var a=function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",{attrs:{id:"hotel_search"}},[e("c-title",{attrs:{hide:!1,text:t.PageNameList.hotels+"搜索页"}}),e("div",{attrs:{id:"content"}},[e("div",{staticClass:"search_box"},[e("div",{staticClass:"box"},[e("i",{staticClass:"iconfont icon-sousuo1"}),e("input",{directives:[{name:"model",rawName:"v-model",value:t.search_value,expression:"search_value"}],attrs:{type:"text",placeholder:"关键字/位置/品牌/"+t.PageNameList.hotel_find_name},domProps:{value:t.search_value},on:{input:function(o){o.target.composing||(t.search_value=o.target.value)}}})]),e("span",{on:{click:t.gotoSearch}},[t._v("搜索")])]),e("div",{staticClass:"like_box"},[t._m(0),e("div",{staticClass:"goods_box"},[e("van-pull-refresh",{attrs:{"success-text":"刷新成功"},on:{refresh:t.loadTop},model:{value:t.isLoading,callback:function(o){t.isLoading=o},expression:"isLoading"}},[e("hotel-list",{attrs:{datas:t.list_arr,show:!0,start:t.start_time,end:t.end_time}})],1)],1)]),e("div",{staticClass:"y5",staticStyle:{bottom:"7.1875rem"},attrs:{bottommenus:""},on:{click:function(o){return o.stopPropagation(),t.showToolbar.apply(null,arguments)}}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.toolbar,expression:"toolbar"}],staticClass:"y6",attrs:{bottomlinks:""}},[e("router-link",{staticClass:"y8",attrs:{to:t.fun.getUrl("home")}},[t._v(" 首页 ")]),e("router-link",{staticClass:"yb",attrs:{to:t.fun.getUrl("orderlist",{status:"0"})}},[t._v(" 订单 ")]),e("router-link",{staticClass:"yc",attrs:{to:t.fun.getUrl("member")}},[t._v(" 我的 ")]),e("i",{staticClass:"yd"})],1)])])],1)},i=[function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",{staticClass:"title"},[e("div",{staticClass:"line_left"}),e("h2",[t._v("猜你喜欢")]),e("div",{staticClass:"line_right"})])}],n=(e("e7e5"),e("d399")),s=(e("ac1f"),e("841c"),e("b64b"),e("e9c4"),e("99af"),e("d3b7"),e("25f0"),e("6968")),r=e("4ee0"),l=e("ac0d"),c="plugin.hotel.frontend.hotel.goods.get-hotel-goods-by-title",d={mixins:[l["a"]],data:function(){return{loading:!1,allLoaded:!1,goload:!0,isLoadMore:!0,page:1,total_page:0,list_arr:[],location:{},search_value:"",toolbar:!1,start_time:"",end_time:"",PageNameList:{},isLoading:!1}},created:function(){var t=this;1!==this.$route.params.fromHome&&(this.toolbar=!1,this.initData(),this.start_time=this.$route.query.start||"",this.end_time=this.$route.query.end||"",this.showToolbar=!1,this.getCustomizeHotelHead(),this.fun.getLocation().then((function(o){t.location=o,t.search()})).catch((function(t){})))},activated:function(){var t=this;1===this.$route.params.fromHome?(this.toolbar=!1,this.initData(),this.start_time=this.$route.query.start||"",this.end_time=this.$route.query.end||"",this.showToolbar=!1,this.getCustomizeHotelHead(),this.fun.getLocation().then((function(o){t.location=o,t.search()})).catch((function(t){}))):window.location.href.indexOf("#/hotel/search")>-1&&setTimeout((function(){window.scrollTo(0,window.homesearchScrollTop)}),200)},beforeRouteLeave:function(t,o,e){window.homesearchScrollTop=document.documentElement.scrollTop||document.body.scrollTop,e()},mounted:function(){window.homesearchScrollTop=0},methods:{search:function(){var t=this,o=this.fun.bd_encrypt(this.location.point.lng,this.location.point.lat),e={lng:o.lng,lat:o.lat,city_name:this.location.city,page:this.page,entrance_time:this.$route.query.start||"",price:this.$route.query.price||"",star_rated:this.$route.query.star||"",category_id:this.$route.query.category||"",leave_at:this.$route.query.end||"",kwd:this.search_value};$http.get(c,e,"加载中...").then((function(o){1==o.result&&(t.list_arr=o.data.data,t.isLoading=!1,t.page=1,t.isLoadMore=!0,t.total_page=o.data.last_page,t.total_page||(t.total_page=0))})).catch((function(t){}))},getCustomizeHotelHead:function(){var t=this,o=localStorage.getItem("customizeHotelHead");this.fun.isTextEmpty(o)?$http.get("plugin.hotel.frontend.hotel.get-hotel-info.get-custom-name",{},"加载中...").then((function(o){1==o.result&&(t.PageNameList=o.data,localStorage.setItem("customizeHotelHead",JSON.stringify(o.data)))})).catch((function(t){})):this.PageNameList=JSON.parse(localStorage.getItem("customizeHotelHead"))},getMoreData:function(){var t=this;this.isLoadMore=!1;var o=this;if(o.page!=o.total_page){this.page=this.page+1;var e=this.fun.bd_encrypt(this.location.point.lng,this.location.point.lat),a={lng:e.lng,lat:e.lat,city_name:this.location.city,page:this.page,entrance_time:this.$route.query.start||"",price:this.$route.query.price||"",star_rated:this.$route.query.star||"",category_id:this.$route.query.category||"",leave_at:this.$route.query.end||"",kwd:this.search_value};$http.get(c,a,"加载中...").then((function(e){if(o.isLoadMore=!0,1!=e.result)return o.page=o.page-1,void(o.isLoadMore=!1);t.list_arr=t.list_arr.concat(e.data.data)})).catch((function(t){}))}},searchMore:function(){var t=this;if(this.page!=this.total_page){if(this.page>=this.total_page)return this.loading=!0,void(this.allLoaded=!0);this.page=this.page+1;var o=this.fun.bd_encrypt(this.location.point.lng,this.location.point.lat),e={lng:o.lng,lat:o.lat,city_name:this.location.city,page:this.page,entrance_time:this.$route.query.start||"",price:this.$route.query.price||"",star_rated:this.$route.query.star||"",category_id:this.$route.query.category||"",leave_at:this.$route.query.end||"",kwd:this.search_value};$http.get(c,e,"加载中...").then((function(o){if(1!=o.result)return t.page=t.page-1,t.loading=!0,t.allLoaded=!0,void(t.isLoadMore=!1);t.loading=!1,t.allLoaded=!1,t.list_arr=t.list_arr.concat(o.data.data)})).catch((function(t){}))}},initData:function(){this.page=1,this.total_page=0,this.goload=!0,this.loading=!0,this.allLoaded=!1,this.isLoadMore=!0,this.list_arr=[]},loadTop:function(){this.initData(),this.search()},loadBottom:function(){this.isLoadMore&&(this.searchMore(),this.$refs.hotel_loadmore.onBottomLoaded())},getLocation:function(){var t=this,o=new AMap.Map("iCenter");function e(o){var e=o.position.toString().split(","),a={lat:e[1],lng:e[0]},i=t.fun.isTextEmpty(o.addressComponent.city)?o.addressComponent.province:o.addressComponent.city,n={address:o.formattedAddress,city:i,title:o.formattedAddress,point:a};t.$store.commit("updateLocation",n),t.$store.commit("setLocation",n),t.location=n,t.search()}function a(t){Object(n["a"])("定位失败,请手动切换位置")}o.plugin("AMap.Geolocation",(function(){var t=new AMap.Geolocation({enableHighAccuracy:!0,timeout:1e4,maximumAge:0,convert:!0,showButton:!0,buttonPosition:"LB",buttonOffset:new AMap.Pixel(10,20),showMarker:!0,showCircle:!0,panToLocation:!0,zoomToAccuracy:!0});o.addControl(t),t.getCurrentPosition(),AMap.event.addListener(t,"complete",e),AMap.event.addListener(t,"error",a)}))},gotoSearch:function(){this.initData(),this.search()},showToolbar:function(){this.toolbar=!this.toolbar}},components:{cTitle:s["a"],hotelList:r["a"]}},h=d,g=h,f=(e("35eb"),e("2877")),b=Object(f["a"])(g,a,i,!1,null,"a3fa27b8",null);o["default"]=b.exports},"35eb":function(t,o,e){"use strict";e("8993")},8993:function(t,o,e){var a=e("c737");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var i=e("499e").default;i("d4bf1846",a,!0,{sourceMap:!1,shadowMode:!1})},ac0d:function(t,o,e){"use strict";e.d(o,"a",(function(){return n}));var a=document.documentElement,i=document.body,n={data:function(){return{}},activated:function(){window.addEventListener("scroll",this.handleScroll)},deactivated:function(){window.removeEventListener("scroll",this.handleScroll)},methods:{getScrollTop:function(){var t=0;return a&&a.scrollTop?t=a.scrollTop:i&&(t=i.scrollTop),t},getClientHeight:function(){var t=0;return t=i.clientHeight&&a.clientHeight?Math.min(i.clientHeight,a.clientHeight):Math.max(i.clientHeight,a.clientHeight),t},getScrollHeight:function(){return Math.max(i.scrollHeight,a.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(){}}}},c737:function(t,o,e){var a=e("24fb");o=a(!1),o.push([t.i,"#hotel_search #content[data-v-a3fa27b8]{background:#fff}#hotel_search #content .search_box[data-v-a3fa27b8]{width:100%;border-bottom:.0625rem solid #ebebeb;padding:.375rem .9375rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}#hotel_search #content .search_box .box[data-v-a3fa27b8]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:18.75rem;height:1.875rem;border-radius:.375rem;background:#f5f5f5;padding:0 .625rem}#hotel_search #content .search_box .box i[data-v-a3fa27b8]{font-size:1rem;color:#999;line-height:1.875rem;margin-right:.625rem}#hotel_search #content .search_box .box input[data-v-a3fa27b8]{width:15rem;border:none;font-size:15px}#hotel_search #content .search_box span[data-v-a3fa27b8]{font-size:15px;line-height:1.875rem}#hotel_search #content .like_box[data-v-a3fa27b8]{background:#fff}#hotel_search #content .like_box .title[data-v-a3fa27b8]{height:2.5rem;line-height:2.5rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}#hotel_search #content .like_box .title .line_left[data-v-a3fa27b8]{width:3.125rem;height:.0625rem;border:.0625rem dashed #ebebeb;margin-right:.625rem}#hotel_search #content .like_box .title h2[data-v-a3fa27b8]{font-size:18px}#hotel_search #content .like_box .title .line_right[data-v-a3fa27b8]{width:3.125rem;height:.0625rem;border:.0625rem dashed #ebebeb;margin-left:.625rem}#hotel_search #content .like_box .goods_box[data-v-a3fa27b8]{padding:.625rem 0}#hotel_search #content .like_box .goods_box .goods[data-v-a3fa27b8]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-bottom:.625rem}#hotel_search #content .like_box .goods_box .goods .img[data-v-a3fa27b8]{width:6.25rem;height:8.75rem;background:#f8f8f8;overflow:hidden;margin:0 .625rem}#hotel_search #content .like_box .goods_box .goods .img img[data-v-a3fa27b8]{width:100%}#hotel_search #content .like_box .goods_box .goods .info[data-v-a3fa27b8]{text-align:left;width:16rem;padding-right:.625rem;border-bottom:.0625rem solid #ebebeb;padding-bottom:.625rem}#hotel_search #content .like_box .goods_box .goods .info .info_a[data-v-a3fa27b8]{font-size:16px;font-weight:700;line-height:1.5rem;max-height:3rem;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}#hotel_search #content .like_box .goods_box .goods .info .info_a font[data-v-a3fa27b8]{font-size:12px;color:#8c8c8c;font-weight:400;margin-left:.625rem}#hotel_search #content .like_box .goods_box .goods .info .info_b[data-v-a3fa27b8]{font-size:14px;color:#8c8c8c}#hotel_search #content .like_box .goods_box .goods .info .info_b span[data-v-a3fa27b8]{font-size:20px;color:#337ef9;font-weight:700;margin-right:.625rem}#hotel_search #content .like_box .goods_box .goods .info .info_b span font[data-v-a3fa27b8]{font-size:12px;font-weight:400}#hotel_search #content .like_box .goods_box .goods .info .goods_box[data-v-a3fa27b8]{padding:.625rem 0}#hotel_search #content .like_box .goods_box .goods .info .goods_box .goods[data-v-a3fa27b8]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-bottom:.625rem}#hotel_search #content .like_box .goods_box .goods .info .goods_box .goods .img[data-v-a3fa27b8]{width:6.25rem;height:6.25rem;background:#f8f8f8;overflow:hidden;margin:0 .625rem}#hotel_search #content .like_box .goods_box .goods .info .goods_box .goods .img img[data-v-a3fa27b8]{width:100%}#hotel_search #content .like_box .goods_box .goods .info .goods_box .goods .info[data-v-a3fa27b8]{text-align:left;width:16rem;padding-right:.625rem;border-bottom:.0625rem solid #ebebeb;padding-bottom:.625rem}#hotel_search #content .like_box .goods_box .goods .info .goods_box .goods .info .info_a[data-v-a3fa27b8]{font-size:16px;font-weight:700;line-height:1.5rem;max-height:3rem;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}#hotel_search #content .like_box .goods_box .goods .info .goods_box .goods .info .info_a font[data-v-a3fa27b8]{font-size:12px;color:#8c8c8c;font-weight:400;margin-left:.625rem}#hotel_search #content .like_box .goods_box .goods .info .goods_box .goods .info .info_b[data-v-a3fa27b8]{font-size:14px;color:#8c8c8c}#hotel_search #content .like_box .goods_box .goods .info .goods_box .goods .info .info_b span[data-v-a3fa27b8]{font-size:20px;color:#337ef9;font-weight:700;margin-right:.625rem}#hotel_search #content .like_box .goods_box .goods .info .goods_box .goods .info .info_b span font[data-v-a3fa27b8]{font-size:12px;font-weight:400}#hotel_search #content .like_box .goods_box .goods .info .goods_box .goods .info .info_c[data-v-a3fa27b8]{font-size:12px;color:#8c8c8c}#hotel_search #content .like_box .goods_box .goods .info .goods_box .goods .info .info_d[data-v-a3fa27b8]{font-size:12px;color:#259b24}#hotel_search #content .like_box .goods_box .goods .info .goods_box .goods .info .info_e[data-v-a3fa27b8]{color:#f15353}#hotel_search #content .like_box .goods_box .goods .info .goods_box .goods .info .info_e span[data-v-a3fa27b8]{font-size:20px;font-weight:700}#hotel_search #content .like_box .goods_box .goods .info .goods_box .goods .info .info_e font[data-v-a3fa27b8]:last-child{color:#8c8c8c}#hotel_search #content .like_box .goods_box .goods .info .info_d[data-v-a3fa27b8]{font-size:12px;color:#259b24}#hotel_search #content .like_box .goods_box .goods .info .info_e[data-v-a3fa27b8]{color:#f15353}#hotel_search #content .like_box .goods_box .goods .info .info_e span[data-v-a3fa27b8]{font-size:20px;font-weight:700}#hotel_search #content .like_box .goods_box .goods .info .info_e font[data-v-a3fa27b8]:last-child{color:#8c8c8c}#hotel_search #content .y5[data-v-a3fa27b8]{position:fixed;z-index:1000;right:0;bottom:3.75rem;width:2.25rem;height:2.25rem;background:rgba(0,0,0,.8) url(//static-o2o.360buyimg.com/daojia/new/images/menu/bm.png) .4375rem .4375rem no-repeat;background-size:4.0625rem 1.25rem;border:.0625rem solid #757575;border-radius:.25rem 0 0 .25rem}#hotel_search #content .y6[data-v-a3fa27b8]{position:absolute;right:-.0625rem;bottom:2.25rem;width:5.9375rem;border:.0625rem solid #757575;background:rgba(0,0,0,.8)}#hotel_search #content .y6 a[data-v-a3fa27b8]{display:block;border-bottom:.0625rem solid #4b4b4b;line-height:2.1875rem;height:2.1875rem;color:#fff;background-image:url(//static-o2o.360buyimg.com/daojia/new/images/icon/bmenu.png);background-repeat:no-repeat;background-size:1rem 18.75rem}",""]),t.exports=o}}]); |