1
0
forked from dyf/APP

Compare commits

..

5 Commits

Author SHA1 Message Date
e5e2aca0c4 Merge branch 'main' of http://47.107.152.87:3000/liubiao/APP
# Conflicts:
#	.gitignore
#	pages/common/index/index.vue
#	unpackage/dist/dev/app-plus/app-config-service.js
#	unpackage/dist/dev/app-plus/app-service.js
#	unpackage/dist/dev/app-plus/app-view.js
#	unpackage/dist/dev/app-plus/manifest.json
#	utils/request.js
2025-07-29 09:40:01 +08:00
40639d2bad 蓝牙握手提交 2025-07-29 09:36:54 +08:00
3c0bf2f770 添加蓝牙通讯握手 2025-07-29 09:34:15 +08:00
0ac0d1998a Merge branch 'main' of http://47.107.152.87:3000/liubiao/APP
# Conflicts:
#	unpackage/dist/dev/app-plus/app-config-service.js
#	unpackage/dist/dev/app-plus/app-service.js
#	unpackage/dist/dev/app-plus/app-view.js
2025-07-15 13:18:13 +08:00
e470726fbd 添加几个函数 2025-07-14 11:42:35 +08:00
203 changed files with 9430 additions and 8021 deletions

6
.gitignore vendored
View File

