chunk-728154d2.f630cc0e.js 35 KB

1234567
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-728154d2"],{"57b9":function(t,e,o){"use strict";o.r(e);var s=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"headP myWork"},[o("div",{staticClass:"top-warp"},[o("Head",{attrs:{title:t.title}}),o("div",{staticClass:"tab flexA"},[o("p",{staticClass:"flexCC",on:{click:function(e){return t.changeTab(0)}}},[o("span",[t._v("未认领")]),o("i",{directives:[{name:"show",rawName:"v-show",value:0==t.tabType,expression:"tabType == 0"}]})]),o("p",{staticClass:"flexCC",on:{click:function(e){return t.changeTab(1)}}},[o("span",[t._v("处理中")]),o("i",{directives:[{name:"show",rawName:"v-show",value:1==t.tabType,expression:"tabType == 1"}]})]),o("p",{staticClass:"flexCC",on:{click:function(e){return t.changeTab(2)}}},[o("span",[t._v("已处理")]),o("i",{directives:[{name:"show",rawName:"v-show",value:2==t.tabType,expression:"tabType == 2"}]})]),o("p",{staticClass:"flexCC",on:{click:function(e){return t.changeTab(3)}}},[o("span",[t._v("已完成")]),o("i",{directives:[{name:"show",rawName:"v-show",value:3==t.tabType,expression:"tabType == 3"}]})])])],1),o("mescroll-vue",{directives:[{name:"show",rawName:"v-show",value:0==t.tabType,expression:"tabType==0"}],ref:"mescroll0",attrs:{down:t.getMescrollDown(0),up:t.getMescrollUp(0)},on:{init:t.mescrollInit0}},[o("ul",{attrs:{id:"dataList0"}},t._l(t.tab0.list,function(e,s){return o("li",{key:s,on:{click:function(e){return t.detail(e,s)}}},[o("span",{directives:[{name:"show",rawName:"v-show",value:"充电工单"==e.type_name,expression:"item.type_name=='充电工单'"}],staticClass:"state1 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"断电工单"==e.type_name,expression:"item.type_name=='断电工单'"}],staticClass:"state2 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"组长工单"==e.type_name,expression:"item.type_name=='组长工单'"}],staticClass:"state3 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"偷盗工单"==e.type_name,expression:"item.type_name=='偷盗工单'"}],staticClass:"state4 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"离线工单"==e.type_name,expression:"item.type_name=='离线工单'"}],staticClass:"state5 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"救援工单"==e.type_name,expression:"item.type_name=='救援工单'"}],staticClass:"state6 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"断电工单"==e.type_name,expression:"item.type_name=='断电工单'"}],staticClass:"state7 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"警报工单"==e.type_name,expression:"item.type_name=='警报工单'"}],staticClass:"state8 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"故障工单"==e.type_name,expression:"item.type_name=='故障工单'"}],staticClass:"state9 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"其他工单"==e.type_name,expression:"item.type_name=='其他工单'"}],staticClass:"state10 state"},[t._v(t._s(e.type_name))]),o("h4",{directives:[{name:"show",rawName:"v-show",value:e.reason,expression:"item.reason"}]},[t._v(t._s(e.reason))]),o("h4",{directives:[{name:"show",rawName:"v-show",value:!e.reason,expression:"!item.reason"}]},[t._v(t._s(e.type_name))]),o("div",[o("div",[o("P",[o("span",[t._v("车辆编号:")]),o("span",[t._v(t._s(e.bike_no))])]),o("P",[o("span",[t._v("创建时间:")]),o("span",[t._v(t._s(e.created_at))])])],1),o("div",[o("P",[o("span",[t._v("进度:")]),o("span",[t._v(t._s(e.planned))])]),o("P",[o("span",[t._v("来源:")]),o("span",[t._v(t._s(e.source))])])],1)])])}),0)]),o("mescroll-vue",{directives:[{name:"show",rawName:"v-show",value:1==t.tabType,expression:"tabType==1"}],ref:"mescroll1",attrs:{up:t.getMescrollUp(1)},on:{init:t.mescrollInit1}},[o("ul",{attrs:{id:"dataList1"}},t._l(t.tab1.list,function(e,s){return o("li",{key:s,on:{click:function(e){return t.detail(e,s)}}},[o("span",{directives:[{name:"show",rawName:"v-show",value:"充电工单"==e.type_name,expression:"item.type_name=='充电工单'"}],staticClass:"state1 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"断电工单"==e.type_name,expression:"item.type_name=='断电工单'"}],staticClass:"state2 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"组长工单"==e.type_name,expression:"item.type_name=='组长工单'"}],staticClass:"state3 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"偷盗工单"==e.type_name,expression:"item.type_name=='偷盗工单'"}],staticClass:"state4 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"离线工单"==e.type_name,expression:"item.type_name=='离线工单'"}],staticClass:"state5 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"救援工单"==e.type_name,expression:"item.type_name=='救援工单'"}],staticClass:"state6 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"断电工单"==e.type_name,expression:"item.type_name=='断电工单'"}],staticClass:"state7 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"警报工单"==e.type_name,expression:"item.type_name=='警报工单'"}],staticClass:"state8 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"故障工单"==e.type_name,expression:"item.type_name=='故障工单'"}],staticClass:"state9 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"其他工单"==e.type_name,expression:"item.type_name=='其他工单'"}],staticClass:"state10 state"},[t._v(t._s(e.type_name))]),o("h4",{directives:[{name:"show",rawName:"v-show",value:e.reason,expression:"item.reason"}]},[t._v(t._s(e.reason))]),o("h4",{directives:[{name:"show",rawName:"v-show",value:!e.reason,expression:"!item.reason"}]},[t._v(t._s(e.type_name))]),o("div",[o("div",[o("P",[o("span",[t._v("当前负责人:")]),o("span",[t._v(t._s(e.worker))])]),o("P",[o("span",[t._v("车辆编号:")]),o("span",[t._v(t._s(e.bike_no))])]),o("P",[o("span",[t._v("创建时间:")]),o("span",[t._v(t._s(e.created_at))])])],1),o("div",[o("P",[o("span",[t._v("进度:")]),o("span",[t._v(t._s(e.planned))])]),o("P",[o("span",[t._v("来源:")]),o("span",[t._v(t._s(e.source))])])],1)])])}),0)]),o("mescroll-vue",{directives:[{name:"show",rawName:"v-show",value:2==t.tabType,expression:"tabType==2"}],ref:"mescroll2",attrs:{up:t.getMescrollUp(2)},on:{init:t.mescrollInit2}},[o("ul",{attrs:{id:"dataList2"}},t._l(t.tab2.list,function(e,s){return o("li",{key:s,on:{click:function(e){return t.detail(e,s)}}},[o("span",{directives:[{name:"show",rawName:"v-show",value:"充电工单"==e.type_name,expression:"item.type_name=='充电工单'"}],staticClass:"state1 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"断电工单"==e.type_name,expression:"item.type_name=='断电工单'"}],staticClass:"state2 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"组长工单"==e.type_name,expression:"item.type_name=='组长工单'"}],staticClass:"state3 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"偷盗工单"==e.type_name,expression:"item.type_name=='偷盗工单'"}],staticClass:"state4 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"离线工单"==e.type_name,expression:"item.type_name=='离线工单'"}],staticClass:"state5 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"救援工单"==e.type_name,expression:"item.type_name=='救援工单'"}],staticClass:"state6 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"断电工单"==e.type_name,expression:"item.type_name=='断电工单'"}],staticClass:"state7 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"警报工单"==e.type_name,expression:"item.type_name=='警报工单'"}],staticClass:"state8 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"故障工单"==e.type_name,expression:"item.type_name=='故障工单'"}],staticClass:"state9 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"其他工单"==e.type_name,expression:"item.type_name=='其他工单'"}],staticClass:"state10 state"},[t._v(t._s(e.type_name))]),o("h4",{directives:[{name:"show",rawName:"v-show",value:e.reason,expression:"item.reason"}]},[t._v(t._s(e.reason))]),o("h4",{directives:[{name:"show",rawName:"v-show",value:!e.reason,expression:"!item.reason"}]},[t._v(t._s(e.type_name))]),o("div",[o("div",[o("P",[o("span",[t._v("当前负责人:")]),o("span",[t._v(t._s(e.worker))])]),o("P",[o("span",[t._v("车辆编号:")]),o("span",[t._v(t._s(e.bike_no))])]),o("P",[o("span",[t._v("创建时间:")]),o("span",[t._v(t._s(e.created_at))])])],1),o("div",[o("P",[o("span",[t._v("进度:")]),o("span",[t._v(t._s(e.planned))])]),o("P",[o("span",[t._v("来源:")]),o("span",[t._v(t._s(e.source))])])],1)])])}),0)]),o("mescroll-vue",{directives:[{name:"show",rawName:"v-show",value:3==t.tabType,expression:"tabType==3"}],ref:"mescroll3",attrs:{up:t.getMescrollUp(3)},on:{init:t.mescrollInit3}},[o("ul",{attrs:{id:"dataList3"}},t._l(t.tab3.list,function(e,s){return o("li",{key:s,on:{click:function(e){return t.detail(e,s)}}},[o("span",{directives:[{name:"show",rawName:"v-show",value:"充电工单"==e.type_name,expression:"item.type_name=='充电工单'"}],staticClass:"state1 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"断电工单"==e.type_name,expression:"item.type_name=='断电工单'"}],staticClass:"state2 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"组长工单"==e.type_name,expression:"item.type_name=='组长工单'"}],staticClass:"state3 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"偷盗工单"==e.type_name,expression:"item.type_name=='偷盗工单'"}],staticClass:"state4 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"离线工单"==e.type_name,expression:"item.type_name=='离线工单'"}],staticClass:"state5 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"救援工单"==e.type_name,expression:"item.type_name=='救援工单'"}],staticClass:"state6 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"断电工单"==e.type_name,expression:"item.type_name=='断电工单'"}],staticClass:"state7 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"警报工单"==e.type_name,expression:"item.type_name=='警报工单'"}],staticClass:"state8 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"故障工单"==e.type_name,expression:"item.type_name=='故障工单'"}],staticClass:"state9 state"},[t._v(t._s(e.type_name))]),o("span",{directives:[{name:"show",rawName:"v-show",value:"其他工单"==e.type_name,expression:"item.type_name=='其他工单'"}],staticClass:"state10 state"},[t._v(t._s(e.type_name))]),o("h4",{directives:[{name:"show",rawName:"v-show",value:e.reason,expression:"item.reason"}]},[t._v(t._s(e.reason))]),o("h4",{directives:[{name:"show",rawName:"v-show",value:!e.reason,expression:"!item.reason"}]},[t._v(t._s(e.type_name))]),o("div",[o("div",[o("P",[o("span",[t._v("当前负责人:")]),o("span",[t._v(t._s(e.worker))])]),o("P",[o("span",[t._v("车辆编号:")]),o("span",[t._v(t._s(e.bike_no))])]),o("P",[o("span",[t._v("创建时间:")]),o("span",[t._v(t._s(e.created_at))])])],1),o("div",[o("P",[o("span",[t._v("进度:")]),o("span",[t._v(t._s(e.planned))])]),o("P",[o("span",[t._v("来源:")]),o("span",[t._v(t._s(e.source))])])],1)])])}),0)])],1)},a=[],n=o("8d6b"),i=o("76a0"),r={name:"mescrollMore",components:{MescrollVue:n["a"]},data:function(){return{title:"我的工单",tab0:{mescroll:null,list:[],isListInit:!1},tab1:{mescroll:null,list:[],isListInit:!1},tab2:{mescroll:null,list:[],isListInit:!1},tab3:{mescroll:null,list:[],isListInit:!1},tabType:0}},methods:{mescrollInit0:function(t){t.tabType=0,this.tab0.mescroll=t},mescrollInit1:function(t){t.tabType=1,this.tab1.mescroll=t},mescrollInit2:function(t){t.tabType=2,this.tab2.mescroll=t},mescrollInit3:function(t){t.tabType=3,this.tab3.mescroll=t},getMescrollDown:function(t){var e=0===t;return{auto:e,callback:this.downCallback}},getMescrollUp:function(t){var e="dataList"+t;return{auto:!1,callback:this.upCallback,noMoreSize:4,empty:{warpId:e,icon:"http://www.mescroll.com/img/mescroll-empty.png",tip:"暂无相关数据~"},toTop:{src:"http://www.mescroll.com/img/mescroll-totop.png"}}},downCallback:function(t){0===t.tabType||1===t.tabType||2===t.tabType||t.tabType,t.resetUpScroll()},upCallback:function(t,e){var o=this;if(i["Indicator"].open({text:"加载中...",spinnerType:"fading-circle"}),0==this.tabType)this.axios.get(config.url.workList+"?planned=1&&page="+t.num).then(function(s){if(200==s.status){i["Indicator"].close();var a=s.data.data;1===t.num&&(o.tab0.list=[]),o.tab0.list=o.tab0.list.concat(a),o.$nextTick(function(){e.endSuccess(a.length)})}}).catch(function(t){console.log(t.response),i["Indicator"].close()});else{var s="";1==this.tabType?s=2:2==this.tabType?s=3:3==this.tabType&&(s=4),this.axios.get(config.url.myWorkOrderList+s+"&&page="+t.num).then(function(s){if(200==s.status)if(i["Indicator"].close(),1==o.tabType){o.tab1.isListInit=!0;var a=s.data.data;1===t.num&&(o.tab1.list=[]),o.tab1.list=o.tab1.list.concat(a),console.log(o.tab1.list,111111),o.$nextTick(function(){e.endSuccess(a.length)})}else if(2==o.tabType){o.tab2.isListInit=!0;var n=s.data.data;1===t.num&&(o.tab2.list=[]),o.tab2.list=o.tab2.list.concat(n),console.log(o.tab2.list,2222222),o.$nextTick(function(){e.endSuccess(n.length)})}else if(3==o.tabType){o.tab3.isListInit=!0;var r=s.data.data;1===t.num&&(o.tab3.list=[]),o.tab3.list=o.tab3.list.concat(r),console.log(o.tab3.list,33333),o.$nextTick(function(){e.endSuccess(r.length)})}}).catch(function(t){console.log(t.response),i["Indicator"].close()})}},detail:function(t,e){var o="";0==this.tabType?o=this.tab0.list[e].id:1==this.tabType?o=this.tab1.list[e].id:2==this.tabType?o=this.tab2.list[e].id:3==this.tabType&&(o=this.tab3.list[e].id),this.$router.push({name:"workdetail",params:{work_order_id:o}})},changeTab:function(t){var e=this.getTabData(this.tabType),o=this.getTabData(t);e.mescroll.hideTopBtn(),this.tabType=t,o.isListInit?setTimeout(function(){var t=o.mescroll.getScrollTop();t>=o.mescroll.optUp.toTop.offset?o.mescroll.showTopBtn():o.mescroll.hideTopBtn()},30):o.mescroll.triggerDownScroll()},getTabData:function(t){return null==t&&(t=this.tabType),0===t?this.tab0:1===t?this.tab1:2===t?this.tab2:3===t?this.tab3:void 0}},beforeRouteEnter:function(t,e,o){o(function(t){var e=t.$refs["mescroll"+t.tabType];e&&e.beforeRouteEnter()})},beforeRouteLeave:function(t,e,o){var s=this.$refs["mescroll"+this.tabType];s&&s.beforeRouteLeave(),o()}},l=r,p=(o("815c"),o("2877")),c=Object(p["a"])(l,s,a,!1,null,"493b36a0",null);e["default"]=c.exports},"815c":function(t,e,o){"use strict";var s=o("a2cb"),a=o.n(s);a.a},"8d6b":function(t,e,o){"use strict";var s=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{ref:"mescroll",staticClass:"mescroll"},[o("div",[t._t("default")],2)])},a=[],n=o("f868"),i=o.n(n),r=(o("f2fd"),{name:"MeScrollVue",data:function(){return{mescroll:null,lastScrollTop:0,lastBounce:null}},props:{up:Object,down:Object},mounted:function(){this.mescroll=new i.a(this.$refs.mescroll,{up:this.up,down:this.down}),this.$emit("init",this.mescroll)},methods:{beforeRouteEnter:function(){var t=this;this.mescroll&&(this.lastScrollTop&&(this.mescroll.setScrollTop(this.lastScrollTop),setTimeout(function(){t.mescroll.setTopBtnFadeDuration(0)},16)),null!=this.lastBounce&&this.mescroll.setBounce(this.lastBounce))},beforeRouteLeave:function(){this.mescroll&&(this.lastScrollTop=this.mescroll.getScrollTop(),this.mescroll.hideTopBtn(0),this.lastBounce=this.mescroll.optUp.isBounce,this.mescroll.setBounce(!0))}}}),l=r,p=o("2877"),c=Object(p["a"])(l,s,a,!1,null,null,null);e["a"]=c.exports},a2cb:function(t,e,o){},f2fd:function(t,e,o){},f868:function(t,e,o){var s,a;
  2. /*!
  3. * version 1.4.1 MIT
  4. * 2019-2-1 wenju
  5. * http://www.mescroll.com
  6. */(function(n,i){s=i,a="function"===typeof s?s.call(e,o,e,t):s,void 0===a||(t.exports=a)})(0,function(){var t=function(t,e){var o=this;if(o.version="1.4.0",o.isScrollBody=!t||"body"===t,o.scrollDom=o.isScrollBody?document.body:o.getDomById(t),o.scrollDom){o.options=e||{};var s=navigator.userAgent,a=!!s.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),n="undefined"===typeof window.orientation,i=s.indexOf("Android")>-1||s.indexOf("Adr")>-1;o.os={ios:a,pc:n,android:i},o.isDownScrolling=!1,o.isUpScrolling=!1;var r=o.options.down&&o.options.down.callback;o.initDownScroll(),o.initUpScroll(),setTimeout(function(){o.optDown.use&&o.optDown.auto&&r&&(o.optDown.autoShowLoading?o.triggerDownScroll():o.optDown.callback&&o.optDown.callback(o)),o.optUp.use&&o.optUp.auto&&!o.isUpAutoLoad&&o.triggerUpScroll()},30)}};return t.prototype.extendDownScroll=function(e){t.extend(e,{use:!0,auto:!0,autoShowLoading:!1,isLock:!1,isBoth:!1,offset:80,inOffsetRate:1,outOffsetRate:.2,bottomOffset:20,minAngle:45,hardwareClass:"mescroll-hardware",mustToTop:!1,warpId:null,warpClass:"mescroll-downwarp",resetClass:"mescroll-downwarp-reset",textInOffset:"下拉刷新",textOutOffset:"释放更新",textLoading:"加载中 ...",htmlContent:'<p class="downwarp-progress"></p><p class="downwarp-tip"></p>',inited:function(t,e){t.downTipDom=e.getElementsByClassName("downwarp-tip")[0],t.downProgressDom=e.getElementsByClassName("downwarp-progress")[0]},inOffset:function(t){t.downTipDom&&(t.downTipDom.innerHTML=t.optDown.textInOffset),t.downProgressDom&&t.downProgressDom.classList.remove("mescroll-rotate")},outOffset:function(t){t.downTipDom&&(t.downTipDom.innerHTML=t.optDown.textOutOffset)},onMoving:function(t,e,o){if(t.downProgressDom){var s=360*e;t.downProgressDom.style.webkitTransform="rotate("+s+"deg)",t.downProgressDom.style.transform="rotate("+s+"deg)"}},beforeLoading:function(t,e){return!1},showLoading:function(t){t.downTipDom&&(t.downTipDom.innerHTML=t.optDown.textLoading),t.downProgressDom&&t.downProgressDom.classList.add("mescroll-rotate")},afterLoading:function(t){return 0},callback:function(t){t.resetUpScroll()}})},t.prototype.extendUpScroll=function(e){var o=this.os.pc;t.extend(e,{use:!0,auto:!0,isLock:!1,isBoth:!1,isBounce:!0,callback:null,page:{num:0,size:10,time:null},noMoreSize:5,offset:100,toTop:{warpId:null,src:null,html:null,offset:1e3,warpClass:"mescroll-totop",showClass:"mescroll-fade-in",hideClass:"mescroll-fade-out",fadeDuration:.5,duration:300,supportTap:!1,btnClick:null},loadFull:{use:!1,delay:500},empty:{warpId:null,icon:null,tip:"暂无相关数据~",btntext:"",btnClick:null,supportTap:!1},clearId:null,clearEmptyId:null,hardwareClass:"mescroll-hardware",warpId:null,warpClass:"mescroll-upwarp",htmlLoading:'<p class="upwarp-progress mescroll-rotate"></p><p class="upwarp-tip">加载中..</p>',htmlNodata:'<p class="upwarp-nodata">-- END --</p>',inited:function(t,e){},showLoading:function(t,e){e.innerHTML=t.optUp.htmlLoading},showNoMore:function(t,e){e.innerHTML=t.optUp.htmlNodata},onScroll:null,scrollbar:{use:o,barClass:"mescroll-bar"},lazyLoad:{use:!1,attr:"imgurl",showClass:"mescroll-lazy-in",delay:500,offset:200}})},t.extend=function(e,o){if(!e)return o;for(var s in o)null==e[s]?e[s]=o[s]:"object"===typeof e[s]&&t.extend(e[s],o[s]);return e},t.prototype.initDownScroll=function(){var t=this;if(t.optDown=t.options.down||{},t.extendDownScroll(t.optDown),t.touchstartEvent=function(e){t.isScrollTo&&t.preventDefault(e),t.startPoint=t.getPoint(e),t.lastPoint=t.startPoint,t.maxTouchmoveY=t.getBodyHeight()-t.optDown.bottomOffset,t.inTouchend=!1;var o=t.getScrollTop();t.isKeepTop=0===o,t.os.pc&&o<=0&&(t.scrollDom.addEventListener("mousemove",t.touchmoveEvent,{passive:!1}),document.ondragstart=function(){return!1})},t.scrollDom.addEventListener("mousedown",t.touchstartEvent),t.scrollDom.addEventListener("touchstart",t.touchstartEvent),t.touchmoveEvent=function(e){if(t.startPoint){var o=t.getScrollTop();o>0&&(t.isKeepTop=!1);var s=t.getPoint(e),a=s.y-t.startPoint.y;if(a>0){if(o<=0&&(t.preventDefault(e),t.optDown.use&&!t.inTouchend&&!t.isDownScrolling&&!t.optDown.isLock&&(!t.isUpScrolling||t.isUpScrolling&&t.optUp.isBoth))){if(t.optDown.mustToTop&&!t.isKeepTop)return;var n=Math.abs(t.lastPoint.x-s.x),i=Math.abs(t.lastPoint.y-s.y),r=Math.sqrt(n*n+i*i);if(0!==r){var l=Math.asin(i/r)/Math.PI*180;if(l<t.optDown.minAngle)return}if(t.maxTouchmoveY>0&&s.y>=t.maxTouchmoveY)return t.inTouchend=!0,void t.touchendEvent();var p=s.y-t.lastPoint.y;t.downHight||(t.downHight=0),t.downHight<t.optDown.offset?(1!==t.movetype&&(t.movetype=1,t.optDown.inOffset(t),t.downwarp.classList.remove(t.optDown.resetClass),t.isMoveDown=!0,t.os.ios&&!t.isKeepTop&&(t.scrollDom.classList.add(t.optDown.hardwareClass),t.scrollDom.style.webkitOverflowScrolling="auto",t.isSetScrollAuto=!0)),t.downHight+=p*t.optDown.inOffsetRate):(2!==t.movetype&&(t.movetype=2,t.optDown.outOffset(t),t.downwarp.classList.remove(t.optDown.resetClass),t.isMoveDown=!0,t.os.ios&&!t.isKeepTop&&(t.scrollDom.classList.add(t.optDown.hardwareClass),t.scrollDom.style.webkitOverflowScrolling="auto",t.isSetScrollAuto=!0)),t.downHight+=p>0?p*t.optDown.outOffsetRate:p),t.downwarp.style.height=t.downHight+"px";var c=t.downHight/t.optDown.offset;t.optDown.onMoving(t,c,t.downHight)}}else if(a<0){var m=t.getScrollHeight(),u=t.getClientHeight(),h=m-u-o;!t.optUp.isBounce&&h<=0&&t.preventDefault(e),t.optUp.use&&!t.optUp.isLock&&t.optUp.hasNext&&!t.isUpScrolling&&(!t.isDownScrolling||t.isDownScrolling&&t.optDown.isBoth)&&(u+t.optUp.offset>=m||h<=0)&&t.triggerUpScroll()}t.lastPoint=s}},t.scrollDom.addEventListener("touchmove",t.touchmoveEvent,{passive:!1}),t.touchendEvent=function(){t.optDown.use&&t.isMoveDown&&(t.downHight>=t.optDown.offset?t.triggerDownScroll():(t.downwarp.classList.add(t.optDown.resetClass),t.downHight=0,t.downwarp.style.height=0),t.isSetScrollAuto&&(t.scrollDom.style.webkitOverflowScrolling="touch",t.scrollDom.classList.remove(t.optDown.hardwareClass),t.isSetScrollAuto=!1),t.movetype=0,t.isMoveDown=!1),t.os.pc&&(t.scrollDom.removeEventListener("mousemove",t.touchmoveEvent),document.ondragstart=function(){return!0})},t.scrollDom.addEventListener("mouseup",t.touchendEvent),t.scrollDom.addEventListener("mouseleave",t.touchendEvent),t.scrollDom.addEventListener("touchend",t.touchendEvent),t.scrollDom.addEventListener("touchcancel",t.touchendEvent),t.optDown.use){t.downwarp=document.createElement("div"),t.downwarp.className=t.optDown.warpClass,t.downwarp.innerHTML='<div class="downwarp-content">'+t.optDown.htmlContent+"</div>";var e=t.optDown.warpId?t.getDomById(t.optDown.warpId):t.scrollDom;t.optDown.warpId&&e?e.appendChild(t.downwarp):(e||(e=t.scrollDom),e.insertBefore(t.downwarp,t.scrollDom.firstChild)),setTimeout(function(){t.optDown.inited(t,t.downwarp)},0)}},t.prototype.preventDefault=function(t){t&&t.cancelable&&!t.defaultPrevented&&t.preventDefault()},t.prototype.getPoint=function(t){return{x:t.touches?t.touches[0].pageX:t.clientX,y:t.touches?t.touches[0].pageY:t.clientY}},t.prototype.triggerDownScroll=function(){this.optDown.beforeLoading(this,this.downwarp)||(this.showDownScroll(),this.optDown.callback&&this.optDown.callback(this))},t.prototype.showDownScroll=function(){this.isDownScrolling=!0,this.optDown.showLoading(this),this.downHight=this.optDown.offset,this.downwarp.classList.add(this.optDown.resetClass),this.downwarp.style.height=this.optDown.offset+"px"},t.prototype.endDownScroll=function(){var t=this,e=function(){t.downHight=0,t.downwarp.style.height=0,t.isDownScrolling=!1,t.downProgressDom&&t.downProgressDom.classList.remove("mescroll-rotate")},o=t.optDown.afterLoading(t);"number"===typeof o&&o>0?setTimeout(e,o):e()},t.prototype.lockDownScroll=function(t){null==t&&(t=!0),this.optDown.isLock=t},t.prototype.initUpScroll=function(){var t,e=this;(e.optUp=e.options.up||{use:!1},e.extendUpScroll(e.optUp),e.optUp.scrollbar.use&&e.scrollDom.classList.add(e.optUp.scrollbar.barClass),e.optUp.isBounce||e.setBounce(!1),!1!==e.optUp.use)&&(e.optUp.hasNext=!0,e.upwarp=document.createElement("div"),e.upwarp.className=e.optUp.warpClass,e.optUp.warpId&&(t=e.getDomById(e.optUp.warpId)),t||(t=e.scrollDom),t.appendChild(e.upwarp),e.preScrollY=0,e.lazyStartTime=(new Date).getTime(),e.lazyTag="mescroll-lazying",e.scrollEvent=function(){var t=e.getScrollTop(),o=t-e.preScrollY>0;if(e.preScrollY=t,!e.isUpScrolling&&(!e.isDownScrolling||e.isDownScrolling&&e.optDown.isBoth)&&!e.optUp.isLock&&e.optUp.hasNext){var s=e.getScrollHeight()-e.getClientHeight()-t;s<=e.optUp.offset&&o&&e.triggerUpScroll()}var a=e.optUp.toTop;if((a.src||a.html)&&(t>=a.offset?e.showTopBtn():e.hideTopBtn()),e.optUp.lazyLoad.use){var n=(new Date).getTime();e.lazyTimer&&clearTimeout(e.lazyTimer),n-e.lazyStartTime>=e.optUp.lazyLoad.delay?(e.lazyStartTime=n,e.lazyLoad(0)):e.lazyTimer=e.lazyLoad()}e.optUp.onScroll&&e.optUp.onScroll(e,t,o)},e.isScrollBody?window.addEventListener("scroll",e.scrollEvent):e.scrollDom.addEventListener("scroll",e.scrollEvent),setTimeout(function(){e.optUp.inited(e,e.upwarp)},0))},t.prototype.setBounce=function(t){!this.isScrollBody&&this.os.ios&&(!1===t?(this.optUp.isBounce=!1,window.addEventListener("touchmove",this.bounceTouchmove,{passive:!1})):(this.optUp.isBounce=!0,window.removeEventListener("touchmove",this.bounceTouchmove)))},t.prototype.bounceTouchmove=function(t){var e=this,o=t.target,s=!0;while(o!==document.body&&o!==document){var a=o.classList;if(a){if(a.contains("mescroll")||a.contains("mescroll-touch")){s=!1;break}if(a.contains("mescroll-touch-x")||a.contains("mescroll-touch-y")){var n=t.touches?t.touches[0].pageX:t.clientX,i=t.touches?t.touches[0].pageY:t.clientY;e.preWinX||(e.preWinX=n),e.preWinY||(e.preWinY=i);var r=Math.abs(e.preWinX-n),l=Math.abs(e.preWinY-i),p=Math.sqrt(r*r+l*l);if(e.preWinX=n,e.preWinY=i,0!==p){var c=Math.asin(l/p)/Math.PI*180;if(c<=45&&a.contains("mescroll-touch-x")||c>45&&a.contains("mescroll-touch-y")){s=!1;break}}}}o=o.parentNode}s&&t.cancelable&&!t.defaultPrevented&&"function"===typeof t.preventDefault&&t.preventDefault()},t.prototype.triggerUpScroll=function(){this.optUp.callback&&!this.isUpScrolling&&(this.showUpScroll(),this.optUp.page.num++,this.isUpAutoLoad=!0,this.optUp.callback(this.optUp.page,this))},t.prototype.showUpScroll=function(){this.isUpScrolling=!0,this.upwarp.classList.add(this.optUp.hardwareClass),this.upwarp.style.visibility="visible",this.upwarp.style.display="block",this.optUp.showLoading(this,this.upwarp)},t.prototype.showNoMore=function(){this.upwarp.style.visibility="visible",this.upwarp.style.display="block",this.optUp.hasNext=!1,this.optUp.showNoMore(this,this.upwarp)},t.prototype.hideUpScroll=function(t){t?this.upwarp.style.display="none":this.upwarp.style.visibility="hidden",this.upwarp.classList.remove(this.optUp.hardwareClass);var e=this.upwarp.getElementsByClassName("upwarp-progress")[0];e&&e.classList.remove("mescroll-rotate")},t.prototype.endUpScroll=function(t,e){null!=t&&(t?this.showNoMore():this.hideUpScroll(e)),this.isUpScrolling=!1},t.prototype.resetUpScroll=function(t){if(this.optUp&&this.optUp.use){var e=this.optUp.page;this.prePageNum=e.num,this.prePageTime=e.time,e.num=1,e.time=null,this.isDownScrolling||!1===t||(null==t?(this.removeEmpty(),this.clearDataList(),this.showUpScroll()):this.showDownScroll()),this.isUpAutoLoad=!0,this.optUp.callback&&this.optUp.callback(e,this)}},t.prototype.setPageNum=function(t){this.optUp.page.num=t-1},t.prototype.setPageSize=function(t){this.optUp.page.size=t},t.prototype.clearDataList=function(){var t=this.optUp.clearId||this.optUp.clearEmptyId;if(t){var e=this.getDomById(t);e&&(e.innerHTML="")}},t.prototype.endByPage=function(t,e,o){var s;this.optUp.use&&null!=e&&(s=this.optUp.page.num<e),this.endSuccess(t,s,o)},t.prototype.endBySize=function(t,e,o){var s;if(this.optUp.use&&null!=e){var a=(this.optUp.page.num-1)*this.optUp.page.size+t;s=a<e}this.endSuccess(t,s,o)},t.prototype.endSuccess=function(t,e,o){var s=this;if(s.isDownScrolling&&s.endDownScroll(),s.optUp.use){var a;if(null!=t){var n=s.optUp.page.num,i=s.optUp.page.size;if(1===n&&(s.clearDataList(),o&&(s.optUp.page.time=o)),t<i||!1===e)if(s.optUp.hasNext=!1,0===t&&1===n)a=!1,s.showEmpty();else{var r=(n-1)*i+t;a=!(r<s.optUp.noMoreSize),s.removeEmpty()}else a=!1,s.optUp.hasNext=!0,s.removeEmpty()}var l=!s.optUp.hasNext;s.endUpScroll(a,l),s.loadFull(),s.optUp.lazyLoad.use&&s.lazyLoad(16)}},t.prototype.endErr=function(){if(this.isDownScrolling){var t=this.optUp.page;t&&this.prePageNum&&(t.num=this.prePageNum,t.time=this.prePageTime),this.endDownScroll()}this.isUpScrolling&&(this.optUp.page.num--,this.endUpScroll(!1))},t.prototype.loadFull=function(){var t=this;t.optUp.loadFull.use&&!t.optUp.isLock&&t.optUp.hasNext&&t.optUp.callback&&t.getScrollHeight()<=t.getClientHeight()&&setTimeout(function(){t.getScrollHeight()<=t.getClientHeight()&&t.triggerUpScroll()},t.optUp.loadFull.delay)},t.prototype.lockUpScroll=function(t){null==t&&(t=!0),this.optUp.isLock=t},t.prototype.showEmpty=function(){var t=this,e=t.optUp.empty,o=e.warpId||t.optUp.clearEmptyId;if(null!=o){var s=t.getDomById(o);if(s){t.removeEmpty();var a="";if(e.icon&&(a+='<img class="empty-icon" src="'+e.icon+'"/>'),e.tip&&(a+='<p class="empty-tip">'+e.tip+"</p>"),e.btntext&&(a+='<p class="empty-btn">'+e.btntext+"</p>"),t.emptyDom=document.createElement("div"),t.emptyDom.className="mescroll-empty",t.emptyDom.innerHTML=a,s.appendChild(t.emptyDom),e.btnClick){var n=t.emptyDom.getElementsByClassName("empty-btn")[0];e.supportTap?n.addEventListener("tap",function(o){o.stopPropagation(),t.preventDefault(o),e.btnClick()}):n.onclick=function(){e.btnClick()}}}}},t.prototype.removeEmpty=function(){this.removeChild(this.emptyDom)},t.prototype.showTopBtn=function(t){if(!this.topBtnShow){this.topBtnShow=!0;var e,o=this,s=o.optUp.toTop;if(null==o.toTopBtn)s.html?(o.toTopBtn=document.createElement("div"),o.toTopBtn.innerHTML=s.html):(o.toTopBtn=document.createElement("img"),o.toTopBtn.src=s.src),o.toTopBtn.className=s.warpClass,s.supportTap?o.toTopBtn.addEventListener("tap",function(t){t.stopPropagation(),o.preventDefault(t);var e=s.btnClick&&s.btnClick();!0!==e&&o.scrollTo(0,o.optUp.toTop.duration)}):o.toTopBtn.onclick=function(){var t=s.btnClick&&s.btnClick();!0!==t&&o.scrollTo(0,o.optUp.toTop.duration)},s.warpId&&(e=o.getDomById(s.warpId)),e||(e=document.body),e.appendChild(o.toTopBtn);o.toTopBtn.classList.remove(s.hideClass),o.toTopBtn.classList.add(s.showClass),o.setTopBtnFadeDuration(t)}},t.prototype.hideTopBtn=function(t){this.topBtnShow&&this.toTopBtn&&(this.topBtnShow=!1,this.toTopBtn.classList.remove(this.optUp.toTop.showClass),this.toTopBtn.classList.add(this.optUp.toTop.hideClass),this.setTopBtnFadeDuration(t))},t.prototype.setTopBtnFadeDuration=function(t){if(this.toTopBtn){var e=(null!=t?t:this.optUp.toTop.fadeDuration)+"s";this.toTopBtn.style.animationDuration=e,this.toTopBtn.style.webkitAnimationDuration=e}},t.prototype.scrollTo=function(t,e){var o=this,s=o.getScrollTop(),a=t;if(a>0){var n=o.getScrollHeight()-o.getClientHeight();a>n&&(a=n)}else a=0;o.isScrollTo=!0,o.scrollDom.style.webkitOverflowScrolling="auto",o.getStep(s,a,function(t){o.setScrollTop(t),t===a&&(o.scrollDom.style.webkitOverflowScrolling="touch",o.isScrollTo=!1)},e)},t.prototype.getStep=function(t,e,o,s,a){var n=e-t;if(0!==s&&0!==n){s=s||300,a=a||30;var i=s/a,r=n/i,l=0,p=window.setInterval(function(){l<i-1?(t+=r,o&&o(t,p),l++):(o&&o(e,p),window.clearInterval(p))},a)}else o&&o(e)},t.prototype.lazyLoad=function(t){var e=this,o=null!=t?t:e.optUp.lazyLoad.delay,s=setTimeout(function(){for(var t=e.scrollDom.querySelectorAll("["+e.optUp.lazyLoad.attr+"]"),o=t.length,s=0;s<o;s++){var a=t[s];if("true"!==a.getAttribute(e.lazyTag)&&e.isInSee(a,e.optUp.lazyLoad.offset)){var n=a.getAttribute(e.optUp.lazyLoad.attr),i=new Image;i.onload=function(){var t=this.src,o=this.dom,s=e.optUp.lazyLoad.showClass;s&&o.classList.add(s),"IMG"===o.tagName?o.src=t:o.style.backgroundImage="url("+t+")",o.removeAttribute(e.optUp.lazyLoad.attr),o.removeAttribute(e.lazyTag)},i.onerror=function(){this.dom.removeAttribute(e.lazyTag)},i.onabort=function(){this.dom.removeAttribute(e.lazyTag)},i.src=n,a.setAttribute(e.lazyTag,"true"),i.dom=a}}},o);return s},t.prototype.isInSee=function(t,e){e=e||0;var o=this.getOffsetTop(t),s=this.getScrollTop()-e,a=o+t.offsetHeight,n=s+e+this.getClientHeight()+e;return o<n&&o>=s||a<=n&&a>s},t.prototype.getOffsetTop=function(t){var e=t.offsetTop,o=t.offsetParent;while(null!=o&&o!==this.scrollDom)e+=o.offsetTop+o.clientTop,o=o.offsetParent;return e},t.prototype.getScrollHeight=function(){return this.scrollDom.scrollHeight},t.prototype.getClientHeight=function(){return this.isScrollBody&&"CSS1Compat"===document.compatMode?document.documentElement.clientHeight:this.scrollDom.clientHeight},t.prototype.getBodyHeight=function(){return document.body.clientHeight||document.documentElement.clientHeight},t.prototype.getScrollTop=function(){return this.isScrollBody?document.documentElement.scrollTop||document.body.scrollTop:this.scrollDom.scrollTop},t.prototype.getToBottom=function(){return this.getScrollHeight()-this.getClientHeight()-this.getScrollTop()},t.prototype.setScrollTop=function(t){"number"===typeof t&&(this.isScrollBody?(document.documentElement.scrollTop=t,document.body.scrollTop=t):this.scrollDom.scrollTop=t)},t.prototype.getDomById=function(t){var e;return t&&("string"===typeof t?e=document.getElementById(t):t.nodeType&&(e=t)),e||console.error('the element with id as "'+t+'" can not be found: document.getElementById("'+t+'")==null'),e},t.prototype.removeChild=function(t){if(t){var e=t.parentNode;e&&e.removeChild(t),t=null}},t.prototype.destroy=function(){var t=this;t.scrollDom.removeEventListener("touchstart",t.touchstartEvent),t.scrollDom.removeEventListener("touchmove",t.touchmoveEvent),t.scrollDom.removeEventListener("touchend",t.touchendEvent),t.scrollDom.removeEventListener("touchcancel",t.touchendEvent),t.scrollDom.removeEventListener("mousedown",t.touchstartEvent),t.scrollDom.removeEventListener("mousemove",t.touchmoveEvent),t.scrollDom.removeEventListener("mouseup",t.touchendEvent),t.scrollDom.removeEventListener("mouseleave",t.touchendEvent),t.removeChild(t.downwarp),t.isScrollBody?window.removeEventListener("scroll",t.scrollEvent):t.scrollDom.removeEventListener("scroll",t.scrollEvent),t.removeChild(t.upwarp),t.removeChild(t.toTopBtn),t.setBounce(!0)},t})}}]);
  7. //# sourceMappingURL=chunk-728154d2.f630cc0e.js.map