|
@@ -2,7 +2,7 @@ import OHeader from '@/components/o-header'
|
|
|
import OSticky from '@/components/o-sticky'
|
|
|
import { Tabs, Tab, Icon, Popup, DatePicker, DatePickerColumnType, Calendar } from 'vant'
|
|
|
import { defineComponent, reactive, ref, provide } from 'vue'
|
|
|
-import { useRouter } from 'vue-router'
|
|
|
+import { useRoute, useRouter } from 'vue-router'
|
|
|
// import linkBg from './images/ranking-bg.png'
|
|
|
import TimerBang from './components/timer-bang'
|
|
|
import DayBang from './components/day-bang'
|
|
@@ -10,15 +10,17 @@ import styles from './index.module.less'
|
|
|
import dayjs from 'dayjs'
|
|
|
import isBetween from 'dayjs/plugin/isBetween'
|
|
|
dayjs.extend(isBetween)
|
|
|
-const activeName = ref('student')
|
|
|
+
|
|
|
export default defineComponent({
|
|
|
name: 'ranking-list',
|
|
|
setup() {
|
|
|
const router = useRouter()
|
|
|
+ const route = useRoute()
|
|
|
const state = reactive({
|
|
|
heightV: 0,
|
|
|
showPopoverTime: false
|
|
|
})
|
|
|
+ const activeName = ref(route.query.type || 'day')
|
|
|
|
|
|
const forms = reactive({
|
|
|
practiceMonth: dayjs().day(1).format('YYYYMMDD'),
|
|
@@ -54,10 +56,10 @@ export default defineComponent({
|
|
|
color={'#fff'}
|
|
|
>
|
|
|
<Tab name="day" title="天数榜"></Tab>
|
|
|
- <Tab name="timer" title="时长榜"></Tab>
|
|
|
+ <Tab name="time" title="时长榜"></Tab>
|
|
|
</Tabs>
|
|
|
</OSticky>
|
|
|
- {activeName.value == 'timer' ? (
|
|
|
+ {activeName.value == 'time' ? (
|
|
|
<TimerBang toHeight={state.heightV}></TimerBang>
|
|
|
) : (
|
|
|
<DayBang toHeight={state.heightV}></DayBang>
|