@ -1,5 +1 @@
*node_modules/*
*dist/*
*unpackage/*
unpackage/

View File

@ -1,6 +1,6 @@
export default {
featrueValueCallback: null,//蓝牙特征变化回调
BleChangeCallback:null,//蓝牙状态变化回调
featrueValueCallback: null, //蓝牙特征变化回调
BleChangeCallback: null, //蓝牙状态变化回调
//引导用户打开蓝牙
showBluetoothGuide: function(showTip) {
let platform = process.env.UNI_PLATFORM;
@ -89,7 +89,7 @@ export default {
uni.getBluetoothAdapterState({
success(res1) {
console.log("当前蓝牙适配器状态:" + JSON.stringify(res1))
//console.log("当前蓝牙适配器状态:" + JSON.stringify(res1))
if (callback) {
callback(res1);
}
@ -126,8 +126,8 @@ export default {
callback();
}
uni.onBluetoothAdapterStateChange(function(state) {
console.log('蓝牙状态发生变化:' + JSON.stringify(state));
if(this.BleChangeCallback){
//console.log('蓝牙状态发生变化:' + JSON.stringify(state));
if (this.BleChangeCallback) {
this.BleChangeCallback()
}
})
@ -232,7 +232,7 @@ export default {
StopSearch: function() {
uni.stopBluetoothDevicesDiscovery({
success: (res) => {
console.log("停止搜索蓝牙设备成功")
//console.log("停止搜索蓝牙设备成功")
},
fail() {
console.log("无法停止蓝牙搜索")
@ -241,8 +241,7 @@ export default {
},
//获取已连接的设备
getLinkBlue: function(callback) {
uni.getConnectedBluetoothDevices({
services: ["0xFFE0"],
uni.getConnectedBluetoothDevices({
success: (res) => {
if (callback) {
callback(res);
@ -250,7 +249,7 @@ export default {
}
},
fail: function(ex) {
console.log("获取已连接设备异常");
console.log("获取已连接设备异常",ex);
if (callback) {
callback({
devices: []
@ -261,7 +260,7 @@ export default {
},
//连接某个设备
LinkBlue: function(deviceId, callback, error) {
//console.log("deviceId="+deviceId)
this.StopSearch();
var these = this;
let key = "linkedDevices";
@ -274,54 +273,58 @@ export default {
var str = uni.getStorageSync(key);
if (str) {
linkedDevices = JSON.parse(str);
}else{
linkedDevices=[];
} else {
linkedDevices = [];
}
}
//连接成功的回调
var lindedCallback = function () {
var lindedCallback = function(id,flag) {
let c = linkedDevices.find(function (v) {
let c = linkedDevices.find(function(v) {
return v.deviceId == deviceId;
});
if (c) {
console.log("连接成功开始监听特征变化")
if (c && !flag) {
console.log("连接成功开始监听特征变化deviceid="+deviceId+',serviceId='+c.notifyServiceid+',characteristicId='+c.notifyCharactId)
//监听设备的特征变化
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));
setTimeout(()=>{
uni.notifyBLECharacteristicValueChange({
deviceId: deviceId,
serviceId: c.notifyServiceid,
characteristicId: c.notifyCharactId,
state: true,
success: function(res) {
console.log("开始监听成功。。。。",res)
//订阅特征值
if(these.featrueValueCallback){
these.featrueValueCallback(data);
}
});
uni.onBLECharacteristicValueChange(function(data) {
// data.characteristicId
// data.deviceId
// data.serviceId
// data.value
console.log("监听到特征值:" + JSON.stringify(data));
if (these.featrueValueCallback) {
these.featrueValueCallback(data);
}
});
}
}
});
});
},1000);
}
if (callback) {
callback(deviceId);
callback(deviceId,flag);
}
}
var linkState = function(res) {
console.log("获取已连接的设备回调" + JSON.stringify(res))
//console.log("获取已连接的设备回调" + JSON.stringify(res))
let flag = res.devices.find(function(v) {
if (v.deviceId == deviceId) {
return true;
@ -329,82 +332,97 @@ export default {
return false;
});
if (flag) {
console.log("设备状态已连接");
lindedCallback(deviceId);
//console.log("设备状态已连接");
lindedCallback(deviceId,true);
return;
} else {
console.log("设备未连接");
console.log("设备未连接:"+deviceId);
linkDevice(deviceId);
}
}
var linkDevice = function(id) {
console.log("正在连接"+id);
var linkDevice = function() {
console.log("正在连接" + deviceId);
uni.createBLEConnection({
deviceId: id,
deviceId: deviceId,
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设置失败")
var call = () => {
if (linkedDevices) {
console.log("11111" + JSON.stringify(linkedDevices));
f = linkedDevices.find(function(v) {
return v.deviceId == deviceId;
});
} 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 == deviceId;
});
linkedDevices.push(f);
uni.setStorageSync(key, JSON.stringify(
linkedDevices));
getService(deviceId);
}
});
} else {
console.log("缓存中已连接过");
if (!f.services) {
getService(deviceId);
} else {
lindedCallback(deviceId,false);
}
}
}
let os = uni.getSystemInfoSync().osName;
if (os == 'android') {
uni.setBLEMTU({
deviceId: deviceId,
mtu: 512,
success: () => {
//console.log("mtu设置成功");
},
fail: function() {
console.log("mtu设置失败")
},
complete: function() {
call();
}
});
} else {
call();
}
},
fail: function(ex) {
if (error) {
console.log("蓝牙连接失败" + JSON.stringify(error));
error(ex);
if (ex) {
console.log("蓝牙连接失败" + JSON.stringify(ex));
if(error){
error(ex);
}
}
}
});
@ -435,9 +453,9 @@ export default {
Promise.all(promises)
.then(results => {
console.log('所有操作成功完成', results);
lindedCallback(id);
lindedCallback(id,false);
})
.catch(error => {
console.error('至少一个操作失败', error);
@ -447,9 +465,9 @@ export default {
} else {
repeatCnt++;
if (repeatCnt > 5) {
lindedCallback(id);
lindedCallback(id,false);
return;
}
setTimeout(function() {
@ -498,10 +516,14 @@ export default {
if (notiChar) {
v.notifyServiceid = serviceId;
v.notifyCharactId = notiChar.uuid;
}
}
});
uni.setStorageSync(key, JSON.stringify(linkedDevices));
resolve(res);
},
@ -522,9 +544,9 @@ export default {
}
});
console.log("正在获取蓝牙适配器状态")
//console.log("正在获取蓝牙适配器状态")
this.CheckBlue((res) => {
console.log("蓝牙状态:" + JSON.stringify(res));
//console.log("蓝牙状态:" + JSON.stringify(res));
if (res.available) {
this.getLinkBlue(linkState);
} else {
@ -580,13 +602,13 @@ export default {
reject(`deviceid为空请输入要发送的设备`);
return;
}
console.log("准备发送数据包");
console.log("准备发送数据包");
let key = "linkedDevices";
var store = uni.getStorageInfoSync();
var f = store.keys.find(function(v) {
return v == key;
});
console.log("倒计时5");
console.log("倒计时5");
var linkedDevices = [];
if (f) {
var str = uni.getStorageSync(key);
@ -595,35 +617,19 @@ export default {
}
}
console.log("倒计时4");
console.log("倒计时4");
if (linkedDevices && linkedDevices.length && linkedDevices.length > 0) {
console.log("倒计时3");
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");
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");
}
});
console.log("倒计时1");
these.sendDataNew(f.deviceId,f.writeServiceId,f.wirteCharactId,buffer).then(succ).catch(err);
} else {
reject(`已连接设备中无法找到此设备`);
// console.log("警报:已连接设备中无法找到此设备")
@ -636,36 +642,67 @@ export default {
});
},
sendDataNew: function(deviceid, serviceId, characteristicId, buffer) {
console.log("准备向设备发送数据deviceid=" + deviceid);
//console.log("准备向设备发送数据deviceid=" + deviceid+',serviceId='+serviceId+',characteristicId='+characteristicId);
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");
}
let promise = new Promise((succ, err) => {
uni.writeBLECharacteristicValue({
deviceId: deviceid,
serviceId: serviceId,
characteristicId: characteristicId,
value: buffer,
success: () => {
//console.log("发送数据成功");
succ();
},
fail: (ex) => {
console.log("发送数据失败" + JSON.stringify(ex));
err(ex);
}
});
});
if (uni.getSystemInfoSync().osName.toLowerCase() == 'ios') {
//专业给IOS填坑uni.writeBLECharacteristicValue在IOS上不进入任何回调
function timeout(ms) {
return new Promise((_, err) => {
setTimeout(() => {
err({
code: -1,
errMsg: '超时了'
})
}, ms);
});
}
Promise.race([promise, timeout(50)]).then(resolve).catch((ex) => {
console.log("ex=", ex);
if (ex.code == -1) {
resolve();
} else {
reject(ex);
}
}).finally(() => {
console.log("完成了")
});
} else {
promise.then(resolve).catch(reject);
}
});
}
}
}

View File

@ -1,6 +1,7 @@
{
"pages": [
{
"path": "pages/common/login/index",
"style": {
@ -121,6 +122,13 @@
"fullscreen": true
}
},
{
"path" : "pages/650/HBY650",
"style" :
{
"navigationBarTitleText" : "HBY650"
}
},
{
"path": "pages/common/map/index",
"style": {
@ -158,6 +166,8 @@
"navigationBarTitleText": "分享管理"
}
}
],
"tabBar": {
"color": "#fff",

View File

@ -144,8 +144,7 @@
</template>
<script>
import ble from '../../api/6155/BlueHelper';
import { deviceReName } from '../../api/common';
import ble from '@/api/6155/BlueHelper';
export default {
data() {
@ -230,7 +229,7 @@ import { deviceReName } from '../../api/common';
RSSI: '-30',
statu: '运行中',
liangDu: '50',
id:''
id: ''
},
cEdit: {
mode: ''
@ -242,7 +241,11 @@ import { deviceReName } from '../../api/common';
id: 'HSXF01061'
},
device: {
deviceId: ''
deviceId: '',
writeServiceId: '',
wirteCharactId: '',
notifyServiceid:'',
notifyCharactId:''
}
}
},
@ -253,20 +256,20 @@ import { deviceReName } from '../../api/common';
eventChannel.on('detailData', function(data) {
console.log("收到父页面的参数:" + JSON.stringify(data));
var device = data.data;
these.device.deviceId = device.deviceMac;
these.formData.name=device.bluetoothName?device.bluetoothName:device.deviceName;
these.formData.img=device.devicePic;
these.formData.id=device.id;
these.formData.name = device.bluetoothName ? device.bluetoothName : device.deviceName;
these.formData.img = device.devicePic;
these.formData.id = device.id;
})
ble.featrueValueCallback = these.bleValueNotify;
},
onHide: function() {
@ -299,7 +302,7 @@ import { deviceReName } from '../../api/common';
content: '是否断开与设备的蓝牙连接?',
success: function(res) {
if (res.confirm) {
disconnectDevice(these.device.deviceId);
ble.disconnectDevice(these.device.deviceId);
}
uni.navigateBack();
@ -332,17 +335,64 @@ import { deviceReName } from '../../api/common';
}
},
methods: {
getDevice: function() {
var these = this;
if (this.device.deviceId && this.device.writeServiceId && this.device.wirteCharactId) {
return this.device;
}
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) {
if(v.deviceId == these.device.deviceId){
these.device.writeServiceId=v.writeServiceId;
these.device.wirteCharactId=v.wirteCharactId;
these.device.notifyServiceid=v.notifyServiceid;
these.device.notifyCharactId=v.notifyCharactId;
return true;
}
return false;
});
} else {
f = null;
}
return f;
},
bleValueNotify: function(data) {
console.log("读取到设备发送的数据:" + JSON.stringify(data));
// data.characteristicId
// data.deviceId
// data.serviceId
// data.value
//
},
proParam: function() {
this.alert('提示', "敬请期待");
uni.showToast({
title: '敬请期待'
})
},
handRemark: function() {
this.alert('提示', "敬请期待");
@ -400,139 +450,114 @@ import { deviceReName } from '../../api/common';
// 分包发送图片数据
var sendImagePackets = function(imageData) {
return new Promise((resolve, reject) => {
// this.isSending = true;
// this.progress = 0;
// this.currentPacket = 0;
// 总数据包数
const totalPackets = 52;
let currentPacket = 1;
let key = "linkedDevices";
var store = uni.getStorageInfoSync();
var f = store.keys.find(function(v) {
return v == key;
});
// console.log("倒计时5");
var linkedDevices = [];
f = these.getDevice();
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 == these.device.deviceId;
});
if (f) {
// 发送单个数据包
const sendNextPacket = () => {
if (currentPacket > totalPackets) {
uni.hideLoading();
these.Status.BottomMenu.show = false;
these.Status.Progress.show = false;
these.Status.Pop.showPop = true;
these.Status.Pop.message = "上传成功";
these.Status.Pop.iconUrl =
"/static/images/6155/DeviceDetail/uploadSuccess.png";
resolve();
return;
}
// 计算当前包的数据
let packetSize = 250;
if (currentPacket <= 51) {
packetSize = 250; // 前51个包每个500字节
} else {
packetSize = 50; // 最后一个包100字节
}
// 创建数据包
const startIndex = (currentPacket - 1) * packetSize;
const endIndex = Math.min(startIndex + packetSize, imageData
.length);
if (startIndex > endIndex) {
return;
}
const packetData = imageData.slice(startIndex,
endIndex); // imageData.subarray(startIndex, endIndex);
console.log("imageData.length=" + imageData.length +
",startIndex=" +
startIndex +
",endIndex=" + endIndex + ",数据包长度" + (endIndex -
startIndex) +
',packetData.length=' + packetData.length);
// 构建数据包
const bufferSize = 5 + packetData.length * 2; // 头部5字节 + 数据部分
const buffer = new ArrayBuffer(bufferSize);
const dataView = new DataView(buffer);
// 填充头部
dataView.setUint8(0, 0x55); // 帧头
dataView.setUint8(1, 0x02); // 帧类型:开机画面
dataView.setUint8(2, '0x' + currentPacket.toString(16).padStart(2,
'0')); // 包序号
// if(packetData.length==250)
// {
// dataView.setUint8(3, 0x01);
// dataView.setUint8(4, 0xFF);
// }
if (packetData.length == 250) {
dataView.setUint8(3, 0x01);
dataView.setUint8(4, 0xF4);
} else {
dataView.setUint8(3, 0x00);
dataView.setUint8(4, 0x64);
}
// 填充数据每个RGB565值占2字节
for (let i = 0; i < packetData.length; i++) {
dataView.setUint16(5 + i * 2, packetData[i], false); // 大端字节序
}
console.log(
`发送数据包${currentPacket}/${totalPackets},${dataView.getUint8(0)} ${dataView.getUint8(1)} ${dataView.getUint8(2)}`
)
//发送数据包
ble.sendDataNew(f.deviceId, f.writeServiceId, f.wirteCharactId, buffer)
.then(() => {
console.log("发送一个包完成了");
these.Status.Progress.curr = currentPacket;
currentPacket++;
setTimeout(sendNextPacket, 100);
}).catch(err => {
console.log("发送数据包失败了" + JSON.stringify(err));
// this.isSending = false;
these.Status.BottomMenu.show = false;
these.Status.Progress.show = false;
these.alert("发送数据包失败了");
uni.hideLoading();
reject(err);
});
// 发送单个数据包
const sendNextPacket = () => {
if (currentPacket > totalPackets) {
uni.hideLoading();
these.Status.BottomMenu.show = false;
these.Status.Progress.show = false;
these.Status.Pop.showPop = true;
these.Status.Pop.message = "上传成功";
these.Status.Pop.iconUrl =
"/static/images/6155/DeviceDetail/uploadSuccess.png";
resolve();
return;
}
// 开始发送数据
sendNextPacket();
// 计算当前包的数据
let packetSize = 250;
if (currentPacket <= 51) {
packetSize = 250; // 前51个包每个500字节
} else {
packetSize = 50; // 最后一个包100字节
}
// 创建数据包
const startIndex = (currentPacket - 1) * packetSize;
const endIndex = Math.min(startIndex + packetSize, imageData
.length);
if (startIndex > endIndex) {
return;
}
const packetData = imageData.slice(startIndex,
endIndex); // imageData.subarray(startIndex, endIndex);
console.log("imageData.length=" + imageData.length +
",startIndex=" +
startIndex +
",endIndex=" + endIndex + ",数据包长度" + (endIndex -
startIndex) +
',packetData.length=' + packetData.length);
// 构建数据包
const bufferSize = 5 + packetData.length * 2; // 头部5字节 + 数据部分
const buffer = new ArrayBuffer(bufferSize);
const dataView = new DataView(buffer);
// 填充头部
dataView.setUint8(0, 0x55); // 帧头
dataView.setUint8(1, 0x02); // 帧类型:开机画面
dataView.setUint8(2, '0x' + currentPacket.toString(16).padStart(2,
'0')); // 包序号
// if(packetData.length==250)
// {
// dataView.setUint8(3, 0x01);
// dataView.setUint8(4, 0xFF);
// }
if (packetData.length == 250) {
dataView.setUint8(3, 0x01);
dataView.setUint8(4, 0xF4);
} else {
dataView.setUint8(3, 0x00);
dataView.setUint8(4, 0x64);
}
// 填充数据每个RGB565值占2字节
for (let i = 0; i < packetData.length; i++) {
dataView.setUint16(5 + i * 2, packetData[i], false); // 大端字节序
}
console.log(
`发送数据包${currentPacket}/${totalPackets},${dataView.getUint8(0)} ${dataView.getUint8(1)} ${dataView.getUint8(2)}`
)
//发送数据包
ble.sendDataNew(f.deviceId, f.writeServiceId, f.wirteCharactId, buffer)
.then(() => {
console.log("发送一个包完成了");
these.Status.Progress.curr = currentPacket;
currentPacket++;
setTimeout(sendNextPacket, 100);
}).catch(err => {
console.log("发送数据包失败了" + JSON.stringify(err));
// this.isSending = false;
these.Status.BottomMenu.show = false;
these.Status.Progress.show = false;
these.alert("发送数据包失败了");
uni.hideLoading();
reject(err);
});
}
// 开始发送数据
sendNextPacket();
}
});
}
@ -568,7 +593,7 @@ import { deviceReName } from '../../api/common';
})
},
fail(ex) {
console.log("跳转页面失败"+JSON.stringify(ex));
console.log("跳转页面失败" + JSON.stringify(ex));
}
});
@ -590,8 +615,7 @@ import { deviceReName } from '../../api/common';
switch (type) {
case "main":
title = '主灯模式';
items = [
{
items = [{
text: '强光',
icon: '/static/images/6155/DeviceDetail/qiang.png'
},
@ -678,24 +702,26 @@ import { deviceReName } from '../../api/common';
const dataView = new DataView(buffer);
dataView.setUint8(0, 0x4A); // 帧头
dataView.setUint8(1, 0x51);
dataView.setUint8(2, 0x4F);
dataView.setUint8(3, 0x43);
if(this.Status.BottomMenu.type=='main'){
dataView.setUint8(1, 0x51);
dataView.setUint8(2, 0x4F);
dataView.setUint8(3, 0x43);
if (this.Status.BottomMenu.type == 'main') {
//主灯模式
dataView.setUint8(4, 0x04); // 帧类型
}else{
} else {
//副灯模式
dataView.setUint8(4, 0x05); // 帧类型
}
}
dataView.setUint8(5, dataValue); // 数据
dataView.setUint16(6, '9C41');
let f = this.getDevice();
// 发送数据
ble.LinkBlue(this.device.deviceId, () => {
ble.LinkBlue(f.deviceId, () => {
setTimeout(() => {
ble.sendData(this.device.deviceId, buffer);
ble.sendDataNew(f.deviceId, f.writeServiceId, f.wirteCharactId, buffer);
}, 1000);
});
@ -796,28 +822,33 @@ import { deviceReName } from '../../api/common';
console.log("dataView.length=" + dataView.byteLength)
// 发送数据包
ble.LinkBlue(these.device.deviceId, () => {
setTimeout(() => {
ble.sendData(these.device.deviceId, buffer).then(() => {
// 更新进度
console.log(
`发送文字数据包 ${currentPacket}/${totalPackets}: ${text}`
);
// 发送下一个包
currentPacket++;
setTimeout(sendNextPacket, 100);
}).catch(err => {
// this.isSendingText = false;
uni.showToast({
title: '文字发送失败',
icon: 'none'
let f = these.getDevice();
if (f) {
// 发送数据包
ble.LinkBlue(f.deviceId, () => {
setTimeout(() => {
ble.sendDataNew(f.deviceId, f.writeServiceId, f
.wirteCharactId, buffer).then(() => {
// 更新进度
console.log(
`发送文字数据包 ${currentPacket}/${totalPackets}: ${text}`
);
// 发送下一个包
currentPacket++;
setTimeout(sendNextPacket, 100);
}).catch(err => {
// this.isSendingText = false;
uni.showToast({
title: '文字发送失败',
icon: 'none'
});
});
});
}, 0);
}, 0);
});
});
}
// }).catch(err => {
// this.isSendingText = false;
@ -851,7 +882,7 @@ import { deviceReName } from '../../api/common';
//给蓝牙设备发送信号更新亮度
setTimeout(() => {
this.sendBrightness();
}, 100);
}, 10);
},
sendBrightness: function() {
const buffer = new ArrayBuffer(6);
@ -864,16 +895,64 @@ import { deviceReName } from '../../api/common';
dataView.setUint8(3, 0x00); // 数据长度
dataView.setUint8(4, 0x01); // 数据长度
dataView.setUint8(5, data); // 数据
let f = this.getDevice();
if (f) {
// 发送数据
ble.LinkBlue(f.deviceId, () => {
setTimeout(() => {
ble.sendDataNew(f.deviceId, f.writeServiceId, f.wirteCharactId, buffer);
}, 1000)
// 发送数据
ble.LinkBlue(this.device.deviceId, () => {
setTimeout(() => {
ble.sendData(this.device.deviceId, buffer);
}, 1000)
});
}
});
},
//获取当前设备状态
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'); // 数据长度
let f = this.getDevice();
if (f) {
// 发送数据
ble.LinkBlue(f.deviceId, () => {
setTimeout(() => {
ble.sendDataNew(f.deviceId, f.writeServiceId, f.wirteCharactId, buffer);
}, 100)
});
}
}
}
}
</script>

1813
pages/650/HBY650.vue Normal file

File diff suppressed because it is too large Load Diff

View File

@ -12,63 +12,56 @@
{{tab.typeName}}
</view>
</view>
<view class="uniui-more">
<image @click="allMore" src="/static/images/more.png" mode="" class="more"></image>
</view>
</scroll-view>
<view class="sendFlex" v-if="activeTab && activeTab.id !== ''&& activeTabInfo.communicationMode==0">
<!-- <view class="callpolice">报警</view> -->
<view class="sendFlex">
<view class="callpolice">报警</view>
<view class="Sendmessage" @click="location">位置</view>
<view class="Sendmessage" @click="handleSend">发送信息</view>
</view>
<scroll-view class="device-list" scroll-y @scrolltolower="onScrollToLower" :lower-threshold="100"
style="height:80vh;">
<view v-if="deviceList.length>0">
<uni-swipe-action ref="swipeAction">
<block v-for="(item, index) in deviceList" :key="index" :ref="'swipeItem_' + index">
<uni-swipe-action-item :right-options="Options"
@click="handleSwipeClick($event, item, index)" class="device-card">
<view @click.stop="handleFile(item)">
<view class="device-header">
<view class="deviceIMG">
<image :src="item.devicePic" class="IMG"></image>
</view>
<view class="device-name">
<view>设备:{{item.deviceName}}</view>
<view class="ID">
<view class="ID" v-if="item.communicationMode==0">ID:{{item.deviceImei}}
</view>
<view class="ID" v-else>ID:{{item.deviceMac}}</view>
<view class="onlines" v-if="item.communicationMode==0">在线</view>
<view>电量90%</view>
</view>
</view>
<uni-swipe-action ref="swipeAction">
<block v-for="(item, index) in deviceList" :key="index" :ref="'swipeItem_' + index">
<uni-swipe-action-item :right-options="Options"
@click="handleSwipeClick($event, item, index)" class="device-card">
<view @click.stop="handleFile(item)">
<view class="device-header">
<view class="deviceIMG">
<image :src="item.devicePic" class="IMG"></image>
</view>
<view class="" v-if="item.communicationMode==1">
<view class="device-status online">已连接</view>
<view class="device-status unline">未连接</view>
<view class="device-name">
<view>设备:{{item.deviceName}}</view>
<view class="ID">
<view class="ID" v-if="item.communicationMode==0">ID:{{item.deviceImei}}
</view>
<view class="ID" v-else>ID:{{item.deviceMac}}</view>
<view class="onlines" v-if="item.communicationMode==0">在线</view>
<view>电量90%</view>
</view>
</view>
</view>
<image src="/static/images/cires.png" class="circle"></image>
</uni-swipe-action-item>
</block>
</uni-swipe-action>
<!-- 加载状态提示 -->
<view class="loading-status">
<text v-if="loading">加载中...</text>
<text v-if="finished">没有更多数据了</text>
</view>
</view>
<view v-else class="noDATA">
<view> <uni-icons type="image-filled" size="120" color="rgba(255, 255, 255, 0.9)"></uni-icons>
</view>
暂无数据
<view class="" v-if="item.communicationMode==1">
<view class="device-status online">已连接</view>
<view class="device-status unline">未连接</view>
</view>
</view>
<image src="/static/images/cires.png" class="circle"></image>
</uni-swipe-action-item>
</block>
</uni-swipe-action>
<!-- 加载状态提示 -->
<view class="loading-status">
<text v-if="loading">加载中...</text>
<text v-if="finished">没有更多数据了</text>
</view>
</scroll-view>
</view>
<!-- 删除弹框 -->
<view class="agreement-mask" v-if="deleteShow" @click="closePopup('delete')">
<view class="agreement-popupC" @click.stop>
<view class="agreement-mask" v-if="deleteShow">
<view class="agreement-popupC">
<view class="popup-content">
<image src="/static/images/dell.png" mode="" class="svg"></image>
<uni-icon class="trash"></uni-icon>
@ -83,14 +76,13 @@
</view>
</view>
<!-- =========重命名============== -->
<view class="agreement-mask" v-if="RenameModel" @click="closePopup('rename')">
<view class="agreement-popupD" @click.stop>
<view class="agreement-mask" v-if="RenameModel">
<view class="agreement-popupD">
<view class="popup-content">
<view>
<view class="popup-flex">
<text>设备名称</text>
<input type="text" v-model="deviceName" placeholder="请输入设备名称" class="popup-input"
@click.stop />
<input type="text" v-model="deviceName" placeholder="请输入设备名称" class="popup-input" />
</view>
</view>
</view>
@ -111,17 +103,6 @@
</view>
</view>
</view>
<!-- ====分享类型提示框==== -->
<view class="tooltip-share" v-if="showshare">
<view class="tooltip-arrow"></view>
<view class="tooltip-content">
<view class="tooltip-item" v-for="(item, index) in shareItems" :key="index"
@click="handleshareClick(item)">
<image :src="item.icon" class="item-icon" />
<text>{{ item.text }}</text>
</view>
</view>
</view>
</view>
</template>
@ -140,7 +121,6 @@
tabs: [],
activeTab: 0,
showTooltip: false,
showshare: false,
Options: [{
text: '重命名',
style: {
@ -172,63 +152,21 @@
action: 'bluetooth'
}
],
shareItems: [{
text: '所有类型',
icon: '/static/images/type.png',
action: 'type'
},
{
text: '所有分享',
icon: '/static/images/share.png',
action: 'share'
}
],
page: 1, // 当前页码
size: 10, // 每页条数
total: 0, // 总数据量
loading: false,
finished: false,
deviceId: '',
deviceName: "", //重命名
activeTabInfo: ''
deviceName: "" //重命名
}
},
methods: {
// 更多
allMore() {
this.showshare = !this.showshare;
},
// 所有分享,所有类型
handleshareClick(item) {
this.showshare = false; // 关闭弹窗
switch (item.action) {
case 'type':
uni.navigateTo({
url: '/pages/common/allType/index'
});
break;
case 'share':
uni.navigateTo({
url: "/pages/6170/allShare/index"
})
break;
}
},
// 点击弹框外的区域关闭
closePopup(type) {
if (type === 'delete') {
this.deleteShow = false;
uni.showTabBar(); // 显示TabBar
} else if (type === 'rename') {
this.RenameModel = false;
uni.showTabBar(); // 显示TabBar
}
},
// tab导航切换栏
getTab() {
deviceTypeList({}).then((res) => {
if (res.code == 200) {
//console.log("deviceTypeList=" + JSON.stringify(res.data));
console.log("deviceTypeList=" + JSON.stringify(res.data));
this.tabs = [{
id: '',
name: '全部设备',
@ -248,7 +186,6 @@
switchTab(tab, index) {
this.deviceList = [];
this.activeTab = index;
this.activeTabInfo = tab
this.page = 1; // 重置页码
this.finished = false; // 重
// 明确传递参数空字符串改为null或undefined
@ -289,11 +226,10 @@
onScrollToLower() {
this.getData();
},
// 添加扫一三图标
scan() {
this.showTooltip = !this.showTooltip;
},
// 添加设备,扫一扫,蓝牙
handleMenuClick(item) {
this.showTooltip = false; // 关闭弹窗
switch (item.action) {
@ -303,6 +239,15 @@
});
break;
case 'bluetooth':
// uni.navigateTo({
// url: 'pages/common/addBLE/AddDevice',
// success:(res)=>{
// res.eventChannel.emit('key', { data: 'data from starter page' })
// },fail: (ex) => {
// console.log("跳转失败了",JSON.stringify(ex));
// }
// });
uni.navigateTo({
url: "/pages/common/addBLE/addEquip"
})
@ -311,11 +256,8 @@
},
// 右滑点击事件处理
handleSwipeClick(e, item, index) {
const {
content
} = e
console.log(item, 'eeeee');
const {content} = e
console.log(e, 'eeeee');
switch (e.content.text) {
case '删除':
this.handleDeleteDevice(item, index)
@ -348,8 +290,6 @@
this.onIntall();
}, 500);
this.deleteShow = false
// 关闭所有滑动项
this.$refs.swipeAction.closeAll();
} else {
uni.showToast({
title: res.msg,
@ -383,8 +323,6 @@
}, 500);
this.RenameModel = false
this.deviceName = ''
// 关闭所有滑动项
this.$refs.swipeAction.closeAll();
} else {
uni.showToast({
title: res.msg,
@ -396,84 +334,57 @@
},
// 发生短信
handleSend() {
const currentTab = this.tabs[this.activeTab];
const deviceType = currentTab.id || 'all';
console.log(`跳转到发送信息页面\n当前设备类型: ${deviceType}\n设备类型名称: ${currentTab.typeName}`);
uni.navigateTo({
url: '/pages/common/send/index',
events: {
ack: function(data) {}
},
success: (res) => {
res.eventChannel.emit('deviceSend', {
data: deviceType
});
}
url: '/pages/common/send/index'
})
},
// 位置
location() {
location(){
uni.navigateTo({
url: '/pages/common/map/index'
url:'/pages/common/map/index'
})
},
handleFile(item) {
//console.log('item' + JSON.stringify(item));
console.log('item' + JSON.stringify(item));
// communicationMode 0是4G 1是蓝牙
if (item.communicationMode == 0) {
uni.navigateTo({
url: "/pages/6170/deviceControl/index",
events: {
ack: function(data) {}
},
success: (res) => {
// 页面跳转成功后的回调函数
res.eventChannel.emit('deviceControl', {
data: item,
apiType: 'listA' // 自定义标识,详情哪里根据这个参数不同信息
});
}
})
}
if (item.typeName == '6155') {
uni.navigateTo({
url: "/pages/6155/deviceDetail",
events: {
ack: function(data) {
url: `/pages/6170/deviceControl/index?id=${item.id}`
});
return;
}
if (item.typeName == '6155') {
uni.navigateTo({
url: "/pages/650/HBY650",
events: {
ack: function(data) {
}
},
success: (res) => {
res.eventChannel.emit('detailData', {
data: item
});
}
},
success: (res) => {
res.eventChannel.emit('detailData', {
data: item
});
}
})
}
})
}
},
onIntall() {
this.page = 1;
this.finished = false;
this.getData(); // 重新加载第一页数据
},
},
onIntall() {
this.page = 1;
this.finished = false;
this.getData(this.deviceType); // 重新加载第一页数据
},
},
onLoad() {
this.getTab()
this.onIntall()
// 绑定页面做了监听,新增成功,刷新页面
uni.$on('refreshDeviceList', () => {
this.getTab() // 刷新数据
onShow() {
this.getTab()
this.onIntall()
});
},
beforeDestroy() {
// 组件销毁前移除监听器
uni.$off('refreshDeviceList');
},
}
}
}
</script>
<style>
@ -492,7 +403,6 @@
white-space: nowrap;
/* 禁止换行 */
overflow: hidden;
position: relative;
}
@ -530,21 +440,6 @@
font-size: 28rpx;
}
.uniui-more {
position: relative;
width: 100%;
}
.more {
width: 40rpx;
height: 8rpx;
/* position: absolute; */
/* right: 0rpx;
z-index: 100; */
float: right;
top: -95rpx
}
.gprs {
width: 28rpx;
height: 35rpx;
@ -570,6 +465,118 @@
position: relative;
}
/* .device-header {
display: flex;
align-items: center;
margin-bottom: 15rpx;
padding: 30rpx 0 10rpx 30rpx;
width: 100%;
}
.device-name {
font-size: 28rpx;
color: rgba(255, 255, 255, 0.87);
margin-left: 24rpx;
line-height: 50rpx;
}
.ID {
color: rgba(255, 255, 255, 0.6);
font-size: 24rpx;
}
.device-status {
width: 122rpx;
height: 52rpx;
font-size: 26rpx;
border-radius: 0px 8px 0px 8px;
background-color: rgb(42, 42, 42);
position: absolute;
top: 0rpx;
right: 0rpx;
text-align: center;
line-height: 52rpx;
}
.circle {
width: 8rpx;
height: 40rpx;
position: absolute;
right: 18rpx;
top: 65rpx;
}
.online {
color: rgb(187, 230, 0);
}
.unline {
color: rgba(255, 255, 255, 0.4);
}
.device-id {
font-size: 26rpx;
color: #999;
margin-bottom: 20rpx;
display: block;
}
.device-info {
display: flex;
font-size: 28rpx;
color: rgba(255, 255, 255, 0.87);
position: relative;
width: 100%;
}
.device-flex{
display: flex;
justify-content: space-between;
}
.deviceIMG {
width: 100rpx;
height: 100rpx;
border-radius: 16rpx;
position: relative;
background-color: rgba(42, 42, 42, 0.6);
display: flex;
align-items: center;
}
.IMG {
width: 68rpx;
height: 50rpx;
margin-left: 17%;
}
.onlines::before {
content: '';
position: absolute;
width: 15rpx;
height: 15rpx;
background: rgb(0, 171, 103);
border-radius: 50%;
left: 120rpx;
top: 15rpx
}
.line {
width: 2rpx;
height: 24rpx;
background: linear-gradient(90deg,
rgba(0, 0, 0, 0) 0%,
rgb(255, 255, 255) 50%,
rgba(255, 255, 255, 0) 100%);
margin-top: 12rpx;
}
.loading-status {
text-align: center;
color: rgba(255, 255, 255, 0.6);
padding: 20rpx;
font-size: 22rpx;
} */
.device-header {
display: flex;
align-items: center;
@ -654,7 +661,6 @@
width: 68rpx;
height: 50rpx;
margin-left: 17%;
object-fit: contain;
}
.onlines {
@ -689,12 +695,6 @@
font-size: 22rpx;
}
.noDATA {
text-align: center;
color: rgba(255, 255, 255, 0.87);
transform: translate(-0%, 100%);
}
/* 遮罩层 */
.agreement-mask {
position: fixed;
@ -756,7 +756,6 @@
color: rgba(255, 255, 255, 0.87);
height: 50rpx;
padding: 30rpx;
align-items: center;
}
.popup-input {
@ -813,14 +812,6 @@
z-index: 9999;
}
.tooltip-share {
position: fixed;
right: 18rpx;
top: 230rpx;
/* 根据导航栏高度调整 */
z-index: 9999;
}
.tooltip-arrow {
width: 0;
height: 0;

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -125,7 +125,7 @@ String.prototype.transFloat = function() {
//
if (uni.getSystemInfoSync().platform){
if (uni.getSystemInfoSync().platform.toLowerCase()=='android' || uni.getSystemInfoSync().platform.toLowerCase()=='ios'){
uni.onBluetoothAdapterStateChange(function(res) {
if (!res.available) {
isOpen = false

Binary file not shown.

Binary file not shown.

1
unpackage/cache/apk/apkurl vendored Normal file
View File

@ -0,0 +1 @@
https://app.liuyingyong.cn/build/download/fc63d0d0-3136-11f0-91c0-d548695e4e4f

File diff suppressed because one or more lines are too long

4
unpackage/cache/certdata vendored Normal file
View File

@ -0,0 +1,4 @@
andrCertfile=E:/andr-qianming/test.keystore
andrCertAlias=testalias
andrCertPass=TPDYL0B366pvkrS7cMPwfg==
storePassword=TPDYL0B366pvkrS7cMPwfg==

View File

@ -0,0 +1,4 @@
[General]
andrCertfile=package.keystore
andrCertAlias=__UNI__117DAB0
andrCertPass="rWkRTuafvGeXqPqYKAx3iw=="

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<script>
var __UniViewStartTime__ = Date.now();
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
CSS.supports('top: constant(a)'))
document.write(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<title>View</title>
<link rel="stylesheet" href="view.css" />
</head>
<body>
<div id="app"></div>
<script src="__uniappes6.js"></script>
<script src="view.umd.min.js"></script>
<script src="app-view.js"></script>
</body>
</html>

View File

@ -0,0 +1,3 @@
{
"prompt" : "template"
}

View File

@ -0,0 +1,8 @@
var isReady=false;var onReadyCallbacks=[];
var isServiceReady=false;var onServiceReadyCallbacks=[];
var __uniConfig = {"pages":["pages/index/transition","pages/index/index","pages/user/index"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"uni-app","navigationBarBackgroundColor":"#F8F8F8","backgroundColor":"#F8F8F8"},"tabBar":{"color":"#999999","selectedColor":"#0D99FF","backgroundColor":"#FFFFFF","list":[{"pagePath":"pages/index/index","text":"设备","iconPath":"static/tabs/home.png","selectedIconPath":"static/tabs/home-active.png"},{"pagePath":"pages/user/index","text":"信息","iconPath":"static/tabs/orders.png","selectedIconPath":"static/tabs/orders-active.png"}]},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"JingQuan","compilerVersion":"4.64","entryPagePath":"pages/index/transition","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
var __uniRoutes = [{"path":"/pages/index/transition","meta":{"isQuit":true},"window":{"navigationBarTitleText":"过度页面","navigationBarHidden":true}},{"path":"/pages/index/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"设备管理"}},{"path":"/pages/user/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"个人信息"}}];
__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()})}});
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}}}});

