直播间需要添加签到功能

This commit is contained in:
cbb
2026-01-13 17:56:19 +08:00
parent 06e026c8b8
commit c139fcf501
16 changed files with 313 additions and 171 deletions

View File

@@ -29,9 +29,14 @@
/** 连续天数 */
const continuousDays = ref(0)
/** 给数子补零 */
const padZero = num => {
return num < 10 ? `0${num}` : num
}
const getData = async msg => {
const res = await getSignList({
signMonth: `${currentYear.value}-${currentMonth.value}`
signMonth: `${currentYear.value}-${padZero(currentMonth.value)}`
})
dateList.value = generateCalendar(
@@ -199,7 +204,9 @@
</view>
<!-- 切换 -->
<view class="switch-box">
<text class="date">{{ currentYear }}{{ currentMonth }}</text>
<text class="date">
{{ currentYear }}{{ padZero(currentMonth) }}
</text>
<view class="btn">
<uni-icons
type="left"