|
@@ -5,6 +5,7 @@ import Modal from "../../components/Modal/Modal.vue";
|
|
import { ref } from "vue";
|
|
import { ref } from "vue";
|
|
import { request } from "../../utils/request";
|
|
import { request } from "../../utils/request";
|
|
import { onShow } from "@dcloudio/uni-app";
|
|
import { onShow } from "@dcloudio/uni-app";
|
|
|
|
+import { router } from "../../utils/router";
|
|
const prizeList = ref([
|
|
const prizeList = ref([
|
|
{
|
|
{
|
|
id: "coupon88",
|
|
id: "coupon88",
|
|
@@ -56,6 +57,10 @@ const onDone = (_, origin) => {
|
|
content: origin.name,
|
|
content: origin.name,
|
|
});
|
|
});
|
|
};
|
|
};
|
|
|
|
+const nameData = ref({
|
|
|
|
+ name: '',
|
|
|
|
+ id: 0
|
|
|
|
+})
|
|
|
|
|
|
const getList = async () => {
|
|
const getList = async () => {
|
|
const getlottery = await request(
|
|
const getlottery = await request(
|
|
@@ -74,6 +79,14 @@ const getList = async () => {
|
|
name: item.reward_name,
|
|
name: item.reward_name,
|
|
};
|
|
};
|
|
});
|
|
});
|
|
|
|
+ const d = await request('api/question_bank/question_reception/check_in/get_user_check_info')
|
|
|
|
+ const t = ['first', 'second', 'third', 'fourth']
|
|
|
|
+ data.value = data.value.map((i, index) => ({
|
|
|
|
+ ...i,
|
|
|
|
+ status: d.data[t[index] + '_day_status'],
|
|
|
|
+ }))
|
|
|
|
+ const time = await request('api/question_bank/question_reception/check_in/get_valid_activity')
|
|
|
|
+ nameData.value = time.data
|
|
};
|
|
};
|
|
const showModal = ref({
|
|
const showModal = ref({
|
|
show: false,
|
|
show: false,
|
|
@@ -82,10 +95,14 @@ const qiandao = async () => {
|
|
const res = await request(
|
|
const res = await request(
|
|
"api/question_bank/question_reception/check_in/set_user_record",
|
|
"api/question_bank/question_reception/check_in/set_user_record",
|
|
{
|
|
{
|
|
- activity_id: 1,
|
|
|
|
|
|
+ activity_id: nameData.value.id,
|
|
}
|
|
}
|
|
);
|
|
);
|
|
if (res.code === "error") return;
|
|
if (res.code === "error") return;
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '打卡成功',
|
|
|
|
+ icon: 'none'
|
|
|
|
+ })
|
|
if (day.value === data.value.length) {
|
|
if (day.value === data.value.length) {
|
|
const reward = await request(
|
|
const reward = await request(
|
|
"api/question_bank/question_reception/lottery_sign_in/get_reward"
|
|
"api/question_bank/question_reception/lottery_sign_in/get_reward"
|
|
@@ -95,6 +112,7 @@ const qiandao = async () => {
|
|
...reward.data,
|
|
...reward.data,
|
|
};
|
|
};
|
|
}
|
|
}
|
|
|
|
+ getList()
|
|
};
|
|
};
|
|
|
|
|
|
onShow(getList);
|
|
onShow(getList);
|
|
@@ -111,6 +129,7 @@ onShow(getList);
|
|
/>
|
|
/>
|
|
</template>
|
|
</template>
|
|
<div class="items">
|
|
<div class="items">
|
|
|
|
+ <div style="width: 100%; margin-bottom: 32rpx; font-weight: bold;font-size: 28rpx;color: #7D3800;">{{ nameData.name }}</div>
|
|
<div class="gifs">
|
|
<div class="gifs">
|
|
<div
|
|
<div
|
|
v-for="item in data"
|
|
v-for="item in data"
|
|
@@ -177,6 +196,14 @@ onShow(getList);
|
|
<div style="color: #fff">剩余 {{ lottery }} 次</div>
|
|
<div style="color: #fff">剩余 {{ lottery }} 次</div>
|
|
</div>
|
|
</div>
|
|
</Container>
|
|
</Container>
|
|
|
|
+ <div class="fixed-right">
|
|
|
|
+ <div class="item" @click="router.push({
|
|
|
|
+ url: '/pages/richpage/rule'
|
|
|
|
+ })">规则</div>
|
|
|
|
+ <div class="item" @click="router.push({
|
|
|
|
+ url: '/pages/punch/jiangli'
|
|
|
|
+ })">奖励</div>
|
|
|
|
+ </div>
|
|
<Modal v-model:open="showModal.show">
|
|
<Modal v-model:open="showModal.show">
|
|
<template #custom>
|
|
<template #custom>
|
|
<div class="css">
|
|
<div class="css">
|
|
@@ -198,6 +225,26 @@ onShow(getList);
|
|
</Modal>
|
|
</Modal>
|
|
</template>
|
|
</template>
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
|
+.fixed-right {
|
|
|
|
+ position: fixed;
|
|
|
|
+ top: 20%;
|
|
|
|
+ right: 0;
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ gap: 20rpx;
|
|
|
|
+ .item {
|
|
|
|
+ width: 64rpx;
|
|
|
|
+height: 42rpx;
|
|
|
|
+background: rgba(0,0,0,0.5);
|
|
|
|
+border-radius: 500rpx 0rpx 0rpx 500rpx;
|
|
|
|
+display: flex;
|
|
|
|
+align-items: center;
|
|
|
|
+justify-content: center;
|
|
|
|
+font-weight: 500;
|
|
|
|
+font-size: 24rpx;
|
|
|
|
+color: #FFFFFF;
|
|
|
|
+ }
|
|
|
|
+}
|
|
.b {
|
|
.b {
|
|
background: linear-gradient(90deg, #ff8f18 0%, #fe6002 100%);
|
|
background: linear-gradient(90deg, #ff8f18 0%, #fe6002 100%);
|
|
border-radius: 200rpx 200rpx 200rpx 200rpx;
|
|
border-radius: 200rpx 200rpx 200rpx 200rpx;
|
|
@@ -262,7 +309,7 @@ onShow(getList);
|
|
|
|
|
|
|
|
|
|
.items {
|
|
.items {
|
|
- background: url(https://openwork-oss.oss-cn-shenzhen.aliyuncs.com/uploads/question/2025/06/9rtXotBySN0yiKmoyT0d41QPox63L3F8Gpdvyt00.png)
|
|
|
|
|
|
+ background: url(https://openwork-oss.oss-cn-shenzhen.aliyuncs.com/uploads/question/2025/06/mWqxGK0BDpfayEeb7bRwOP0oEZVOZsTgXdIQKXp3.png)
|
|
no-repeat;
|
|
no-repeat;
|
|
background-size: 100% 100%;
|
|
background-size: 100% 100%;
|
|
width: 654rpx;
|
|
width: 654rpx;
|