canyin-project/ybcy/views/channel/index/static/js/chunk-2d0e9723.cd01bad6.js
2024-11-01 16:07:54 +08:00

1 line
5.4 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0e9723"],{"8e22":function(t,s,e){"use strict";e.r(s);var a=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{},[e("div",{staticClass:"home",staticStyle:{height:"100%"}},[e("div",{ref:"title_box",staticClass:"title_box"},[e("div",{staticClass:"real_time_box"},[e("div",{staticClass:"title_chinese"},[t._v("实时更新")]),e("div",{staticClass:"title_english"},[t._v(t._s(t.storeName))])]),e("div",{staticClass:"progress_box",staticStyle:{display:"flex","justify-content":"flex-end","align-items":"flex-end"}},[e("div",{staticClass:"order_progress"},[t._v(" 还有"),e("span",{staticStyle:{color:"#DCA873"}},[t._v(t._s(t.count?t.count:0))]),t._v("人排队中 ")]),e("div",{staticStyle:{"font-size":"38px",color:"#666"}},[t._v("日期 "+t._s(t.day))])])]),e("div",{ref:"big_number_box",staticClass:"big_number_box",staticStyle:{height:"100%"}},[e("div",{staticClass:"ready_box ready_box_right",staticStyle:{"min-height":"100%"}},[t._m(0),e("div",{staticClass:"all_number"},t._l(t.status_1,(function(s,a){return e("div",{staticClass:"ready_box_text flex wid"},[e("div",{staticClass:"flex-g-1 t_c fon_30",staticStyle:{width:"33.33%"}},[t._v(t._s(s.name)),e("span",{staticClass:"color_9"},[t._v(""+t._s(s.min)+"-"+t._s(s.max)+"人)")])]),e("div",{staticClass:"flex-g-1 t_c fon_30",staticStyle:{width:"33.33%"}},[t._v(t._s(s.totalNum)),e("span",{staticClass:"color_9"},[t._v("桌")])]),e("div",{staticClass:"flex-g-1 t_c fon_30",staticStyle:{width:"33.33%"}},[t._v(t._s(s.minute)),e("span",{staticClass:"color_9"},[t._v("分钟")])])])})),0),e("div",{staticClass:"blank_box",staticStyle:{width:"100%",bottom:"0",left:"0",position:"absolute",background:"#f7f7f9"}})]),e("div",{staticClass:"ready_box ready_box_left",staticStyle:{"min-height":"100%"}},[e("div",{staticClass:"ready_box_text_bottom"},[t._m(1),e("div",{staticClass:"all_number"},t._l(t.status_1,(function(s,a){return e("div",{staticClass:"ready_box_text flex wid"},[e("div",{staticClass:"flex-g-1 t_c fon_30",staticStyle:{width:"50%"}},[t._v(t._s(s.name)),e("span",{staticClass:"color_9"},[t._v(""+t._s(s.min)+"-"+t._s(s.max)+"人)")])]),e("div",{staticClass:"flex-g-1 t_c fon_30 finish_num suf",staticStyle:{width:"50%","font-size":"50px"}},[t._v(t._s(s.code))])])})),0),e("div",{staticClass:"blank_box2",staticStyle:{width:"100%",bottom:"0",left:"0",position:"absolute",background:"#f7f7f9"}})])])])])])},i=[function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"ready_box_text ready_box_text_bottom"},[e("div",{staticClass:"left flex wid"},[e("div",{staticClass:"ready_text ready_text_bottom flex-g-1 t_c",staticStyle:{"font-size":"32px",width:"33.33%"}},[t._v("餐桌类型")]),e("div",{staticClass:"ready_text ready_text_bottom flex-g-1 t_c",staticStyle:{"font-size":"32px",width:"33.33%"}},[t._v("等待桌数")]),e("div",{staticClass:"ready_text ready_text_bottom flex-g-1 t_c",staticStyle:{"font-size":"32px",width:"33.33%"}},[t._v("预计等待")])])])},function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"flex wid",staticStyle:{"margin-bottom":"46px"}},[e("div",{staticClass:"ready_text ready_text_bottom flex-g-1 t_c",staticStyle:{"font-size":"32px",width:"50%"}},[t._v("餐桌类型")]),e("div",{staticClass:"ready_text ready_text_bottom flex-g-1 t_c",staticStyle:{"font-size":"32px",width:"50%"}},[t._v("等待桌号")])])}],o=(e("4160"),e("ac1f"),e("1276"),e("159b"),e("96cf"),e("1da1")),c=e("7cb7"),n=(e("557b"),e("365c")),l={created:function(){var t=this;this.$route.query.storeId&&(this.storeId=this.$route.query.storeId,this.fetchData()),this.upLoad2(this),setInterval((function(){t.fetchData()}),3e3)},data:function(){return{loading:!1,key:"",status_1:[],status_2:[],count:"",arr:[],day:"",storeName:"",percentage:0,show_text:!1,show_percentage:!1,percentage_color:"",big_number_box_top:0,title_box_top:0,num_box_height:0,storeId:""}},methods:{upLoad2:function(t){t.lockReconnect=!1,t.ws=null;var s="wss://bkycms.com:9875",e=n["a"].isDev?s:"wss://"+window.location.host+":9875";function a(s){try{"WebSocket"in window&&(t.ws=new WebSocket(s)),i()}catch(e){o(s)}}function i(){t.ws.onclose=function(){o(e)},t.ws.onerror=function(){o(e)},t.ws.onopen=function(){var s={type:"storeId",data:t.storeId};t.ws.send(JSON.stringify(s))},t.ws.onmessage=function(s){if(console.log("llws收到消息啦"),s.data){var e=JSON.parse(s.data);if("3"==e.type){t.storeName=e.storeName,document.title="实时更新-"+e.storeName,t.status_1=e.list,t.status_2=e.list,t.count=e.number,t.day=e.day;var a=[];e.list.length&&(e.list.forEach((function(t){a.push(t.code)})),t.arr=a[0].split(""))}}}}function o(s){t.lockReconnect||(t.lockReconnect=!0,setTimeout((function(){a(s),t.lockReconnect=!1}),2e3))}a(e),window.onbeforeunload=function(){t.ws.close()}},fetchData:function(){var t=this;return Object(o["a"])(regeneratorRuntime.mark((function s(){var e,a,i;return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:return s.next=2,Object(c["jc"])({storeId:t.storeId});case 2:e=s.sent,a=e.data,t.storeName=a.storeName,document.title="实时更新-"+a.storeName,t.status_1=a.list,t.status_2=a.list,t.count=a.number,t.day=a.day,i=[],a.list.length&&(a.list.forEach((function(t){i.push(t.code)})),t.arr=i[0].split(""));case 12:case"end":return s.stop()}}),s)})))()}},destroyed:function(){console.log("页面销毁"),this.lockReconnect=!0,this.ws.close()}},r=l,_=e("2877"),d=Object(_["a"])(r,a,i,!1,null,null,null);s["default"]=d.exports}}]);