蓝牙模块添加在web平台默认成功方便调试功能,4877功能完成
This commit is contained in:
@ -313,7 +313,7 @@
|
||||
these.formData.img = device.devicePic;
|
||||
these.formData.id = device.id;
|
||||
these.formData.deviceId = f.deviceId;
|
||||
these.formData.bleStatu=false;
|
||||
these.formData.bleStatu = false;
|
||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
||||
console.log("连接成功")
|
||||
these.formData.bleStatu = true;
|
||||
@ -469,7 +469,9 @@
|
||||
return f;
|
||||
},
|
||||
bleValueNotify: function(receive, device, path, recArr) {
|
||||
|
||||
if (receive.deviceId !== this.formData.deviceId) {
|
||||
return;
|
||||
}
|
||||
if (this.Status.pageHide) {
|
||||
return;
|
||||
}
|
||||
@ -534,6 +536,7 @@
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
buttonText: '去连接',
|
||||
buttonTextColor: '#232323de',
|
||||
okCallback: function() {
|
||||
console.log("1111");
|
||||
uni.navigateTo({
|
||||
@ -992,39 +995,52 @@
|
||||
this.Status.Pop.showPop = false;
|
||||
},
|
||||
showPop: function(option) {
|
||||
|
||||
hideLoading(this);
|
||||
let defaultCfg = {
|
||||
showHeader: false,
|
||||
headerTxt: "",
|
||||
showHeader: false,
|
||||
showCancel: false,
|
||||
borderColor: '#BBE600',
|
||||
buttonBgColor: '#BBE600',
|
||||
okCallback: null,
|
||||
cancelCallback: null,
|
||||
let def = {
|
||||
showPop: true, //是否显示弹窗
|
||||
popType: 'custom',
|
||||
bgColor: '#383934bd',
|
||||
borderColor: '#BBE600',
|
||||
textColor: '#ffffffde',
|
||||
buttonBgColor: '#BBE600',
|
||||
buttonTextColor: '#232323DE',
|
||||
iconUrl: '',
|
||||
message: '',
|
||||
buttonText: '确定',
|
||||
clickEvt: ''
|
||||
};
|
||||
if (!option) {
|
||||
clickEvt: '',
|
||||
visiblePrompt: false,
|
||||
promptTitle: '',
|
||||
modelValue: '',
|
||||
visibleClose: false,
|
||||
okCallback: null,
|
||||
showSlot: false,
|
||||
buttonCancelText: '',
|
||||
showCancel: false,
|
||||
}
|
||||
|
||||
}
|
||||
let keys = Object.keys(option);
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
let key = keys[i];
|
||||
this.Status.Pop[key] = option[key];
|
||||
}
|
||||
keys = Object.keys(defaultCfg);
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
let keys = Object.keys(def);
|
||||
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
let key = keys[i];
|
||||
if (key in option) {
|
||||
continue;
|
||||
}
|
||||
this.Status.Pop[key] = defaultCfg[key];
|
||||
this.Status.Pop[key] = def[key];
|
||||
}
|
||||
if (option) {
|
||||
keys = Object.keys(option);
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
let key = keys[i];
|
||||
|
||||
this.Status.Pop[key] = option[key];
|
||||
}
|
||||
}
|
||||
|
||||
this.Status.Pop.showPop = true;
|
||||
if (!option.borderColor) {
|
||||
option.borderColor = '#BBE600';
|
||||
option.buttonBgColor = '#BBE600';
|
||||
}
|
||||
these.Status.Pop.showPop = true;
|
||||
},
|
||||
sendUsr() {
|
||||
let f = this.getDevice();
|
||||
|
||||
Reference in New Issue
Block a user