mytrends.js 4.0 KB

1
  1. require('../../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["mine/pages/trends/mytrends"],{"07c2":function(t,e,a){"use strict";var n=a("cbf8"),i=a.n(n);i.a},"20a8":function(t,e,a){"use strict";a.r(e);var n=a("e23c"),i=a.n(n);for(var r in n)["default"].indexOf(r)<0&&function(t){a.d(e,t,(function(){return n[t]}))}(r);e["default"]=i.a},5612:function(t,e,a){"use strict";a.d(e,"b",(function(){return n})),a.d(e,"c",(function(){return i})),a.d(e,"a",(function(){}));var n=function(){var t=this,e=t.$createElement,a=(t._self._c,t.__map(t.list,(function(e,a){var n=t.__get_orig(e),i=e.photo.length;return{$orig:n,g0:i}}))),n=t.wtdt&&t.list.length;t.$mp.data=Object.assign({},{$root:{l0:a,g1:n}})},i=[]},"5bb7":function(t,e,a){"use strict";(function(t,e){var n=a("4ea4");a("11d3"),a("5c17");n(a("66fd"));var i=n(a("81ab"));t.__webpack_require_UNI_MP_PLUGIN__=a,e(i.default)}).call(this,a("bc2e")["default"],a("543d")["createPage"])},"81ab":function(t,e,a){"use strict";a.r(e);var n=a("5612"),i=a("20a8");for(var r in i)["default"].indexOf(r)<0&&function(t){a.d(e,t,(function(){return i[t]}))}(r);a("07c2");var o=a("f0c5"),s=Object(o["a"])(i["default"],n["b"],n["c"],!1,null,"002ba59e",null,!1,n["a"],void 0);e["default"]=s.exports},cbf8:function(t,e,a){},e23c:function(t,e,a){"use strict";(function(t){var n=a("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=a("55e8"),r=a("1214"),o=n(a("1efe")),s=o.default.baseUrl,c={data:function(){return{addimg:a("c9bb"),tablist:[{tit:"我的动态",val:1},{tit:"我的点赞",val:2},{tit:"我的收藏",val:3}],pageSize:10,pageNum:1,tabidx:1,reachflag:!0,wtdt:"",baseUrl:"",list:""}},onUnload:function(){t.$off("refreshdatalis")},onLoad:function(){var e=this;t.$on("refreshdatalis",(function(a){t.$emit("refreshdatalist"),e.reachflag=!0,e.pageNum=1,e.list=[],e.getDataFn()})),this.baseUrl=s,this.getDataFn()},onReachBottom:function(){this.reachflag&&(this.pageNum++,this.getDataFn())},methods:{getCheck:function(t){this.tabidx=t},judgeDate:function(t){var e=new Date;e.setDate(e.getDate()-1);var a=this.ge_time_format(e),n=new Date;n.setTime(n.getTime());var i=this.ge_time_format(n);if(t.split(" ")[0]==i){var r={type:1,tit:"今天"};return r}if(t.split(" ")[0]==a){r={type:1,tit:"昨天"};return r}var o=this.ge_format(t),s=o.split("-");r={type:2,tit:s};return r},ge_time_format:function(t){if(t)var e=new Date(t);else e=new Date;var a=e.getFullYear(),n=e.getMonth()+1,i=e.getDate();n<10&&(n="0"+n),i<10&&(i="0"+i);var r=a+"-"+n+"-"+i;return r},ge_format:function(t){if(t)var e=new Date(t);else e=new Date;var a=e.getFullYear(),n=e.getMonth()+1,i=e.getDate();i<10&&(i="0"+i);var r=a+"-"+n+"-"+i;return r},getphotoFn:function(){var e=this;t.chooseImage({count:9,success:function(a){var n=a.tempFilePaths;if(n.length>9)t.showToast({title:"最多上传9张图片",icon:"none",duration:2e3});else{var i=a.tempFilePaths.length;(0,r.uploadmore)("/common/upload",n,0,0,0,i,[],(function(t){e.$tab.navigateTo("/mine/pages/trends/addtrend?data="+encodeURIComponent(JSON.stringify(t)))}))}}})},getDetail:function(t){this.$tab.navigateTo("/mine/pages/trends/trenddetail?id="+t)},getPreview:function(e,a){var n=this,i=[];e.forEach((function(t){var e=n.baseUrl+t;i.push(e)})),t.previewImage({urls:i,current:a,success:function(t){},fail:function(t){}})},getDataFn:function(){var t=this,e={pageSize:this.pageSize,pageNum:this.pageNum};(0,i.getNoticeMy)(e).then((function(e){if(200==e.code){if(e.rows.length<t.pageSize)t.reachflag=!1,t.wtdt="到底了~";else{var a=parseInt(e.rows.length)+parseInt(t.pageSize)*parseInt(t.pageNum-1);a<e.total?(t.reachflag=!0,t.wtdt="上拉加载更多"):(t.reachflag=!1,t.wtdt="到底了~")}var n=e.rows||[];n.length&&n.forEach((function(e){e.createTime?e.time=t.judgeDate(e.createTime):e.time="",e.image?e.photo=e.image.split(","):e.photo=[]})),1==t.pageNum?t.list=n:t.list=t.list.concat(n)}else t.$toast(e.msg)}))}}};e.default=c}).call(this,a("543d")["default"])}},[["5bb7","common/runtime","common/vendor","mine/common/vendor"]]]);