Files
new-dianxiaorui-uniapp/uni_modules/gb-qiandao/readme.md
PC-202306242200\Administrator f529129c93 first commit
2026-03-31 10:53:43 +08:00

111 lines
2.1 KiB
Markdown

##简单粗暴的签到系统,非常简单使用
##步骤
1.导入
2.使用示例
```html
<template>
<view>
<gb-qiandao :days="days" :play_number="play_number" :search_number="search_number" :full_ad="full_ad"
:taskList="taskList" :completeDay="completeDay" :dayList="dayList" :rule="rule" :taskStatus="taskStatus"
@receiveMoney="receiveMoney" @listTab="listTab"></gb-qiandao>
</view>
</template>
<script>
export default {
data() {
return {
// 签到天数
days: 0,
// 签到任务第一个
play_number: 0,
// 签到任务第二个
search_number: 0,
// 签到任务第三个
full_ad: 0,
// 已完成天数
completeDay: 0,
// 签到状态 0.代表未签到 1.代表已签到
taskStatus: 0.,
// 签到规则
rule: '这里是签到规则,你可以任意编辑',
// 签到任务奖励数组
dayList: [1, 1, 2, 3, 5, 6, 7],
// 签到任务
taskList: [{
title: '试玩游戏',
img: '../../static/yx.png',
number: 1,
dec: '完成游戏赚相关游戏'
},
{
title: '试玩应用',
img: '../../static/zl.png',
number: 1,
dec: '完成应用赚相关任务'
},
{
title: '观看广告',
img: '../../static/kgg.png',
number: 10,
dec: '观看广告赚相关广告'
}
]
}
},
onLoad() {
this.getData()
},
methods: {
// 获取用户签到得相关信息,自己写接口获取即可
getData() {
},
// 签到并领取奖励
receiveMoney() {
uni.showToast({
title: "签到成功并获得奖励",
icon: 'none',
position: 'bottom'
})
},
// 签到任务完成
listTab(i) {
if (i == 0) {
uni.showToast({
title: "跳转第一个任务",
icon: 'none',
position: 'bottom'
})
}
if (i == 1) {
uni.showToast({
title: "跳转第二个任务",
icon: 'none',
position: 'bottom'
})
}
if (i == 2) {
uni.showToast({
title: "跳转第三个任务",
icon: 'none',
position: 'bottom'
})
}
}
}
}
</script>
<style>
</style>
```