feat(device): 引导检查附近设备权限,点击拉起系统授权设置

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
17792275749
2026-08-24 10:05:19 +08:00
co-authored by Claude Sonnet 4.6
parent 6fe36f59fe
commit 31b745f2ab
3 changed files with 27 additions and 23 deletions
@@ -106,26 +106,30 @@
background-color: #1385FA; background-color: #1385FA;
} }
// .help { .help {
// width: 100%; width: 100%;
// height: 30rpx; height: 30rpx;
// text-align: center; display: flex;
// line-height: 30rpx; flex-wrap: nowrap;
// margin-bottom: 60rpx; justify-content: center;
align-items: center;
margin-bottom: 60rpx;
// .help-text { .help-text {
// color: #808080; height: 30rpx;
// font-size: 30rpx; font-size: 30rpx;
// line-height: 30rpx; line-height: 30rpx;
// margin-right: 8rpx; color: #808080;
// } margin-right: 8rpx;
}
// .help-link { .help-link {
// color: #1385FA; height: 30rpx;
// font-size: 30rpx; font-size: 30rpx;
// line-height: 30rpx; line-height: 30rpx;
// } color: #1385FA;
// } }
}
.search-device { .search-device {
width: 100%; width: 100%;
@@ -88,7 +88,7 @@ Page({
}, },
onOpenHelp() { onOpenHelp() {
wx.showToast({ title: '请确保设备已开机且在附近', icon: 'none' }) wx.openAppAuthorizeSetting()
}, },
/** 将所有卡片置为未连接 */ /** 将所有卡片置为未连接 */
@@ -24,10 +24,10 @@
</view> </view>
<!-- 帮助文案 --> <!-- 帮助文案 -->
<!-- <view class="help"> <view class="help">
<text class="help-text">无法配对设备?</text> <view class="help-text">找不到设备</view>
<text class="help-link" bind:tap="onOpenHelp">查看帮助</text> <view class="help-link" bind:tap="onOpenHelp">检查附近设备权限</view>
</view> --> </view>
<!-- 搜索结果模块:found / empty 时整体显示 --> <!-- 搜索结果模块:found / empty 时整体显示 -->
<block wx:if="{{ status === 'found' || status === 'empty' }}"> <block wx:if="{{ status === 'found' || status === 'empty' }}">