refactor(index): 调整版本水印相关逻辑与样式
1. 调整版本连击触发条件为3次以上而非≥3次 2. 优化版本水印的DOM结构和触发绑定方式 3. 简化背景内联样式并调整水印内边距 4. 修改版本水印的颜色和阴影样式
This commit is contained in:
@@ -33,15 +33,15 @@
|
|||||||
</diy-index-page>
|
</diy-index-page>
|
||||||
|
|
||||||
<view v-else class="bg-index"
|
<view v-else class="bg-index"
|
||||||
:style="{ backgroundImage: backgroundUrl, paddingTop: paddingTop, marginTop: marginTop, paddingBottom: '80rpx' }">
|
:style="{ backgroundImage: backgroundUrl, paddingTop: paddingTop, marginTop: marginTop }">
|
||||||
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop"
|
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop"
|
||||||
:followOfficialAccount="followOfficialAccount" @loaded="onDiyGroupLoaded" />
|
:followOfficialAccount="followOfficialAccount" @loaded="onDiyGroupLoaded" />
|
||||||
<ns-copyright v-show="isShowCopyRight" />
|
<view class="version-watermark-wrap" v-if="versionWatermark && diyGroupReady" @tap="onVersionTap">
|
||||||
<view class="version-watermark-wrap">
|
<view class="version-watermark">
|
||||||
<view class="version-watermark" v-if="versionWatermark && diyGroupReady" @tap="onVersionTap">
|
|
||||||
<text>{{ versionWatermark }}</text>
|
<text>{{ versionWatermark }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<ns-copyright v-show="isShowCopyRight" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<template v-if="adv.advshow != -1">
|
<template v-if="adv.advshow != -1">
|
||||||
@@ -253,7 +253,7 @@ export default {
|
|||||||
|
|
||||||
.version-watermark-wrap {
|
.version-watermark-wrap {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 18rpx 0 24rpx;
|
padding: 8rpx 0 8rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.version-watermark {
|
.version-watermark {
|
||||||
@@ -262,10 +262,7 @@ export default {
|
|||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
letter-spacing: -0.3rpx;
|
letter-spacing: -0.3rpx;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
color: rgba(226, 226, 226, 0.2);
|
color: rgba(245, 245, 245, 0.1);
|
||||||
text-shadow:
|
|
||||||
0 1rpx 0 rgba(255, 255, 255, 0.9),
|
|
||||||
0 -1rpx 0 rgba(0, 0, 0, 0.06);
|
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -128,14 +128,14 @@ export default {
|
|||||||
this.diyGroupReady = true;
|
this.diyGroupReady = true;
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 版本连击 3 次显示构建版本信息(供测试人员使用)
|
* 版本连击 3 次以上显示构建版本信息(供测试人员使用)
|
||||||
*/
|
*/
|
||||||
onVersionTap() {
|
onVersionTap() {
|
||||||
this._titleTapCount = (this._titleTapCount || 0) + 1;
|
this._titleTapCount = (this._titleTapCount || 0) + 1;
|
||||||
if (this._titleTapTimer) {
|
if (this._titleTapTimer) {
|
||||||
clearTimeout(this._titleTapTimer);
|
clearTimeout(this._titleTapTimer);
|
||||||
}
|
}
|
||||||
if (this._titleTapCount >= 3) {
|
if (this._titleTapCount > 3) {
|
||||||
this._titleTapCount = 0;
|
this._titleTapCount = 0;
|
||||||
this._showVersionInfo();
|
this._showVersionInfo();
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user