Commit 401d000d authored by 王炽's avatar 王炽

66666

parent 226e7123
.task_complete_tips_overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
z-index: 9999;
.mask_overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
}
.task_complete_tips_container {
position: relative;
width: 600rpx;
// height: 500rpx;
border-radius: 30rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
z-index: 2;
.tips_title {
font-size: 50rpx;
font-weight: bold;
color: #ffffff;
margin-bottom: 20rpx;
text-align: center;
}
.points_text {
font-size: 32rpx;
color: #ffffff;
margin-bottom: 80rpx;
text-align: center;
}
.task_complete_icon {
width: 122rpx;
height: 122rpx;
margin-bottom: 90rpx;
}
.accept_button {
width: 300rpx;
height: 80rpx;
background: #D3A458;
border-radius: 40rpx;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 104rpx;
.accept_button_text {
font-size: 32rpx;
color: #ffffff;
font-weight: 500;
}
}
.close_button {
width: 60rpx;
height: 60rpx;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
background: rgba(0, 0, 0, 0.5);
.close_icon {
margin-top: -7rpx;
margin-left: 2rpx;
font-size: 40rpx;
color: #ffffff;
font-weight: bold;
}
}
}
}
\ No newline at end of file
<template>
<view class="task_complete_tips_overlay" v-if="visible" @click.stop>
<!-- 遮罩层 -->
<view class="mask_overlay"></view>
<!-- 弹窗内容 -->
<view class="task_complete_tips_container">
<!-- 第一行:标题文字 -->
<text class="tips_title">完成{{ taskTitle }}任务</text>
<!-- 第二行:积分文字 -->
<text class="points_text">获得{{ points }}积分</text>
<!-- 第三行:图片 -->
<image class="task_complete_icon" :src="$baseUrl + `integral/1023/jifenIcon1.png`" mode="aspectFit" />
<!-- 第四行:开心收下按钮 -->
<view class="accept_button" @click="handleAccept">
<text class="accept_button_text">开心收下</text>
</view>
<!-- 第五行:关闭按钮 -->
<view class="close_button" @click="handleClose">
<text class="close_icon">×</text>
</view>
</view>
</view>
</template>
<script setup>
import { defineProps, defineEmits } from 'vue';
// Props 定义
const props = defineProps({
visible: {
type: Boolean,
default: false
},
points: {
type: Number,
default: 100
},
taskTitle: {
type: String,
default: 'xxx'
}
});
// Emits 定义
const emit = defineEmits(['close', 'accept']);
// 关闭弹窗
const handleClose = () => {
emit('close');
};
// 开心收下按钮点击
const handleAccept = () => {
emit('accept');
emit('close');
};
</script>
<style lang="less" scoped>
@import '@/components/renwu/TaskCompleteTips.less';
</style>
<template>
<view class="task_pop_overlay" v-if="visible" @click="handleClose">
<view class="task_pop_overlay" v-if="visible" @click.stop>
<view class="task_pop_container" @click.stop>
<!-- 弹窗头部 -->
<view class="task_pop_header">
......@@ -37,11 +37,20 @@
</view>
</view>
</view>
<!-- 任务完成提示弹窗 -->
<TaskCompleteTips
:visible="showTaskCompleteTips"
:points="currentTaskPoints"
:taskTitle="currentTaskTitle"
@close="handleCloseTaskCompleteTips"
/>
</view>
</template>
<script setup>
import { defineProps, defineEmits } from 'vue';
import { defineProps, defineEmits, ref } from 'vue';
import TaskCompleteTips from './TaskCompleteTips.vue';
// Props 定义
const props = defineProps({
......@@ -54,6 +63,11 @@ const props = defineProps({
// Emits 定义
const emit = defineEmits(['close', 'taskClick']);
// 任务完成提示弹窗状态
const showTaskCompleteTips = ref(false);
const currentTaskPoints = ref(0);
const currentTaskTitle = ref('');
// 任务列表数据
const taskList = [
{
......@@ -79,7 +93,7 @@ const taskList = [
},
{
id: 4,
title: '浏览星妈优选商城',
title: '完成首单优选消费',
points: 20,
icon: '/static/images/task_browse.png',
completed: false
......@@ -91,34 +105,6 @@ const taskList = [
icon: '/static/images/task_follow.png',
completed: true
},
{
id: 6,
title: '添加企业微信',
points: 20,
icon: '/static/images/task_wechat.png',
completed: false
},
{
id: 6,
title: '添加企业微信',
points: 20,
icon: '/static/images/task_wechat.png',
completed: false
},
{
id: 6,
title: '添加企业微信',
points: 20,
icon: '/static/images/task_wechat.png',
completed: false
},
{
id: 6,
title: '添加企业微信',
points: 20,
icon: '/static/images/task_wechat.png',
completed: false
},
{
id: 6,
title: '添加企业微信',
......@@ -141,8 +127,18 @@ const handleTaskClick = (task, index) => {
return;
}
// 显示任务完成提示弹窗
currentTaskTitle.value = task.title;
currentTaskPoints.value = task.points;
// showTaskCompleteTips.value = true;
emit('taskClick', { task, index });
};
// 关闭任务完成提示弹窗
const handleCloseTaskCompleteTips = () => {
showTaskCompleteTips.value = false;
};
</script>
<style lang="less" scoped>
......
.integral-container{
width: 100%;
height: 100vh;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
......
......@@ -421,7 +421,7 @@
</view>
<!-- 7天连续签到奖励容器 -->
<view class="signin_reward_container" v-if="false">
<view class="signin_reward_container" v-if="true">
<!-- 标题区域 -->
<view class="signin_title_area">
<text class="signin_main_title">连签7天,奖励翻5倍</text>
......@@ -2800,11 +2800,11 @@
const handleTaskClick = (data) => {
console.log('任务点击:', data);
// 这里可以添加具体的任务跳转逻辑
uni.showToast({
title: `开始${data.task.title}`,
icon: 'none',
duration: 2000
});
// uni.showToast({
// title: `开始${data.task.title}`,
// icon: 'none',
// duration: 2000
// });
}
......
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