|
@@ -17,7 +17,7 @@
|
|
</div>
|
|
</div>
|
|
<div class="sidebar-block">
|
|
<div class="sidebar-block">
|
|
<div class="awardTitle">中奖名单</div>
|
|
<div class="awardTitle">中奖名单</div>
|
|
- <list-scroll></list-scroll>
|
|
|
|
|
|
+ <list-scroll :listData="listScrollData"></list-scroll>
|
|
|
|
|
|
<!-- <div class="avatar">
|
|
<!-- <div class="avatar">
|
|
<el-avatar fit="fill" :size="65" :src="avatar"></el-avatar>
|
|
<el-avatar fit="fill" :size="65" :src="avatar"></el-avatar>
|
|
@@ -121,7 +121,7 @@
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
import { mapGetters } from 'vuex'
|
|
import { mapGetters } from 'vuex'
|
|
-import { indexList } from "@/api/allApi";
|
|
|
|
|
|
+import { indexList,winningList } from "@/api/allApi";
|
|
import listScroll from '@/components/list-scroll.vue';
|
|
import listScroll from '@/components/list-scroll.vue';
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
@@ -129,32 +129,9 @@ export default {
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- noticeList: [
|
|
|
|
- { id: 1, text: '放低姿态' },
|
|
|
|
- { id: 2, text: '努力进取' },
|
|
|
|
- { id: 3, text: '勇于探索' },
|
|
|
|
- { id: 4, text: '乐于分享' }
|
|
|
|
- ],
|
|
|
|
- activitykist: [
|
|
|
|
- // {
|
|
|
|
- // status:0,
|
|
|
|
- // statusName:'未参加',
|
|
|
|
- // name:'每日签到',
|
|
|
|
- // img:'https://xiaoyou.dgtis.com/images/image/2024/08/23/xd5idemwj5itooa9t2ee.jpg'
|
|
|
|
- // },
|
|
|
|
- // {
|
|
|
|
- // status:1,
|
|
|
|
- // statusName:'已参加',
|
|
|
|
- // name:'每周竞技',
|
|
|
|
- // img:'https://xiaoyou.dgtis.com/images/image/2024/08/23/xd5idemwj5itooa9t2ee.jpg'
|
|
|
|
- // },
|
|
|
|
- // {
|
|
|
|
- // status:2,
|
|
|
|
- // statusName:'未开启',
|
|
|
|
- // name:'每月抽奖',
|
|
|
|
- // img:'https://xiaoyou.dgtis.com/images/image/2024/08/23/xd5idemwj5itooa9t2ee.jpg'
|
|
|
|
- // }
|
|
|
|
- ],
|
|
|
|
|
|
+ timer: null,
|
|
|
|
+ listScrollData: [],
|
|
|
|
+ activitykist: [],
|
|
hoursTip: '你好!',
|
|
hoursTip: '你好!',
|
|
isActive: false,
|
|
isActive: false,
|
|
};
|
|
};
|
|
@@ -167,9 +144,22 @@ export default {
|
|
this.getHoursTip()
|
|
this.getHoursTip()
|
|
indexList().then(response => {
|
|
indexList().then(response => {
|
|
this.activitykist = response.data.data
|
|
this.activitykist = response.data.data
|
|
- })
|
|
|
|
|
|
+ });
|
|
|
|
+ this.getWinningList();
|
|
|
|
+ this.initWinningList();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ initWinningList(){
|
|
|
|
+ setInterval(() => {
|
|
|
|
+ this.getWinningList();
|
|
|
|
+ }, 300000);
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ getWinningList(){
|
|
|
|
+ winningList().then(response => {
|
|
|
|
+ this.listScrollData = response.data.data.items;
|
|
|
|
+ })
|
|
|
|
+ },
|
|
goFestiveEvents(val) {
|
|
goFestiveEvents(val) {
|
|
|
|
|
|
if (val.title == '每日答题') {
|
|
if (val.title == '每日答题') {
|
|
@@ -231,7 +221,9 @@ export default {
|
|
mounted() {
|
|
mounted() {
|
|
window.addEventListener('scroll', this.handleScroll)
|
|
window.addEventListener('scroll', this.handleScroll)
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+ beforeDestroy() {
|
|
|
|
+ clearInterval(this.timer);
|
|
|
|
+ },
|
|
destroyed() {
|
|
destroyed() {
|
|
// 离开该页面需要移除这个监听的事件,不然会报错
|
|
// 离开该页面需要移除这个监听的事件,不然会报错
|
|
window.removeEventListener('scroll', this.handleScroll)
|
|
window.removeEventListener('scroll', this.handleScroll)
|