View File

@ -0,0 +1 @@
(function(e){function r(r){for(var n,l,i=r[0],p=r[1],a=r[2],c=0,s=[];c<i.length;c++)l=i[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in p)Object.prototype.hasOwnProperty.call(p,n)&&(e[n]=p[n]);f&&f(r);while(s.length)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++){var p=t[i];0!==o[p]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={"app-config":0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e["default"]}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var i=this["webpackJsonp"]=this["webpackJsonp"]||[],p=i.push.bind(i);i.push=r,i=i.slice();for(var a=0;a<i.length;a++)r(i[a]);var f=p;t()})([]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__A21EF43","name":"JingQuan","version":{"name":"1.0.0","code":"100"},"description":"设备管控","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Bluetooth":{},"Barcode":{},"Camera":{},"Maps":{"coordType":"gcj02"},"OAuth":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":true,"delay":0,"target":"id:1","waiting":true},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"distribute":{"splashscreen":{"useOriginalMsgbox":true},"icons":{"android":{"hdpi":"icon-android-hdpi.png","xhdpi":"icon-android-xhdpi.png","xxhdpi":"icon-android-xxhdpi.png","xxxhdpi":"icon-android-xxxhdpi.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"},"prerendered":"false"}},"google":{"abiFilters":["armeabi-v7a","arm64-v8a","x86"],"permissions":["<uses-permission android:name=\"android.permission.INTERNET\"/>","<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>","<uses-permission android:name=\"android.permission.BLUETOOTH\"/>","<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>","<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>","<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>","<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"/>","<uses-permission android:name=\"android.permission.a\"/>","<uses-permission android:name=\"android.permission.BLUETOOTH_CONNECT\"/>"],"packagename":"uni.app.UNIEA8BBE","aliasname":"testalias","password":"TPDYL0B366pvkrS7cMPwfg==","storepwd":"TPDYL0B366pvkrS7cMPwfg==","keypwd":"TPDYL0B366pvkrS7cMPwfg==","keystore":"google-keystore.keystore","custompermissions":true},"apple":{"dSYMs":false,"privacyDescription":{"NSBluetoothAlwaysUsageDescription":"需要蓝牙访问权限,用于设备通信","NSBluetoothPeripheralUsageDescription":"需要蓝牙访问权限,用于设备通信"},"devices":"universal"},"plugins":{"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}},"oauth":{},"maps":{"description":"地图插件"}},"orientation":"portrait-primary"},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"safearea":{"background":"#FFFFFF","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"4.64","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#999999","selectedColor":"#0D99FF","backgroundColor":"#FFFFFF","list":[{"pagePath":"pages/index/index","text":"设备","iconPath":"static/tabs/home.png","selectedIconPath":"static/tabs/home-active.png"},{"pagePath":"pages/user/index","text":"信息","iconPath":"static/tabs/orders.png","selectedIconPath":"static/tabs/orders-active.png"}],"borderStyle":"rgba(0,0,0,0.4)","height":"50px"},"launch_path":"__uniappview.html","adid":"128260200603"},"locale":"auto"}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 597 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 617 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 692 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 941 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 518 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 592 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 575 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<script>
var __UniViewStartTime__ = Date.now();
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
CSS.supports('top: constant(a)'))
document.write(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<title>View</title>
<link rel="stylesheet" href="view.css" />
</head>
<body>
<div id="app"></div>
<script src="__uniappes6.js"></script>
<script src="view.umd.min.js"></script>
<script src="app-view.js"></script>
</body>
</html>

View File

@ -0,0 +1,3 @@
{
"prompt" : "template"
}

View File

@ -0,0 +1,8 @@
var isReady=false;var onReadyCallbacks=[];
var isServiceReady=false;var onServiceReadyCallbacks=[];
var __uniConfig = {"pages":["pages/index/transition","pages/index/index","pages/user/index"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"uni-app","navigationBarBackgroundColor":"#F8F8F8","backgroundColor":"#F8F8F8"},"tabBar":{"color":"#999999","selectedColor":"#0D99FF","backgroundColor":"#FFFFFF","list":[{"pagePath":"pages/index/index","text":"设备","iconPath":"static/tabs/home.png","selectedIconPath":"static/tabs/home-active.png"},{"pagePath":"pages/user/index","text":"信息","iconPath":"static/tabs/orders.png","selectedIconPath":"static/tabs/orders-active.png"}]},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"JingQuan","compilerVersion":"4.64","entryPagePath":"pages/index/transition","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
var __uniRoutes = [{"path":"/pages/index/transition","meta":{"isQuit":true},"window":{"navigationBarTitleText":"过度页面","navigationBarHidden":true}},{"path":"/pages/index/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"设备管理"}},{"path":"/pages/user/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"个人信息"}}];
__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()})}});
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}}}});

