| | |
| | | <div class="tab-item" style="cursor: pointer;" :class="{active:currentIndex==5}" @click="currentIndex=5">通知通告</div> |
| | | </div> |
| | | <div class="right-3-list" v-loading="listLoading"> |
| | | <scroll-pagination @load="getList" :finishLoding="finishLoding"> |
| | | <scroll-pagination @load="getList" :finishLoding="finishLoding" :list="list"> |
| | | <div class="list3-item" v-for="(m,i) in list" :key="i"> |
| | | <div class="list3-item-title"> |
| | | <img src="../../../static/img/index-tip.svg" alt=""> |
| | |
| | | total: null, |
| | | listLoading: true, // 组件loading的展示,默认为true |
| | | finishLoding: false, // 加载完成,显示已经没有更多了 |
| | | timer:null |
| | | timer:null, |
| | | keyMap:{}, |
| | | } |
| | | }, |
| | | watch:{ |
| | |
| | | this.getScheduleByMe() |
| | | }, |
| | | currentIndex(){ |
| | | this.keyMap = {} |
| | | this.currentPage = 1; |
| | | this.list = []; |
| | | this.getList(); |
| | |
| | | this.weekdays = this.getWeekdaysForNextWeek() |
| | | this.init(); |
| | | this.currentPage = 1; |
| | | this.keyMap = {} |
| | | this.list = []; |
| | | this.getList(); |
| | | this.getScheduleByMe() |
| | |
| | | this.timer = setInterval(() => { |
| | | this.init(); |
| | | this.currentPage = 1; |
| | | this.keyMap = {} |
| | | this.list = []; |
| | | this.getList(); |
| | | this.getScheduleByMe() |
| | |
| | | }, |
| | | methods: { |
| | | getList(){ |
| | | const key = `_${this.currentPage}` |
| | | const value = this.keyMap[key] |
| | | // 如果value存在,表示缓存有值,那么阻止请求 |
| | | if(value) { |
| | | return |
| | | } |
| | | // value不存在,表示第一次请求,设置占位 |
| | | this.keyMap[key] = 'temp' |
| | | if(this.currentPage==1){ |
| | | this.listLoading = true |
| | | } |