1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4978db5f"],{"0afc":function(t,e,o){t.exports=o.p+"img/noneData.919a3c84.png"},"209e":function(t,e,o){"use strict";o.d(e,"l",(function(){return n})),o.d(e,"n",(function(){return r})),o.d(e,"a",(function(){return i})),o.d(e,"o",(function(){return a})),o.d(e,"s",(function(){return l})),o.d(e,"t",(function(){return c})),o.d(e,"m",(function(){return p})),o.d(e,"p",(function(){return u})),o.d(e,"q",(function(){return d})),o.d(e,"j",(function(){return h})),o.d(e,"c",(function(){return m})),o.d(e,"e",(function(){return f})),o.d(e,"i",(function(){return w})),o.d(e,"b",(function(){return v})),o.d(e,"k",(function(){return y})),o.d(e,"f",(function(){return g})),o.d(e,"g",(function(){return b})),o.d(e,"d",(function(){return D})),o.d(e,"u",(function(){return S})),o.d(e,"r",(function(){return T})),o.d(e,"h",(function(){return k}));var s=o("b775");function n(t){return Object(s["a"])({url:"/api/talkskill/talkskill_xq",method:"post",data:t})}function r(t){return Object(s["a"])({url:"/api/talkskill/collectCancel",method:"post",data:t})}function i(t){return Object(s["a"])({url:"/api/talkskill/addComment",method:"post",data:t})}function a(t){return Object(s["a"])({url:"/api/talkskill/commentList",method:"post",data:t})}function l(t){return Object(s["a"])({url:"/api/talkskill/praise",method:"post",data:t})}function c(t){return Object(s["a"])({url:"/api/talkskill/praiseCancel",method:"post",data:t})}function p(t){return Object(s["a"])({url:"/api/talkskill/use_talkskill",method:"post",data:t})}function u(t){return Object(s["a"])({url:"/api/talkskill/label_list",method:"post",data:t})}function d(t){return Object(s["a"])({url:"/api/talkskill/lists",method:"post",data:t})}function h(t){return Object(s["a"])({url:"/api/talkskill/submit_questions",method:"post",data:t})}function m(t){return Object(s["a"])({url:"/api/talkskill/get_answer_list",method:"post",data:t})}function f(t){return Object(s["a"])({url:"/api/talkskill/get_my_answer_list",method:"post",data:t})}function w(t){return Object(s["a"])({url:"/api/talkskill/submit_talkskill",method:"post",data:t})}function v(t){return Object(s["a"])({url:"/api/talkskill/edit_talkskill",method:"post",data:t})}function y(t){return Object(s["a"])({url:"/api/talkskill/system",method:"post",data:t})}function g(t){return Object(s["a"])({url:"/api/talkskill/get_person_list",method:"post",data:t})}function b(t){return Object(s["a"])({url:"/api/talkskill/get_cates",method:"post",data:t})}function D(t){return Object(s["a"])({url:"/api/talkskill/get_cates_all",method:"post",data:t})}function S(t){return Object(s["a"])({url:"/api/talkskill/success_list",method:"post",data:t})}function T(t){return Object(s["a"])({url:"/api/talkskill/chosen_and_success_list",method:"post",data:t})}function k(t){return Object(s["a"])({url:"/api/talkskill/keyword_list",method:"post",data:t})}},"226a":function(t,e,o){},4554:function(t,e,o){},"46d5":function(t,e,o){"use strict";o("4554")},"4e82":function(t,e,o){"use strict";var s=o("23e7"),n=o("e330"),r=o("59ed"),i=o("7b0b"),a=o("07fa"),l=o("577e"),c=o("d039"),p=o("addb"),u=o("a640"),d=o("04d1"),h=o("d998"),m=o("2d00"),f=o("512c"),w=[],v=n(w.sort),y=n(w.push),g=c((function(){w.sort(void 0)})),b=c((function(){w.sort(null)})),D=u("sort"),S=!c((function(){if(m)return m<70;if(!(d&&d>3)){if(h)return!0;if(f)return f<603;var t,e,o,s,n="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:o=3;break;case 68:case 71:o=4;break;default:o=2}for(s=0;s<47;s++)w.push({k:e+s,v:o})}for(w.sort((function(t,e){return e.v-t.v})),s=0;s<w.length;s++)e=w[s].k.charAt(0),n.charAt(n.length-1)!==e&&(n+=e);return"DGBEFHACIJK"!==n}})),T=g||!b||!D||!S,k=function(t){return function(e,o){return void 0===o?-1:void 0===e?1:void 0!==t?+t(e,o)||0:l(e)>l(o)?1:-1}};s({target:"Array",proto:!0,forced:T},{sort:function(t){void 0!==t&&r(t);var e=i(this);if(S)return void 0===t?v(e):v(e,t);var o,s,n=[],l=a(e);for(s=0;s<l;s++)s in e&&y(n,e[s]);p(n,k(t)),o=n.length,s=0;while(s<o)e[s]=n[s++];while(s<l)delete e[s++];return e}})},"4eda":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAMCAYAAABvEu28AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAEqADAAQAAAABAAAADAAAAABFeZu2AAAA00lEQVQoFWO09Axb8P///3gGCgAjI+NCJhEWgSwGRoZrZJsD1AsygxFkgK1nqNZvBobTDP8ZuEgykJHhGysDg+nh7auvMYM0Prpz7bWcmvaz//8ZAkgxiImJIe3o9tW7QXrABoEYj29fuyCrqqMIZBqA+IQAKFyOb1/dAFPHBGOAaKLDCxouyHrBYYQsQDC8kMIFWR/cazBBQuGFHC4wPSAawyCQIK7wQg8XkFoYQAkjmCCIxggvLOGCrB4jjJAl4eEFFISlF2R5kthWXqEJIExIEwC7ikozadyXtQAAAABJRU5ErkJggg=="},"897a":function(t,e,o){"use strict";var s=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"wordSearch relative flex-row align-center"},[3!=t.type?s("div",{staticClass:"itemStyle relative flex-sub flex-row justify-center align-center",on:{click:function(e){return t.handleShow(1)}}},[s("span",{staticClass:"overflowText"},[t._v(t._s(t.searchForm.cate2&&"全部"!=t.searchForm.cate2?t.searchForm.cate2:"场景"))]),s("img",{attrs:{src:o("4eda"),alt:""}})]):t._e(),s("div",{staticClass:"itemStyle relative flex-sub flex-row justify-center align-center",on:{click:function(e){return t.handleShow(2)}}},[s("span",{staticClass:"overflowText"},[t._v(t._s(t.searchForm.house_type&&"全部"!=t.searchForm.house_type?t.searchForm.house_type:"房屋类型"))]),s("img",{attrs:{src:o("4eda"),alt:""}})]),s("div",{staticClass:"itemStyle relative flex-sub flex-row justify-center align-center",on:{click:function(e){return t.handleShow(3)}}},[s("span",{staticClass:"overflowText"},[t._v(t._s(t.searchForm.user_cate&&"全部"!=t.searchForm.user_cate?t.searchForm.user_cate:"适用部门"))]),s("img",{attrs:{src:o("4eda"),alt:""}})]),s("div",{staticClass:"itemStyle relative flex-sub flex-row justify-center align-center",on:{click:function(e){return t.handleShow(4)}}},[s("span",{staticClass:"overflowText"},[t._v(t._s(t.searchForm.orderName&&"默认排序"!=t.searchForm.orderName?t.searchForm.orderName:"排序"))]),s("img",{attrs:{src:o("4eda"),alt:""}})]),t.classify&&1==t.type?s("div",{staticClass:"classification"},t._l(t.searchObj.cate2,(function(e){return s("div",{key:e.id,on:{click:function(o){return t.handleSelect(1,e)}}},[t._v(" "+t._s(e.name)+" ("+t._s(1==t.sucess?e.count:e.successCount)+") ")])})),0):t._e(),t.classify&&2==t.type?s("div",{staticClass:"classification"},t._l(t.allcate,(function(e){return s("div",{key:e.id,on:{click:function(o){return t.handleSelect(1,e)}}},[t._v(" "+t._s(e.name)+" ("+t._s(1==t.sucess?e.count:e.successCount)+") ")])})),0):t._e(),s("div",{directives:[{name:"show",rawName:"v-show",value:t.houseType,expression:"houseType"}],staticClass:"houseType"},t._l(t.searchObj.house_type,(function(e){return s("span",{key:e.id,class:{active:e.name==t.searchForm.house_type},on:{click:function(o){return t.handleSelect(2,e)}}},[t._v(t._s(e.name))])})),0),s("div",{directives:[{name:"show",rawName:"v-show",value:t.people,expression:"people"}],staticClass:"people"},t._l(t.searchObj.user,(function(e){return s("span",{key:e.id,class:{active:e.name==t.searchForm.user_cate},on:{click:function(o){return t.handleSelect(3,e)}}},[t._v(t._s(e.name))])})),0),s("div",{directives:[{name:"show",rawName:"v-show",value:t.sort,expression:"sort"}],staticClass:"sortStyle"},t._l(t.sortlist,(function(e){return s("div",{key:e.id,on:{click:function(o){return t.handleSelect(4,e)}}},[t._v(" "+t._s(e.name)+" ")])})),0),s("div",{directives:[{name:"show",rawName:"v-show",value:t.classify||t.houseType||t.people||t.sort,expression:"classify || houseType || people || sort"}],staticClass:"mask",on:{click:function(e){return t.handleShow(0)}}})])},n=[],r=(o("a9e3"),o("4e82"),o("b0c0"),{props:{searchObj:{type:Object,default:function(){return{}},require:!0},allcate:{type:Array},type:{type:Number,default:1},nowtext:{type:Number,default:1},sucess:{type:Number,default:1},wordtype:{type:Number,default:1},sortlist:{type:Array,default:function(){return[{id:1,name:"默认排序",type:"id desc"},{id:2,name:"使用次数正序",type:"use_count asc"},{id:3,name:"使用次数倒序",type:"use_count desc"},{id:4,name:"更新时间正序",type:"order_date asc"},{id:5,name:"更新时间倒序",type:"order_date desc"}]}}},data:function(){return{classify:!1,houseType:!1,people:!1,sort:!1,searchForm:{user_cate:"全部",house_type:"全部",cate2:"全部",order:"",orderName:""},nowtitobj:{user_cate:"",house_type:"",cate2:"",order:""}}},methods:{handleShow:function(t){switch(t){case 1:this.classify=!this.classify;break;case 2:this.houseType=!this.houseType;break;case 3:this.people=!this.people;break;case 4:this.sort=!this.sort;break;default:this.classify=!1,this.houseType=!1,this.people=!1,this.sort=!1;break}},handleSelect:function(t,e){switch(t){case 1:this.searchForm.cate2=e.name,this.nowtitobj.cate2=e.id,this.classify=!1;break;case 2:this.searchForm.house_type=e.name,this.nowtitobj.house_type=e.id,this.houseType=!1;break;case 3:this.searchForm.user_cate=e.name,this.nowtitobj.user_cate=e.id,this.people=!1;break;case 4:this.searchForm.order=e.type,this.nowtitobj.order=e.type,this.searchForm.orderName=e.name,this.sort=!1;break}1==this.nowtext?this.$emit("update",this.searchForm):2==this.nowtext&&this.$emit("update",this.nowtitobj)}}}),i=r,a=(o("df1b"),o("2877")),l=Object(a["a"])(i,s,n,!1,null,"369ec0f6",null);e["a"]=l.exports},"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)])},n=[],r=o("f868"),i=o.n(r),a=(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=a,c=o("2877"),p=Object(c["a"])(l,s,n,!1,null,null,null);e["a"]=p.exports},"91ab":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:"sucessword"},[o("div",{staticClass:"titlebox"},[o("word-filter",{attrs:{searchObj:t.searchObj,type:2,nowtext:2,sucess:2,sortlist:t.sortlist,allcate:t.searchObj.cate2},on:{update:t.handleSearch}})],1),o("mescroll-vue",{ref:"wordList",staticClass:"wordBoxmescroll",attrs:{down:t.mescrollDown,up:t.mescrollUp},on:{init:t.mescrollInit}},[t._l(t.dataList,(function(e,s){return o("div",{key:e.id,staticClass:"everyword color333",class:{nowordbox:t.nowqid==e.id,firsteveryword:0==s},on:{click:function(o){return t.getwordtap(e)}}},[o("div",{staticClass:"everywordbox relative"},[o("span",{staticClass:"cirbox"}),o("div",{staticClass:"font32 lh44"},[t._v(t._s(e.title))]),o("div",{staticClass:"clearfix mgt8 lh34 font24"},[o("div",{staticClass:"pull-left color9DB6CF"},[t._v(" "+t._s(e.addtime?e.addtime.split(" ")[0]:"")+" ")]),o("div",{staticClass:"pull-right color71C4FF"},[t._v(" 浏览"+t._s(e.view_times?e.view_times:0)+"次 ")])])])])})),o("nonedata",{attrs:{datashow:t.datashow,len:t.dataList.length}})],2),o("wzhload",{directives:[{name:"show",rawName:"v-show",value:t.loadFlag,expression:"loadFlag"}]})],1)},n=[],r=(o("e9c4"),o("99af"),o("b0c0"),o("209e")),i=(o("18a0"),o("a92e")),a=o("8d6b"),l=o("897a"),c={name:"sucessword",data:function(){return{loadFlag:!0,datashow:!1,searchObj:{},sortlist:[{id:1,name:"默认排序",type:"id desc"},{id:2,name:"浏览次数正序",type:"view_times asc"},{id:3,name:"浏览次数倒序",type:"view_times desc"},{id:4,name:"添加时间正序",type:"addtime asc"},{id:5,name:"添加时间倒序",type:"addtime desc"}],filterObj:{house_type:"",order:"",user_cate:"",cate1:""},mescroll:null,mescrollDown:{},mescrollUp:{auto:!1,callback:this.wordfun,page:{num:0,size:10},onScroll:this.onScroll,htmlLoading:"",htmlNodata:"",noMoreSize:5},dataList:[],nowqid:"",scrollTop:0}},components:{MescrollVue:a["a"],nonedata:i["a"],wordFilter:l["a"]},created:function(){this.getword()},methods:{onScroll:function(t,e,o){this.scrollTop=e},getword:function(){var t=this,e={};Object(r["d"])(e).then((function(e){if(0==e.data.code){t.searchObj=e.data.data,t.searchObj.cate2=e.data.data.cates;var o=0;for(var s in e.data.data.cates)o+=1*e.data.data.cates[s].successCount;t.searchObj.cate2.unshift({name:"全部",id:"",successCount:o}),t.searchObj.house_type.unshift({name:"全部",id:""}),t.searchObj.user.unshift({name:"全部",id:""})}}))},handleSearch:function(t){var e=JSON.parse(JSON.stringify(t));this.filterObj={house_type:"全部"!=e.house_type?e.house_type:"",order:e.order,user_cate:"全部"!=e.user_cate?e.user_cate:"",cate1:"全部"!=e.cate2?e.cate2:""},this.mescroll.resetUpScroll()},mescrollInit:function(t){this.mescroll=t},wordfun:function(t,e){var o=this,s={page:t.num,limit:t.size,keyword:"",house_type:this.filterObj.house_type,cate1:this.filterObj.cate1,order:this.filterObj.order,user_cate:this.filterObj.user_cate};Object(r["u"])(s).then((function(s){0==s.data.code&&(1===t.num&&(o.dataList=[]),o.datashow=!0,o.dataList=o.dataList.concat(s.data.data),o.$nextTick((function(){e.endSuccess(s.data.data.length)}))),setTimeout((function(){o.loadFlag=!1}),600)}))},getwordtap:function(t){this.nowqid=t.id,this.$router.push({name:"wordmsg",query:{type:2,qid:t.id}})}},beforeRouteEnter:function(t,e,o){null==e.name||"fineword"==e.name||"answersword"==e.name?t.meta.isBack=!0:t.meta.isBack=!1,o()},activated:function(){this.$route.meta.isBack?this.mescroll.resetUpScroll():this.mescroll.scrollTo(this.scrollTop,2)},mounted:function(){}},p=c,u=(o("46d5"),o("2877")),d=Object(u["a"])(p,s,n,!1,null,"5ca29488",null);e["default"]=d.exports},"99af":function(t,e,o){"use strict";var s=o("23e7"),n=o("da84"),r=o("d039"),i=o("e8b5"),a=o("861d"),l=o("7b0b"),c=o("07fa"),p=o("8418"),u=o("65f0"),d=o("1dde"),h=o("b622"),m=o("2d00"),f=h("isConcatSpreadable"),w=9007199254740991,v="Maximum allowed index exceeded",y=n.TypeError,g=m>=51||!r((function(){var t=[];return t[f]=!1,t.concat()[0]!==t})),b=d("concat"),D=function(t){if(!a(t))return!1;var e=t[f];return void 0!==e?!!e:i(t)},S=!g||!b;s({target:"Array",proto:!0,forced:S},{concat:function(t){var e,o,s,n,r,i=l(this),a=u(i,0),d=0;for(e=-1,s=arguments.length;e<s;e++)if(r=-1===e?i:arguments[e],D(r)){if(n=c(r),d+n>w)throw y(v);for(o=0;o<n;o++,d++)o in r&&p(a,d,r[o])}else{if(d>=w)throw y(v);p(a,d++,r)}return a.length=d,a}})},a92e:function(t,e,o){"use strict";var s=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"nonedata",staticStyle:{margin:"auto"}},[s("div",{directives:[{name:"show",rawName:"v-show",value:"0"==t.len&&t.datashow,expression:"len == '0' && datashow"}],staticClass:"noneDataBox"},[s("img",{attrs:{src:o("0afc")}}),s("div",[t._v(t._s(t.text))])])])},n=[],r=(o("a9e3"),{name:"nonedata",props:{len:{type:Number,default:0},datashow:{type:Boolean,default:!1},text:{type:String,default:"暂无数据展示"}},data:function(){return{}},created:function(){},methods:{},mounted:function(){}}),i=r,a=(o("bf10"),o("2877")),l=Object(a["a"])(i,s,n,!1,null,"e6e9b0c4",null);e["a"]=l.exports},bf10:function(t,e,o){"use strict";o("c93c")},c93c:function(t,e,o){},df1b:function(t,e,o){"use strict";o("226a")},e9c4:function(t,e,o){var s=o("23e7"),n=o("da84"),r=o("d066"),i=o("2ba4"),a=o("e330"),l=o("d039"),c=n.Array,p=r("JSON","stringify"),u=a(/./.exec),d=a("".charAt),h=a("".charCodeAt),m=a("".replace),f=a(1..toString),w=/[\uD800-\uDFFF]/g,v=/^[\uD800-\uDBFF]$/,y=/^[\uDC00-\uDFFF]$/,g=function(t,e,o){var s=d(o,e-1),n=d(o,e+1);return u(v,t)&&!u(y,n)||u(y,t)&&!u(v,s)?"\\u"+f(h(t,0),16):t},b=l((function(){return'"\\udf06\\ud834"'!==p("\udf06\ud834")||'"\\udead"'!==p("\udead")}));p&&s({target:"JSON",stat:!0,forced:b},{stringify:function(t,e,o){for(var s=0,n=arguments.length,r=c(n);s<n;s++)r[s]=arguments[s];var a=i(p,null,r);return"string"==typeof a?m(a,w,g):a}})},f2fd:function(t,e,o){},f868:function(t,e,o){var s,n;(function(r,i){s=i,n="function"===typeof s?s.call(e,o,e,t):s,void 0===n||(t.exports=n)})(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,n=!!s.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),r="undefined"===typeof window.orientation,i=s.indexOf("Android")>-1||s.indexOf("Adr")>-1;o.os={ios:n,pc:r,android:i},o.isDownScrolling=!1,o.isUpScrolling=!1;var a=o.options.down&&o.options.down.callback;o.initDownScroll(),o.initUpScroll(),setTimeout((function(){o.optDown.use&&o.optDown.auto&&a&&(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),n=s.y-t.startPoint.y;if(n>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 r=Math.abs(t.lastPoint.x-s.x),i=Math.abs(t.lastPoint.y-s.y),a=Math.sqrt(r*r+i*i);if(0!==a){var l=Math.asin(i/a)/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 c=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+=c*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+=c>0?c*t.optDown.outOffsetRate:c),t.downwarp.style.height=t.downHight+"px";var p=t.downHight/t.optDown.offset;t.optDown.onMoving(t,p,t.downHight)}}else if(n<0){var u=t.getScrollHeight(),d=t.getClientHeight(),h=u-d-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)&&(d+t.optUp.offset>=u||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 n=e.optUp.toTop;if((n.src||n.html)&&(t>=n.offset?e.showTopBtn():e.hideTopBtn()),e.optUp.lazyLoad.use){var r=(new Date).getTime();e.lazyTimer&&clearTimeout(e.lazyTimer),r-e.lazyStartTime>=e.optUp.lazyLoad.delay?(e.lazyStartTime=r,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 n=o.classList;if(n){if(n.contains("mescroll")||n.contains("mescroll-touch")){s=!1;break}if(n.contains("mescroll-touch-x")||n.contains("mescroll-touch-y")){var r=t.touches?t.touches[0].pageX:t.clientX,i=t.touches?t.touches[0].pageY:t.clientY;e.preWinX||(e.preWinX=r),e.preWinY||(e.preWinY=i);var a=Math.abs(e.preWinX-r),l=Math.abs(e.preWinY-i),c=Math.sqrt(a*a+l*l);if(e.preWinX=r,e.preWinY=i,0!==c){var p=Math.asin(l/c)/Math.PI*180;if(p<=45&&n.contains("mescroll-touch-x")||p>45&&n.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 n=(this.optUp.page.num-1)*this.optUp.page.size+t;s=n<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 n;if(null!=t){var r=s.optUp.page.num,i=s.optUp.page.size;if(1===r&&(s.clearDataList(),o&&(s.optUp.page.time=o)),t<i||!1===e)if(s.optUp.hasNext=!1,0===t&&1===r)n=!1,s.showEmpty();else{var a=(r-1)*i+t;n=!(a<s.optUp.noMoreSize),s.removeEmpty()}else n=!1,s.optUp.hasNext=!0,s.removeEmpty()}var l=!s.optUp.hasNext;s.endUpScroll(n,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 n="";if(e.icon&&(n+='<img class="empty-icon" src="'+e.icon+'"/>'),e.tip&&(n+='<p class="empty-tip">'+e.tip+"</p>"),e.btntext&&(n+='<p class="empty-btn">'+e.btntext+"</p>"),t.emptyDom=document.createElement("div"),t.emptyDom.className="mescroll-empty",t.emptyDom.innerHTML=n,s.appendChild(t.emptyDom),e.btnClick){var r=t.emptyDom.getElementsByClassName("empty-btn")[0];e.supportTap?r.addEventListener("tap",(function(o){o.stopPropagation(),t.preventDefault(o),e.btnClick()})):r.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(),n=t;if(n>0){var r=o.getScrollHeight()-o.getClientHeight();n>r&&(n=r)}else n=0;o.isScrollTo=!0,o.scrollDom.style.webkitOverflowScrolling="auto",o.getStep(s,n,(function(t){o.setScrollTop(t),t===n&&(o.scrollDom.style.webkitOverflowScrolling="touch",o.isScrollTo=!1)}),e)},t.prototype.getStep=function(t,e,o,s,n){var r=e-t;if(0!==s&&0!==r){s=s||300,n=n||30;var i=s/n,a=r/i,l=0,c=window.setInterval((function(){l<i-1?(t+=a,o&&o(t,c),l++):(o&&o(e,c),window.clearInterval(c))}),n)}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 n=t[s];if("true"!==n.getAttribute(e.lazyTag)&&e.isInSee(n,e.optUp.lazyLoad.offset)){var r=n.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=r,n.setAttribute(e.lazyTag,"true"),i.dom=n}}}),o);return s},t.prototype.isInSee=function(t,e){e=e||0;var o=this.getOffsetTop(t),s=this.getScrollTop()-e,n=o+t.offsetHeight,r=s+e+this.getClientHeight()+e;return o<r&&o>=s||n<=r&&n>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}))}}]);
|