forked from angelo/web-retail-h5
feat(bonus): 奖金查询控制
This commit is contained in:
parent
b58166d6e5
commit
22e0e1b1b8
|
@ -92,8 +92,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
// 注意: 后端API需要支持按日期范围查询奖金明细
|
||||
// import { getBonusDetailsByDate, getTodayBonusTotal } from '@/config/bonus.js';
|
||||
import dayjs from 'dayjs'
|
||||
import { queryBonusTotal, queryBonusList } from '@/config/bonus'
|
||||
export default {
|
||||
|
@ -154,10 +152,9 @@ export default {
|
|||
// 校验区间不能超过31天
|
||||
const start = dayjs(this.startDate)
|
||||
const end = dayjs(this.endDate)
|
||||
console.log(end.diff(start, 'day'), '...a?')
|
||||
if (end.diff(start, 'day') > 30) {
|
||||
if (end.diff(start, 'day') > 60) {
|
||||
uni.showToast({
|
||||
title: '最多只能查询31天内的数据',
|
||||
title: '最多只能查询60天内的数据',
|
||||
icon: 'none',
|
||||
})
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue