webpackJsonp([9],{ZulW:function(t,e){},oVp6:function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=s("Dd8w"),i=s.n(a),o=s("qkow"),n=s("Cpzv"),r=s("NYxO"),c=s("PJh5"),d=s.n(c),u={data:function(){return{list:[],flag:!0,currentPage:0,color:["#15A8AA","#F95D30","#ADADAD","#ADADAD"]}},created:function(){this.$store.commit("updateLoading",!0),this.getData()},computed:i()({},Object(r.b)(["locationInfo","userInfo","orderStatus"])),methods:{getData:function(){var t=this;this.flag&&(this.flag=!1,0==this.currentPage&&(this.list=[]),this.currentPage++,this.$http.get({url:"/seeOrder/page",data:{userId:this.userInfo.id,currentPage:this.currentPage,pageNumber:20,showFlag:"Y"}}).then(function(e){t.$store.commit("updateLoading",!1),e.success&&(e.data.pp.forEach(function(e){e.orderTime=t.getDayChinese(d()(e.orderTime).format("YYYY-MM-DD dddd HH:mm")),t.list.push(e)}),e.data.page.currentPage<e.data.page.totalPage&&(t.flag=!0))}))},getDayChinese:function(t){var e=t.split(" "),s="";switch(e[1]){case"Monday":s="周一";break;case"Tuesday":s="周二";break;case"Wednesday":s="周三";break;case"Thursday":s="周四";break;case"Friday":s="周五";break;case"Saturday":s="周六";break;case"Sunday":s="周日"}return e[0]+" "+s+" "+e[2]},menu:function(){this.$refs.list.scrollTop+this.$refs.list.offsetHeight>=this.$refs.list.scrollHeight&&this.getData()},cancel:function(t){var e=this;this.$alert({title:"提示",content:"确认取消预约吗？",showCancel:!0},function(){e.$store.commit("updateLoading",!0),e.$http.post({url:"/seeOrder/update",data:{id:e.list[t].id,orderStatus:3}}).then(function(s){e.$store.commit("updateLoading",!1),s.success&&(e.$modal.success({msg:"取消预约成功",duration:1500}),e.list[t].orderStatus=3)})})},del:function(t){var e=this;this.$alert({title:"提示",content:"确认删除预约吗？",showCancel:!0},function(){e.$store.commit("updateLoading",!0),e.$http.post({url:"/seeOrder/update",data:{id:e.list[t].id,showFlag:"N"}}).then(function(s){e.$store.commit("updateLoading",!1),s.success&&(e.$modal.success({msg:"删除成功",duration:1500}),e.list.splice(t,1))})})},goHome:function(){this.$router.push({name:"home"})}},components:{GmButton:o.a,largeGoodsItem:n.a}},l={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{ref:"list",staticClass:"container",on:{scroll:t.menu}},[t.list.length>0?a("div",{staticClass:"list"},t._l(t.list,function(e,s){return a("div",{staticClass:"list-item"},[a("div",{staticClass:"top"},[a("div",{staticClass:"title"},[t._v(t._s(e.orderTime))]),t._v(" "),a("div",{staticClass:"btn",style:{backgroundColor:t.color[e.orderStatus]}},[t._v(t._s(t.orderStatus[e.orderStatus]))])]),t._v(" "),a("largeGoodsItem",{attrs:{goodsInfo:e.houseInfo,type:1}}),t._v(" "),e.orderStatus<2?a("div",{staticClass:"delContent",on:{click:function(e){t.cancel(s)}}},[t._v("取消预约")]):a("div",{staticClass:"delContent",on:{click:function(e){t.del(s)}}},[t._v("删除")])],1)})):a("div",{staticClass:"nothing"},[a("img",{attrs:{src:s("xzrq"),alt:""}}),t._v(" "),a("div",{staticClass:"title"},[t._v("还没预约任何房源哦～")]),t._v(" "),a("div",{staticClass:"btn"},[a("gm-button",{attrs:{type:"primary"},on:{click:t.goHome}},[t._v("去逛逛")])],1)])])},staticRenderFns:[]};var h=s("VU/8")(u,l,!1,function(t){s("ZulW")},"data-v-f6ed90ac",null);e.default=h.exports},xzrq:function(t,e,s){t.exports=s.p+"house/img/info_icon_yuyue_kong.19d60fd.png"}});
//# sourceMappingURL=9.ab7560b28eadcc22b5aa.js.map