feat: 下载次数限制,免费额度用完后第一次需要分享,之后需要看广告
This commit is contained in:
@@ -55,5 +55,10 @@
|
||||
background: linear-gradient(135deg, #07c160 0%, #06ad56 100%);
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
&--secondary {
|
||||
background: #f5f5f5;
|
||||
color: #323233;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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');
|
||||
},
|
||||
},
|
||||
|
||||
@@ -8,11 +8,9 @@
|
||||
bind:click-overlay="onOverlayClick"
|
||||
custom-class="share-guide-popup">
|
||||
<view class="share-guide-popup-content">
|
||||
<view class="share-guide-popup-title">分享解锁下载</view>
|
||||
<view class="share-guide-popup-message"> 今日免费下载次数已用完 </view>
|
||||
<view class="share-guide-popup-hint">
|
||||
分享给好友后,可重新点击“下载打印”按钮继续下载
|
||||
</view>
|
||||
<view class="share-guide-popup-title">解锁继续下载</view>
|
||||
<view class="share-guide-popup-message">{{unlockMessage}}</view>
|
||||
<view class="share-guide-popup-hint">{{unlockHint}}</view>
|
||||
<view class="share-guide-popup-buttons">
|
||||
<button
|
||||
class="share-button share-button--primary"
|
||||
|
||||
Reference in New Issue
Block a user