Commit 9f76bc67 by cen

fix: 活动中心卡片

1 parent 9ae5fbed
<template> <template>
<view class="task-box"> <view class="task-box">
<view class="tab-box"> <scroll-view scroll-y ref="scrollViewRef" :scroll-top="scrollTop" @scrolltolower="pageonReachBottom" :class="[getScrollHeight]">
<view class="tab-list">
<view @click="handleTabClick(index)" :class="['tab-item', tabIndex === index ? 'active' : '']"
v-for="(item, index) in tabList" :key="index">
<view class="tab-item-title">{{ item }}</view>
</view>
</view>
<view class="finish-tab" v-if="tabIndex === 1">
<view class="finish-tab-item" @click="handleFinishTabClick(2)" :class="{ 'finish-active': finishIndex === 2 }">
长课程
</view>
<view class="finish-tab-item" @click="handleFinishTabClick(1)" :class="{ 'finish-active': finishIndex === 1 }">
短课程
</view>
</view>
</view>
<view class="tips" v-if="tabIndex === 0">
<view class="sprite-icon icon-study-tips"></view>
<view class="tips-text">带有"限时学"标签的课程:规定时间内未完成任务,禁止提单!请按时学习。</view>
</view>
<scroll-view scroll-y ref="scrollViewRef" :scroll-top="scrollTop" @scrolltolower="pageonReachBottom"
:class="[getScrollHeight]">
<template v-if="taskList.length"> <template v-if="taskList.length">
<view class="task-list"> <view class="task-list">
<view class="task-item" v-for="(item, index) in taskList" :key="index" @click="handleTaskItemClick(item)"> <view class="task-item" v-for="(item, index) in taskList" :key="index" @click="handleTaskItemClick(item)">
<view class="time-limit-tag" v-if="tabIndex === 0 && item.punishType == 1"></view> <view class="time-limit-tag"></view>
<view v-if="tabIndex === 0 && item.punishType == 1" class="time-limit-countdown "> <view class="time-limit-countdown">
<template v-if="item._timeout"> <template v-if="item._showCountdown">
<view class="countdown-label timeout-label">已超时</view>
</template>
<template v-else-if="item._showCountdown">
<view class="countdown-label">剩</view> <view class="countdown-label">剩</view>
<view class="countdown-num">{{ item._countdownHour }}</view> <view class="countdown-num">{{ item._countdownHour }}</view>
<view class="countdown-separator">:</view> <view class="countdown-separator">:</view>
...@@ -52,13 +28,7 @@ ...@@ -52,13 +28,7 @@
<view class="countdown-num">--</view> <view class="countdown-num">--</view>
</template> </template>
</view> </view>
<image <image class="task-item-img" :src="item.courseType === 1 ? require('../../../../assets/images/common/short-course-default.webp') : require('../../../../assets/images/common/course-default-bg.webp')" mode="aspectFill" />
class="task-item-img"
:src="item.courseType === 1
? require('../../../../assets/images/common/short-course-default.webp')
: require('../../../../assets/images/common/course-default-bg.webp')"
mode="aspectFill"
/>
<view class="task-item-content"> <view class="task-item-content">
<view class="task-item-title">{{ item.taskTitle }}</view> <view class="task-item-title">{{ item.taskTitle }}</view>
<view class="task-item-text"> <view class="task-item-text">
...@@ -67,13 +37,16 @@ ...@@ -67,13 +37,16 @@
<view class="task-item-progress-bar" :style="{ width: Math.floor(item.taskProgress) + '%' }"></view> <view class="task-item-progress-bar" :style="{ width: Math.floor(item.taskProgress) + '%' }"></view>
<view class="task-item-progress-text">{{ Math.floor(item.taskProgress) }}%</view> <view class="task-item-progress-text">{{ Math.floor(item.taskProgress) }}%</view>
</view> </view>
<view class="task-item-value" v-else><view class="dot-value"></view><view class="green">已完成</view></view> <view class="task-item-value" v-else>
<view class="dot-value"></view>
<view class="green">已完成</view>
</view>
</view> </view>
<view class="task-item-text" v-if="item.courseType === 2"> <view class="task-item-text" v-if="item.courseType === 2">
<view class="task-item-label">课程数</view> <view class="task-item-label">课程数</view>
<view class="task-item-value"> <view class="task-item-value">
{{ item.courseTotalCount }}节 | {{ item.courseTotalCount }}节 |
{{ (item.totalDuration || item.totalDuration === 0) ? `${item.totalDuration}min` : '-' }} {{ item.totalDuration || item.totalDuration === 0 ? `${item.totalDuration}min` : '-' }}
</view> </view>
</view> </view>
<view class="task-item-text"> <view class="task-item-text">
...@@ -95,7 +68,6 @@ ...@@ -95,7 +68,6 @@
<view class="end-text">到底了!</view> <view class="end-text">到底了!</view>
</template> </template>
</scroll-view> </scroll-view>
</view> </view>
</template> </template>
<script> <script>
...@@ -119,17 +91,17 @@ export default { ...@@ -119,17 +91,17 @@ export default {
}, },
computed: { computed: {
getScrollHeight() { getScrollHeight() {
const list = this.taskList; const list = this.taskList
if (!list || list.length === 0) { if (!list || list.length === 0) {
return ''; return ''
} }
switch (this.tabIndex) { switch (this.tabIndex) {
case 0: case 0:
return 'task-list-box'; return 'task-list-box'
case 1: case 1:
return 'task-finish-box'; return 'task-finish-box'
default: default:
return ''; return ''
} }
} }
}, },
...@@ -137,137 +109,133 @@ export default { ...@@ -137,137 +109,133 @@ export default {
this.getCourseTaskPage(this.tabIndex) this.getCourseTaskPage(this.tabIndex)
}, },
beforeDestroy() { beforeDestroy() {
this.clearCountdownTimer(); this.clearCountdownTimer()
// 移除事件监听,防止内存泄漏 // 移除事件监听,防止内存泄漏
uni.$off && uni.$off('backStudyCenter'); uni.$off && uni.$off('backStudyCenter')
}, },
methods: { methods: {
// 清除倒计时定时器 // 清除倒计时定时器
clearCountdownTimer() { clearCountdownTimer() {
if (this.timer) { if (this.timer) {
clearInterval(this.timer); clearInterval(this.timer)
this.timer = null; this.timer = null
} }
}, },
// 启动倒计时定时器 // 启动倒计时定时器
startCountdownForAll() { startCountdownForAll() {
this.clearCountdownTimer(); this.clearCountdownTimer()
this.updateAllCountdowns(); // 立即更新一次 this.updateAllCountdowns() // 立即更新一次
this.timer = setInterval(() => { this.timer = setInterval(() => {
this.updateAllCountdowns(); this.updateAllCountdowns()
}, 1000); }, 1000)
}, },
// 更新所有需要倒计时的任务 // 更新所有需要倒计时的任务
updateAllCountdowns() { updateAllCountdowns() {
const now = new Date(); const now = new Date()
let hasCountdown = false; let hasCountdown = false
this.taskList.forEach(item => { this.taskList.forEach(item => {
if ( if (this.tabIndex === 0 && item.punishType == 1 && item.taskDeadline) {
this.tabIndex === 0 && const deadline = new Date(item.taskDeadline)
item.punishType == 1 && const diff = deadline - now
item.taskDeadline const oneDayMs = 24 * 60 * 60 * 1000
) {
const deadline = new Date(item.taskDeadline);
const diff = deadline - now;
const oneDayMs = 24 * 60 * 60 * 1000;
if (diff > 0 && diff < oneDayMs) { if (diff > 0 && diff < oneDayMs) {
// 小于1天,展示24小时倒计时 // 小于1天,展示24小时倒计时
hasCountdown = true; hasCountdown = true
const hours = Math.floor(diff / (1000 * 60 * 60)); const hours = Math.floor(diff / (1000 * 60 * 60))
const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60)); const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60))
const seconds = Math.floor((diff % (1000 * 60)) / 1000); const seconds = Math.floor((diff % (1000 * 60)) / 1000)
this.$set(item, '_countdownHour', hours.toString().padStart(2, '0')); this.$set(item, '_countdownHour', hours.toString().padStart(2, '0'))
this.$set(item, '_countdownMinute', minutes.toString().padStart(2, '0')); this.$set(item, '_countdownMinute', minutes.toString().padStart(2, '0'))
this.$set(item, '_countdownSecond', seconds.toString().padStart(2, '0')); this.$set(item, '_countdownSecond', seconds.toString().padStart(2, '0'))
this.$set(item, '_showCountdown', true); this.$set(item, '_showCountdown', true)
this.$set(item, '_showDays', false); this.$set(item, '_showDays', false)
this.$set(item, '_leftDays', null); this.$set(item, '_leftDays', null)
this.$set(item, '_timeout', false); this.$set(item, '_timeout', false)
} else if (diff >= oneDayMs) { } else if (diff >= oneDayMs) {
// 超过等于1天,显示剩余天数(不足x天则展示x-1天) // 超过等于1天,显示剩余天数(不足x天则展示x-1天)
this.$set(item, '_showCountdown', false); this.$set(item, '_showCountdown', false)
this.$set(item, '_showDays', true); this.$set(item, '_showDays', true)
// days = Math.ceil(diff / oneDayMs) - 1, 最小为1天 // days = Math.ceil(diff / oneDayMs) - 1, 最小为1天
let days = Math.ceil(diff / oneDayMs) - 1; let days = Math.ceil(diff / oneDayMs) - 1
if (days < 1) days = 1; if (days < 1) days = 1
this.$set(item, '_leftDays', days); this.$set(item, '_leftDays', days)
this.$set(item, '_countdownHour', null); this.$set(item, '_countdownHour', null)
this.$set(item, '_countdownMinute', null); this.$set(item, '_countdownMinute', null)
this.$set(item, '_countdownSecond', null); this.$set(item, '_countdownSecond', null)
this.$set(item, '_timeout', false); this.$set(item, '_timeout', false)
} else if (diff <= 0) { } else if (diff <= 0) {
// 已超时 // 已超时
this.$set(item, '_timeout', true); this.$set(item, '_timeout', true)
this.$set(item, '_showCountdown', false); this.$set(item, '_showCountdown', false)
this.$set(item, '_showDays', false); this.$set(item, '_showDays', false)
this.$set(item, '_leftDays', null); this.$set(item, '_leftDays', null)
this.$set(item, '_countdownHour', null); this.$set(item, '_countdownHour', null)
this.$set(item, '_countdownMinute', null); this.$set(item, '_countdownMinute', null)
this.$set(item, '_countdownSecond', null); this.$set(item, '_countdownSecond', null)
} }
} else { } else {
this.$set(item, '_showCountdown', false); this.$set(item, '_showCountdown', false)
this.$set(item, '_showDays', false); this.$set(item, '_showDays', false)
this.$set(item, '_leftDays', null); this.$set(item, '_leftDays', null)
this.$set(item, '_timeout', false); this.$set(item, '_timeout', false)
} }
}); })
// 如果没有任何需要倒计时的,清除定时器 // 如果没有任何需要倒计时的,清除定时器
if (!hasCountdown) { if (!hasCountdown) {
this.clearCountdownTimer(); this.clearCountdownTimer()
} }
}, },
// 格式化时间 // 格式化时间
formatTime(time, formatStr) { formatTime(time, formatStr) {
if (!time) return '-'; if (!time) return '-'
return dayjs(time).format(formatStr); return dayjs(time).format(formatStr)
}, },
// 初始化倒计时字段(用于新获取的数据) // 初始化倒计时字段(用于新获取的数据)
initCountdownFieldsForList(list) { initCountdownFieldsForList(list) {
const now = new Date(); const now = new Date()
list.forEach(item => { list.forEach(item => {
if (this.tabIndex === 0 && item.punishType == 1 && item.taskDeadline) { if (this.tabIndex === 0 && item.punishType == 1 && item.taskDeadline) {
const deadline = new Date(item.taskDeadline); const deadline = new Date(item.taskDeadline)
const diff = deadline - now; const diff = deadline - now
if (diff > 0 && diff <= 24 * 60 * 60 * 1000) { if (diff > 0 && diff <= 24 * 60 * 60 * 1000) {
// 需要倒计时 // 需要倒计时
const hours = Math.floor(diff / (1000 * 60 * 60)); const hours = Math.floor(diff / (1000 * 60 * 60))
const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60)); const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60))
const seconds = Math.floor((diff % (1000 * 60)) / 1000); const seconds = Math.floor((diff % (1000 * 60)) / 1000)
this.$set(item, '_countdownHour', hours.toString().padStart(2, '0')); this.$set(item, '_countdownHour', hours.toString().padStart(2, '0'))
this.$set(item, '_countdownMinute', minutes.toString().padStart(2, '0')); this.$set(item, '_countdownMinute', minutes.toString().padStart(2, '0'))
this.$set(item, '_countdownSecond', seconds.toString().padStart(2, '0')); this.$set(item, '_countdownSecond', seconds.toString().padStart(2, '0'))
this.$set(item, '_showCountdown', true); this.$set(item, '_showCountdown', true)
this.$set(item, '_showDays', false); this.$set(item, '_showDays', false)
this.$set(item, '_leftDays', null); this.$set(item, '_leftDays', null)
this.$set(item, '_timeout', false); this.$set(item, '_timeout', false)
} else if (diff > 24 * 60 * 60 * 1000) { } else if (diff > 24 * 60 * 60 * 1000) {
// 超过24小时,显示剩余天数 // 超过24小时,显示剩余天数
const days = Math.ceil(diff / (24 * 60 * 60 * 1000)); const days = Math.ceil(diff / (24 * 60 * 60 * 1000))
this.$set(item, '_showCountdown', false); this.$set(item, '_showCountdown', false)
this.$set(item, '_showDays', true); this.$set(item, '_showDays', true)
this.$set(item, '_leftDays', days); this.$set(item, '_leftDays', days)
this.$set(item, '_countdownHour', null); this.$set(item, '_countdownHour', null)
this.$set(item, '_countdownMinute', null); this.$set(item, '_countdownMinute', null)
this.$set(item, '_countdownSecond', null); this.$set(item, '_countdownSecond', null)
this.$set(item, '_timeout', false); this.$set(item, '_timeout', false)
} else if (diff <= 0) { } else if (diff <= 0) {
// 已超时 // 已超时
this.$set(item, '_timeout', true); this.$set(item, '_timeout', true)
this.$set(item, '_showCountdown', false); this.$set(item, '_showCountdown', false)
this.$set(item, '_showDays', false); this.$set(item, '_showDays', false)
this.$set(item, '_leftDays', null); this.$set(item, '_leftDays', null)
this.$set(item, '_countdownHour', null); this.$set(item, '_countdownHour', null)
this.$set(item, '_countdownMinute', null); this.$set(item, '_countdownMinute', null)
this.$set(item, '_countdownSecond', null); this.$set(item, '_countdownSecond', null)
} }
} else { } else {
this.$set(item, '_showCountdown', false); this.$set(item, '_showCountdown', false)
this.$set(item, '_showDays', false); this.$set(item, '_showDays', false)
this.$set(item, '_leftDays', null); this.$set(item, '_leftDays', null)
this.$set(item, '_timeout', false); this.$set(item, '_timeout', false)
} }
}); })
}, },
// 获取我的任务接口, completeStatus: 完成状态 0=待完成 1=已完成, courseType: 课程类型 1=短课程 2=长课程 // 获取我的任务接口, completeStatus: 完成状态 0=待完成 1=已完成, courseType: 课程类型 1=短课程 2=长课程
async getCourseTaskPage(completeStatus, courseType) { async getCourseTaskPage(completeStatus, courseType) {
...@@ -287,10 +255,10 @@ export default { ...@@ -287,10 +255,10 @@ export default {
} }
const res = await uni.$api.commonApi.getCourseTaskPage(params) const res = await uni.$api.commonApi.getCourseTaskPage(params)
// 处理倒计时相关字段 // 处理倒计时相关字段
let newList = res.list || []; let newList = res.list || []
// 对新获取的数据初始化倒计时字段 // 对新获取的数据初始化倒计时字段
if (completeStatus === 0) { if (completeStatus === 0) {
this.initCountdownFieldsForList(newList); this.initCountdownFieldsForList(newList)
} }
if (pageNum == 1) { if (pageNum == 1) {
this.taskList = newList this.taskList = newList
...@@ -305,31 +273,31 @@ export default { ...@@ -305,31 +273,31 @@ export default {
// 只在tabIndex为0时处理倒计时 // 只在tabIndex为0时处理倒计时
if (completeStatus === 0) { if (completeStatus === 0) {
// 启动定时器(不管是第一页还是翻页都要) // 启动定时器(不管是第一页还是翻页都要)
this.startCountdownForAll(); this.startCountdownForAll()
} else { } else {
// 非待完成tab,清除定时器 // 非待完成tab,清除定时器
this.clearCountdownTimer(); this.clearCountdownTimer()
} }
} catch (error) { } catch (error) {
uni.showToast({ uni.showToast({
title: error, title: error,
icon: "none", icon: 'none'
}); })
} }
}, },
pageonReachBottom() { pageonReachBottom() {
console.log('到底了'); console.log('到底了')
// 解构赋值,设置 nothing 的默认值 // 解构赋值,设置 nothing 的默认值
let { pageNum, total, pageSize, tabIndex, finishIndex } = this; let { pageNum, total, pageSize, tabIndex, finishIndex } = this
if (Math.ceil(total / pageSize) > pageNum) { if (Math.ceil(total / pageSize) > pageNum) {
this.pageNum += 1; this.pageNum += 1
if (tabIndex == 0) { if (tabIndex == 0) {
this.getCourseTaskPage(tabIndex) this.getCourseTaskPage(tabIndex)
} else { } else {
this.getCourseTaskPage(tabIndex, finishIndex) this.getCourseTaskPage(tabIndex, finishIndex)
} }
} else { } else {
this.nothing = true; this.nothing = true
} }
}, },
handleTabClick(index) { handleTabClick(index) {
...@@ -337,7 +305,7 @@ export default { ...@@ -337,7 +305,7 @@ export default {
this.pageNum = 1 this.pageNum = 1
this.nothing = false this.nothing = false
this.taskList = [] this.taskList = []
this.clearCountdownTimer(); this.clearCountdownTimer()
if (index == 1) { if (index == 1) {
this.finishIndex = 2 this.finishIndex = 2
this.getCourseTaskPage(index, this.finishIndex) // 已完成,默认查长课程 this.getCourseTaskPage(index, this.finishIndex) // 已完成,默认查长课程
...@@ -347,35 +315,35 @@ export default { ...@@ -347,35 +315,35 @@ export default {
this.scrollTop = 1 this.scrollTop = 1
setTimeout(() => { setTimeout(() => {
this.scrollTop = 0 this.scrollTop = 0
}, 100); }, 100)
}, },
handleFinishTabClick(index) { handleFinishTabClick(index) {
this.finishIndex = index this.finishIndex = index
this.pageNum = 1 this.pageNum = 1
this.nothing = false this.nothing = false
this.taskList = [] this.taskList = []
this.clearCountdownTimer(); this.clearCountdownTimer()
this.getCourseTaskPage(this.tabIndex, index) this.getCourseTaskPage(this.tabIndex, index)
}, },
handleTaskItemClick(item) { handleTaskItemClick(item) {
// console.log(item) // console.log(item)
const {courseType, id} = item const { courseType, id } = item
if (courseType == 1) { if (courseType == 1) {
uni.$track.add({eventCode: 'app_short_course', businessId: id, pagePath: '/pages/equity/index'}) uni.$track.add({ eventCode: 'app_short_course', businessId: id, pagePath: '/pages/equity/index' })
} }
uni.navigateTo({ uni.navigateTo({
url: `/pages/common/studyDetail/${courseType == 1 ? 'shortCourse' : 'longCourse'}?row=${encodeURIComponent(JSON.stringify(item))}&completeStatus=${this.tabIndex}`, url: `/pages/common/studyDetail/${courseType == 1 ? 'shortCourse' : 'longCourse'}?row=${encodeURIComponent(JSON.stringify(item))}&completeStatus=${this.tabIndex}`,
fail: (err) => { fail: err => {
console.error('页面跳转失败:', err); console.error('页面跳转失败:', err)
}, },
// 页面跳转后,监听返回事件 // 页面跳转后,监听返回事件
success: () => { success: () => {
// 兼容H5/小程序/APP,返回时触发自定义事件 // 兼容H5/小程序/APP,返回时触发自定义事件
// 这里不需要处理,onShow和backStudyCenter事件已处理倒计时恢复 // 这里不需要处理,onShow和backStudyCenter事件已处理倒计时恢复
} }
}); })
}, },
findBeiSenSSOToken () { findBeiSenSSOToken() {
return new Promise(resolve => { return new Promise(resolve => {
const url = 'https%3A%2F%2Fcloud.italent.cn%2FPageHome%2FIndex%3Fproduct%3DLearning%26keyName%3DNusion%26pageCode%3DLearningNewHomepage%26appCode%3DLearning%26_qsrcapp%3DLearning%26_qrt%3Dhtml%26quark_s%3D5102bff371c00da5b19968ee53a8c3f1499ecd2447a19f72f3e3ba2390cc9617%23%2FviewDynamic%3Fshadow_context%3D%257BappModel%253A%2522italent%2522%252Cuppid%253A%25221%2522%257D%26quark_s%3D028930f1066f8ef8d28790940d53ae64337f44bde3a44cf89a290e4a3611e3e2' const url = 'https%3A%2F%2Fcloud.italent.cn%2FPageHome%2FIndex%3Fproduct%3DLearning%26keyName%3DNusion%26pageCode%3DLearningNewHomepage%26appCode%3DLearning%26_qsrcapp%3DLearning%26_qrt%3Dhtml%26quark_s%3D5102bff371c00da5b19968ee53a8c3f1499ecd2447a19f72f3e3ba2390cc9617%23%2FviewDynamic%3Fshadow_context%3D%257BappModel%253A%2522italent%2522%252Cuppid%253A%25221%2522%257D%26quark_s%3D028930f1066f8ef8d28790940d53ae64337f44bde3a44cf89a290e4a3611e3e2'
uni.$api.commonApi.findBeiSenSSOToken({}).then(res => { uni.$api.commonApi.findBeiSenSSOToken({}).then(res => {
...@@ -384,7 +352,7 @@ export default { ...@@ -384,7 +352,7 @@ export default {
resolve(studyUrl) resolve(studyUrl)
}) })
}) })
}, }
} }
} }
</script> </script>
...@@ -398,7 +366,7 @@ export default { ...@@ -398,7 +366,7 @@ export default {
display: flex; display: flex;
width: toRpx(436); width: toRpx(436);
height: toRpx(80); height: toRpx(80);
background-color: #F5F6F7; background-color: #f5f6f7;
border-radius: toRpx(16); border-radius: toRpx(16);
color: #666666; color: #666666;
font-size: toRpx(28); font-size: toRpx(28);
...@@ -413,7 +381,7 @@ export default { ...@@ -413,7 +381,7 @@ export default {
&.active { &.active {
background-color: #fff; background-color: #fff;
color: #1A1A1A; color: #1a1a1a;
border-radius: toRpx(10); border-radius: toRpx(10);
font-weight: 600; font-weight: 600;
} }
...@@ -427,7 +395,7 @@ export default { ...@@ -427,7 +395,7 @@ export default {
background-color: rgba(255, 243, 224, 0.8); background-color: rgba(255, 243, 224, 0.8);
border-radius: toRpx(8); border-radius: toRpx(8);
font-size: toRpx(24); font-size: toRpx(24);
color: #FF9D0A; color: #ff9d0a;
height: toRpx(48); height: toRpx(48);
margin: toRpx(24) toRpx(40) 0; margin: toRpx(24) toRpx(40) 0;
...@@ -468,7 +436,7 @@ export default { ...@@ -468,7 +436,7 @@ export default {
&.finish-active { &.finish-active {
background: #2d66f71a; background: #2d66f71a;
font-weight: 500; font-weight: 500;
color: #2D66F7; color: #2d66f7;
} }
} }
} }
...@@ -565,7 +533,7 @@ export default { ...@@ -565,7 +533,7 @@ export default {
.task-item-title { .task-item-title {
font-size: toRpx(30); font-size: toRpx(30);
color: #292D33; color: #292d33;
font-weight: 500; font-weight: 500;
margin-bottom: toRpx(24); margin-bottom: toRpx(24);
width: toRpx(340); width: toRpx(340);
...@@ -583,7 +551,7 @@ export default { ...@@ -583,7 +551,7 @@ export default {
.task-item-label { .task-item-label {
width: toRpx(96); width: toRpx(96);
color: #999EA8; color: #999ea8;
margin-right: toRpx(24); margin-right: toRpx(24);
} }
...@@ -596,11 +564,11 @@ export default { ...@@ -596,11 +564,11 @@ export default {
width: toRpx(12); width: toRpx(12);
height: toRpx(12); height: toRpx(12);
border-radius: 50%; border-radius: 50%;
background: #2CCA74; background: #2cca74;
margin-right: toRpx(8); margin-right: toRpx(8);
} }
.green { .green {
color: #2CCA74; color: #2cca74;
} }
} }
} }
...@@ -608,11 +576,11 @@ export default { ...@@ -608,11 +576,11 @@ export default {
.task-item-progress { .task-item-progress {
width: toRpx(151); width: toRpx(151);
height: toRpx(16); height: toRpx(16);
background: linear-gradient(128.8deg, rgba(117, 188, 255, .35) 0%, rgba(44, 102, 247, .35) 100%); background: linear-gradient(128.8deg, rgba(117, 188, 255, 0.35) 0%, rgba(44, 102, 247, 0.35) 100%);
border-radius: toRpx(8); border-radius: toRpx(8);
.task-item-progress-text { .task-item-progress-text {
color: #3B73FF; color: #3b73ff;
font-size: toRpx(24); font-size: toRpx(24);
position: absolute; position: absolute;
top: 50%; top: 50%;
...@@ -655,4 +623,4 @@ export default { ...@@ -655,4 +623,4 @@ export default {
height: calc(100% - #{toRpx(20)}); height: calc(100% - #{toRpx(20)});
} }
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!