user.js 4.9 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/user/user"],{3528:function(t,e,n){"use strict";var a=n("9090"),r=n.n(a);r.a},"728c":function(t,e,n){},"88a0":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=n("59de");function r(t){return s(t)||u(t)||o(t)||i()}function i(){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,e){if(t){if("string"===typeof t)return c(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)?c(t,e):void 0}}function u(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function s(t){if(Array.isArray(t))return c(t)}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n<e;n++)a[n]=t[n];return a}var d={mixins:[a.avatar],computed:{wavetop:function(){return this.$u.http.config.baseUrl+"/assets/addons/cms/img/wave-top.png"},wavemiddle:function(){return this.$u.http.config.baseUrl+"/assets/addons/cms/img/wave-mid.png"},wavebottom:function(){return this.$u.http.config.baseUrl+"/assets/addons/cms/img/wave-bot.png"},isBind:function(){return!1}},onLoad:function(t){var e=this.$Route.query||t||{};this.user_id=e.user_id||e.uid||"",this.getUserIndex()},data:function(){return{url:"",tabwidth:150,userInfo:{},user_id:0,tableList:[{name:"他的文章(0)",type:"archives"},{name:"他的评论(0)",type:"comments"}],current:0,list:[],is_update:!1,has_more:!1,status:"nomore",scrollTop:0,page:1}},methods:{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}})},getUserIndex:function(){var e=this;this.$api.getUserInfo({user_id:this.user_id,type:this.tableList[this.current].type,page:this.page}).then((function(n){if(!n.code)return e.$u.toast(n.msg),void setTimeout((function(){t.navigateBack({delta:1})}),1e3);e.status="nomore",e.is_update&&(e.is_update=!1,e.list=[]),e.tableList=[{name:"他的文章(".concat(n.data.archives,")"),type:"archives"},{name:"他的评论(".concat(n.data.comments,")"),type:"comments"}],e.userInfo=n.data.user,e.list=[].concat(r(e.list),r(n.data.list.data)),e.has_more=n.data.list.last_page>n.data.list.current_page}))},change:function(t){this.tabwidth=30*this.$util.strlen(this.tableList[t].name),this.current=t,this.page=1,this.is_update=!0,this.getUserIndex()}},onPageScroll:function(t){this.scrollTop=t.scrollTop},onReachBottom:function(){this.has_more&&(this.status="loading",this.page++,this.getUserIndex())}};e.default=d}).call(this,n("5486")["default"])},"8dfe":function(t,e,n){"use strict";var a=n("728c"),r=n.n(a);r.a},9090:function(t,e,n){},"916d":function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return a}));var a={faNavbar:function(){return n.e("components/fa-navbar/fa-navbar").then(n.bind(null,"6858"))},uAvatar:function(){return n.e("uview-ui/components/u-avatar/u-avatar").then(n.bind(null,"3108"))},faUTabs:function(){return Promise.all([n.e("common/vendor"),n.e("components/fa-u-tabs/fa-u-tabs")]).then(n.bind(null,"e0b8"))},uGap:function(){return n.e("uview-ui/components/u-gap/u-gap").then(n.bind(null,"71a3"))},uImage:function(){return n.e("uview-ui/components/u-image/u-image").then(n.bind(null,"9406"))},uTag:function(){return n.e("uview-ui/components/u-tag/u-tag").then(n.bind(null,"a8f0"))},uBackTop:function(){return n.e("uview-ui/components/u-back-top/u-back-top").then(n.bind(null,"ad8f"))},uLoadmore:function(){return n.e("uview-ui/components/u-loadmore/u-loadmore").then(n.bind(null,"340d"))},faTabbar:function(){return Promise.all([n.e("common/vendor"),n.e("components/fa-tabbar/fa-tabbar")]).then(n.bind(null,"ecd8"))}},r=function(){var t=this,e=t.$createElement,n=(t._self._c,t.current?null:t.__map(t.list,(function(e,n){var a=t.__get_orig(e),r=t._f("timeFrom")(e.createtime,"yyyy-mm-dd");return{$orig:a,f0:r}}))),a={color:t.theme.bgColor};t.$mp.data=Object.assign({},{$root:{l0:n,a0:a}})},i=[]},c721:function(t,e,n){"use strict";(function(t){n("630e");a(n("66fd"));var e=a(n("ec56"));function a(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("5486")["createPage"])},d9d9:function(t,e,n){"use strict";n.r(e);var a=n("88a0"),r=n.n(a);for(var i in a)"default"!==i&&function(t){n.d(e,t,(function(){return a[t]}))}(i);e["default"]=r.a},ec56:function(t,e,n){"use strict";n.r(e);var a=n("916d"),r=n("d9d9");for(var i in r)"default"!==i&&function(t){n.d(e,t,(function(){return r[t]}))}(i);n("3528"),n("8dfe");var o,u=n("f0c5"),s=Object(u["a"])(r["default"],a["b"],a["c"],!1,null,"4ed295c8",null,!1,a["a"],o);e["default"]=s.exports}},[["c721","common/runtime","common/vendor"]]]);