feat: 下载次数限制,免费额度用完后第一次需要分享,之后需要看广告
This commit is contained in:
@@ -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');
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user