|
|
@ -1,5 +1,7 @@ |
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
|
import { getVoteList } from '@/api/common' |
|
|
import { getVoteList } from '@/api/common' |
|
|
|
|
|
|
|
|
|
|
|
const reListRef = ref() |
|
|
const navto = (url: string, params = {}) => uni.$util.goToPage({ url, params }) |
|
|
const navto = (url: string, params = {}) => uni.$util.goToPage({ url, params }) |
|
|
const doSearch = (formData: { page: number; limit: number }, onSuccess: Function) => { |
|
|
const doSearch = (formData: { page: number; limit: number }, onSuccess: Function) => { |
|
|
getVoteList(formData).then((res) => { |
|
|
getVoteList(formData).then((res) => { |
|
|
@ -7,6 +9,19 @@ const doSearch = (formData: { page: number; limit: number }, onSuccess: Function |
|
|
onSuccess({ data }) |
|
|
onSuccess({ data }) |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const setInerval = ref<any>() |
|
|
|
|
|
|
|
|
|
|
|
onShow(() => { |
|
|
|
|
|
setInerval.value = setInterval(() => { |
|
|
|
|
|
reListRef.value.refreshFn() |
|
|
|
|
|
}, 5000) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
onHide(() => { |
|
|
|
|
|
clearInterval(setInerval.value) |
|
|
|
|
|
setInerval.value = null |
|
|
|
|
|
}) |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<template> |
|
|
<template> |
|
|
|