增加小程序,修改游戏前端

This commit is contained in:
2026-02-04 17:29:51 +08:00
parent de17737ca1
commit 8c677908d7
835 changed files with 283328 additions and 2165 deletions

View File

@@ -0,0 +1,33 @@
<view class="container">
<view class="header-tip">
<text>输入名字,看看今天谁是天选打工人</text>
</view>
<view class="input-area">
<input class="input" placeholder="输入名字 (如: 小明)" value="{{newName}}" bindinput="onInput" bindconfirm="addName" />
<view class="btn-add" bindtap="addName">添加</view>
</view>
<scroll-view scroll-y class="list-area">
<view class="name-list">
<block wx:for="{{names}}" wx:key="*this">
<view class="name-item">
<text class="name-text">{{item}}</text>
<view class="btn-delete" bindtap="removeName" data-index="{{index}}">×</view>
</view>
</block>
<view wx:if="{{names.length === 0}}" class="empty-tip">
<text>还没有候选人,快去添加吧</text>
</view>
</view>
</scroll-view>
<view class="result-area">
<view class="result-box {{isRolling ? 'rolling' : ''}}">
<text class="result-text">{{result || '?'}}</text>
</view>
<button class="btn-start" bindtap="startDraw" disabled="{{isRolling || names.length < 2}}">
{{isRolling ? '随机抽取中...' : '开始抽取'}}
</button>
</view>
</view>