View File

@ -0,0 +1 @@
(function(e){function r(r){for(var n,l,i=r[0],p=r[1],a=r[2],c=0,s=[];c<i.length;c++)l=i[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in p)Object.prototype.hasOwnProperty.call(p,n)&&(e[n]=p[n]);f&&f(r);while(s.length)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++){var p=t[i];0!==o[p]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={"app-config":0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e["default"]}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var i=this["webpackJsonp"]=this["webpackJsonp"]||[],p=i.push.bind(i);i.push=r,i=i.slice();for(var a=0;a<i.length;a++)r(i[a]);var f=p;t()})([]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__A21EF43","name":"JingQuan","version":{"name":"1.0.0","code":"100"},"description":"设备管控","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Bluetooth":{},"Barcode":{},"Camera":{},"Maps":{"coordType":"gcj02"},"OAuth":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"distribute":{"splashscreen":{"useOriginalMsgbox":true},"icons":{"android":{"hdpi":"unpackage/res/icons/72x72.png","xhdpi":"unpackage/res/icons/96x96.png","xxhdpi":"unpackage/res/icons/144x144.png","xxxhdpi":"unpackage/res/icons/192x192.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"}}},"google":{"permissions":["<uses-permission android:name=\"android.permission.INTERNET\"/>","<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>","<uses-permission android:name=\"android.permission.BLUETOOTH\"/>","<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>","<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>","<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>","<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"/>","<uses-permission android:name=\"android.permission.a\"/>","<uses-permission android:name=\"android.permission.BLUETOOTH_CONNECT\"/>"],"abiFilters":["armeabi-v7a","arm64-v8a","x86"]},"apple":{"privacyDescription":{"NSBluetoothPeripheralUsageDescription":"需要蓝牙访问权限,用于设备通信","NSBluetoothAlwaysUsageDescription":"需要蓝牙访问权限,用于设备通信"},"dSYMs":false},"plugins":{"geolocation":{},"maps":{},"oauth":{},"push":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"safearea":{"background":"#FFFFFF","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"4.64","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#999999","selectedColor":"#0D99FF","backgroundColor":"#FFFFFF","list":[{"pagePath":"pages/index/index","text":"设备","iconPath":"static/tabs/home.png","selectedIconPath":"static/tabs/home-active.png"},{"pagePath":"pages/user/index","text":"信息","iconPath":"static/tabs/orders.png","selectedIconPath":"static/tabs/orders-active.png"}],"borderStyle":"rgba(0,0,0,0.4)","height":"50px"},"launch_path":"__uniappview.html"},"locale":"auto"}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 597 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 617 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 692 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 941 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 518 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 592 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Some files were not shown because too many files have changed in this diff Show More