feat: 下载次数限制,免费额度用完后第一次需要分享,之后需要看广告

This commit is contained in:
R524809
2026-05-20 16:51:54 +08:00
parent d52339c0fa
commit 51650db04e
9 changed files with 282 additions and 225 deletions
@@ -1,4 +1,9 @@
import { recordShareSuccess } from '../../utils/shareGuide';
import {
getShareGuidePopupCopy,
recordShareSuccess,
} from '../../utils/shareGuide';
const popupCopy = getShareGuidePopupCopy();
Component({
options: {},
@@ -14,7 +19,10 @@ Component({
/**
* 组件的初始数据
*/
data: {},
data: {
unlockMessage: popupCopy.message,
unlockHint: popupCopy.hint,
},
/**
* 组件的方法列表
*/
@@ -31,9 +39,7 @@ Component({
/** 点击分享按钮 */
onShare() {
// 记录分享成功(用户点击了分享按钮,视为已分享)
recordShareSuccess();
// 关闭弹窗并通知父组件分享成功(不触发下载,用户需要重新点击下载按钮)
this.triggerEvent('onShareSuccess');
},
},