Commit 57733a86d8d251ded4b3d6b9735a7d918823c93e
1 parent
301064dd
刷新积分商城积分信息
Showing
1 changed file
with
13 additions
and
1 deletions
src/pages/pointsMall/pointsMall.vue
| ... | ... | @@ -430,7 +430,7 @@ export default { |
| 430 | 430 | // 设置标题 |
| 431 | 431 | this.$set(this.backs, 'title', '积分商城'); |
| 432 | 432 | } |
| 433 | - // 获取商品信息接口 | |
| 433 | + // 获取积分商城商品信息接口 | |
| 434 | 434 | this.integralMallIndex(); |
| 435 | 435 | }, |
| 436 | 436 | mounted () { |
| ... | ... | @@ -445,8 +445,20 @@ export default { |
| 445 | 445 | }); |
| 446 | 446 | } |
| 447 | 447 | } |
| 448 | + | |
| 448 | 449 | // 监听滚动条,设置滚动条推动渐变颜色和图片 |
| 449 | 450 | window.addEventListener("scroll", this.onPageScrollFun, true); |
| 451 | + | |
| 452 | + // 页面显示监听 | |
| 453 | + document.addEventListener('visibilitychange', () => { | |
| 454 | + | |
| 455 | + // 页面显示出来了 | |
| 456 | + if (document.hidden === false) { | |
| 457 | + | |
| 458 | + // 获取积分商城商品信息接口 | |
| 459 | + this.integralMallIndex(); | |
| 460 | + } | |
| 461 | + }); | |
| 450 | 462 | } |
| 451 | 463 | } |
| 452 | 464 | </script> | ... | ... |