hotel.js 7.4 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/hotel"],{1622:function(t,e,o){},"1d03":function(t,e,o){"use strict";o.r(e);var i=o("6433"),s=o.n(i);for(var n in i)"default"!==n&&function(t){o.d(e,t,(function(){return i[t]}))}(n);e["default"]=s.a},"35cf":function(t,e,o){"use strict";var i=o("1622"),s=o.n(i);s.a},5161:function(t,e,o){"use strict";o.r(e);var i=o("d61c"),s=o("1d03");for(var n in s)"default"!==n&&function(t){o.d(e,t,(function(){return s[t]}))}(n);o("35cf");var c,a=o("f0c5"),r=Object(a["a"])(s["default"],i["b"],i["c"],!1,null,"0d5d5db0",null,!1,i["a"],c);e["default"]=r.exports},6433:function(t,e,o){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=o("2f62");function s(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,i)}return o}function n(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?s(Object(o),!0).forEach((function(e){c(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function c(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var a=function(){o.e("component/uni-icon/uni-icon").then(function(){return resolve(o("d4ee"))}.bind(null,o)).catch(o.oe)},r=function(){o.e("component/uni-nav-bar/uni-nav-bar").then(function(){return resolve(o("9d62"))}.bind(null,o)).catch(o.oe)},d=function(){o.e("component/commoNar").then(function(){return resolve(o("e217"))}.bind(null,o)).catch(o.oe)},l=function(){o.e("component/shopList").then(function(){return resolve(o("989b"))}.bind(null,o)).catch(o.oe)},h=function(){o.e("component/assess").then(function(){return resolve(o("553f"))}.bind(null,o)).catch(o.oe)},u=function(){o.e("component/Gobacktop").then(function(){return resolve(o("e3cf"))}.bind(null,o)).catch(o.oe)},g={components:{uniIcon:a,uniNavBar:r,commoNar:d,assess:h,shopList:l,Gobacktop:u},data:function(){return{isTop:0,hoteldetail:{},has_collected:0,chosegoods_commonid:!0,chosegoods_price:!0,firstwo:1,isDetail:1,pictureUrl:this.pictureUrl,showdialog:!1,store_description:"",store_summary:"",store_slide:[],goods_list:[],isnexttwo:1,feedback_list:[],hotelitle:"",istopclick:0,page:1,goodId:0,page_size:10,gc_id_1:"",gc_id_2:"",goods_commonid:"",goods_price:"",praise:"",keyword:"",category_list:[{gc_id_1:"",gc_name:"全部"}],tabIndex:1,isprice:0,menu:[{name:"综合",id:"0"},{name:"上新",id:"1"},{name:"价格",id:"2"},{name:"分类",id:"3"}],classify:[],background:["color1","color2","color3"],indicatorDots:!0,autoplay:!0,interval:2e3,duration:500,activeindex:0,scrollTop:0,old:{scrollTop:0},value1:0,iScrolltop:1}},onShareAppMessage:function(e){t.showShareMenu({withShareTicket:!0});var o=this,i=this.goodId;return e.from,{title:o.hotelitle,path:"/pages/index/shop?id=".concat(i),imageUrl:o.store_slide[0]}},onReady:function(){},onLoad:function(t){this.goodId=t.id,this.activeindex=0,this.getshopdetail(),this.hotelmenu(),this.gethoteil()},computed:n({},(0,i.mapState)(["hasLogin","userInfo","successlogion"])),methods:{getop:function(){this.scrollTop=this.old.scrollTop,this.$nextTick((function(){this.scrollTop=0})),this.isTop=!1},gofeedback:function(){if(0!=this.hoteldetail.can_feedback){var e=this.goodId;t.navigateTo({url:"/pages/index/feedback?store_id=".concat(e)})}else this.$msg(this.hoteldetail.feedback_msg)},gotosearch:function(){var e=this.goodId;t.navigateTo({url:"/pages/index/hotelsearch?store_id=".concat(e)})},gocollect:function(){var e=this;this.hasLogin&&this.successlogion?this.request({url:"/v1/favorites/collect",method:"post",data:{type:"store",fav_id:this.goodId},success:function(){e.gethoteil()}}):t.navigateTo({url:"/pages/myCenter/logion"})},choseType:function(t){this.tabIndex=t,this.isDetail=1,this.page=1,1==this.tabIndex?(this.istopclick=0,this.isprice=0,this.gc_id_1="",this.goods_price="",this.goods_commonid="",this.getshopdetail(2)):2==this.tabIndex?(this.chosegoods_price=!0,this.istopclick=this.chosegoods_commonid?1:2,this.isprice=0,this.goods_price="",this.goods_commonid=this.chosegoods_commonid?"asc":"desc",this.chosegoods_commonid=!this.chosegoods_commonid,this.getshopdetail(2)):3==this.tabIndex?(this.chosegoods_commonid=!0,this.istopclick=0,this.isprice=this.chosegoods_price?3:4,this.goods_price=this.chosegoods_price?"desc":"asc",this.goods_commonid="",this.chosegoods_price=!this.chosegoods_price,this.getshopdetail(2)):4==this.tabIndex&&(this.istopclick=0,this.isprice=0,this.goods_price="",this.goods_commonid="",this.chosegoods_price=!0,this.chosegoods_commonid=!0)},changeisclick:function(t){},godetail:function(e){var o=e.gc_id,i=this.goodId,s=e.gc_name;t.navigateTo({url:"/pages/index/hoteldetail?id=".concat(o,"&gc_name=").concat(s,"&store_id=").concat(i)})},getshopdetail:function(t){var e=this;this.request({url:"/v2/entry/storeGoods",method:"get",data:{store_id:this.goodId,page:this.page,goods_commonid:this.goods_commonid,goods_price:this.goods_price,gc_id_1:this.gc_id_1},success:function(o){2==t&&(e.goods_list=[]),e.goods_list=e.goods_list.concat(o.data.data.goods_list),o.data.data.goods_list.length<10&&(e.isDetail=2)}})},hotelmenu:function(){var t=this;this.request({url:"/v1/entry/storeCategory",method:"get",data:{store_id:this.goodId},success:function(e){var o=e.data.data.category_list;o.forEach((function(t,e){t.text=t.gc_name,t.value=e}));var i=[{gc_id:"",gc_name:"全部"}];t.classify=i.concat(o),t.category_list=o.splice(0,10)}})},onChange:function(t){this.activeindex=t.detail.name,this.page=1,1==t.detail.name?this.getcomment():0==t.detail.name&&this.getshopdetail()},getcomment:function(){var t=this;this.request({url:"/v1/store/feedbackList",method:"POST",data:{page:this.page,page_size:10,store_id:this.goodId},success:function(e){t.feedback_list=e.data.data.feedback_list,e.data.data.feedback_list.length<10&&(t.isnexttwo=2)}})},gethoteil:function(){var t=this;this.request({url:"/v1/store/info",method:"get",data:{store_id:this.goodId},success:function(e){var o=e.data.data;t.hoteldetail=o,t.hotelitle=o.store_name,t.store_slide=o.store_slide,t.store_summary=o.store_summary;var i=new RegExp("<img","gi");o.store_description=o.store_description.replace(i,'<img style="width: 100%;height: auto;display: block;text-align: center;'),t.store_description=o.store_description,t.has_collected=o.has_collected}})},changemenu:function(t){},confirm:function(t){this.tabIndex=0,this.gc_id_1=t.gc_id,this.getshopdetail(2)},upper:function(t){},lower:function(t){1==this.isnexttwo&&1==this.activeindex?(this.page=this.page+1,this.getcomment()):1==this.isDetail&&(this.page=this.page+1,this.getshopdetail())},scroll:function(t){t.detail.scrollTop>400?this.isTop=!0:this.isTop=!1,t.detail.scrollTop>160?this.iScrolltop=2:this.iScrolltop=1,this.old.scrollTop=t.detail.scrollTop},goback:function(){t.navigateBack()}}};e.default=g}).call(this,o("543d")["default"])},9801:function(t,e,o){"use strict";(function(t){o("0bef"),o("921b");i(o("66fd"));var e=i(o("5161"));function i(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,o("543d")["createPage"])},d61c:function(t,e,o){"use strict";var i,s=function(){var t=this,e=t.$createElement;t._self._c},n=[];o.d(e,"b",(function(){return s})),o.d(e,"c",(function(){return n})),o.d(e,"a",(function(){return i}))}},[["9801","common/runtime","common/vendor"]]]);