修复已知问题
This commit is contained in:
@@ -51,7 +51,21 @@
|
||||
}
|
||||
|
||||
continuousDays.value = res.data.continuousDays
|
||||
indexData.value = res.data.list.map(v => v.signDate)
|
||||
// indexData.value = res.data.list.map(v => v.signDate)
|
||||
indexData.value = res.data.list
|
||||
|
||||
console.log(indexData.value, '===')
|
||||
}
|
||||
|
||||
/** 判断那一天签到了 */
|
||||
const isSign = item => {
|
||||
return indexData.value.some(v => v.signDate === item.signDate)
|
||||
}
|
||||
|
||||
/** 判断签到那一天加多少积分 */
|
||||
const isAddIntegral = item => {
|
||||
return indexData.value.find(v => v.signDate === item.signDate)
|
||||
.pointsAwarded
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -232,11 +246,11 @@
|
||||
<view v-for="(item, index) in weekList" :key="index" class="item">
|
||||
<text class="bottom-name">{{ item.name }}</text>
|
||||
</view>
|
||||
<!-- 签到 -->
|
||||
<!-- 签到 :class="{ active: indexData.includes(item.signDate) }" -->
|
||||
<view
|
||||
v-for="(item, index) in dateList"
|
||||
:key="index"
|
||||
:class="{ active: indexData.includes(item.signDate) }"
|
||||
:class="{ active: isSign(item) }"
|
||||
class="item"
|
||||
@click="onItem(item)"
|
||||
>
|
||||
@@ -246,7 +260,7 @@
|
||||
mode="heightFix"
|
||||
class="icon"
|
||||
></image>
|
||||
<!-- <text>+10</text> -->
|
||||
<text v-if="isSign(item)">+{{ isAddIntegral(item) }}</text>
|
||||
</view>
|
||||
<text
|
||||
:style="{ color: item.isToday ? '#00d993' : '#999999' }"
|
||||
|
||||
Reference in New Issue
Block a user