Browse Source

自动切换列表

master
mk 1 year ago
parent
commit
76c1a9387e
  1. 17
      src/views/next/screen-content-right/zdyf-right/index.vue

17
src/views/next/screen-content-right/zdyf-right/index.vue

@ -261,7 +261,8 @@ export default {
yjyList: [], yjyList: [],
zyzxList: [], zyzxList: [],
zyzxType: 1, zyzxType: 1,
navId: '' navId: '',
timer:null
} }
}, },
mounted () { mounted () {
@ -277,6 +278,11 @@ export default {
seedPowerCompanyList({}).then((res) => { seedPowerCompanyList({}).then((res) => {
this.yjyList = res.data.list this.yjyList = res.data.list
}) })
let that = this
clearInterval(this.timer)
this.timer = setInterval(()=>{
this.switchZYZX()
},5000)
}, },
methods: { methods: {
...mapActions({ ...mapActions({
@ -287,6 +293,9 @@ export default {
set_zdyf_ggqy: 'SET_ZDYF_GGQY', set_zdyf_ggqy: 'SET_ZDYF_GGQY',
set_research_id: 'SET_RESEARCH_ID' set_research_id: 'SET_RESEARCH_ID'
}), }),
switchZYZX(){
this.zyzxType = this.zyzxType === 1?2:1
},
handelClickTalents () { handelClickTalents () {
this.set_talents(true) this.set_talents(true)
}, },
@ -325,7 +334,11 @@ export default {
}, },
components: {}, components: {},
computed: {}, computed: {},
watch: {} watch: {},
destroyed(){
clearInterval(this.timer);
this.timer = null;
}
} }
</script> </script>

Loading…
Cancel
Save