1 line
4.0 KiB
JavaScript
1 line
4.0 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-17820e10"],{"631c":function(t,e,i){var a=i("24fb");e=a(!1),e.push([t.i,".coffee_machine[data-v-fd71b44c]{padding:.75rem}.coffee_machine .title[data-v-fd71b44c]{font-weight:700;line-height:1.31rem;font-size:.94rem;text-align:left;margin-bottom:.5rem}.coffee_machine .list[data-v-fd71b44c]{padding:.75rem;background:#fff;border-radius:.75rem}.coffee_machine .list .line[data-v-fd71b44c]{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;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.coffee_machine .list .line .left[data-v-fd71b44c]{font-size:.88rem;line-height:1.5rem}.coffee_machine .list .line .tcolor[data-v-fd71b44c]{color:#999;font-size:.75rem}.coffee_machine .list .line .right[data-v-fd71b44c]{font-size:.75rem;color:#28b2fa}",""]),t.exports=e},80464:function(t,e,i){"use strict";i("a91b")},a91b:function(t,e,i){var a=i("631c");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=i("499e").default;n("0738dc5b",a,!0,{sourceMap:!1,shadowMode:!1})},ac0d:function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var a=document.documentElement,n=document.body,o={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:n&&(t=n.scrollTop),t},getClientHeight:function(){var t=0;return t=n.clientHeight&&a.clientHeight?Math.min(n.clientHeight,a.clientHeight):Math.max(n.clientHeight,a.clientHeight),t},getScrollHeight:function(){return Math.max(n.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(){}}}},c5c7:function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"coffee_machine"},[i("c-title",{attrs:{hide:!1,text:"设备管理"}}),i("div",{staticClass:"title"},[t._v("当前管理设备:")]),t._l(t.info,(function(e,a){return i("div",{key:a,staticClass:"list",on:{click:function(i){return t.tocoffee_machineIndex(e.id)}}},[i("div",{staticClass:"line"},[i("div",{staticClass:"left"},[t._v(t._s(e.name||"咖啡机"))]),i("div",{staticClass:"right"},[t._v("ID:"+t._s(e.id))])]),i("div",{staticClass:"line"},[i("div",{staticClass:"left tcolor"},[t._v("设备号:"+t._s(e.code))])]),i("div",{staticClass:"line"},[i("div",{staticClass:"left tcolor"},[t._v(" 设置地址:"+t._s(e.has_one_province.areaname)+t._s(e.has_one_city.areaname)+t._s(e.has_one_district.areaname)+t._s(e.has_one_street.areaname)+t._s(e.address)+" ")])])])}))],2)},n=[],o=(i("14d9"),i("99af"),i("ac0d")),c={mixins:[o["a"]],data:function(){return{info:[],isLoadMore:!0,page:1,total_page:0}},activated:function(){this.getData()},methods:{tocoffee_machineIndex:function(t){this.$router.push(this.fun.getUrl("coffee_machineIndex",{machine_id:t}))},getData:function(){var t=this;$http.post("plugin.coffee-machine.frontend.owner.machineList",{},"loading").then((function(e){1==e.result?(t.isLoadMore=!0,t.info=e.data.data,t.total_page=e.data.last_page,t.total_page||(t.total_page=0)):t.$toast(e.msg)}))},getMoreData:function(){var t=this;this.isLoadMore=!1,this.page>=this.total_page||(this.page=this.page+1,$http.get("plugin.coffee-machine.frontend.owner.machineList",{page:this.page},"加载中").then((function(e){if(t.isLoadMore=!0,1!==e.result)return t.page=t.page-1,void(t.isLoadMore=!1);var i=e.data.data;t.info=t.info.concat(i)}),(function(t){})))}}},s=c,l=(i("80464"),i("2877")),r=Object(l["a"])(s,a,n,!1,null,"fd71b44c",null);e["default"]=r.exports}}]); |