This commit is contained in:
win 2026-04-21 12:53:34 +08:00
parent 575ccb2cfa
commit e0a1d6e934
2 changed files with 23 additions and 85 deletions

View File

@ -51,16 +51,8 @@
<text class="enter-btn-text">{{ entering ? '正在进入...' : (ticketCount > 0 ? '立即开局' : '资格不足') }}</text>
</view>
<view
class="btn-free"
:class="{ disabled: entering }"
@tap="enterGame('minesweeper_free')"
>
<text class="free-btn-text">🍭 练习试玩 </text>
</view>
<view
class="btn-secondary"
<view
class="btn-secondary"
@tap="goRoomList"
>
<text class="secondary-btn-text">📡 对战列表 / 围观</text>
@ -108,7 +100,7 @@ export default {
},
async enterGame(code) {
const targetCode = code || this.gameCode
if (targetCode !== 'minesweeper_free' && this.ticketCount <= 0) return
if (this.ticketCount <= 0) return
if (this.entering) return
this.entering = true
@ -324,35 +316,6 @@ export default {
}
}
.btn-free {
margin-top: 24rpx;
height: 110rpx;
width: 100%;
border-radius: 55rpx;
background: rgba($brand-primary, 0.15);
border: 1px solid rgba($brand-primary, 0.3);
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s;
&:active {
transform: scale(0.98);
background: rgba($brand-primary, 0.25);
}
&.disabled {
opacity: 0.5;
pointer-events: none;
}
}
.free-btn-text {
color: $brand-primary;
font-size: 32rpx;
font-weight: 700;
}
.btn-secondary {
margin-top: 24rpx;
background: rgba(255,255,255,0.05);

View File

@ -2,22 +2,10 @@
<view class="page">
<view class="bg-decoration"></view>
<!-- Tab 切换 -->
<view class="tab-bar glass-card">
<view
class="tab-item"
:class="{ active: gameType === 'minesweeper' }"
@tap="switchTab('minesweeper')"
>
<text class="tab-text">付费模式</text>
</view>
<view
class="tab-item"
:class="{ active: gameType === 'minesweeper_free' }"
@tap="switchTab('minesweeper_free')"
>
<text class="tab-text">免费模式</text>
</view>
<!-- 对战分说明 -->
<view class="score-tip glass-card">
<text class="score-tip-icon">💡</text>
<text class="score-tip-text">对战分 = 游戏内排名积分赢局 +1000 基础分得分/伤害/宝箱均有加成与平台充值积分无关</text>
</view>
<!-- 我的排名 -->
@ -44,7 +32,7 @@
<view class="my-divider"></view>
<view class="my-right">
<text class="my-pts">{{ myRank.total_rank_points || 0 }}</text>
<text class="my-pts-label"></text>
<text class="my-pts-label">对战</text>
</view>
</view>
@ -123,11 +111,6 @@ export default {
this.fetchList(true)
},
methods: {
switchTab(type) {
if (this.gameType === type) return
this.gameType = type
this.fetchList(true)
},
async fetchList(reset = false) {
if (reset) {
this.list = []
@ -179,36 +162,27 @@ export default {
overflow: hidden;
}
/* Tab */
.tab-bar {
/* 对战分说明 */
.score-tip {
position: relative;
z-index: 10;
z-index: 5;
margin: 0 32rpx 20rpx;
padding: 20rpx 24rpx;
display: flex;
margin: 24rpx 32rpx 20rpx;
padding: 8rpx;
border-radius: $radius-round;
align-items: flex-start;
gap: 12rpx;
}
.tab-item {
flex: 1;
height: 72rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius: $radius-round;
transition: all $transition-normal $ease-out;
&.active {
background: $gradient-brand;
box-shadow: $shadow-warm;
.tab-text { color: #fff; font-weight: 700; }
}
.score-tip-icon {
font-size: 28rpx;
flex-shrink: 0;
line-height: 1.6;
}
.tab-text {
font-size: $font-md;
.score-tip-text {
font-size: 22rpx;
color: $text-sub;
font-weight: 600;
line-height: 1.6;
}
/* 我的排名 */
@ -296,6 +270,7 @@ export default {
/* 列表 */
.list-wrap {
flex: 1;
height: 0;
padding: 0 32rpx;
}