소스 검색

移除 CashDiscountGrant 中未使用的 randomDate 函数

修复 ESLint no-unused-vars 报错。发放时间改用 randomDateTime 派生后,原 randomDate 已无引用。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Fade 1 개월 전
부모
커밋
c88f5da184
1개의 변경된 파일0개의 추가작업 그리고 6개의 파일을 삭제
  1. 0 6
      pc/src/views/CashDiscountGrant.vue

+ 0 - 6
pc/src/views/CashDiscountGrant.vue

@@ -104,12 +104,6 @@ const GRANT_REASONS = ['新开户礼遇', '月度消费达标奖励', '生日专
 
 function pad(n) { return String(n).padStart(2, '0') }
 
-function randomDate(baseDate, offsetDays) {
-  const d = new Date(baseDate)
-  d.setDate(d.getDate() - Math.floor(Math.random() * offsetDays))
-  return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`
-}
-
 function randomDateTime(baseDate, offsetDays) {
   const d = new Date(baseDate)
   d.setDate(d.getDate() - Math.floor(Math.random() * offsetDays))