|
@@ -1,13 +1,13 @@
|
|
import { defineComponent, PropType, ref } from 'vue'
|
|
import { defineComponent, PropType, ref } from 'vue'
|
|
import styles from './index.module.less'
|
|
import styles from './index.module.less'
|
|
-import { CellGroup, List, Sticky } from 'vant'
|
|
|
|
|
|
+import { CellGroup, List } from 'vant'
|
|
import iconMoney from '../../images/icon-money.png'
|
|
import iconMoney from '../../images/icon-money.png'
|
|
import ColResult from '@/components/col-result'
|
|
import ColResult from '@/components/col-result'
|
|
import Echats from '../echats'
|
|
import Echats from '../echats'
|
|
import TeacherItem from '../teacher-item'
|
|
import TeacherItem from '../teacher-item'
|
|
import BuyItem from '../buy-item'
|
|
import BuyItem from '../buy-item'
|
|
import request from '@/helpers/request'
|
|
import request from '@/helpers/request'
|
|
-import { getTimeRange, TIME_TYPE } from '../../home-statistics'
|
|
|
|
|
|
+import { getTimeRange } from '../../home-statistics'
|
|
import { moneyFormat } from '@/helpers/utils'
|
|
import { moneyFormat } from '@/helpers/utils'
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
@@ -129,10 +129,14 @@ export default defineComponent({
|
|
}
|
|
}
|
|
|
|
|
|
const getList = async () => {
|
|
const getList = async () => {
|
|
|
|
+ console.log(state.loading, state)
|
|
|
|
+ // if (state.loading || state.finished) return; // 如果正在加载或者已加载完,则返回
|
|
|
|
+ state.loading = true
|
|
try {
|
|
try {
|
|
const { data } = await request.post(
|
|
const { data } = await request.post(
|
|
'/api-teacher/home/teacherIncomeList',
|
|
'/api-teacher/home/teacherIncomeList',
|
|
{
|
|
{
|
|
|
|
+ hideLoading: false,
|
|
data: {
|
|
data: {
|
|
...timeRange.value,
|
|
...timeRange.value,
|
|
type: props.type,
|
|
type: props.type,
|
|
@@ -141,17 +145,18 @@ export default defineComponent({
|
|
}
|
|
}
|
|
)
|
|
)
|
|
|
|
|
|
- state.loading = false
|
|
|
|
state.statInfo = data.statInfo || 0
|
|
state.statInfo = data.statInfo || 0
|
|
tableList.value = tableList.value.concat(data.rows || [])
|
|
tableList.value = tableList.value.concat(data.rows || [])
|
|
|
|
|
|
state.finished = data.pageNo >= data.totalPage
|
|
state.finished = data.pageNo >= data.totalPage
|
|
|
|
+
|
|
state.params.page = data.pageNo + 1
|
|
state.params.page = data.pageNo + 1
|
|
dataShow.value = tableList.value.length > 0
|
|
dataShow.value = tableList.value.length > 0
|
|
} catch {
|
|
} catch {
|
|
dataShow.value = false
|
|
dataShow.value = false
|
|
state.finished = true
|
|
state.finished = true
|
|
}
|
|
}
|
|
|
|
+ state.loading = false
|
|
}
|
|
}
|
|
|
|
|
|
getSysConfig()
|
|
getSysConfig()
|
|
@@ -195,6 +200,7 @@ export default defineComponent({
|
|
v-model:loading={state.loading}
|
|
v-model:loading={state.loading}
|
|
finished={state.finished}
|
|
finished={state.finished}
|
|
finishedText=" "
|
|
finishedText=" "
|
|
|
|
+ immediateCheck={false}
|
|
onLoad={getList}
|
|
onLoad={getList}
|
|
>
|
|
>
|
|
<CellGroup border={false}>
|
|
<CellGroup border={false}>
|