Merge branch 'main' of http://47.107.152.87:3000/dyf/APP
This commit is contained in:
@ -95,7 +95,7 @@
|
||||
|
||||
|
||||
|
||||
<view class="warn" style="padding-bottom: 20rpx;">
|
||||
<view style="padding-bottom: 20rpx;">
|
||||
|
||||
|
||||
<view class="proinfo lamp">
|
||||
|
||||
@ -223,25 +223,30 @@
|
||||
|
||||
|
||||
|
||||
<view class="proinfo lamp">
|
||||
<text class="title">产品信息</text>
|
||||
<view class="itemcontent">
|
||||
<view class="item" @click="proParam()">
|
||||
<image class="img" src="/static/images/6155/DeviceDetail/param.png" mode="aspectFit"></image>
|
||||
<text class="txt">产品参数</text>
|
||||
</view>
|
||||
<view class="item" @click="handRemark()">
|
||||
<image class="img" src="/static/images/6155/DeviceDetail/remark.png" mode="aspectFit"></image>
|
||||
<text class="txt">操作说明</text>
|
||||
</view>
|
||||
<view class="item" @click="handVideo()">
|
||||
<image class="img" src="/static/images/6155/DeviceDetail/video.png" mode="aspectFit"></image>
|
||||
<text class="txt">操作视频</text>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
<view class="proinfo lamp">
|
||||
<text class="title">产品信息</text>
|
||||
<view class="itemcontent">
|
||||
<view class="item" @click="proParam()">
|
||||
<image class="img" src="/static/images/6155/DeviceDetail/param.png" mode="aspectFit"></image>
|
||||
<text class="txt">产品参数</text>
|
||||
</view>
|
||||
<view class="item" @click="handRemark()">
|
||||
<image class="img" src="/static/images/6155/DeviceDetail/remark.png" mode="aspectFit"></image>
|
||||
<text class="txt">操作说明</text>
|
||||
</view>
|
||||
<view class="item" @click="handVideo()">
|
||||
<image class="img" src="/static/images/6155/DeviceDetail/video.png" mode="aspectFit"></image>
|
||||
<text class="txt">操作视频</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 弹窗通知 -->
|
||||
</view>
|
||||
|
||||
<!-- 弹窗通知 -->
|
||||
<MessagePopup :visible="Status.Pop.showPop" :type="Status.Pop.popType" :bgColor="Status.Pop.bgColor"
|
||||
:borderColor="Status.Pop.borderColor" :textColor="Status.Pop.textColor"
|
||||
:buttonBgColor="Status.Pop.buttonBgColor" :buttonTextColor="Status.Pop.buttonTextColor"
|
||||
@ -249,7 +254,7 @@
|
||||
@buttonClick="HidePop" :visiblePrompt="Status.Pop.visiblePrompt" :promptTitle="Status.Pop.promptTitle"
|
||||
v-model="Status.Pop.modelValue" @closePop="closePop" :buttonCancelText="Status.Pop.buttonCancelText"
|
||||
:showCancel="Status.Pop.showCancel" @cancelPop="closePop" />
|
||||
|
||||
|
||||
<!-- 下方菜单 -->
|
||||
<!-- <BottomSlideMenuPlus :config="Status.BottomMenu" @close="closeMenu" @itemClick="handleItemClick"
|
||||
@btnClick="btnClick">
|
||||
@ -261,9 +266,8 @@
|
||||
</view>
|
||||
</view>
|
||||
</BottomSlideMenuPlus> -->
|
||||
|
||||
|
||||
<global-loading ref="loading" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
@ -147,7 +147,7 @@
|
||||
</view>
|
||||
|
||||
|
||||
<view class="warn" style="padding-bottom: 20rpx;">
|
||||
<view style="padding-bottom: 20rpx;">
|
||||
|
||||
|
||||
<view class="proinfo lamp">
|
||||
|
||||
@ -183,7 +183,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="warn" style="padding-bottom: 20rpx;">
|
||||
<view style="padding-bottom: 20rpx;">
|
||||
|
||||
|
||||
<view class="proinfo lamp">
|
||||
|
||||
@ -184,22 +184,22 @@
|
||||
},
|
||||
onLoad(option) {
|
||||
eventChannel = this.getOpenerEventChannel();
|
||||
|
||||
|
||||
eventChannel.on('detailData', function(rec) {
|
||||
console.log("接收到父页面的参数:", rec);
|
||||
these.device = rec.data;
|
||||
if (rec.data.bluetoothName) {
|
||||
these.search = rec.data.bluetoothName;
|
||||
}else if(rec.data.deviceName){
|
||||
} else if (rec.data.deviceName) {
|
||||
these.search = rec.data.deviceName;
|
||||
}
|
||||
|
||||
|
||||
startValidDevice();
|
||||
|
||||
|
||||
});
|
||||
let search = option.search;
|
||||
these = this;
|
||||
|
||||
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
|
||||
ble = bleTool.getBleTool(); // Ensure ble is initialized
|
||||
@ -464,7 +464,7 @@
|
||||
|
||||
StartSubsrib();
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
@ -481,9 +481,9 @@
|
||||
}
|
||||
|
||||
plus.android.requestPermissions(
|
||||
['android.permission.ACCESS_FINE_LOCATION'],
|
||||
['android.permission.BLUETOOTH','android.permission.BLUETOOTH_ADMIN','android.permission.ACCESS_FINE_LOCATION','android.permission.ACCESS_COARSE_LOCATION'],
|
||||
(result) => {
|
||||
if (result.granted.length > 0) {
|
||||
if (result.granted && result.granted.length > 0) {
|
||||
console.log('定位权限已授予');
|
||||
resolve(true);
|
||||
} else {
|
||||
@ -533,39 +533,40 @@
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
ble.StopSearch().finally(() => {
|
||||
|
||||
let disconnectPromises = [];
|
||||
if (ble.data && ble.data.LinkedList) {
|
||||
ble.data.LinkedList.forEach(device => {
|
||||
console.log(`Requesting disconnect for ${device.deviceId}`);
|
||||
disconnectPromises.push(ble.disconnectDevice(device.deviceId));
|
||||
});
|
||||
showLoading(these,{text:'正在刷新'})
|
||||
let time = null;
|
||||
let startSearch = () => {
|
||||
|
||||
if(time!==null){
|
||||
clearTimeout(time);
|
||||
}
|
||||
|
||||
Promise.allSettled(disconnectPromises).finally(() => {
|
||||
|
||||
|
||||
time = setTimeout(() => {
|
||||
these.EquipMents = [];
|
||||
these.PairEquip = [];
|
||||
|
||||
ble.StartSearch().then(result => {
|
||||
console.log("Fresh scan started successfully.");
|
||||
}).catch(err => {
|
||||
console.error("Failed to start fresh scan:", err);
|
||||
console.log("开始搜索成功",result);
|
||||
|
||||
}).catch(err => {
|
||||
console.error("开始搜索失败:", err);
|
||||
if (err.code === 10001) {
|
||||
these.showOpenSetting();
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '开始搜索失败:' + err.msg
|
||||
content: '出现错误:' + err.msg
|
||||
});
|
||||
|
||||
}
|
||||
}).finally(()=>{
|
||||
hideLoading(these);
|
||||
});
|
||||
});
|
||||
});
|
||||
}, 200);
|
||||
|
||||
}
|
||||
|
||||
ble.StopSearch().finally(startSearch);
|
||||
|
||||
|
||||
|
||||
@ -678,12 +679,11 @@
|
||||
console.log("客户端验证失败");
|
||||
deviceInvalid();
|
||||
return;
|
||||
}
|
||||
else if (f.macAddress == these.device.deviceMac){
|
||||
} else if (f.macAddress == these.device.deviceMac) {
|
||||
console.log("客户端验证成功");
|
||||
deviceOK();
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
} else {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user