新建项目
This commit is contained in:
89
pages/lobby/lobby.wxml
Normal file
89
pages/lobby/lobby.wxml
Normal file
@@ -0,0 +1,89 @@
|
||||
<view class="page lobby-page" wx:if="{{room}}">
|
||||
<view class="room-head">
|
||||
<view class="row between">
|
||||
<view class="pill">{{modeName}}</view>
|
||||
<view class="room-status"><view class="pulse"></view>等待加入</view>
|
||||
</view>
|
||||
<view class="room-name">{{room.name}}</view>
|
||||
<view class="code-wrap" bindtap="copyCode">
|
||||
<view>
|
||||
<view class="code-label">房间码 · 点击复制</view>
|
||||
<view class="room-code">{{room.code}}</view>
|
||||
</view>
|
||||
<button class="share-mini" open-type="share">邀请好友</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="rule-strip">
|
||||
<view>
|
||||
<text class="rule-number">{{room.settings.durationMinutes}}</text>
|
||||
<text class="rule-unit">分钟</text>
|
||||
<view class="rule-name">游戏时间</view>
|
||||
</view>
|
||||
<view>
|
||||
<text class="rule-number">{{room.settings.radiusMeters}}</text>
|
||||
<text class="rule-unit">米</text>
|
||||
<view class="rule-name">活动半径</view>
|
||||
</view>
|
||||
<view>
|
||||
<text class="rule-number">{{room.settings.seekerCount}}</text>
|
||||
<text class="rule-unit">人</text>
|
||||
<view class="rule-name">寻找者</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="row between player-heading">
|
||||
<view class="section-label">玩家 {{room.players.length}} / {{room.settings.maxPlayers}}</view>
|
||||
<view class="muted demo-note">已加入模拟队友</view>
|
||||
</view>
|
||||
<view class="player-list">
|
||||
<view wx:for="{{room.players}}" wx:key="id" class="player-row">
|
||||
<view class="player-avatar {{item.isHost ? 'host' : ''}}">{{item.avatar}}</view>
|
||||
<view class="player-main">
|
||||
<view class="player-name">
|
||||
{{item.name}}
|
||||
<text wx:if="{{item.isHost}}" class="host-tag">房主</text>
|
||||
<text wx:if="{{item.isBot}}" class="bot-tag">模拟</text>
|
||||
</view>
|
||||
<view class="player-state">{{item.ready ? '已准备好' : '正在确认装备'}}</view>
|
||||
</view>
|
||||
<view class="ready-dot {{item.ready ? 'ready' : ''}}">
|
||||
{{item.ready ? '✓' : '…'}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="tip-card">
|
||||
<view class="tip-icon">!</view>
|
||||
<view>
|
||||
<view class="tip-title">开局前安全确认</view>
|
||||
<view class="tip-copy">确保所有人定位可用、电量充足,并约定紧急集合点。抓捕只用口令确认,禁止身体接触。</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="button-stack">
|
||||
<button
|
||||
wx:if="{{showStartButton}}"
|
||||
class="primary-button"
|
||||
loading="{{starting}}"
|
||||
disabled="{{starting || !canStart}}"
|
||||
bindtap="startGame"
|
||||
>
|
||||
{{startHint}}
|
||||
</button>
|
||||
<button
|
||||
wx:else
|
||||
class="{{meReady ? 'ghost-button' : 'secondary-button'}}"
|
||||
bindtap="toggleReady"
|
||||
>
|
||||
{{meReady ? '取消准备' : '我准备好了'}}
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="state-page" wx:elif="{{errorMessage}}">
|
||||
<view class="state-icon">!</view>
|
||||
<view class="state-title">无法进入候场</view>
|
||||
<view class="state-copy">{{errorMessage}}</view>
|
||||
<button class="primary-button state-action" bindtap="backHome">返回首页</button>
|
||||
</view>
|
||||
Reference in New Issue
Block a user