86 lines
2.8 KiB
Plaintext
86 lines
2.8 KiB
Plaintext
<!-- pages/bot-list/bot-list.wxml -->
|
||
<view class="container">
|
||
<!-- 功能介绍区域 -->
|
||
<view class="guide-box">
|
||
<image src="/images/butterfly-icon.png" class="guide-icon" mode="aspectFit"></image>
|
||
<text class="guide-text">下载蝴蝶号视频教程:\n1. 添加下方机器人\n2. 转发视频给机器人\n3. 自动回复下载链接</text>
|
||
</view>
|
||
|
||
<!-- 状态监控动画 -->
|
||
<view class="monitoring-box">
|
||
<image src="/images/radar.png" class="radar-icon"></image>
|
||
<text>机器人状态持续监控中...</text>
|
||
<text class="update-time">{{lastUpdateTimeText}}</text>
|
||
</view>
|
||
|
||
<!-- 加载状态 -->
|
||
<view class="loading-box" wx:if="{{loading}}">
|
||
<image src="/images/loading.png" class="loading-icon"></image>
|
||
<text>数据加载中...</text>
|
||
</view>
|
||
|
||
<!-- 错误状态 -->
|
||
<view class="error-box" wx:if="{{error}}">
|
||
<text>{{error}}</text>
|
||
<button class="retry-btn" bindtap="loadBotData">重新加载</button>
|
||
</view>
|
||
|
||
<!-- 机器人列表 -->
|
||
<scroll-view
|
||
scroll-y
|
||
class="bot-list"
|
||
wx:if="{{!loading && !error}}"
|
||
refresher-enabled="{{true}}"
|
||
refresher-triggered="{{refreshing}}"
|
||
bindrefresherrefresh="onPullRefresh">
|
||
<view class="bot-list-inner">
|
||
<view class="bot-item {{item.selected ? 'selected' : ''}}"
|
||
wx:for="{{botList}}"
|
||
wx:key="wxid"
|
||
bindtap="selectBot"
|
||
data-bot="{{item}}">
|
||
<view class="status-indicator {{item.status}}"></view>
|
||
<view class="bot-info">
|
||
<text class="bot-account">{{item.account}}</text>
|
||
<text class="bot-status">{{statusText[item.status]}}</text>
|
||
<text class="bot-update">最后检测: {{item.last_check}}</text>
|
||
</view>
|
||
<view class="action-buttons">
|
||
<button
|
||
class="btn copy-btn"
|
||
catchtap="copyAccount"
|
||
data-account="{{item.account}}">
|
||
复制微信号
|
||
</button>
|
||
<button
|
||
class="btn qrcode-btn"
|
||
catchtap="showQrcode"
|
||
data-index="{{index}}">
|
||
查看二维码
|
||
</button>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</scroll-view>
|
||
|
||
<!-- 二维码弹窗 -->
|
||
<view class="qr-modal {{showQrModal ? 'show' : ''}}" bindtap="closeQrcode">
|
||
<view class="modal-container" catchtap="preventBubble">
|
||
<view class="modal-header">
|
||
<text class="modal-title">{{selectedBot.account}}</text>
|
||
<view class="close-btn" bindtap="closeQrcode">×</view>
|
||
</view>
|
||
<view class="modal-content">
|
||
<image
|
||
src="{{selectedBot.qrcode_url}}"
|
||
mode="widthFix"
|
||
class="qrcode-image"
|
||
binderror="handleImageError">
|
||
</image>
|
||
</view>
|
||
<view class="modal-footer">
|
||
<button class="save-btn" bindtap="saveQrcode">保存到相册</button>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view> |