|
|
1 yıl önce | |
|---|---|---|
| .. | ||
| components | 1 yıl önce | |
| pages | 1 yıl önce | |
| static | 1 yıl önce | |
| uniCloud | 1 yıl önce | |
| utils | 1 yıl önce | |
| changelog.md | 1 yıl önce | |
| package.json | 1 yıl önce | |
| readme.md | 1 yıl önce | |
1.普通签到是通过clientDb实现,如果你要使用看广告签到的方式,
为了防止刷量需要修改`opendb-sign-in.schema`中`permission` -> `create` 的值设置为`false`
文件路径 :
uni_modules/uni-sign-in/uniCloud/database/opendb-sign-in.schema.json
示例:
{
"bsonType": "object",
"required": [],
"permission": {
"read": "auth.uid == doc.user_id",
"create": false,
"update": false,
"delete": false
}
}
<template>
<view>
<uni-sign-in ref="signIn"></uni-sign-in>
<button type="default" @click="signIn">签到</button>
</view>
</template>
<script>
export default {
methods: {
signIn() { //签到
this.$refs.signIn.open()
}
}
}
</script>
详情参考uni-starter

DB Schema表结构,
/uniCloud/database/opendb-sign-in.schema.json
> 更多表结构说明详情:https://uniapp.dcloud.io/uniCloud/schemauni-clientDB-actions 一个可编程的 clientDB 前置后置操作
两个api接口
普通签到this.$refs.signIn.open()
看激励视频广告签到this.$refs.signIn.showRewardedVideoAd()
是否支持配置积分数
答:暂不支持,今后的版本有计划支持
有没有更多玩法
答:计划今后推出 (2.1)需要看广告才能签到 --- 已支持 (2.2)补签的玩法