|
@@ -10,11 +10,32 @@
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
import { ref } from 'vue'
|
|
import { ref } from 'vue'
|
|
|
|
+import { todayDetail } from '@/api/mine'
|
|
|
|
+import { toPage } from '@/utils/page'
|
|
|
|
|
|
defineOptions({
|
|
defineOptions({
|
|
name: 'MissionCenter', // 任务中心
|
|
name: 'MissionCenter', // 任务中心
|
|
})
|
|
})
|
|
-
|
|
|
|
|
|
+const dailyMission = [
|
|
|
|
+ {
|
|
|
|
+ name: 'Invite Friends Earn Cash',
|
|
|
|
+ description: 'Unlimited rewards',
|
|
|
|
+ icon: '/static/icons/invite-friends.png',
|
|
|
|
+ url: '/pages/referEarn/referEarn',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: 'Open Group Buy',
|
|
|
|
+ description: 'Win group opening rewards',
|
|
|
|
+ icon: '/static/icons/open-group-buy.png',
|
|
|
|
+ url: '/pages/index/index',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: 'Join Group Buy',
|
|
|
|
+ description: 'Win group opening rewards',
|
|
|
|
+ icon: '/static/icons/join-group-buy.png',
|
|
|
|
+ url: '/pages/index/index',
|
|
|
|
+ },
|
|
|
|
+]
|
|
// 当前签到天数
|
|
// 当前签到天数
|
|
const currentDay = ref(3)
|
|
const currentDay = ref(3)
|
|
// 今日是否已签到
|
|
// 今日是否已签到
|
|
@@ -31,6 +52,14 @@ function signIn() {
|
|
}
|
|
}
|
|
// 这里可以添加签到请求逻辑
|
|
// 这里可以添加签到请求逻辑
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+async function getSignList() {
|
|
|
|
+ const res = await todayDetail()
|
|
|
|
+ console.log(res)
|
|
|
|
+}
|
|
|
|
+onLoad(() => {
|
|
|
|
+ getSignList()
|
|
|
|
+})
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<template>
|
|
<template>
|
|
@@ -78,23 +107,23 @@ function signIn() {
|
|
</text>
|
|
</text>
|
|
</view>
|
|
</view>
|
|
<view
|
|
<view
|
|
- v-for="i in 3"
|
|
|
|
- :key="i"
|
|
|
|
|
|
+ v-for="(item, index) in dailyMission"
|
|
|
|
+ :key="index"
|
|
class="flex items-center justify-between py-30rpx"
|
|
class="flex items-center justify-between py-30rpx"
|
|
- :class="{ 'border-b-1 border-b-solid border-b-#E1E1E1': i !== 3 }"
|
|
|
|
|
|
+ :class="{ 'border-b-1 border-b-solid border-b-#E1E1E1': index !== dailyMission.length - 1 }"
|
|
>
|
|
>
|
|
<view class="flex items-center">
|
|
<view class="flex items-center">
|
|
- <image src="https://picsum.photos/100" class="mr-16rpx h-100rpx w-100rpx" />
|
|
|
|
|
|
+ <image :src="item.icon" class="mr-16rpx h-100rpx w-100rpx" />
|
|
<view>
|
|
<view>
|
|
<view class="text-28rpx font-bold">
|
|
<view class="text-28rpx font-bold">
|
|
- Invte Fridens Earn Cash
|
|
|
|
|
|
+ {{ item.name }}
|
|
</view>
|
|
</view>
|
|
<view class="text-24rpx text-#6E6E6E">
|
|
<view class="text-24rpx text-#6E6E6E">
|
|
- Unlimited rewards
|
|
|
|
|
|
+ {{ item.description }}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <wd-button size="small">
|
|
|
|
|
|
+ <wd-button size="small" @click="toPage(item.url)">
|
|
Start Now
|
|
Start Now
|
|
</wd-button>
|
|
</wd-button>
|
|
</view>
|
|
</view>
|