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

66666

parent 56480949
......@@ -741,8 +741,7 @@
.task_button {
width: 384rpx;
height: 86rpx;
background: rgba(255, 255, 255, 0);
border: 2px solid #e6a23c;
border: none;
border-radius: 60rpx;
display: flex;
align-items: center;
......@@ -753,58 +752,12 @@
.task_button_text {
font-size: 32rpx;
color: #e6a23c;
font-weight: bold;
}
&:active {
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 @@
<text class="signin_button_text">立即签到</text>
</view>
<!-- 已签到状态 -->
<view v-else class="task_button" :class="`item-${itemIndex}`" @click="handleTaskButtonClick">
<text class="task_button_text" :class="`item-${itemIndex}`">赚更多积分</text>
<view v-else class="task_button" :class="`item-${itemIndex}`" :style="getTaskButtonBgStyle" @click="handleTaskButtonClick">
<text class="task_button_text" :class="`item-${itemIndex}`" :style="{ color: getTaskButtonTextColor }">赚更多积分</text>
</view>
</view>
<!-- 积分限时购 -->
......@@ -1688,6 +1688,26 @@ const getWeekdayLabel = (day) => {
const weekdays = ['', '周一', '周二', '周三', '周四', '周五', '周六', '周日'];
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) => {
let colors = '';
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