|
|
|
@ -1,5 +1,5 @@ |
|
|
|
<template> |
|
|
|
<view class="ie-page"> |
|
|
|
<view class="ie-page" :class="{ 'low-performance': lowPowerMode }"> |
|
|
|
<view class="ambient ambient-a"></view> |
|
|
|
<view class="ambient ambient-b"></view> |
|
|
|
<view class="top-safe" :style="{ height: menuButtonInfo.top + 'px' }"></view> |
|
|
|
@ -20,6 +20,9 @@ |
|
|
|
<view class="planet-ring"></view> |
|
|
|
<view class="planet-icon">◌</view> |
|
|
|
</view> |
|
|
|
<view class="perf-toggle" :class="{ active: lowPowerMode }" @tap="toggleLowPowerMode"> |
|
|
|
{{ lowPowerMode ? '流畅' : '性能' }} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="drift-field"> |
|
|
|
@ -147,6 +150,7 @@ |
|
|
|
showProfile: false, |
|
|
|
profileReady: false, |
|
|
|
profile: {}, |
|
|
|
lowPowerMode: false, |
|
|
|
targetMode: 'any', |
|
|
|
targetGender: 'any', |
|
|
|
activeDriftText: '', |
|
|
|
@ -241,6 +245,7 @@ |
|
|
|
if (uni.getMenuButtonBoundingClientRect) { |
|
|
|
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect() |
|
|
|
} |
|
|
|
this.lowPowerMode = uni.getStorageSync('ieLowPowerMode') === '1' |
|
|
|
this.pickCompanion() |
|
|
|
this.loadHome() |
|
|
|
this.animateAwakeCount(this.awakeCount) |
|
|
|
@ -273,9 +278,9 @@ |
|
|
|
this.awakeCount = 118 + Math.floor(Math.random() * 28) |
|
|
|
this.waitingCount = 39 + Math.floor(Math.random() * 18) |
|
|
|
this.animateAwakeCount(this.awakeCount) |
|
|
|
}, 4200) |
|
|
|
}, this.lowPowerMode ? 9000 : 4200) |
|
|
|
} |
|
|
|
if (!this.galaxyTimer) { |
|
|
|
if (!this.lowPowerMode && !this.galaxyTimer) { |
|
|
|
this.galaxyTimer = setInterval(() => { |
|
|
|
this.galaxyAutoAngle = (this.galaxyAutoAngle + 3.8) % 360 |
|
|
|
}, 160) |
|
|
|
@ -303,6 +308,10 @@ |
|
|
|
if (this.countTimer) { |
|
|
|
clearInterval(this.countTimer) |
|
|
|
} |
|
|
|
if (this.lowPowerMode) { |
|
|
|
this.displayAwakeCount = target |
|
|
|
return |
|
|
|
} |
|
|
|
const start = this.displayAwakeCount |
|
|
|
const diff = target - start |
|
|
|
let step = 0 |
|
|
|
@ -321,6 +330,13 @@ |
|
|
|
const list = this.companions[this.currentMode] |
|
|
|
this.matchedPerson = list[Math.floor(Math.random() * list.length)] |
|
|
|
}, |
|
|
|
toggleLowPowerMode() { |
|
|
|
this.lowPowerMode = !this.lowPowerMode |
|
|
|
uni.setStorageSync('ieLowPowerMode', this.lowPowerMode ? '1' : '0') |
|
|
|
this.stopPageTimers() |
|
|
|
this.startPageTimers() |
|
|
|
uni.showToast({ title: this.lowPowerMode ? '已开启流畅模式' : '已开启氛围动效', icon: 'none' }) |
|
|
|
}, |
|
|
|
async loadHome() { |
|
|
|
const home = await ieHome() |
|
|
|
if (!home) return |
|
|
|
@ -1152,6 +1168,28 @@ |
|
|
|
box-shadow: 0 24rpx 70rpx rgba(96,112,160,.13); |
|
|
|
} |
|
|
|
|
|
|
|
.perf-toggle { |
|
|
|
position: absolute; |
|
|
|
right: 0; |
|
|
|
top: 148rpx; |
|
|
|
z-index: 4; |
|
|
|
height: 48rpx; |
|
|
|
line-height: 48rpx; |
|
|
|
padding: 0 18rpx; |
|
|
|
border-radius: 999rpx; |
|
|
|
color: rgba(22,27,46,.58); |
|
|
|
background: rgba(255,255,255,.72); |
|
|
|
border: 1rpx solid rgba(255,255,255,.86); |
|
|
|
box-shadow: 0 12rpx 32rpx rgba(96,112,160,.1); |
|
|
|
font-size: 20rpx; |
|
|
|
font-weight: 800; |
|
|
|
} |
|
|
|
|
|
|
|
.perf-toggle.active { |
|
|
|
color: #11162a; |
|
|
|
background: #a9ffe7; |
|
|
|
} |
|
|
|
|
|
|
|
.drift-field { |
|
|
|
position: relative; |
|
|
|
z-index: 2; |
|
|
|
@ -2108,4 +2146,52 @@ |
|
|
|
from { filter: hue-rotate(0deg); } |
|
|
|
to { filter: hue-rotate(18deg); } |
|
|
|
} |
|
|
|
|
|
|
|
.low-performance::before, |
|
|
|
.low-performance::after, |
|
|
|
.low-performance .ambient, |
|
|
|
.low-performance .wave-line, |
|
|
|
.low-performance .liquid, |
|
|
|
.low-performance .soul-particle, |
|
|
|
.low-performance .galaxy-ring, |
|
|
|
.low-performance .orbit-planet::after, |
|
|
|
.low-performance .mood-dock::before, |
|
|
|
.low-performance .tab-glow { |
|
|
|
display: none !important; |
|
|
|
} |
|
|
|
|
|
|
|
.low-performance .drift-fragment, |
|
|
|
.low-performance .galaxy-breath, |
|
|
|
.low-performance .galaxy-body, |
|
|
|
.low-performance .planet-sub, |
|
|
|
.low-performance .start-match-btn, |
|
|
|
.low-performance .count-num, |
|
|
|
.low-performance .typing-cursor { |
|
|
|
animation: none !important; |
|
|
|
transition: none !important; |
|
|
|
} |
|
|
|
|
|
|
|
.low-performance .signal-planet { |
|
|
|
transform: translate(-50%, -50%) scale(.9); |
|
|
|
} |
|
|
|
|
|
|
|
.low-performance .galaxy-body { |
|
|
|
box-shadow: |
|
|
|
0 18rpx 48rpx rgba(108,92,231,.14), |
|
|
|
inset 8rpx 10rpx 24rpx rgba(255,255,255,.52); |
|
|
|
} |
|
|
|
|
|
|
|
.low-performance .mood-dock, |
|
|
|
.low-performance .target-dock, |
|
|
|
.low-performance .bottom-actions, |
|
|
|
.low-performance .drift-fragment, |
|
|
|
.low-performance .match-mask, |
|
|
|
.low-performance .profile-mask, |
|
|
|
.low-performance .sub-line { |
|
|
|
backdrop-filter: none !important; |
|
|
|
} |
|
|
|
|
|
|
|
.low-performance .drift-fragment:nth-of-type(n+5) { |
|
|
|
display: none; |
|
|
|
} |
|
|
|
</style> |
|
|
|
|