添加几个函数
This commit is contained in:
@ -338,11 +338,15 @@ import { deviceReName } from '../../api/common';
|
|||||||
// data.deviceId
|
// data.deviceId
|
||||||
// data.serviceId
|
// data.serviceId
|
||||||
// data.value
|
// data.value
|
||||||
|
//
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
proParam: function() {
|
proParam: function() {
|
||||||
this.alert('提示', "敬请期待");
|
|
||||||
|
uni.showToast({
|
||||||
|
title:'敬请期待'
|
||||||
|
})
|
||||||
},
|
},
|
||||||
handRemark: function() {
|
handRemark: function() {
|
||||||
this.alert('提示', "敬请期待");
|
this.alert('提示', "敬请期待");
|
||||||
@ -851,7 +855,7 @@ import { deviceReName } from '../../api/common';
|
|||||||
//给蓝牙设备发送信号更新亮度
|
//给蓝牙设备发送信号更新亮度
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.sendBrightness();
|
this.sendBrightness();
|
||||||
}, 100);
|
}, 10);
|
||||||
},
|
},
|
||||||
sendBrightness: function() {
|
sendBrightness: function() {
|
||||||
const buffer = new ArrayBuffer(6);
|
const buffer = new ArrayBuffer(6);
|
||||||
@ -873,7 +877,50 @@ import { deviceReName } from '../../api/common';
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
//获取当前设备状态
|
||||||
|
GetDeviceStatu:function(){
|
||||||
|
//数据头 命令码 数据 校验码
|
||||||
|
//JQOC 0B 00 9C41
|
||||||
|
|
||||||
|
//硬件响应
|
||||||
|
//数据头 命令码 主灯模式 副灯模式 亮度(%) 电量(%) 充电状态 校验码
|
||||||
|
//JQOC 0B 01 01 64 85 01 9C41
|
||||||
|
this.sendCmd('0x0B');
|
||||||
|
},
|
||||||
|
//设备重启
|
||||||
|
DeviceReStart:function(){
|
||||||
|
//数据头 命令码 数据 校验码
|
||||||
|
//JQOC 0C 01 9C412
|
||||||
|
this.sendCmd('0x0C');
|
||||||
|
},
|
||||||
|
//恢复出厂设置
|
||||||
|
DeviceReSet:function(){
|
||||||
|
//数据头 命令码 数据 校验码
|
||||||
|
//JQOC 0D 01 9C412
|
||||||
|
this.sendCmd('0x0D');
|
||||||
|
},
|
||||||
|
sendCmd:function(type,callback){
|
||||||
|
//数据头 命令码 数据 校验码
|
||||||
|
|
||||||
|
const buffer = new ArrayBuffer(7);
|
||||||
|
const dataView = new DataView(buffer);
|
||||||
|
let data = '0x' + parseInt(this.formData.liangDu).toString(16);
|
||||||
|
console.log("亮度:" + this.formData.liangDu + ',16进制:' + data);
|
||||||
|
dataView.setUint8(0, 'JQOC'); // 帧头
|
||||||
|
dataView.setUint8(1, type); // 帧类型:亮度调节
|
||||||
|
dataView.setUint8(2, '0x01'); // 包序号
|
||||||
|
dataView.setUint8(3, '9C41'); // 数据长度
|
||||||
|
|
||||||
|
// 发送数据
|
||||||
|
ble.LinkBlue(this.device.deviceId, () => {
|
||||||
|
setTimeout(() => {
|
||||||
|
ble.sendData(this.device.deviceId, buffer);
|
||||||
|
}, 1000)
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
16
unpackage/dist/dev/app-plus/__uniappautomator.js
vendored
16
unpackage/dist/dev/app-plus/__uniappautomator.js
vendored
File diff suppressed because one or more lines are too long
@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
var isReady=false;var onReadyCallbacks=[];
|
var isReady=false;var onReadyCallbacks=[];
|
||||||
var isServiceReady=false;var onServiceReadyCallbacks=[];
|
var isServiceReady=false;var onServiceReadyCallbacks=[];
|
||||||
var __uniConfig = {"pages":["pages/common/login/index","pages/6155/deviceDetail","pages/common/index/index","pages/common/user/index","pages/common/scan/scan","pages/common/qrcode/qrcode","pages/common/send/index","pages/common/userAgreement/index","pages/common/privacyAgreement/index","pages/common/aboutUs/index","pages/6170/deviceControl/index","pages/6170/operationVideo/index","pages/6170/addvideo/index","pages/6170/editVideo/index","pages/6170/operatingInstruct/index","pages/common/addBLE/addEquip","pages/common/addBLE/LinkBle","pages/6155/ImgCrop"],"window":{"navigationBarTextStyle":"white","navigationBarTitleText":"uni-app","navigationBarBackgroundColor":"#121212","backgroundColor":"#121212"},"tabBar":{"color":"#fff","selectedColor":"#BBE600","backgroundColor":"#202020","list":[{"pagePath":"pages/common/index/index","text":"我的设备","iconPath":"/static/tabs/device.png","selectedIconPath":"/static/tabs/device-HL.png"},{"pagePath":"pages/common/user/index","text":"我的","iconPath":"/static/tabs/my.png","selectedIconPath":"/static/tabs/my-HL.png"}]},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"JingQuan","compilerVersion":"4.64","entryPagePath":"pages/common/login/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
|
var __uniConfig = {"pages":["pages/common/login/index","pages/common/index/index","pages/common/user/index","pages/common/scan/scan","pages/common/qrcode/qrcode","pages/common/send/index","pages/common/userAgreement/index","pages/common/privacyAgreement/index","pages/common/aboutUs/index","pages/6170/deviceControl/index","pages/common/operationVideo/index","pages/common/addvideo/index","pages/common/operatingInstruct/index","pages/common/productDes/index","pages/common/addBLE/addEquip","pages/common/addBLE/LinkBle","pages/6155/deviceDetail","pages/6155/ImgCrop"],"window":{"navigationBarTextStyle":"white","navigationBarTitleText":"uni-app","navigationBarBackgroundColor":"#121212","backgroundColor":"#121212"},"tabBar":{"color":"#fff","selectedColor":"#BBE600","backgroundColor":"#202020","list":[{"pagePath":"pages/common/index/index","text":"我的设备","iconPath":"/static/tabs/device.png","selectedIconPath":"/static/tabs/device-HL.png"},{"pagePath":"pages/common/user/index","text":"我的","iconPath":"/static/tabs/my.png","selectedIconPath":"/static/tabs/my-HL.png"}]},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"JingQuan","compilerVersion":"4.75","entryPagePath":"pages/common/login/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
|
||||||
var __uniRoutes = [{"path":"/pages/common/login/index","meta":{"isQuit":true},"window":{"navigationStyle":"custom"}},{"path":"/pages/6155/deviceDetail","meta":{},"window":{"navigationBarTitleText":"HBY 6155"}},{"path":"/pages/common/index/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationStyle":"custom"}},{"path":"/pages/common/user/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"我的"}},{"path":"/pages/common/scan/scan","meta":{},"window":{"navigationBarTitleText":"扫描"}},{"path":"/pages/common/qrcode/qrcode","meta":{},"window":{"navigationBarTitleText":"扫描到的设备"}},{"path":"/pages/common/send/index","meta":{},"window":{"navigationBarTitleText":"发送信息"}},{"path":"/pages/common/userAgreement/index","meta":{},"window":{"navigationBarTitleText":"用户协议"}},{"path":"/pages/common/privacyAgreement/index","meta":{},"window":{"navigationBarTitleText":"隐私协议"}},{"path":"/pages/common/aboutUs/index","meta":{},"window":{"navigationBarTitleText":"关于我们"}},{"path":"/pages/6170/deviceControl/index","meta":{},"window":{"navigationStyle":"custom"}},{"path":"/pages/6170/operationVideo/index","meta":{},"window":{"navigationStyle":"custom"}},{"path":"/pages/6170/addvideo/index","meta":{},"window":{"navigationBarTitleText":"添加"}},{"path":"/pages/6170/editVideo/index","meta":{},"window":{"navigationBarTitleText":"编辑视频"}},{"path":"/pages/6170/operatingInstruct/index","meta":{},"window":{"navigationStyle":"custom"}},{"path":"/pages/common/addBLE/addEquip","meta":{},"window":{"navigationBarTitleText":"添加设备"}},{"path":"/pages/common/addBLE/LinkBle","meta":{},"window":{"navigationBarTitleText":"扫描到的设备"}},{"path":"/pages/6155/ImgCrop","meta":{},"window":{"navigationBarTitleText":"图像裁剪","navigationStyle":"custom","fullscreen":true}}];
|
var __uniRoutes = [{"path":"/pages/common/login/index","meta":{"isQuit":true},"window":{"navigationStyle":"custom"}},{"path":"/pages/common/index/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationStyle":"custom"}},{"path":"/pages/common/user/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"我的"}},{"path":"/pages/common/scan/scan","meta":{},"window":{"navigationBarTitleText":"扫描"}},{"path":"/pages/common/qrcode/qrcode","meta":{},"window":{"navigationBarTitleText":"扫描到的设备"}},{"path":"/pages/common/send/index","meta":{},"window":{"navigationBarTitleText":"发送信息"}},{"path":"/pages/common/userAgreement/index","meta":{},"window":{"navigationBarTitleText":"用户协议"}},{"path":"/pages/common/privacyAgreement/index","meta":{},"window":{"navigationBarTitleText":"隐私协议"}},{"path":"/pages/common/aboutUs/index","meta":{},"window":{"navigationBarTitleText":"关于我们"}},{"path":"/pages/6170/deviceControl/index","meta":{},"window":{"navigationStyle":"custom"}},{"path":"/pages/common/operationVideo/index","meta":{},"window":{"navigationStyle":"custom"}},{"path":"/pages/common/addvideo/index","meta":{},"window":{"navigationStyle":"custom"}},{"path":"/pages/common/operatingInstruct/index","meta":{},"window":{"navigationStyle":"custom"}},{"path":"/pages/common/productDes/index","meta":{},"window":{"navigationStyle":"custom"}},{"path":"/pages/common/addBLE/addEquip","meta":{},"window":{"navigationBarTitleText":"添加设备"}},{"path":"/pages/common/addBLE/LinkBle","meta":{},"window":{"navigationBarTitleText":"扫描到的设备"}},{"path":"/pages/6155/deviceDetail","meta":{},"window":{"navigationBarTitleText":"HBY 6155"}},{"path":"/pages/6155/ImgCrop","meta":{},"window":{"navigationBarTitleText":"图像裁剪","navigationStyle":"custom","fullscreen":true}}];
|
||||||
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
||||||
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
||||||
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:void 0,window:void 0,document:void 0,frames:void 0,self:void 0,location:void 0,navigator:void 0,localStorage:void 0,history:void 0,Caches:void 0,screen:void 0,alert:void 0,confirm:void 0,prompt:void 0,fetch:void 0,XMLHttpRequest:void 0,WebSocket:void 0,webkit:void 0,print:void 0}}}});
|
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:void 0,window:void 0,document:void 0,frames:void 0,self:void 0,location:void 0,navigator:void 0,localStorage:void 0,history:void 0,Caches:void 0,screen:void 0,alert:void 0,confirm:void 0,prompt:void 0,fetch:void 0,XMLHttpRequest:void 0,WebSocket:void 0,webkit:void 0,print:void 0}}}});
|
||||||
|
7039
unpackage/dist/dev/app-plus/app-service.js
vendored
7039
unpackage/dist/dev/app-plus/app-service.js
vendored
File diff suppressed because one or more lines are too long
7213
unpackage/dist/dev/app-plus/app-view.js
vendored
7213
unpackage/dist/dev/app-plus/app-view.js
vendored
File diff suppressed because one or more lines are too long
2
unpackage/dist/dev/app-plus/manifest.json
vendored
2
unpackage/dist/dev/app-plus/manifest.json
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
unpackage/dist/dev/app-plus/view.css
vendored
2
unpackage/dist/dev/app-plus/view.css
vendored
File diff suppressed because one or more lines are too long
4
unpackage/dist/dev/app-plus/view.umd.min.js
vendored
4
unpackage/dist/dev/app-plus/view.umd.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user