|
5 | 5 |
|
6 | 6 | import{typesasT,getParent,Instance}from'mobx-state-tree'
|
7 | 7 |
|
8 |
| -importtype{TRootStore,TAccount,TC11N,TArticle,TCommunity}from'@/spec' |
9 |
| -import{METRIC}from'@/constant' |
| 8 | +importtype{ |
| 9 | +TRootStore, |
| 10 | +TAccount, |
| 11 | +TC11N, |
| 12 | +TArticle, |
| 13 | +TCommunity, |
| 14 | +TOnlineStatus, |
| 15 | +}from'@/spec' |
| 16 | +import{METRIC,HCN}from'@/constant' |
10 | 17 | import{markStates,toJS}from'@/utils/mobx'
|
11 | 18 |
|
12 | 19 | // import { VIEW, TFooterView } from './constants'
|
@@ -40,6 +47,22 @@ const FooterStore = T.model('FooterStore', {
|
40 | 47 | returntoJS(root.viewing.community)
|
41 | 48 | },
|
42 | 49 |
|
| 50 | +gettotalSubscribes():number{ |
| 51 | +constslf=selfasTStore |
| 52 | +const{ curCommunity}=slf |
| 53 | + |
| 54 | +if(curCommunity.raw===HCN){ |
| 55 | +returncurCommunity.subscribersCount |
| 56 | +} |
| 57 | + |
| 58 | +return0 |
| 59 | +}, |
| 60 | +getonlineStatus():TOnlineStatus{ |
| 61 | +constslf=selfasTStore |
| 62 | +const{ totalSubscribes, realtimeVisitors}=slf |
| 63 | + |
| 64 | +return{ totalSubscribes, realtimeVisitors} |
| 65 | +}, |
43 | 66 | // get type(): TFooterView {
|
44 | 67 | // const root = getParent(self) as TRootStore
|
45 | 68 | // if (root.viewing.community.raw === HCN) return VIEW.HOME
|
|