"use strict";const t=require("../../../common/vendor.js"),e=require("../../../request/api.js"),o=require("../../../utils/util.js"),a=require("../../../common/assets.js"),i={data:()=>({navH:t.inject("navHeight"),followList:[],page:1,loadAll:!1,getRateStr:o.getRateStr,getRateUpOrDown:o.getRateUpOrDown,getLocaleTime:o.getLocaleTime}),onLoad(){this.getFollowCollectListData()},onPullDownRefresh(){this.page=1,this.getFollowCollectListData()},onReachBottom(){this.loadAll||(this.page++,this.getFollowCollectListData())},methods:{clickLookRelatedStockItem(e,o){t.index.navigateTo({url:"/pages/index/stockDetails/stockDetails?type=1&code="+o+"&id="+e})},clickFollowEvent(o,a){e.followEvent(o).then((e=>{t.index.showToast({title:e.message,icon:"none"}),this.followList.splice(a,1)})).catch((t=>{}))},clickEventItem(e){t.index.navigateTo({url:"/pages/index/eventDetails/eventDetails?id="+e})},getFollowCollectListData(){let o={page:this.page,type:"follows"};e.userActivityList(o).then((e=>{200==e.code?(1==e.data.current_page?this.followList=e.data.activities:this.followList=this.followList.concat(e.data.activities),e.data.current_page==e.data.pages&&(this.loadAll=!0)):t.index.showToast({title:e.message,icon:"none"})})).catch((t=>{}))}}};if(!Array){t.resolveComponent("navBar")()}Math;const l=t._export_sfc(i,[["render",function(e,o,i,l,n,s){return{a:t.p({leftText:"关注收藏"}),b:a._imports_0,c:t.f(n.followList,((e,o,i)=>t.e({a:t.t(e.importance),b:t.n("level "+e.importance),c:t.t(e.event_title),d:t.t(e.event_description),e:n.getRateUpOrDown(e.related_avg_chg)},n.getRateUpOrDown(e.related_avg_chg)?{f:a._imports_1$1}:{g:a._imports_2$1},{h:t.t(n.getRateStr(e.related_avg_chg)),i:t.n("rateItem "+(n.getRateUpOrDown(e.related_avg_chg)?"down":"up")),j:n.getRateUpOrDown(e.related_max_chg)},n.getRateUpOrDown(e.related_max_chg)?{k:a._imports_1$1}:{l:a._imports_2$1},{m:t.t(n.getRateStr(e.related_max_chg)),n:t.n("rateItem "+(n.getRateUpOrDown(e.related_max_chg)?"down":"up")),o:n.getRateUpOrDown(e.related_week_chg)},n.getRateUpOrDown(e.related_week_chg)?{p:a._imports_1$1}:{q:a._imports_2$1},{r:t.t(n.getRateStr(e.related_week_chg)),s:t.n("rateItem "+(n.getRateUpOrDown(e.related_week_chg)?"down":"up")),t:t.f(e.related_stocks,((o,a,i)=>({a:t.t(o.stock_name),b:t.t((n.getRateUpOrDown(o.daily_change)?"":"+")+o.daily_change),c:a,d:t.o((t=>s.clickLookRelatedStockItem(e.event_id,o.stock_code)),a)}))),v:t.t(n.getLocaleTime(e.created_at)),w:t.t(e.view_count),x:t.t(e.comment_count),y:t.t(e.follower_count),z:t.o((t=>s.clickFollowEvent(e.event_id,o)),o),A:t.o((t=>s.clickEventItem(e.event_id)),o),B:o}))),d:a._imports_3$1,e:a._imports_4,f:a._imports_5$3,g:t.s("top:"+n.navH+"px;")}}]]);wx.createPage(l);
