Commit 76d1df8c authored by 王炽's avatar 王炽

66666

parent 56480949
...@@ -741,8 +741,7 @@ ...@@ -741,8 +741,7 @@
.task_button { .task_button {
width: 384rpx; width: 384rpx;
height: 86rpx; height: 86rpx;
background: rgba(255, 255, 255, 0); border: none;
border: 2px solid #e6a23c;
border-radius: 60rpx; border-radius: 60rpx;
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -753,58 +752,12 @@ ...@@ -753,58 +752,12 @@
.task_button_text { .task_button_text {
font-size: 32rpx; font-size: 32rpx;
color: #e6a23c;
font-weight: bold; font-weight: bold;
} }
&:active { &:active {
transform: scale(0.95); transform: scale(0.95);
} }
// itemIndex = 0
&.item-0 {
border-color: #503404;
.task_button_text.item-0 {
color: #503404;
}
}
// itemIndex = 1
&.item-1 {
border-color: #284A6C;
.task_button_text.item-1 {
color: #284A6C;
}
}
// itemIndex = 2
&.item-2 {
border-color: #322D6F;
.task_button_text.item-2 {
color: #322D6F;
}
}
// itemIndex = 3
&.item-3 {
border-color: #513403;
.task_button_text.item-3 {
color: #513403;
}
}
// itemIndex = 4
&.item-4 {
border-color: #F7D1A0;
.task_button_text.item-4 {
color: #F7D1A0;
}
}
} }
} }
......
...@@ -267,8 +267,8 @@ ...@@ -267,8 +267,8 @@
<text class="signin_button_text">立即签到</text> <text class="signin_button_text">立即签到</text>
</view> </view>
<!-- 已签到状态 --> <!-- 已签到状态 -->
<view v-else class="task_button" :class="`item-${itemIndex}`" @click="handleTaskButtonClick"> <view v-else class="task_button" :class="`item-${itemIndex}`" :style="getTaskButtonBgStyle" @click="handleTaskButtonClick">
<text class="task_button_text" :class="`item-${itemIndex}`">赚更多积分</text> <text class="task_button_text" :class="`item-${itemIndex}`" :style="{ color: getTaskButtonTextColor }">赚更多积分</text>
</view> </view>
</view> </view>
<!-- 积分限时购 --> <!-- 积分限时购 -->
...@@ -1688,6 +1688,26 @@ const getWeekdayLabel = (day) => { ...@@ -1688,6 +1688,26 @@ const getWeekdayLabel = (day) => {
const weekdays = ['', '周一', '周二', '周三', '周四', '周五', '周六', '周日']; const weekdays = ['', '周一', '周二', '周三', '周四', '周五', '周六', '周日'];
return weekdays[day] || `第${day}天`; return weekdays[day] || `第${day}天`;
} }
// 获取任务按钮背景渐变样式
const getTaskButtonBgStyle = computed(() => {
const gradients = {
0: { from: '#D1AF82', to: '#E6C7A3' },
1: { from: '#8DBAE6', to: '#A0C9F1' },
2: { from: '#9980C2', to: '#BEA8E2' },
3: { from: '#CDA36B', to: '#E0B97D' },
4: { from: '#E7CA9F', to: '#EBD9C9' }
};
const gradient = gradients[itemIndex.value] || gradients[0];
return {
background: `linear-gradient(to right, ${gradient.from}, ${gradient.to})`
};
});
// 获取任务按钮文字颜色
const getTaskButtonTextColor = computed(() => {
return itemIndex.value === 4 ? '#030200' : '#ffffff';
});
const getColor = (type) => { const getColor = (type) => {
let colors = ''; let colors = '';
switch (type) { switch (type) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment