Commit 30757721ba9f54762955e57f7d83e8e4bfbf7042
1 parent
ba4d63d7
刷新达人详情页信息接口
Showing
1 changed file
with
12 additions
and
0 deletions
src/pages/newDaren/newDaren.vue
| ... | ... | @@ -134,6 +134,18 @@ export default { |
| 134 | 134 | // 达人最新动态 |
| 135 | 135 | this.getNewDynamicList(); |
| 136 | 136 | }, |
| 137 | + mounted () { | |
| 138 | + // 页面显示监听 | |
| 139 | + document.addEventListener('visibilitychange', () => { | |
| 140 | + | |
| 141 | + // 页面显示出来了 | |
| 142 | + if (document.hidden === false) { | |
| 143 | + | |
| 144 | + // 刷新达人详情页信息接口 | |
| 145 | + this.newDarenIndex(); | |
| 146 | + } | |
| 147 | + }); | |
| 148 | + }, | |
| 137 | 149 | methods: { |
| 138 | 150 | /** |
| 139 | 151 | * 达人最新动态 | ... | ... |