Skip to content

Commit

Permalink
Clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
sheepzh committed Jan 19, 2024
1 parent 7418e0d commit add05d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/components/Option/components/LimitOption/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { locale } from "@i18n"
import optionService from "@service/option-service"
import { defaultDailyLimit } from "@util/constant/option"
import { ElDivider, ElInput, ElOption, ElSelect } from "element-plus"
import { defineComponent, reactive, unref, UnwrapRef, h, ref, Ref } from "vue"
import { defineComponent, reactive, unref, UnwrapRef, ref, Ref } from "vue"
import { renderOptionItem } from "../../common"
import "./limit-option.sass"
import { judgeVerificationRequired, processVerification } from "@app/util/limit"
Expand Down
3 changes: 1 addition & 2 deletions src/app/util/limit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ export async function judgeVerificationRequired(item: timer.limit.Item): Promise
// Period
if (periods?.length) {
const idx = dateMinute2Idx(new Date())
const hitPeriod = periods?.find(([s, e]) => s <= idx && e >= idx)
console.log(idx, periods, hitPeriod)
const hitPeriod = periods?.some(([s, e]) => s <= idx && e >= idx)
if (hitPeriod) return true
}
// Visit
Expand Down

0 comments on commit add05d8

Please sign in to comment.