3
0
Fork 0

Compare commits

..

No commits in common. "3a7a8a1ac3483ac43998863bb00366244b9a7175" and "b58166d6e5ebeceaf114476c68737343c89d3e71" have entirely different histories.

1 changed files with 10 additions and 1 deletions

View File

@ -92,6 +92,8 @@
</template> </template>
<script> <script>
// : API
// import { getBonusDetailsByDate, getTodayBonusTotal } from '@/config/bonus.js';
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { queryBonusTotal, queryBonusList } from '@/config/bonus' import { queryBonusTotal, queryBonusList } from '@/config/bonus'
export default { export default {
@ -152,7 +154,14 @@ export default {
// 31 // 31
const start = dayjs(this.startDate) const start = dayjs(this.startDate)
const end = dayjs(this.endDate) const end = dayjs(this.endDate)
console.log(end.diff(start, 'day'), '...a?')
if (end.diff(start, 'day') > 30) {
uni.showToast({
title: '最多只能查询31天内的数据',
icon: 'none',
})
return
}
this.bonusList = [] this.bonusList = []
this.fetchBonusData() this.fetchBonusData()
}, },