Skip to content

Commit 195df5e

Browse files
committed
feat(detail): add tips about close advertisement
1 parent 7d1e091 commit 195df5e

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

miniprogram/pages/detail/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ Page({
6363
}
6464
},
6565

66+
toMyCenter() {
67+
wx.navigateTo({
68+
url: '/pages/my/index'
69+
})
70+
},
71+
6672
toNext(e) {
6773
const { max, index } = e.target.dataset;
6874

miniprogram/pages/detail/index.less

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,4 +156,15 @@
156156
color: #0052d9;
157157
}
158158
}
159+
}
160+
161+
.ad-tips {
162+
font-size: 20rpx;
163+
margin-top: 16rpx;
164+
color: #999;
165+
text-align: center;
166+
167+
&__route {
168+
color: #0052d9;
169+
}
159170
}

miniprogram/pages/detail/index.wxml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@
4242
</t-tab-panel>
4343
</t-tabs>
4444

45-
<ad-custom wx:if="{{adFlag}}" unit-id="adunit-376059436c4aaff9" style="margin-top: 32rpx"></ad-custom>
45+
<block wx:if="{{adFlag}}" >
46+
<ad-custom unit-id="adunit-376059436c4aaff9" style="margin-top: 32rpx"></ad-custom>
47+
<view class="ad-tips">广告可以在 <text class="ad-tips__route" bind:tap="toMyCenter">“个人中心”</text> 关闭</view>
48+
</block>
4649

4750
<t-toast id="t-toast" />
4851
<view class="popup popup--top popup--{{startTimeout ? 'active' : 'normal'}}">

0 commit comments

Comments
 (0)