微信小程序联调

This commit is contained in:
zhonghua.li
2026-04-17 07:35:37 +08:00
parent c62622dc90
commit d74bc2ad1f
484 changed files with 3312 additions and 9 deletions

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,5 @@
{
"navigationBarTitleText": "蓝牙录音设备",
"navigationStyle": "custom",
"usingComponents": {}
}

View File

@@ -0,0 +1 @@
<view class="bluetooth-recorder-page data-v-13f08f12"><view class="header data-v-13f08f12"><view class="header-title data-v-13f08f12">蓝牙录音设备</view><view class="{{['header-status', 'data-v-13f08f12', b && 'connected']}}">{{a}}</view></view><view class="section data-v-13f08f12"><view class="section-title data-v-13f08f12">设备搜索</view><view class="action-buttons data-v-13f08f12"><button class="btn btn-primary data-v-13f08f12" disabled="{{d}}" bindtap="{{e}}">{{c}}</button><button class="btn btn-secondary data-v-13f08f12" disabled="{{f}}" bindtap="{{g}}"> 停止搜索 </button></view></view><view wx:if="{{h}}" class="section data-v-13f08f12"><view class="section-title data-v-13f08f12">发现的设备 ({{i}})</view><scroll-view class="device-list data-v-13f08f12" scroll-y><view wx:for="{{j}}" wx:for-item="device" wx:key="e" class="{{['device-item', 'data-v-13f08f12', device.f && 'connected']}}" bindtap="{{device.g}}"><view class="device-info data-v-13f08f12"><text class="device-name data-v-13f08f12">{{device.a}}</text><text class="device-id data-v-13f08f12">{{device.b}}</text><text class="device-rssi data-v-13f08f12">信号强度: {{device.c}} dBm</text></view><view class="device-action data-v-13f08f12"><text wx:if="{{device.d}}" class="status-text connected data-v-13f08f12">已连接</text><text wx:else class="status-text data-v-13f08f12">点击连接</text></view></view></scroll-view></view><view wx:if="{{k}}" class="section data-v-13f08f12"><view class="section-title data-v-13f08f12">连接状态</view><view class="connection-info data-v-13f08f12"><text class="info-item data-v-13f08f12">设备ID: {{l}}</text><text class="info-item data-v-13f08f12">接收状态: {{m}}</text><text class="info-item data-v-13f08f12">数据包数: {{n}}</text><text class="info-item data-v-13f08f12">缓冲区大小: {{o}} KB</text></view><view class="action-buttons data-v-13f08f12"><button class="btn btn-danger data-v-13f08f12" bindtap="{{p}}"> 断开连接 </button><button class="btn btn-secondary data-v-13f08f12" bindtap="{{q}}"> 清空缓冲区 </button></view></view><view wx:if="{{r}}" class="section data-v-13f08f12"><view class="section-title data-v-13f08f12">音频数据</view><view class="action-buttons data-v-13f08f12"><button class="btn btn-primary data-v-13f08f12" bindtap="{{s}}"> 保存录音文件 </button><button class="btn btn-secondary data-v-13f08f12" bindtap="{{t}}"> 上传到服务器 </button></view></view><view class="section data-v-13f08f12"><view class="section-title data-v-13f08f12">操作日志</view><scroll-view class="log-list data-v-13f08f12" scroll-y scroll-top="{{ logScrollTop }}"><view wx:for="{{v}}" wx:for-item="log" wx:key="c" class="{{['log-item', 'data-v-13f08f12', log.d]}}"><text class="log-time data-v-13f08f12">{{log.a}}</text><text class="log-message data-v-13f08f12">{{log.b}}</text></view></scroll-view></view></view>

View File

@@ -0,0 +1 @@
.bluetooth-recorder-page.data-v-13f08f12{min-height:100vh;background:#f5f5f5;padding-bottom:20rpx}.header.data-v-13f08f12{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;padding:40rpx 30rpx 30rpx;display:flex;justify-content:space-between;align-items:center}.header-title.data-v-13f08f12{font-size:36rpx;font-weight:700}.header-status.data-v-13f08f12{font-size:28rpx;padding:8rpx 20rpx;background:rgba(255,255,255,.2);border-radius:20rpx}.header-status.connected.data-v-13f08f12{background:rgba(76,175,80,.8)}.section.data-v-13f08f12{background:#fff;margin:20rpx 30rpx;padding:30rpx;border-radius:16rpx;box-shadow:0 2rpx 8rpx rgba(0,0,0,.1)}.section-title.data-v-13f08f12{font-size:32rpx;font-weight:700;margin-bottom:20rpx;color:#333}.action-buttons.data-v-13f08f12{display:flex;gap:20rpx}.btn.data-v-13f08f12{flex:1;padding:20rpx;border-radius:8rpx;font-size:28rpx;border:none}.btn-primary.data-v-13f08f12{background:#667eea;color:#fff}.btn-secondary.data-v-13f08f12{background:#e0e0e0;color:#666}.btn-danger.data-v-13f08f12{background:#f44336;color:#fff}.btn.data-v-13f08f12:disabled{opacity:.5}.device-list.data-v-13f08f12{max-height:600rpx}.device-item.data-v-13f08f12{display:flex;justify-content:space-between;align-items:center;padding:20rpx;margin-bottom:20rpx;background:#f9f9f9;border-radius:12rpx;border:2rpx solid transparent}.device-item.connected.data-v-13f08f12{border-color:#667eea;background:#f0f4ff}.device-info.data-v-13f08f12{flex:1;display:flex;flex-direction:column;gap:8rpx}.device-name.data-v-13f08f12{font-size:30rpx;font-weight:700;color:#333}.device-id.data-v-13f08f12{font-size:24rpx;color:#999}.device-rssi.data-v-13f08f12{font-size:24rpx;color:#666}.device-action.data-v-13f08f12{padding:10rpx 20rpx}.status-text.data-v-13f08f12{font-size:26rpx;color:#999}.status-text.connected.data-v-13f08f12{color:#667eea;font-weight:700}.connection-info.data-v-13f08f12{display:flex;flex-direction:column;gap:12rpx;margin-bottom:20rpx}.info-item.data-v-13f08f12{font-size:28rpx;color:#666}.log-list.data-v-13f08f12{max-height:400rpx;background:#f9f9f9;border-radius:8rpx;padding:20rpx}.log-item.data-v-13f08f12{display:flex;gap:20rpx;padding:12rpx 0;border-bottom:1rpx solid #eee;font-size:24rpx}.log-item.data-v-13f08f12:last-child{border-bottom:none}.log-time.data-v-13f08f12{color:#999;min-width:120rpx}.log-message.data-v-13f08f12{flex:1;color:#333}.log-item.success .log-message.data-v-13f08f12{color:#4caf50}.log-item.error .log-message.data-v-13f08f12{color:#f44336}.log-item.warning .log-message.data-v-13f08f12{color:#ff9800}.log-item.info .log-message.data-v-13f08f12{color:#2196f3}

File diff suppressed because one or more lines are too long