diff --git a/api/6155/BlueHelper.js b/api/6155/BlueHelper.js deleted file mode 100644 index 82dd23d..0000000 --- a/api/6155/BlueHelper.js +++ /dev/null @@ -1,671 +0,0 @@ -export default { - featrueValueCallback: null,//蓝牙特征变化回调 - BleChangeCallback:null,//蓝牙状态变化回调 - //引导用户打开蓝牙 - showBluetoothGuide: function(showTip) { - let platform = process.env.UNI_PLATFORM; - - - var openBlueSetting = function() { - // 判断平台类型 - if (platform === 'mp-weixin') { - uni.openSetting(); - } else if (platform === 'app-plus' || platform === 'app') { - //---------------------------------------------------------------- - const osName = plus.os.name; - - if (osName === 'iOS') { - // iOS 平台打开蓝牙设置 - plus.runtime.openURL('App-Prefs:root=Bluetooth', function() { - console.log('成功打开蓝牙设置'); - }, function(err) { - console.error('打开蓝牙设置失败:' + err.message); - uni.showModal({ - title: '提示', - content: '无法自动打开蓝牙设置,请手动前往设置 > 蓝牙 进行操作。', - showCancel: false - }); - }); - } else if (osName === 'Android') { - // Android 平台打开蓝牙设置 - try { - const Intent = plus.android.importClass('android.content.Intent'); - const Settings = plus.android.importClass('android.provider.Settings'); - const main = plus.android.runtimeMainActivity(); - const intent = new Intent(Settings.ACTION_BLUETOOTH_SETTINGS); - main.startActivity(intent); - } catch (e) { - console.error('打开蓝牙设置失败:' + e.message); - // 尝试使用通用设置页面作为备选方案 - plus.runtime.openURL('settings://', function() { - console.log('打开系统设置成功,请手动找到蓝牙选项'); - }, function() { - uni.showModal({ - title: '提示', - content: '无法自动打开蓝牙设置,请手动前往设置页面开启蓝牙。', - showCancel: false - }); - }); - } - } else { - uni.showModal({ - title: '提示', - content: '当前系统不支持自动打开蓝牙设置,请手动操作。', - showCancel: false - }); - } - - - //-------------------------------------------------------------------- - } else if (platform === 'mp-alipay') { - uni.openSetting(); - } - - } - - if (showTip !== undefined) { - openBlueSetting(); - return; - } - if (platform === 'mp-weixin' || platform === 'app-plus' || platform === 'mp-alipay' || platform === 'app') { - uni.showModal({ - title: '蓝牙未开启', - content: '请在系统设置中打开蓝牙以使用此功能', - success: (res) => { - if (res.confirm) { - openBlueSetting(); - } - } - }); - } else { - console.log("当前平台不支持打开系统设置" + platform); - } - - - }, - //获取蓝牙适配器状态 - CheckBlue: function(callback) { - - uni.getBluetoothAdapterState({ - success(res1) { - - console.log("当前蓝牙适配器状态:" + JSON.stringify(res1)) - if (callback) { - callback(res1); - } - - }, - fail(ex1) { - console.log("检查蓝牙状态异常:" + JSON.stringify(ex1)); - if (callback) { - if (ex1.code == 10000) { - console.log("未初始化蓝牙适配器"); - } - let res1 = { - available: false, - discovering: false - } - callback(res1); - } - }, - complete() { - - } - }); - }, - //初始化蓝牙模块 - OpenBlue: function(isCheckState, callback, availCallback) { - - var these = this; - - var init = function() { - uni.openBluetoothAdapter({ - success: (res) => { - console.log("蓝牙初始化成功:" + JSON.stringify(res)); - if (callback) { - callback(); - } - uni.onBluetoothAdapterStateChange(function(state) { - console.log('蓝牙状态发生变化:' + JSON.stringify(state)); - if(this.BleChangeCallback){ - this.BleChangeCallback() - } - }) - }, - fail: function(ex2) { - console.log("蓝牙初始化失败:" + JSON.stringify(ex2)) - if (ex2.code == '10001') { - console.log("手机蓝牙未打开或设备不支持蓝牙"); - - - if (availCallback) { - availCallback(); - } else { - these.showBluetoothGuide(); - } - } - } - }); - } - if (isCheckState) { - this.CheckBlue(function(res1) { - if (res1.available) { - if (callback) { - callback(); - } - return; - } - init(); - }) - } else { - init(); - } - - - - }, - //关闭蓝牙模块,停止搜索、断开所有连接 - CloseBlue: function(callback) { - - this.StopSearch(); - - this.disconnectDevice(); - - uni.closeBluetoothAdapter({ - success: () => { - console.log("蓝牙模块已关闭"); - if (callback) { - callback(); - } - } - }); - }, - //开始搜索新设备 - StartSearch: function(callback) { - - var these = this; - - //发现新设备 - var onDeviceFound = function() { - uni.onBluetoothDeviceFound(function(res) { - console.log("发现新设备:" + JSON.stringify(res)); - if (callback) { - callback(res); - } - }) - } - //开始搜索 - var Search = function() { - uni.startBluetoothDevicesDiscovery({ - services: ["0xFFE0"], - allowDuplicatesKey: false, - success: (res) => { - console.log('开始搜索蓝牙设备成功'); - onDeviceFound(); - }, - fail: (err) => { - console.log(`搜索蓝牙设备失败: ${err.errMsg}`); - } - }); - - } - //先检查蓝牙状态是可用 - this.CheckBlue(function(res1) { - if (res1.available) { - if (!res1.discovering) { - Search(); - } else { - console.log("当前蓝牙正在搜索设备") - } - - } else { - these.OpenBlue(false, Search, () => { - these.showBluetoothGuide(); - }); - } - }); - - - - }, - //停止搜索 - StopSearch: function() { - uni.stopBluetoothDevicesDiscovery({ - success: (res) => { - console.log("停止搜索蓝牙设备成功") - }, - fail() { - console.log("无法停止蓝牙搜索") - } - }); - }, - //获取已连接的设备 - getLinkBlue: function(callback) { - uni.getConnectedBluetoothDevices({ - services: ["0xFFE0"], - success: (res) => { - if (callback) { - callback(res); - - } - }, - fail: function(ex) { - console.log("获取已连接设备异常"); - if (callback) { - callback({ - devices: [] - }); - } - } - }) - }, - //连接某个设备 - LinkBlue: function(deviceId, callback, error) { - - this.StopSearch(); - var these = this; - let key = "linkedDevices"; - var store = uni.getStorageInfoSync(); - var f = store.keys.find(function(v) { - return v == key; - }); - var linkedDevices = []; - if (f) { - var str = uni.getStorageSync(key); - if (str) { - linkedDevices = JSON.parse(str); - }else{ - linkedDevices=[]; - } - - } - //连接成功的回调 - var lindedCallback = function () { - - let c = linkedDevices.find(function (v) { - return v.deviceId == deviceId; - }); - - if (c) { - console.log("连接成功开始监听特征变化") - //监听设备的特征变化 - uni.notifyBLECharacteristicValueChange({ - deviceId: deviceId, - serviceId: c.notifyServiceid, - characteristicId: c.notifyCharactId, - state: true, - success: function (res) { - console.log("开始监听成功。。。。") - if(res.errCode=='0'){ - //订阅特征值 - uni.onBLECharacteristicValueChange(function(data){ - // data.characteristicId - // data.deviceId - // data.serviceId - // data.value - console.log("监听到特征值:"+JSON.stringify(data)); - - if(these.featrueValueCallback){ - these.featrueValueCallback(data); - } - }); - - } - } - }); - } - - if (callback) { - callback(deviceId); - } - } - - var linkState = function(res) { - console.log("获取已连接的设备回调" + JSON.stringify(res)) - let flag = res.devices.find(function(v) { - if (v.deviceId == deviceId) { - return true; - } - return false; - }); - if (flag) { - console.log("设备状态已连接"); - - lindedCallback(deviceId); - - return; - } else { - console.log("设备未连接"); - linkDevice(deviceId); - } - } - - var linkDevice = function(id) { - console.log("正在连接"+id); - uni.createBLEConnection({ - deviceId: id, - timeout: 30000, - success: function(info) { - - console.log("连接成功"); - - uni.setBLEMTU({ - deviceId: id, - mtu: 512, - success: () => { - console.log("mtu设置成功"); - if(linkedDevices){ - console.log("11111"+JSON.stringify(linkedDevices)); - f = linkedDevices.find(function (v) { - return v.deviceId == id; - }); - }else{ - console.log("22222") - f=null; - } - - - - if (!f) { - console.log("缓存中没有找到该设备") - - these.getLinkBlue(function (res) { - if (res.devices && res.devices.length) { - let f = res.devices.find(function (v) { - return v.deviceId == id; - }); - linkedDevices.push(f); - uni.setStorageSync(key, JSON.stringify(linkedDevices)); - - getService(id); - - } - - }); - - - } else { - console.log("缓存中已连接过"); - if (!f.services) { - getService(id); - } else { - - lindedCallback(id); - - } - } - }, - fail: function() { - console.log("mtu设置失败") - } - }); - - }, - fail: function(ex) { - if (error) { - console.log("蓝牙连接失败" + JSON.stringify(error)); - error(ex); - } - } - }); - } - //获取服务 - var getService = function(id) { - - var repeatCnt = 0; - var startgetService = function() { - uni.getBLEDeviceServices({ - deviceId: id, - success: function(res) { - if (res.services && res.services.length > 0) { - console.log("获取到服务:" + JSON.stringify(res)); - - linkedDevices.find(function(v) { - if (v.deviceId == id) { - v.services = res.services; - } - }); - uni.setStorageSync(key, JSON.stringify(linkedDevices)); - var promises = []; - for (var i = 0; i < res.services.length; i++) { - let service = res.services[i]; - promises.push(getFeatrus(id, service.uuid)); - } - - Promise.all(promises) - .then(results => { - console.log('所有操作成功完成', results); - - lindedCallback(id); - - }) - .catch(error => { - console.error('至少一个操作失败', error); - }); - - - } else { - repeatCnt++; - if (repeatCnt > 5) { - - lindedCallback(id); - - return; - } - setTimeout(function() { - startgetService(id); - }, 500); - } - } - }) - } - - setTimeout(function() { - startgetService(id); - }, 1000); - } - //获取特性 - var getFeatrus = function(id, serviceId) { - var promise = new Promise((resolve, reject) => { - uni.getBLEDeviceCharacteristics({ - deviceId: id, - serviceId: serviceId, - success: (res) => { - console.log("获取到特征:" + JSON.stringify(res)); - - //写特征 - let writeChar = res.characteristics.find(char => - char.uuid.indexOf("FFE1") > -1 - ); - //通知特征 - let notiChar = res.characteristics.find(char => - char.uuid.indexOf("FFE2") > -1 - ); - - linkedDevices.find(function(v) { - if (v.deviceId == id) { - if (!v.Characteristics) { - v.Characteristics = []; - } - v.Characteristics = v.Characteristics.concat(res - .characteristics); - - if (writeChar) { - v.writeServiceId = serviceId; - v.wirteCharactId = writeChar.uuid; - } - - if (notiChar) { - v.notifyServiceid = serviceId; - v.notifyCharactId = notiChar.uuid; - } - } - }); - - uni.setStorageSync(key, JSON.stringify(linkedDevices)); - resolve(res); - }, - fail: (ex) => { - console.log("获取特征出现异常:" + JSON.stringify(ex)); - resolve(ex); - } - }); - }); - return promise; - } - - //监测蓝牙状态变化 - uni.onBLEConnectionStateChange(function(res) { - if (!res.connected) { - console.log("蓝牙断开连接" + res.deviceId + ""); - // lindDevice(res.deviceId); - } - }); - - console.log("正在获取蓝牙适配器状态") - this.CheckBlue((res) => { - console.log("蓝牙状态:" + JSON.stringify(res)); - if (res.available) { - this.getLinkBlue(linkState); - } else { - console.log("蓝牙适配器不可用,正在初始化"); - this.OpenBlue(false, () => { - this.getLinkBlue(linkState); - }, () => { - console.log("请引导用户打开蓝牙"); - these.showBluetoothGuide(); - }) - } - - }); - - - }, - //断开连接 - disconnectDevice: function(deviceId) { - - var disconnect = function(id) { - uni.closeBLEConnection({ - deviceId: id, - success: (res) => { - console.log("蓝牙连接已断开"); - - } - }); - } - if (deviceId) { - disconnect(deviceId); - return; - } - //断开所有已连接的设备 - this.getLinkBlue(function(res) { - if (res.devices && res.devices.length > 0) { - for (var i = 0; i < res.devices.length; i++) { - let item = res.devices[i]; - disconnect(item.deviceId); - } - - } else { - console.log("无连接设备"); - } - }); - - }, - //发送二进制数据 - sendData: function(deviceid, buffer) { - - console.log("准备向设备发送数据,deviceid=" + deviceid); - return new Promise((resolve, reject) => { - if (!deviceid) { - reject(`deviceid为空,请输入要发送的设备`); - return; - } - console.log("准备发送数据包"); - let key = "linkedDevices"; - var store = uni.getStorageInfoSync(); - var f = store.keys.find(function(v) { - return v == key; - }); - console.log("倒计时:5"); - var linkedDevices = []; - if (f) { - var str = uni.getStorageSync(key); - if (str) { - linkedDevices = JSON.parse(str); - } - - } - console.log("倒计时:4"); - if (linkedDevices && linkedDevices.length && linkedDevices.length > 0) { - console.log("倒计时:3"); - f = linkedDevices.find(function(v) { - return v.deviceId == deviceid; - - }); - console.log("f=" + JSON.stringify(f)); - // console.log("deviceid=" + deviceid); - console.log("倒计时:2"); - if (f) { - console.log("倒计时:1"); - uni.writeBLECharacteristicValue({ - deviceId: f.deviceId, - serviceId: f.writeServiceId, - characteristicId: f.wirteCharactId, - value: buffer, - success: () => { - console.log("发送数据成功"); - resolve(); - }, - fail: (err) => { - console.log("发送数据失败" + JSON.stringify(err)); - reject(`发送数据失败: ${err.errMsg}`); - }, - complete: function() { - console.log("发送数据complete"); - } - }); - } else { - reject(`已连接设备中无法找到此设备`); - // console.log("警报:已连接设备中无法找到此设备") - } - - } else { - console.log("检测到未与设备建立连接"); - reject(`检测到未与设备建立连接`); - } - - - }); - }, - sendDataNew: function(deviceid, serviceId, characteristicId, buffer) { - - console.log("准备向设备发送数据,deviceid=" + deviceid); - return new Promise((resolve, reject) => { - uni.writeBLECharacteristicValue({ - deviceId: deviceid, - serviceId: serviceId, - characteristicId: characteristicId, - value: buffer, - success: () => { - console.log("发送数据成功"); - resolve(); - }, - fail: (err) => { - console.log("发送数据失败" + JSON.stringify(err)); - reject(`发送数据失败: ${err.errMsg}`); - }, - complete: function() { - console.log("发送数据complete"); - } - }); - - - - - - }); - } - -} - - diff --git a/api/670/HBY670.js b/api/670/HBY670.js new file mode 100644 index 0000000..4cc35d3 --- /dev/null +++ b/api/670/HBY670.js @@ -0,0 +1,93 @@ +import {request,baseURL} from '@/utils/request' + +function getdata(data,url,method){ + return new Promise((resolve,reject)=>{ + if(!url){ + reject('url为空'); + return; + } + if(!method){ + method='POST'; + } + request({ + url: url, + method: method, + data:data + }).then((res)=>{ + resolve(res); + }).catch(ex=>{ + reject(ex); + }); + }); + +} + + +//人员信息设置 +function sendUsr(data){ + let url="/app/xinghan/device/registerPersonInfo"; + return getdata(data,url,"POST"); +} + +//报警信息 +function warnMsg(data){ + let url="/app/xinghan/device/sendAlarmMessage" + return getdata(data,url,"POST"); +} + +//开机图片 +function sendPic(data){ + return new Promise((resolve, reject) => { + + const token = uni.getStorageSync('token'); + const clientid = uni.getStorageSync('clientID'); + let config = { + header: {} + }; + if (token) { + config.header['Authorization'] = 'Bearer ' + token; + config.header['clientid'] = clientid; + } + + uni.uploadFile({ + + url: baseURL + '/app/xinghan/device/uploadLogo', + filePath: data.picPath, + name: 'file', + formData: { + deviceId: data.deviceId, + deviceImei: data.deviceImei + }, + header: config.header, + timeout: 600000, + fail: (ex) => { + console.log("上传视频失败" ,ex); + reject(ex); + }, + success: (res) => { + console.log("上传完成", res); + if(res.statusCode==200){ + resolve(JSON.parse(res.data)); + }else{ + reject(res); + } + + }, + complete: () => { + + } + + }); + }); +} + +export default{ + sendUsr:sendUsr, + warnMsg:warnMsg, + sendPic:sendPic +} + + + + + diff --git a/components/BottomSlideMenuPlus/BottomSlideMenuPlus.vue b/components/BottomSlideMenuPlus/BottomSlideMenuPlus.vue index af0dd3b..ffe890d 100644 --- a/components/BottomSlideMenuPlus/BottomSlideMenuPlus.vue +++ b/components/BottomSlideMenuPlus/BottomSlideMenuPlus.vue @@ -2,17 +2,14 @@ + :style="{backgroundColor:config.maskBgColor,display:(config.showMask?'':'none')}"> {{ config.title }} - + @@ -29,7 +26,13 @@ - + + + + {{ item.text }} @@ -61,34 +64,34 @@ config: { type: Object, default: () => ({ - show: false,//是否显示 - showHeader: false,//是否显示标头 - showMask:true,//是否显示mask - showDivider: false,//是否在两个项之间显示分隔线 - showBtn: false,//是否显示底部按钮 - showClose:false,//是否显示右上角关闭按钮 - maskBgColor:'',//mask的颜色 - menuItems: [],//菜单项 包含icon text - activeIndex: -1,//当前已选中的项编号 - bgColor: '#2a2a2a',//主体背景 - itemBgColor: '#3a3a3a',//各项被选中后的背景 - textColor: '#ffffffde',//各项的文字颜色 - textAlign: 'flex-start',//各项的文字居中方式 - title: '',//header的文字 - dividerColor: '#00000000',//分隔线颜色 - dividerThickness: '0rpx',//分隔线宽度 - dividerMargin: '10rpx',//分隔线距离两边的宽度 - itemHeight: '80rpx',//各项的调试 - btnBgColor: "#bbe600",//按钮颜色 - btnText: "确定",//按钮文字 - btnTextColor: "#000000",//按钮文字颜色 - + show: false, //是否显示 + showHeader: false, //是否显示标头 + showMask: true, //是否显示mask + showDivider: false, //是否在两个项之间显示分隔线 + showBtn: false, //是否显示底部按钮 + showClose: false, //是否显示右上角关闭按钮 + maskBgColor: '', //mask的颜色 + menuItems: [], //菜单项 包含icon text + activeIndex: -1, //当前已选中的项编号 + bgColor: '#2a2a2a', //主体背景 + itemBgColor: '#3a3a3a', //各项被选中后的背景 + textColor: '#ffffffde', //各项的文字颜色 + textAlign: 'flex-start', //各项的文字居中方式 + title: '', //header的文字 + dividerColor: '#00000000', //分隔线颜色 + dividerThickness: '0rpx', //分隔线宽度 + dividerMargin: '10rpx', //分隔线距离两边的宽度 + itemHeight: '80rpx', //各项的调试 + btnBgColor: "#bbe600", //按钮颜色 + btnText: "确定", //按钮文字 + btnTextColor: "#000000", //按钮文字颜色 + }) }, }, - + methods: { closeMenu() { @@ -100,19 +103,18 @@ this.$emit('itemClick', item, index); }, btnClick() { - + let item = null; let index = null; if (this.config.activeIndex > -1) { item = this.config.menuItems[this.config.activeIndex]; } index = this.config.activeIndex; - this.$emit('btnClick', item, index); + this.$emit('btnClick', item, index); } - + } } - \ No newline at end of file diff --git a/components/TextToHex/TextToHexV1.vue b/components/TextToHex/TextToHexV1.vue new file mode 100644 index 0000000..ea33b5e --- /dev/null +++ b/components/TextToHex/TextToHexV1.vue @@ -0,0 +1,194 @@ + + + + + \ No newline at end of file diff --git a/components/global-loading/global-loading.vue b/components/global-loading/global-loading.vue new file mode 100644 index 0000000..0848bec --- /dev/null +++ b/components/global-loading/global-loading.vue @@ -0,0 +1,199 @@ + + + + + \ No newline at end of file diff --git a/config/index.js b/config/index.js index e977462..dcd1dcc 100644 --- a/config/index.js +++ b/config/index.js @@ -2,11 +2,11 @@ const config = { // 开发环境 development: { - BASE_URL: 'http://192.168.2.34:8000', + BASE_URL: 'http://192.168.110.54:8000', API_PREFIX: '', // MQTT 配置 MQTT_HOST: '47.120.79.150', - MQTT_PORT: 9083, + MQTT_PORT: 8083, MQTT_USERNAME: 'admin', MQTT_PASSWORD: '#YtvpSfCNG' }, @@ -16,7 +16,7 @@ const config = { API_PREFIX: '', // MQTT 配置 MQTT_HOST: '47.120.79.150', - MQTT_PORT: 9083, + MQTT_PORT: 8083, MQTT_USERNAME: 'admin', MQTT_PASSWORD: '#YtvpSfCNG' } diff --git a/package-lock.json b/package-lock.json index 346f6d7..a38d96b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -272,7 +272,8 @@ "node_modules/mescroll-uni": { "version": "1.3.7", "resolved": "https://registry.npmjs.org/mescroll-uni/-/mescroll-uni-1.3.7.tgz", - "integrity": "sha512-1pQMtGA+iVRKhfJZZNXdBx05NnthIk6zm3hRbumswSA54eaKOMgpUDb9AQ2+rRdXmS6kLkEYSbW/fkb7/IyoAg==" + "integrity": "sha512-1pQMtGA+iVRKhfJZZNXdBx05NnthIk6zm3hRbumswSA54eaKOMgpUDb9AQ2+rRdXmS6kLkEYSbW/fkb7/IyoAg==", + "license": "MIT" }, "node_modules/mime-db": { "version": "1.52.0", @@ -296,7 +297,8 @@ "node_modules/paho-mqtt": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/paho-mqtt/-/paho-mqtt-1.1.0.tgz", - "integrity": "sha512-KPbL9KAB0ASvhSDbOrZBaccXS+/s7/LIofbPyERww8hM5Ko71GUJQ6Nmg0BWqj8phAIT8zdf/Sd/RftHU9i2HA==" + "integrity": "sha512-KPbL9KAB0ASvhSDbOrZBaccXS+/s7/LIofbPyERww8hM5Ko71GUJQ6Nmg0BWqj8phAIT8zdf/Sd/RftHU9i2HA==", + "license": "EPL-1.0" }, "node_modules/proxy-from-env": { "version": "1.1.0", diff --git a/pages.json b/pages.json index ff2076b..297bc18 100644 --- a/pages.json +++ b/pages.json @@ -190,6 +190,89 @@ "style": { "navigationBarTitleText": "呼叫" } + }, + { + "path": "pages/BlueTooth/ModeSetting/VideoSend", + "style": { + "navigationBarTitleText": "发送视频" + + + } + }, + { + "path": "pages/BlueTooth/ModeSetting/VideoSend_1", + "style": { + "navigationBarTitleText": "发送视频" + + + } + }, + { + "path": "pages/BlueTooth/ModeSetting/VideoSend_670", + "style": { + "navigationBarTitleText": "发送视频" + + + } + }, + { + "path": "pages/BlueTooth/ModeSetting/HBY650", + "style": { + "navigationBarTitleText": "HBY650" + } + }, + { + "path": "pages/BlueTooth/ModeSetting/HBY650_1", + "style": { + "navigationBarTitleText": "HBY650" + } + }, + { + "path": "pages/BlueTooth/ModeSetting/ModeSetting", + "style": { + "navigationBarTitleText": "7307-0.96TFT" + } + }, + { + "path": "pages/BlueTooth/ModeSetting/update", + "style": { + "navigationBarTitleText": "版本更新" + } + }, + { + "path": "pages/BlueTooth/ModeSetting/HBY6155", + "style": { + "navigationBarTitleText": "HBY6155" + } + }, + { + "path": "pages/BlueTooth/ModeSetting/HBY6155V1", + "style": { + "navigationBarTitleText": "HBY6155_V1" + } + }, + { + "path": "pages/BlueTooth/ModeSetting/HBY670V1", + "style": { + "navigationBarTitleText": "HBY670" + } + }, { + "path": "pages/BlueTooth/ModeSetting/index", + "style": { + "navigationBarTitleText": "设备类型" + } + }, + { + "path": "pages/670/HBY670", + "style": { + "navigationBarTitleText": "HBY670" + } + }, + { + "path": "pages/650/HBY650", + "style": { + "navigationBarTitleText": "HBY650" + } } diff --git a/pages/6155/ImgCrop.vue b/pages/6155/ImgCrop.vue index cf66c28..e06f20f 100644 --- a/pages/6155/ImgCrop.vue +++ b/pages/6155/ImgCrop.vue @@ -25,18 +25,21 @@ onLoad: function(option) { const eventChannel = this.getOpenerEventChannel(); var these = this; - eventChannel.on('checkImg', function(data) { + eventChannel.on('checkImg', (data)=> { console.log("我收到你的消息了,消息内容是:" + JSON.stringify(data)); - these.src = data.data; + this.src = data.data; + console.log("我收到你的消息了,消息内容是:",data); }) }, methods: { handleCrop(e) { + var these = this; + this.Statu = true; console.log("裁剪完成"); console.log(e.tempFilePath); - + // const ctx = uni.createCanvasContext('splashCanvas', this); ctx.drawImage( e.tempFilePath, @@ -53,11 +56,12 @@ height: 80, success: (res) => { // 处理像素数据并发送 + const eventChannel = these.getOpenerEventChannel(); console.log("res.data.length="+res.data.length); - // this.processAndSendImageData(res.data).then( - // resolve).catch(reject); - const eventChannel = these.getOpenerEventChannel(); - eventChannel.emit('ImgCutOver',res.data); + + + eventChannel.emit('ImgCutOver',{piexls:res.data,picPath:e.tempFilePath}); + uni.navigateBack(); }, fail: (err) => { diff --git a/pages/6155/deviceDetail.vue b/pages/6155/deviceDetail.vue index e1170bf..8e3e041 100644 --- a/pages/6155/deviceDetail.vue +++ b/pages/6155/deviceDetail.vue @@ -24,11 +24,11 @@ 蓝牙名称 - {{formData.name}} + {{formData.blename}} - 信号强度 - {{formData.RSSI}} + 设备名称 + {{formData.deviceName}} 设备状态 @@ -83,24 +83,23 @@ 人员信息登记 发送 + 单位: - + + + + 部门: + 姓名: - - - - 职位: - - - - ID号: - + + 产品信息 @@ -139,25 +138,31 @@ - + @@ -1002,14 +1154,14 @@ import { deviceReName } from '../../api/common'; .eq .bigTxt { color: rgba(255, 255, 255, 0.87); - font-family: PingFang SC; + font-family: "PingFang SC"; font-size: 28rpx; font-weight: 400; } .eq .smallTxt { color: rgba(255, 255, 255, 0.6); - font-family: PingFang SC; + font-family: "PingFang SC"; font-size: 24rpx; font-weight: 400; } @@ -1038,7 +1190,7 @@ import { deviceReName } from '../../api/common'; .eqinfo .lbl { color: rgba(255, 255, 255, 0.87); - font-family: PingFang SC; + font-family: "PingFang SC"; font-size: 28rpx; font-weight: 400; @@ -1048,7 +1200,7 @@ import { deviceReName } from '../../api/common'; .eqinfo .value { color: rgba(255, 255, 255, 0.6); - font-family: PingFang SC; + font-family: "PingFang SC"; font-size: 28rpx; font-weight: 400; @@ -1118,7 +1270,7 @@ import { deviceReName } from '../../api/common'; .mode .bigTxt { color: rgba(255, 255, 255, 0.87); - font-family: PingFang SC; + font-family: "PingFang SC"; font-size: 28rpx; font-weight: 400; @@ -1128,7 +1280,7 @@ import { deviceReName } from '../../api/common'; .mode .smallTxt { color: rgba(255, 255, 255, 0.6); - font-family: PingFang SC; + font-family: "PingFang SC"; font-size: 24rpx; font-weight: 400; @@ -1146,7 +1298,7 @@ import { deviceReName } from '../../api/common'; .usrtitle { color: rgba(255, 255, 255, 0.87); - font-family: PingFang SC; + font-family: "PingFang SC"; font-size: 28rpx; font-weight: 400; height: 40rpx; @@ -1156,12 +1308,12 @@ import { deviceReName } from '../../api/common'; } .usrinfo .btnSend { - line-height: 40rpx; + line-height: 65rpx; border-radius: 8px; - width: 82rpx; - height: 40rpx; + width: 120rpx; + height: 65rpx; color: rgba(35, 35, 35, 0.87); - font-family: PingFang SC; + font-family: "PingFang SC"; font-size: 20rpx; font-weight: 400; letter-spacing: 0.07px; @@ -1194,7 +1346,7 @@ import { deviceReName } from '../../api/common'; text-align: right; color: rgba(255, 255, 255, 0.87); - font-family: PingFang SC; + font-family: "PingFang SC"; font-size: 28rpx; font-weight: 400; @@ -1212,7 +1364,7 @@ import { deviceReName } from '../../api/common'; .usrinfo .value .uni-input-input { color: rgba(255, 255, 255, 0.87); - font-family: PingFang SC; + font-family: "PingFang SC"; font-size: 28rpx; font-weight: 400; @@ -1223,7 +1375,7 @@ import { deviceReName } from '../../api/common'; .usrplace { color: rgba(255, 255, 255, 0.4); - font-family: PingFang SC; + font-family: "PingFang SC"; font-size: 28rpx; font-weight: 400; letter-spacing: 0.07px; @@ -1263,7 +1415,7 @@ import { deviceReName } from '../../api/common'; .proinfo .item .txt { color: rgba(255, 255, 255, 0.6); - font-family: PingFang SC; + font-family: "PingFang SC"; font-size: 24rpx; font-weight: 400; margin-top: 20rpx; @@ -1277,36 +1429,6 @@ import { deviceReName } from '../../api/common'; } - /* .custom-slider .uni-slider-handle-wrapper { - height: 60rpx !important; - border-radius: 3px; - } - - - .custom-slider .uni-slider-active { - background-color: #FF6B6B !important; - } - - - .custom-slider .uni-slider-handle { - width: 60rpx !important; - height: 60rpx !important; - border-radius: 16rpx !important; - background-color: #FFFFFFde !important; - margin-top: -15px !important; - border: none !important; - - } - - .custom-slider .uni-slider-thumb { - width: 60rpx !important; - height: 60rpx !important; - border-radius: 16rpx !important; - background-color: #00000000 !important; - - border: none !important; - } */ - .addIco { width: 100%; height: 360rpx; @@ -1331,4 +1453,11 @@ import { deviceReName } from '../../api/common'; width: 70rpx; height: 70rpx; } + + .TextToHex { + position: fixed; + top: -99999rpx; + left: -99999rpx; + visibility: hidden; + } \ No newline at end of file diff --git a/pages/650/HBY650.vue b/pages/650/HBY650.vue new file mode 100644 index 0000000..f9963ee --- /dev/null +++ b/pages/650/HBY650.vue @@ -0,0 +1,1841 @@ + + + + + \ No newline at end of file diff --git a/pages/670/HBY670.vue b/pages/670/HBY670.vue new file mode 100644 index 0000000..ea422b6 --- /dev/null +++ b/pages/670/HBY670.vue @@ -0,0 +1,2360 @@ + + + + + \ No newline at end of file diff --git a/pages/BlueTooth/ModeSetting/HBY6155.vue b/pages/BlueTooth/ModeSetting/HBY6155.vue new file mode 100644 index 0000000..3ff9f9a --- /dev/null +++ b/pages/BlueTooth/ModeSetting/HBY6155.vue @@ -0,0 +1,1947 @@ + + + + + \ No newline at end of file diff --git a/pages/BlueTooth/ModeSetting/HBY6155V1.vue b/pages/BlueTooth/ModeSetting/HBY6155V1.vue new file mode 100644 index 0000000..06aa86a --- /dev/null +++ b/pages/BlueTooth/ModeSetting/HBY6155V1.vue @@ -0,0 +1,1925 @@ + + + + + \ No newline at end of file diff --git a/pages/BlueTooth/ModeSetting/HBY650.vue b/pages/BlueTooth/ModeSetting/HBY650.vue new file mode 100644 index 0000000..07ebe45 --- /dev/null +++ b/pages/BlueTooth/ModeSetting/HBY650.vue @@ -0,0 +1,1892 @@ + + + + + \ No newline at end of file diff --git a/pages/BlueTooth/ModeSetting/HBY650_1.vue b/pages/BlueTooth/ModeSetting/HBY650_1.vue new file mode 100644 index 0000000..8338463 --- /dev/null +++ b/pages/BlueTooth/ModeSetting/HBY650_1.vue @@ -0,0 +1,1899 @@ + + + + + \ No newline at end of file diff --git a/pages/BlueTooth/ModeSetting/HBY670V1.vue b/pages/BlueTooth/ModeSetting/HBY670V1.vue new file mode 100644 index 0000000..c457ae4 --- /dev/null +++ b/pages/BlueTooth/ModeSetting/HBY670V1.vue @@ -0,0 +1,2837 @@ + + + + + \ No newline at end of file diff --git a/pages/BlueTooth/ModeSetting/ModeSetting.vue b/pages/BlueTooth/ModeSetting/ModeSetting.vue new file mode 100644 index 0000000..c464993 --- /dev/null +++ b/pages/BlueTooth/ModeSetting/ModeSetting.vue @@ -0,0 +1,1499 @@ + + + + + \ No newline at end of file diff --git a/pages/BlueTooth/ModeSetting/VideoSend.vue b/pages/BlueTooth/ModeSetting/VideoSend.vue new file mode 100644 index 0000000..3ea69bb --- /dev/null +++ b/pages/BlueTooth/ModeSetting/VideoSend.vue @@ -0,0 +1,472 @@ + + + + + \ No newline at end of file diff --git a/pages/BlueTooth/ModeSetting/VideoSend_1.vue b/pages/BlueTooth/ModeSetting/VideoSend_1.vue new file mode 100644 index 0000000..1c1eadb --- /dev/null +++ b/pages/BlueTooth/ModeSetting/VideoSend_1.vue @@ -0,0 +1,517 @@ + + + + + \ No newline at end of file diff --git a/pages/BlueTooth/ModeSetting/VideoSend_670.vue b/pages/BlueTooth/ModeSetting/VideoSend_670.vue new file mode 100644 index 0000000..1e8bc89 --- /dev/null +++ b/pages/BlueTooth/ModeSetting/VideoSend_670.vue @@ -0,0 +1,537 @@ + + + + + \ No newline at end of file diff --git a/pages/BlueTooth/ModeSetting/index.vue b/pages/BlueTooth/ModeSetting/index.vue new file mode 100644 index 0000000..d0edfba --- /dev/null +++ b/pages/BlueTooth/ModeSetting/index.vue @@ -0,0 +1,115 @@ + + + + + \ No newline at end of file diff --git a/pages/BlueTooth/ModeSetting/update.vue b/pages/BlueTooth/ModeSetting/update.vue new file mode 100644 index 0000000..e814728 --- /dev/null +++ b/pages/BlueTooth/ModeSetting/update.vue @@ -0,0 +1,273 @@ + + + + + diff --git a/pages/common/addBLE/LinkBle.vue b/pages/common/addBLE/LinkBle.vue index 8183fd0..c45f4fe 100644 --- a/pages/common/addBLE/LinkBle.vue +++ b/pages/common/addBLE/LinkBle.vue @@ -1,22 +1,296 @@ + .deviceDetail { + margin: 200rpx auto; + display: flex; + flex-direction: column; + flex-wrap: nowrap; + align-content: center; + justify-content: center; + align-items: center; + } + + .imgContent, + .titleIco { + width: 120rpx; + height: 120rpx; + } + + .deviceId { + color: rgba(255, 255, 255, 0.87); + font-size: 32rpx; + + line-height: 44rpx; + letter-spacing: 0.14rpx; + margin-top: 5rpx; + } + + .btnLink { + position: fixed; + bottom: 30rpx; + left: 30rpx; + right: 30rpx; + width: calc(100% - 60rpx); + border-radius: 91px; + height: 90rpx; + background: rgba(187, 230, 0, 1); + color: rgba(35, 35, 35, 1); + + + font-size: 32rpx; + line-height: 90rpx; + letter-spacing: 12rpx; + text-align: center; + } + + .bound, + .deviceName { + font-size: 32rpx; + font-weight: 400; + line-height: 44rpx; + letter-spacing: 0.14rpx; + margin-top: 5rpx; + } + + .displayNone { + display: none !important; + } + + .green { + color: rgba(187, 230, 0, 1); + } + + .red { + color: rgba(245, 80, 80, 1); + } + \ No newline at end of file diff --git a/pages/common/addBLE/addEquip.vue b/pages/common/addBLE/addEquip.vue index d5b4a94..5a4d3cd 100644 --- a/pages/common/addBLE/addEquip.vue +++ b/pages/common/addBLE/addEquip.vue @@ -81,13 +81,22 @@ + +