feat(cp排行榜): 发送信件按钮防抖
This commit is contained in:
parent
8e5f075030
commit
86035bc111
@ -965,12 +965,15 @@
|
||||
<div style="display: flex; align-items: center; gap: 4px">
|
||||
<img
|
||||
v-smart-img
|
||||
:src="record.prize?.prizeImage || ''"
|
||||
:src="record?.prize?.prizeImage || ''"
|
||||
alt=""
|
||||
style="width: 10vw; object-fit: cover; display: block; aspect-ratio: 1/1"
|
||||
/>
|
||||
<div style="font-weight: 590; font-size: 0.9em">
|
||||
{{ record.prize?.prizeName }}
|
||||
{{ record?.prize?.prizeName }}
|
||||
</div>
|
||||
<div v-if="record.prize?.days" style="font-weight: 590; font-size: 0.9em">
|
||||
*{{ record?.prize?.days }}Days
|
||||
</div>
|
||||
</div>
|
||||
<div style="font-weight: 510; font-size: 0.8em">
|
||||
@ -1208,6 +1211,7 @@ import { showError, showSuccess } from '@/utils/toast.js'
|
||||
import { handleAvatarImageError, handleRewardImageError } from '@/utils/imageHandler.js'
|
||||
import { useCoupleStore } from '@/stores/couple'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useThrottle, useDebounce } from '@/utils/useDebounce.js'
|
||||
import { formatRewardDisplay } from '@/utils/rewardFormatter.js'
|
||||
|
||||
import {
|
||||
@ -1459,7 +1463,11 @@ const cancelSend = () => {
|
||||
}
|
||||
|
||||
// 发送情书
|
||||
const sendLoveLetter = async () => {
|
||||
const sendLoveLetter = useDebounce(() => {
|
||||
sendLetter() //发送信件
|
||||
}, 1000)
|
||||
|
||||
const sendLetter = async () => {
|
||||
if (!selectedCouple.value.account) return
|
||||
try {
|
||||
await apiSendLoveLetter({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user