102真机测试完成
This commit is contained in:
@ -26,7 +26,7 @@
|
|||||||
<view class="p100" :style="{backgroundColor:config.activeIndex==index?config.itemBgColor:'',
|
<view class="p100" :style="{backgroundColor:config.activeIndex==index?config.itemBgColor:'',
|
||||||
justifyContent:config.textAlign
|
justifyContent:config.textAlign
|
||||||
}">
|
}">
|
||||||
<view class="imgContent" :style="{
|
<view class="imgContent" v-if="item.icon" :style="{
|
||||||
height:config.itemHeight,
|
height:config.itemHeight,
|
||||||
width:config.itemHeight
|
width:config.itemHeight
|
||||||
}">
|
}">
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
<view class="row">
|
<view class="row">
|
||||||
<image class="img" src="/static/images/6155/DeviceDetail/time.png" mode="aspectFit"></image>
|
<image class="img" src="/static/images/6155/DeviceDetail/time.png" mode="aspectFit"></image>
|
||||||
<view class="txt">
|
<view class="txt">
|
||||||
<view class="bigTxt">{{formData.sta_charge?dic.sta_charge[formData.sta_charge]:"" }}</view>
|
<view class="bigTxt">{{formData.sta_charge?dic.sta_charge[formData.sta_charge+'']:"未充电" }}</view>
|
||||||
<view class="smallTxt">设备状态</view>
|
<view class="smallTxt">设备状态</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -46,10 +46,10 @@
|
|||||||
</view> -->
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="warnnig" :class="{'displayNone':formData.sta_sosadd===''}">
|
<view class="warnnig" v-for="item,index in warnDevices">
|
||||||
<view>闯入报警!</view>
|
<view>闯入报警!</view>
|
||||||
<view>
|
<view>
|
||||||
{{getWarDevice(formData.sta_sosadd)}}
|
{{item.name}}
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -114,6 +114,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="rightTxt">
|
<view class="rightTxt">
|
||||||
<text class="bigTxt">{{item.name}}</text>
|
<text class="bigTxt">{{item.name}}</text>
|
||||||
|
<text class="smallTxt" v-if="item.group==='sta_RadarType'">{{Distance}}</text>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -160,6 +161,10 @@
|
|||||||
|
|
||||||
|
|
||||||
<global-loading ref="loading" />
|
<global-loading ref="loading" />
|
||||||
|
|
||||||
|
<BottomSlideMenuPlus :config="Status.BottomMenu" @itemClick="btnClick" @close="closeActionSheet">
|
||||||
|
|
||||||
|
</BottomSlideMenuPlus>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -218,9 +223,31 @@
|
|||||||
show: false,
|
show: false,
|
||||||
showHeader: true,
|
showHeader: true,
|
||||||
menuItems: [{
|
menuItems: [{
|
||||||
text: '强光',
|
text: '2M',
|
||||||
icon: '/static/images/6155/DeviceDetail/qiang.png'
|
value:'status_2M',
|
||||||
}],
|
icon: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '4M',
|
||||||
|
value:'status_4M',
|
||||||
|
icon: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '7M',
|
||||||
|
value:'status_7M',
|
||||||
|
icon: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '10M',
|
||||||
|
value:'status_10M',
|
||||||
|
icon: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '关闭',
|
||||||
|
value:'status_off',
|
||||||
|
icon: ''
|
||||||
|
}
|
||||||
|
],
|
||||||
activeIndex: -1,
|
activeIndex: -1,
|
||||||
bgColor: '#2a2a2a',
|
bgColor: '#2a2a2a',
|
||||||
itemBgColor: '#3a3a3a',
|
itemBgColor: '#3a3a3a',
|
||||||
@ -254,12 +281,13 @@
|
|||||||
statu: '',
|
statu: '',
|
||||||
sta_address: '',
|
sta_address: '',
|
||||||
bleStatu: false,
|
bleStatu: false,
|
||||||
|
sta_charge:'',
|
||||||
sta_LedType: '',
|
sta_LedType: '',
|
||||||
sta_RadarType: '',
|
sta_RadarType: '',
|
||||||
sta_Online: '',
|
sta_Online: '',
|
||||||
warnTime: '',
|
warnTime: '',
|
||||||
sta_sosadd: "",
|
sta_sosadd: "",
|
||||||
|
sta_sosName:'',
|
||||||
sta_IntrusTime: ''
|
sta_IntrusTime: ''
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -349,10 +377,7 @@
|
|||||||
showConfirm: false
|
showConfirm: false
|
||||||
},
|
},
|
||||||
groupDevices: [],
|
groupDevices: [],
|
||||||
audioData: {
|
warnDevices:[]
|
||||||
packetCtn: 0,
|
|
||||||
hexs: []
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -429,7 +454,28 @@
|
|||||||
this.Status.pageHide = false;
|
this.Status.pageHide = false;
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
Distance:function(){
|
||||||
|
let f=this.Status.BottomMenu.menuItems.find((item,index)=>{
|
||||||
|
|
||||||
|
return item.value===this.formData.sta_RadarType;
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
if(f){
|
||||||
|
return f.text;
|
||||||
|
}
|
||||||
|
return '关闭';
|
||||||
|
},
|
||||||
|
activeIndex:function(){
|
||||||
|
let active=4;
|
||||||
|
let f=this.Status.BottomMenu.menuItems.find((item,index)=>{
|
||||||
|
|
||||||
|
if(item.value===this.formData.sta_RadarType){
|
||||||
|
active=index;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return active;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
@ -441,7 +487,8 @@
|
|||||||
|
|
||||||
|
|
||||||
if (item.group == 'sta_RadarType') {
|
if (item.group == 'sta_RadarType') {
|
||||||
this.toggleRedar(item, index);
|
// this.toggleRedar(item, index);
|
||||||
|
this.showRedarSetting(item,index);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -507,6 +554,25 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
showRedarSetting(){
|
||||||
|
this.Status.BottomMenu.show=true;
|
||||||
|
this.Status.BottomMenu.showBtn=false;
|
||||||
|
|
||||||
|
this.Status.BottomMenu.title="感应距离设置";
|
||||||
|
|
||||||
|
this.Status.BottomMenu.textAlign="center";
|
||||||
|
|
||||||
|
this.Status.BottomMenu.showMask=true;
|
||||||
|
this.Status.BottomMenu.activeIndex=this.activeIndex;
|
||||||
|
},
|
||||||
|
btnClick(item,index){
|
||||||
|
this.Status.BottomMenu.show=false;
|
||||||
|
console.log("选中的项:"+index+",值:"+JSON.stringify(item));
|
||||||
|
this.toggleRedar(item,index);
|
||||||
|
},
|
||||||
|
closeActionSheet(){
|
||||||
|
this.Status.BottomMenu.show=false;
|
||||||
},
|
},
|
||||||
toggleRedar(item, index) { //雷达启停
|
toggleRedar(item, index) { //雷达启停
|
||||||
let f = this.getDevice();
|
let f = this.getDevice();
|
||||||
@ -521,7 +587,7 @@
|
|||||||
deviceId: '12345'
|
deviceId: '12345'
|
||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
let val = item.key;
|
let val = item.value;
|
||||||
if (this.formData.sta_RadarType === val) {
|
if (this.formData.sta_RadarType === val) {
|
||||||
val = 'status_off';
|
val = 'status_off';
|
||||||
}
|
}
|
||||||
@ -533,7 +599,9 @@
|
|||||||
|
|
||||||
ble.sendString(f.deviceId, json, f.writeServiceId, f.wirteCharactId, 30)
|
ble.sendString(f.deviceId, json, f.writeServiceId, f.wirteCharactId, 30)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
|
debugger;
|
||||||
this.formData.sta_RadarType = val;
|
this.formData.sta_RadarType = val;
|
||||||
|
this.Status.BottomMenu.activeIndex=index;
|
||||||
these.setBleFormData();
|
these.setBleFormData();
|
||||||
resolve();
|
resolve();
|
||||||
})
|
})
|
||||||
@ -750,6 +818,31 @@
|
|||||||
|
|
||||||
console.log("json=", json)
|
console.log("json=", json)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
let active=-1;
|
||||||
|
let f=this.Status.BottomMenu.menuItems.find((item,index)=>{
|
||||||
|
|
||||||
|
if(item.value===json.sta_RadarType){
|
||||||
|
active=index;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.Status.BottomMenu.activeIndex=active;
|
||||||
|
|
||||||
|
let msg = [];
|
||||||
|
if (json.sta_PowerPercent <= 20 && (json.sta_charge===0 || json.sta_charge==='0')) {
|
||||||
|
msg.push("设备电量低");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(json.sta_sosadd_off){//某个设备解除报警
|
||||||
|
this.warnDevices.filter((d,index)=>{
|
||||||
|
if(d.mac===json.sta_sosadd_off){
|
||||||
|
this.warnDevices.splice(index,1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
let keys = Object.keys(json);
|
let keys = Object.keys(json);
|
||||||
|
|
||||||
keys.forEach(key => {
|
keys.forEach(key => {
|
||||||
@ -759,24 +852,24 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
let msg = [];
|
|
||||||
if (this.formData.sta_PowerPercent <= 20) {
|
|
||||||
msg.push("设备电量低");
|
|
||||||
}
|
|
||||||
if (json.sta_sosadd_off == this.formData.sta_sosadd) {
|
|
||||||
this.formData.sta_sosadd = "";
|
|
||||||
let name=this.getWarDevice(json.sta_sosadd_off);
|
|
||||||
msg.push('"' + name + '"取消报警');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.formData.sta_sosadd !== "") {
|
if (json.sta_sosadd) {//某个设备闯入报警
|
||||||
console.log("查询设备中");
|
console.log("查询设备中",json.sta_sosadd);
|
||||||
this.searchDevice(this.formData.sta_sosadd).catch(ex => {}).then(dev => {
|
this.searchDevice(json.sta_sosadd).catch(ex => {}).then(dev => {
|
||||||
console.log("dev=", dev);
|
console.log("dev=", dev);
|
||||||
|
let d=this.warnDevices.find(v=>{return v.mac===json.sta_sosadd});
|
||||||
|
let deviceName="";
|
||||||
if (dev) {
|
if (dev) {
|
||||||
|
// this.formData.sta_sosName=dev.deviceName;
|
||||||
msg.push('"' + dev.deviceName + '"闯入报警中');
|
msg.push('"' + dev.deviceName + '"闯入报警中');
|
||||||
|
deviceName=dev.deviceName;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
msg.push('闯入报警中');
|
msg.push('闯入报警中');
|
||||||
|
// this.formData.sta_sosName="";
|
||||||
|
}
|
||||||
|
if(!d){
|
||||||
|
this.warnDevices.push({mac:json.sta_sosadd,name:deviceName});
|
||||||
}
|
}
|
||||||
this.showMsg(msg.join(','));
|
this.showMsg(msg.join(','));
|
||||||
});
|
});
|
||||||
@ -805,6 +898,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
getWarDevice(macStr) {
|
getWarDevice(macStr) {
|
||||||
|
console.log("macStr=",macStr);
|
||||||
if (macStr) {
|
if (macStr) {
|
||||||
|
|
||||||
if (!macStr.includes(':')) {
|
if (!macStr.includes(':')) {
|
||||||
@ -834,13 +928,13 @@
|
|||||||
let f = this.groupDevices.find(v => {
|
let f = this.groupDevices.find(v => {
|
||||||
return v.deviceMac === macStr;
|
return v.deviceMac === macStr;
|
||||||
});
|
});
|
||||||
console.log("111111111");
|
// console.log("111111111");
|
||||||
if (f) {
|
if (f) {
|
||||||
console.log("找到设备", f);
|
console.log("找到设备", f);
|
||||||
resolve(f);
|
resolve(f);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log("111111111");
|
// console.log("111111111");
|
||||||
if (macStr == this.device.deviceMac) {
|
if (macStr == this.device.deviceMac) {
|
||||||
console.log("当前设备", this.device);
|
console.log("当前设备", this.device);
|
||||||
resolve(this.device);
|
resolve(this.device);
|
||||||
@ -1058,9 +1152,6 @@
|
|||||||
buttonText: '确定',
|
buttonText: '确定',
|
||||||
okCallback: null
|
okCallback: null
|
||||||
});
|
});
|
||||||
},
|
|
||||||
btnClick() {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -52,8 +52,9 @@
|
|||||||
<view @click="refreshBleList()">刷新</view>
|
<view @click="refreshBleList()">刷新</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="lblTitle">
|
<view class="lblTitle">
|
||||||
<uni-easyinput :styles="{color:'#ffffff'}" :clearable="true" class="uni-mt-5" :trim="'both'"
|
<input class="uni-input" v-model="search" placeholder="名称筛选" />
|
||||||
prefixIcon="search" v-model="search" placeholder="名称筛选"></uni-easyinput>
|
<!-- <uni-easyinput :styles="{color:'#ffffffde',borderColor:'#cbcbcba8'}" :clearable="true" class="uni-mt-5" :trim="'both'"
|
||||||
|
prefixIcon="search" v-model="search" placeholder="名称筛选"></uni-easyinput> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="list searchList">
|
<view class="list searchList">
|
||||||
<view class="item" v-on:click="Link(item,index)" v-for="item, index in EquipMents"
|
<view class="item" v-on:click="Link(item,index)" v-for="item, index in EquipMents"
|
||||||
@ -152,7 +153,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
search:'',//筛选
|
search: '', //筛选
|
||||||
PairEquip: [], //已配对设备
|
PairEquip: [], //已配对设备
|
||||||
EquipMents: [], //搜索出来的设备
|
EquipMents: [], //搜索出来的设备
|
||||||
device: null,
|
device: null,
|
||||||
@ -208,6 +209,67 @@
|
|||||||
"linkStatu": false,
|
"linkStatu": false,
|
||||||
"isTarget": true
|
"isTarget": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"RSSI": -69,
|
||||||
|
"advertisData": "",
|
||||||
|
"advertisServiceUUIDs": [
|
||||||
|
"0000FFE0-0000-1000-8000-00805F9B34FB"
|
||||||
|
],
|
||||||
|
"deviceId": "4F0DAC91-4391-CB07-905E-72D7F03EFCD3",
|
||||||
|
"name": "4877-BF743D",
|
||||||
|
"linkStatu": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"RSSI": -55,
|
||||||
|
"advertisData": "",
|
||||||
|
"advertisServiceUUIDs": [
|
||||||
|
"0000FFE0-0000-1000-8000-00805F9B34FB"
|
||||||
|
],
|
||||||
|
"deviceId": "EBDA4E6F-3A28-FF65-A845-AE8CC7B78375",
|
||||||
|
"name": "HBY670-BF74EA",
|
||||||
|
"linkStatu": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"RSSI": -61,
|
||||||
|
"advertisData": "",
|
||||||
|
"advertisServiceUUIDs": [
|
||||||
|
"0000FFE0-0000-1000-8000-00805F9B34FB"
|
||||||
|
],
|
||||||
|
"deviceId": "469FB381-B47E-1E40-8073-EF50B5704AAB",
|
||||||
|
"name": "EF4651",
|
||||||
|
"linkStatu": false,
|
||||||
|
"isTarget": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"RSSI": -69,
|
||||||
|
"advertisData": "",
|
||||||
|
"advertisServiceUUIDs": [
|
||||||
|
"0000FFE0-0000-1000-8000-00805F9B34FB"
|
||||||
|
],
|
||||||
|
"deviceId": "4F0DAC91-4391-CB07-905E-72D7F03EFCD3",
|
||||||
|
"name": "4877-BF743D",
|
||||||
|
"linkStatu": false
|
||||||
|
},{
|
||||||
|
"RSSI": -55,
|
||||||
|
"advertisData": "",
|
||||||
|
"advertisServiceUUIDs": [
|
||||||
|
"0000FFE0-0000-1000-8000-00805F9B34FB"
|
||||||
|
],
|
||||||
|
"deviceId": "EBDA4E6F-3A28-FF65-A845-AE8CC7B78375",
|
||||||
|
"name": "HBY670-BF74EA",
|
||||||
|
"linkStatu": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"RSSI": -61,
|
||||||
|
"advertisData": "",
|
||||||
|
"advertisServiceUUIDs": [
|
||||||
|
"0000FFE0-0000-1000-8000-00805F9B34FB"
|
||||||
|
],
|
||||||
|
"deviceId": "469FB381-B47E-1E40-8073-EF50B5704AAB",
|
||||||
|
"name": "EF4651",
|
||||||
|
"linkStatu": false,
|
||||||
|
"isTarget": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"RSSI": -69,
|
"RSSI": -69,
|
||||||
"advertisData": "",
|
"advertisData": "",
|
||||||
@ -222,6 +284,7 @@
|
|||||||
|
|
||||||
|
|
||||||
these.PairEquip = [this.EquipMents[0]];
|
these.PairEquip = [this.EquipMents[0]];
|
||||||
|
this.$forceUpdate();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let StartSubsrib = () => {
|
let StartSubsrib = () => {
|
||||||
@ -283,7 +346,9 @@
|
|||||||
|
|
||||||
let f = these.EquipMents.find((v, index) => {
|
let f = these.EquipMents.find((v, index) => {
|
||||||
if (v.deviceId == device.deviceId) {
|
if (v.deviceId == device.deviceId) {
|
||||||
console.log(`更新设备信号: ${device.name || device.deviceId}, RSSI: ${device.RSSI}`);
|
console.log(
|
||||||
|
`更新设备信号: ${device.name || device.deviceId}, RSSI: ${device.RSSI}`
|
||||||
|
);
|
||||||
these.$set(these.EquipMents[index], 'RSSI', device.RSSI);
|
these.$set(these.EquipMents[index], 'RSSI', device.RSSI);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -294,9 +359,11 @@
|
|||||||
console.log("+++ 发现新设备,准备添加到列表:", JSON.stringify(device));
|
console.log("+++ 发现新设备,准备添加到列表:", JSON.stringify(device));
|
||||||
|
|
||||||
if (these.device && these.device.bluetoothName && device.name) {
|
if (these.device && these.device.bluetoothName && device.name) {
|
||||||
if (these.device.bluetoothName === device.name || (device.name && device.name.indexOf(these
|
if (these.device.bluetoothName === device.name || (device.name && device.name
|
||||||
.device.bluetoothName) > -1) || (device.name && this.device.bluetoothName.indexOf(
|
.indexOf(these
|
||||||
device.name) > -1)) {
|
.device.bluetoothName) > -1) || (device.name && this.device
|
||||||
|
.bluetoothName.indexOf(
|
||||||
|
device.name) > -1)) {
|
||||||
device.isTarget = true;
|
device.isTarget = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -309,7 +376,7 @@
|
|||||||
}, pagePath);
|
}, pagePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
let startValidDevice=()=>{
|
let startValidDevice = () => {
|
||||||
if (these.device) {
|
if (these.device) {
|
||||||
console.log("进入配对模式,启用连接恢复和验证逻辑。");
|
console.log("进入配对模式,启用连接恢复和验证逻辑。");
|
||||||
//蓝牙连接已恢复的回调
|
//蓝牙连接已恢复的回调
|
||||||
@ -373,8 +440,8 @@
|
|||||||
eventChannel.on('detailData', function(rec) {
|
eventChannel.on('detailData', function(rec) {
|
||||||
console.log("接收到父页面的参数:", rec);
|
console.log("接收到父页面的参数:", rec);
|
||||||
these.device = rec.data;
|
these.device = rec.data;
|
||||||
if(rec.data.bluetoothName){
|
if (rec.data.bluetoothName) {
|
||||||
these.search=rec.data.bluetoothName.replace('JQZM-','');
|
these.search = rec.data.bluetoothName.replace('JQZM-', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
startValidDevice();
|
startValidDevice();
|
||||||
@ -428,7 +495,10 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
async refreshBleList() {
|
async refreshBleList() {
|
||||||
|
const systemInfo = uni.getSystemInfoSync();
|
||||||
|
if (systemInfo.uniPlatform == 'web') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const hasPermission = await this.checkAndRequestLocationPermission();
|
const hasPermission = await this.checkAndRequestLocationPermission();
|
||||||
if (!hasPermission) {
|
if (!hasPermission) {
|
||||||
console.log("缺少定位权限,已中止蓝牙扫描。");
|
console.log("缺少定位权限,已中止蓝牙扫描。");
|
||||||
@ -820,6 +890,7 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
top: 240rpx;
|
top: 240rpx;
|
||||||
left: 0rpx;
|
left: 0rpx;
|
||||||
|
/* border: 1px solid #BBE600; */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -840,7 +911,7 @@
|
|||||||
align-content: center;
|
align-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-bottom:30rpx;
|
margin-bottom: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list {
|
.list {
|
||||||
@ -850,8 +921,10 @@
|
|||||||
|
|
||||||
.searchList {
|
.searchList {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100% - 260rpx);
|
height: calc(100% - 300rpx);
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
|
box-sizing: border-box;
|
||||||
|
/* border: 1px solid red; */
|
||||||
}
|
}
|
||||||
|
|
||||||
.list .item {
|
.list .item {
|
||||||
@ -1022,11 +1095,20 @@
|
|||||||
-webkit-filter: none !important;
|
-webkit-filter: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-mt-5 {
|
|
||||||
background-color: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uni-easyinput__content {
|
|
||||||
background-color: #121212 !important;
|
.uni-input{
|
||||||
|
background-color: #121212;
|
||||||
|
width:100%;
|
||||||
|
height: 60rpx;
|
||||||
|
color: #ffffffde;
|
||||||
|
border:1rpx solid #cbcbcbde;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
text-indent: 8rpx;
|
||||||
|
font-family: "PingFang SC";
|
||||||
|
line-height: 60rpx;
|
||||||
|
caret-color:#BBE600;
|
||||||
|
font-weight: 200;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -685,7 +685,7 @@ class BleHelper {
|
|||||||
|
|
||||||
uni.onBLECharacteristicValueChange((receive) => {
|
uni.onBLECharacteristicValueChange((receive) => {
|
||||||
//订阅消息
|
//订阅消息
|
||||||
// console.log("收到订阅消息", receive);
|
// console.log("收到订阅消息", receive);
|
||||||
let f = this.data.LinkedList.find((v) => {
|
let f = this.data.LinkedList.find((v) => {
|
||||||
return v.deviceId == receive.deviceId;
|
return v.deviceId == receive.deviceId;
|
||||||
})
|
})
|
||||||
@ -1714,7 +1714,7 @@ class BleHelper {
|
|||||||
let buffer = new ArrayBuffer(bufferSize);
|
let buffer = new ArrayBuffer(bufferSize);
|
||||||
let dataView = new DataView(buffer);
|
let dataView = new DataView(buffer);
|
||||||
for (let i = 0; i < array.length; i++) {
|
for (let i = 0; i < array.length; i++) {
|
||||||
dataView.setUint8(i, array);
|
dataView.setUint8(i, array[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.sendData(deviceid, buffer, writeServiceId, wirteCharactId, ms);
|
return this.sendData(deviceid, buffer, writeServiceId, wirteCharactId, ms);
|
||||||
|
|||||||
@ -569,7 +569,7 @@ class BleReceive {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
console.log("str=",receive.str);
|
// console.log("str=",receive.str);
|
||||||
receiveData = JSON.parse(receive.str);
|
receiveData = JSON.parse(receive.str);
|
||||||
|
|
||||||
let recCnt = recArr.find(v => {
|
let recCnt = recArr.find(v => {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import config from '../config/index.js';
|
import config from '../config/index.js';
|
||||||
export const env = 'development'; //production development //开发of线上 改这里就行
|
export const env = 'production'; //production development //开发of线上 改这里就行
|
||||||
const BASE = config[env];
|
const BASE = config[env];
|
||||||
const request = (options) => {
|
const request = (options) => {
|
||||||
console.log("options" + JSON.stringify(options), BASE.BASE_URL)
|
console.log("options" + JSON.stringify(options), BASE.BASE_URL)
|
||||||
|
|||||||
Reference in New Issue
Block a user