index.js 6.3 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/index"],{"088a":function(t,e,n){"use strict";n.r(e);var r=n("b438"),i=n("1529");for(var a in i)"default"!==a&&function(t){n.d(e,t,(function(){return i[t]}))}(a);n("e973");var o,s=n("f0c5"),u=Object(s["a"])(i["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],o);e["default"]=u.exports},1529:function(t,e,n){"use strict";n.r(e);var r=n("faa1"),i=n.n(r);for(var a in r)"default"!==a&&function(t){n.d(e,t,(function(){return r[t]}))}(a);e["default"]=i.a},"69dc":function(t,e,n){},b438:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return r}));var r={faNavbar:function(){return n.e("components/fa-navbar/fa-navbar").then(n.bind(null,"6858"))},faSearch:function(){return n.e("components/fa-search/fa-search").then(n.bind(null,"ddd4"))},faOrderbySelect:function(){return n.e("components/fa-orderby-select/fa-orderby-select").then(n.bind(null,"26d0"))},uSwiper:function(){return n.e("uview-ui/components/u-swiper/u-swiper").then(n.bind(null,"7570"))},faArticleItem:function(){return n.e("components/fa-article-item/fa-article-item").then(n.bind(null,"b61a"))},uEmpty:function(){return n.e("uview-ui/components/u-empty/u-empty").then(n.bind(null,"34ad"))},uLoadmore:function(){return n.e("uview-ui/components/u-loadmore/u-loadmore").then(n.bind(null,"340d"))},uBackTop:function(){return n.e("uview-ui/components/u-back-top/u-back-top").then(n.bind(null,"ad8f"))},faTabbar:function(){return Promise.all([n.e("common/vendor"),n.e("components/fa-tabbar/fa-tabbar")]).then(n.bind(null,"ecd8"))}},i=function(){var t=this,e=t.$createElement,n=(t._self._c,{color:t.theme.bgColor});t.$mp.data=Object.assign({},{$root:{a0:n}})},a=[]},b739:function(t,e,n){"use strict";(function(t){n("630e");r(n("66fd"));var e=r(n("088a"));function r(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("f266")["createPage"])},e973:function(t,e,n){"use strict";var r=n("69dc"),i=n.n(r);i.a},faa1:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n("a34a"));function i(t){return t&&t.__esModule?t:{default:t}}function a(t){return c(t)||u(t)||s(t)||o()}function o(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(t,e){if(t){if("string"===typeof t)return f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(t,e):void 0}}function u(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function c(t){if(Array.isArray(t))return f(t)}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function h(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?h(Object(n),!0).forEach((function(e){d(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function d(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p(t,e,n,r,i,a,o){try{var s=t[a](o),u=s.value}catch(c){return void n(c)}s.done?e(u):Promise.resolve(u).then(r,i)}function b(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var a=t.apply(e,n);function o(t){p(a,r,i,o,s,"next",t)}function s(t){p(a,r,i,o,s,"throw",t)}o(void 0)}))}}var m={computed:{bannerList:function(){return this.vuex_config.bannerList?this.vuex_config.bannerList:[]},is_order:function(){return this.filterList.length>0||this.orderList.length>0}},data:function(){return{tabwidth:40,current:0,status:"nomore",page:1,channel_id:0,filterList:[],orderList:[],archivesList:[],is_show:!1,has_more:!1,scrollTop:0,is_update:!1,params:{},query:{},isTab:!1,tabList:[],is_empty:!1,channel:{}}},onLoad:function(t){var e=this.$Route.query;"{}"==JSON.stringify(e)&&(e=t),e&&"{}"!=JSON.stringify(e)?this.params=e:this.params={channel:-1,model:-1},this.getCategory(),this.getArchives()},onShow:function(){},methods:{change:function(t){this.tabwidth=30*this.$util.strlen(this.tabList[t].title),this.current=t,this.channel_id=this.tabList[t].id,this.is_update=!0,this.page=1,this.getArchives()},goOrderBy:function(t){this.page=1,this.is_update=!0,this.query=t,this.getArchives()},getArchives:function(){var e=b(r.default.mark((function e(){var n,i,o,s,u,c,f;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=l(l({page:this.page},this.params),this.query),this.channel_id&&(n.channel=this.channel_id),e.next=4,this.$api.getArchives(n);case 4:if(i=e.sent,this.status="nomore",t.stopPullDownRefresh(),i.code){e.next=9;break}return e.abrupt("return");case 9:o=i.data,s=o.filterList,u=o.orderList,c=o.pageList,f=o.channel,this.filterList=s,this.orderList=u,this.channel=f,this.is_update&&(this.is_update=!1,this.archivesList=[]),this.is_show=!0,this.has_more=c.current_page<c.last_page,this.archivesList=[].concat(a(this.archivesList),a(c.data)),this.is_empty=!this.archivesList.length;case 18:case"end":return e.stop()}}),e,this)})));function n(){return e.apply(this,arguments)}return n}(),getCategory:function(){var t=this;this.$api.getCategory(l({},this.params)).then((function(e){1==e.code?(t.tabList=e.data,t.isTab=!0):t.$u.toast(e.msg)}))},openPage:function(t){var e=this.bannerList[t].url;if("/"!=e&&e){if("p"==e.substr(0,1)&&(e="/"+e),-1!=e.indexOf("http"))return this.$u.vuex("vuex_webs",this.bannerList[t]),void this.$u.route("/pages/webview/webview");this.$Router.push({path:e})}}},onPageScroll:function(t){this.scrollTop=t.scrollTop},onPullDownRefresh:function(){this.is_update=!0,this.page=1,this.getArchives()},onReachBottom:function(){this.has_more&&(this.status="loading",this.page=++this.page,this.getArchives())}};e.default=m}).call(this,n("f266")["default"])}},[["b739","common/runtime","common/vendor"]]]);