myarticle.js 4.6 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/publish/myarticle"],{"083a":function(t,n,e){},"18c4":function(t,n,e){"use strict";e.r(n);var i=e("91a5"),a=e.n(i);for(var o in i)"default"!==o&&function(t){e.d(n,t,(function(){return i[t]}))}(o);n["default"]=a.a},"48b9":function(t,n,e){"use strict";var i=e("083a"),a=e.n(i);a.a},7520:function(t,n,e){"use strict";(function(t){e("630e");i(e("66fd"));var n=i(e("aaf0"));function i(t){return t&&t.__esModule?t:{default:t}}t(n.default)}).call(this,e("5486")["createPage"])},"8dfd":function(t,n,e){"use strict";var i=e("ef9b"),a=e.n(i);a.a},"91a5":function(t,n,e){"use strict";function i(t){return u(t)||r(t)||o(t)||a()}function a(){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 o(t,n){if(t){if("string"===typeof t)return s(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?s(t,n):void 0}}function r(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function u(t){if(Array.isArray(t))return s(t)}function s(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,i=new Array(n);e<n;e++)i[e]=t[e];return i}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var c={onLoad:function(){this.getmyArchives()},data:function(){return{isTab:!1,tabwidth:40,tabList:[],current:0,scrollTop:0,list:[],status:"loadmore",has_more:!1,page:1,channel_id:0,is_update:!1,options:[]}},methods:{change:function(t){this.tabwidth=30*this.$util.strlen(this.tabList[t].name),this.current=t,this.channel_id=this.tabList[t].id,this.page=1,this.is_update=!0,this.getmyArchives()},getmyArchives:function(){var t=this;this.$api.myArchives({page:this.page,channel_id:this.channel_id}).then((function(n){if(t.status="loadmore",n.code){t.is_update&&(t.list=[],t.is_update=!1),t.tabList.length<=n.data.channelList.length&&(t.tabList=[{name:"全部",id:0}].concat(i(n.data.channelList)),t.options=[{text:"编辑",style:{backgroundColor:t.theme.bgColor}},{text:"删除",style:{backgroundColor:"#dd524d"}}]);var e=n.data.archivesList;e.data.map((function(t){t.show=!1})),t.list=t.list.concat(e.data),t.has_more=e.last_page>e.current_page,t.isTab||(t.isTab=!0)}else t.$u.toast(n.msg)}))},click:function(t,n){var e=this;1==n?this.$api.deleteArchives({id:this.list[t].id}).then((function(n){e.$u.toast(n.msg),n.code&&e.list.splice(t,1)})):this.$Router.push({path:"/pages/publish/channel",query:{archives_id:this.list[t].id}})},open:function(t){var n=this;this.list[t].show=!0,this.list.map((function(e,i){t!=i&&(n.list[i].show=!1)}))},goDetail:function(t){2==t.model_id?this.$Router.push({path:"/pages/product/detail",query:{id:t.id}}):this.$Router.push({path:"/pages/article/detail",query:{id:t.id}})}},onPageScroll:function(t){this.scrollTop=t.scrollTop},onReachBottom:function(){this.has_more&&(this.status="loading",this.page++,this.getmyArchives())}};n.default=c},aaf0:function(t,n,e){"use strict";e.r(n);var i=e("b1c7"),a=e("18c4");for(var o in a)"default"!==o&&function(t){e.d(n,t,(function(){return a[t]}))}(o);e("8dfd"),e("48b9");var r,u=e("f0c5"),s=Object(u["a"])(a["default"],i["b"],i["c"],!1,null,"53fa72d2",null,!1,i["a"],r);n["default"]=s.exports},b1c7:function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"c",(function(){return o})),e.d(n,"a",(function(){return i}));var i={faNavbar:function(){return e.e("components/fa-navbar/fa-navbar").then(e.bind(null,"6858"))},faUTabs:function(){return Promise.all([e.e("common/vendor"),e.e("components/fa-u-tabs/fa-u-tabs")]).then(e.bind(null,"e0b8"))},uSwipeAction:function(){return e.e("uview-ui/components/u-swipe-action/u-swipe-action").then(e.bind(null,"244c"))},uTag:function(){return e.e("uview-ui/components/u-tag/u-tag").then(e.bind(null,"a8f0"))},uLoadmore:function(){return e.e("uview-ui/components/u-loadmore/u-loadmore").then(e.bind(null,"340d"))},uEmpty:function(){return e.e("uview-ui/components/u-empty/u-empty").then(e.bind(null,"34ad"))},uBackTop:function(){return e.e("uview-ui/components/u-back-top/u-back-top").then(e.bind(null,"ad8f"))},faTabbar:function(){return Promise.all([e.e("common/vendor"),e.e("components/fa-tabbar/fa-tabbar")]).then(e.bind(null,"ecd8"))}},a=function(){var t=this,n=t.$createElement,e=(t._self._c,t.__map(t.list,(function(n,e){var i=t.__get_orig(n),a=t._f("date")(n.publishtime,"yyyy-mm-dd hh:MM:ss");return{$orig:i,f0:a}}))),i={color:t.theme.bgColor};t.$mp.data=Object.assign({},{$root:{l0:e,a0:i}})},o=[]},ef9b:function(t,n,e){}},[["7520","common/runtime","common/vendor"]]]);