Compare commits
5 Commits
1ddb68369d
...
e5e2aca0c4
| Author | SHA1 | Date | |
|---|---|---|---|
| e5e2aca0c4 | |||
| 40639d2bad | |||
| 3c0bf2f770 | |||
| 0ac0d1998a | |||
| e470726fbd |
6
.gitignore
vendored
@ -1,5 +1 @@
|
|||||||
*node_modules/*
|
unpackage/
|
||||||
*dist/*
|
|
||||||
*unpackage/*
|
|
||||||
|
|
||||||
|
|
||||||
@ -89,7 +89,7 @@ export default {
|
|||||||
uni.getBluetoothAdapterState({
|
uni.getBluetoothAdapterState({
|
||||||
success(res1) {
|
success(res1) {
|
||||||
|
|
||||||
console.log("当前蓝牙适配器状态:" + JSON.stringify(res1))
|
//console.log("当前蓝牙适配器状态:" + JSON.stringify(res1))
|
||||||
if (callback) {
|
if (callback) {
|
||||||
callback(res1);
|
callback(res1);
|
||||||
}
|
}
|
||||||
@ -126,7 +126,7 @@ export default {
|
|||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
uni.onBluetoothAdapterStateChange(function(state) {
|
uni.onBluetoothAdapterStateChange(function(state) {
|
||||||
console.log('蓝牙状态发生变化:' + JSON.stringify(state));
|
//console.log('蓝牙状态发生变化:' + JSON.stringify(state));
|
||||||
if (this.BleChangeCallback) {
|
if (this.BleChangeCallback) {
|
||||||
this.BleChangeCallback()
|
this.BleChangeCallback()
|
||||||
}
|
}
|
||||||
@ -232,7 +232,7 @@ export default {
|
|||||||
StopSearch: function() {
|
StopSearch: function() {
|
||||||
uni.stopBluetoothDevicesDiscovery({
|
uni.stopBluetoothDevicesDiscovery({
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
console.log("停止搜索蓝牙设备成功")
|
//console.log("停止搜索蓝牙设备成功")
|
||||||
},
|
},
|
||||||
fail() {
|
fail() {
|
||||||
console.log("无法停止蓝牙搜索")
|
console.log("无法停止蓝牙搜索")
|
||||||
@ -242,7 +242,6 @@ export default {
|
|||||||
//获取已连接的设备
|
//获取已连接的设备
|
||||||
getLinkBlue: function(callback) {
|
getLinkBlue: function(callback) {
|
||||||
uni.getConnectedBluetoothDevices({
|
uni.getConnectedBluetoothDevices({
|
||||||
services: ["0xFFE0"],
|
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (callback) {
|
if (callback) {
|
||||||
callback(res);
|
callback(res);
|
||||||
@ -250,7 +249,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
fail: function(ex) {
|
fail: function(ex) {
|
||||||
console.log("获取已连接设备异常");
|
console.log("获取已连接设备异常",ex);
|
||||||
if (callback) {
|
if (callback) {
|
||||||
callback({
|
callback({
|
||||||
devices: []
|
devices: []
|
||||||
@ -261,7 +260,7 @@ export default {
|
|||||||
},
|
},
|
||||||
//连接某个设备
|
//连接某个设备
|
||||||
LinkBlue: function(deviceId, callback, error) {
|
LinkBlue: function(deviceId, callback, error) {
|
||||||
|
//console.log("deviceId="+deviceId)
|
||||||
this.StopSearch();
|
this.StopSearch();
|
||||||
var these = this;
|
var these = this;
|
||||||
let key = "linkedDevices";
|
let key = "linkedDevices";
|
||||||
@ -280,24 +279,25 @@ export default {
|
|||||||
|
|
||||||
}
|
}
|
||||||
//连接成功的回调
|
//连接成功的回调
|
||||||
var lindedCallback = function () {
|
var lindedCallback = function(id,flag) {
|
||||||
|
|
||||||
let c = linkedDevices.find(function(v) {
|
let c = linkedDevices.find(function(v) {
|
||||||
return v.deviceId == deviceId;
|
return v.deviceId == deviceId;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (c) {
|
if (c && !flag) {
|
||||||
console.log("连接成功开始监听特征变化")
|
console.log("连接成功开始监听特征变化,deviceid="+deviceId+',serviceId='+c.notifyServiceid+',characteristicId='+c.notifyCharactId)
|
||||||
//监听设备的特征变化
|
//监听设备的特征变化
|
||||||
|
setTimeout(()=>{
|
||||||
uni.notifyBLECharacteristicValueChange({
|
uni.notifyBLECharacteristicValueChange({
|
||||||
deviceId: deviceId,
|
deviceId: deviceId,
|
||||||
serviceId: c.notifyServiceid,
|
serviceId: c.notifyServiceid,
|
||||||
characteristicId: c.notifyCharactId,
|
characteristicId: c.notifyCharactId,
|
||||||
state: true,
|
state: true,
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
console.log("开始监听成功。。。。")
|
console.log("开始监听成功。。。。",res)
|
||||||
if(res.errCode=='0'){
|
|
||||||
//订阅特征值
|
//订阅特征值
|
||||||
|
|
||||||
uni.onBLECharacteristicValueChange(function(data) {
|
uni.onBLECharacteristicValueChange(function(data) {
|
||||||
// data.characteristicId
|
// data.characteristicId
|
||||||
// data.deviceId
|
// data.deviceId
|
||||||
@ -310,18 +310,21 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
},1000);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (callback) {
|
if (callback) {
|
||||||
callback(deviceId);
|
callback(deviceId,flag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var linkState = function(res) {
|
var linkState = function(res) {
|
||||||
console.log("获取已连接的设备回调" + JSON.stringify(res))
|
//console.log("获取已连接的设备回调" + JSON.stringify(res))
|
||||||
let flag = res.devices.find(function(v) {
|
let flag = res.devices.find(function(v) {
|
||||||
if (v.deviceId == deviceId) {
|
if (v.deviceId == deviceId) {
|
||||||
return true;
|
return true;
|
||||||
@ -329,35 +332,31 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
if (flag) {
|
if (flag) {
|
||||||
console.log("设备状态已连接");
|
//console.log("设备状态已连接");
|
||||||
|
|
||||||
lindedCallback(deviceId);
|
lindedCallback(deviceId,true);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
console.log("设备未连接");
|
console.log("设备未连接:"+deviceId);
|
||||||
linkDevice(deviceId);
|
linkDevice(deviceId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var linkDevice = function(id) {
|
var linkDevice = function() {
|
||||||
console.log("正在连接"+id);
|
console.log("正在连接" + deviceId);
|
||||||
uni.createBLEConnection({
|
uni.createBLEConnection({
|
||||||
deviceId: id,
|
deviceId: deviceId,
|
||||||
timeout: 30000,
|
timeout: 30000,
|
||||||
success: function(info) {
|
success: function(info) {
|
||||||
|
|
||||||
console.log("连接成功");
|
console.log("连接成功");
|
||||||
|
|
||||||
uni.setBLEMTU({
|
var call = () => {
|
||||||
deviceId: id,
|
|
||||||
mtu: 512,
|
|
||||||
success: () => {
|
|
||||||
console.log("mtu设置成功");
|
|
||||||
if (linkedDevices) {
|
if (linkedDevices) {
|
||||||
console.log("11111" + JSON.stringify(linkedDevices));
|
console.log("11111" + JSON.stringify(linkedDevices));
|
||||||
f = linkedDevices.find(function(v) {
|
f = linkedDevices.find(function(v) {
|
||||||
return v.deviceId == id;
|
return v.deviceId == deviceId;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
console.log("22222")
|
console.log("22222")
|
||||||
@ -372,12 +371,13 @@ export default {
|
|||||||
these.getLinkBlue(function(res) {
|
these.getLinkBlue(function(res) {
|
||||||
if (res.devices && res.devices.length) {
|
if (res.devices && res.devices.length) {
|
||||||
let f = res.devices.find(function(v) {
|
let f = res.devices.find(function(v) {
|
||||||
return v.deviceId == id;
|
return v.deviceId == deviceId;
|
||||||
});
|
});
|
||||||
linkedDevices.push(f);
|
linkedDevices.push(f);
|
||||||
uni.setStorageSync(key, JSON.stringify(linkedDevices));
|
uni.setStorageSync(key, JSON.stringify(
|
||||||
|
linkedDevices));
|
||||||
|
|
||||||
getService(id);
|
getService(deviceId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -387,25 +387,43 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
console.log("缓存中已连接过");
|
console.log("缓存中已连接过");
|
||||||
if (!f.services) {
|
if (!f.services) {
|
||||||
getService(id);
|
getService(deviceId);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
lindedCallback(id);
|
lindedCallback(deviceId,false);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
let os = uni.getSystemInfoSync().osName;
|
||||||
|
if (os == 'android') {
|
||||||
|
uni.setBLEMTU({
|
||||||
|
deviceId: deviceId,
|
||||||
|
mtu: 512,
|
||||||
|
success: () => {
|
||||||
|
//console.log("mtu设置成功");
|
||||||
},
|
},
|
||||||
fail: function() {
|
fail: function() {
|
||||||
console.log("mtu设置失败")
|
console.log("mtu设置失败")
|
||||||
|
},
|
||||||
|
complete: function() {
|
||||||
|
call();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
call();
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
fail: function(ex) {
|
fail: function(ex) {
|
||||||
|
if (ex) {
|
||||||
|
console.log("蓝牙连接失败" + JSON.stringify(ex));
|
||||||
if(error){
|
if(error){
|
||||||
console.log("蓝牙连接失败" + JSON.stringify(error));
|
|
||||||
error(ex);
|
error(ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -436,7 +454,7 @@ export default {
|
|||||||
.then(results => {
|
.then(results => {
|
||||||
console.log('所有操作成功完成', results);
|
console.log('所有操作成功完成', results);
|
||||||
|
|
||||||
lindedCallback(id);
|
lindedCallback(id,false);
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
@ -448,7 +466,7 @@ export default {
|
|||||||
repeatCnt++;
|
repeatCnt++;
|
||||||
if (repeatCnt > 5) {
|
if (repeatCnt > 5) {
|
||||||
|
|
||||||
lindedCallback(id);
|
lindedCallback(id,false);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -498,10 +516,14 @@ export default {
|
|||||||
if (notiChar) {
|
if (notiChar) {
|
||||||
v.notifyServiceid = serviceId;
|
v.notifyServiceid = serviceId;
|
||||||
v.notifyCharactId = notiChar.uuid;
|
v.notifyCharactId = notiChar.uuid;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
uni.setStorageSync(key, JSON.stringify(linkedDevices));
|
uni.setStorageSync(key, JSON.stringify(linkedDevices));
|
||||||
resolve(res);
|
resolve(res);
|
||||||
},
|
},
|
||||||
@ -522,9 +544,9 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log("正在获取蓝牙适配器状态")
|
//console.log("正在获取蓝牙适配器状态")
|
||||||
this.CheckBlue((res) => {
|
this.CheckBlue((res) => {
|
||||||
console.log("蓝牙状态:" + JSON.stringify(res));
|
//console.log("蓝牙状态:" + JSON.stringify(res));
|
||||||
if (res.available) {
|
if (res.available) {
|
||||||
this.getLinkBlue(linkState);
|
this.getLinkBlue(linkState);
|
||||||
} else {
|
} else {
|
||||||
@ -607,23 +629,7 @@ export default {
|
|||||||
console.log("倒计时:2");
|
console.log("倒计时:2");
|
||||||
if (f) {
|
if (f) {
|
||||||
console.log("倒计时:1");
|
console.log("倒计时:1");
|
||||||
uni.writeBLECharacteristicValue({
|
these.sendDataNew(f.deviceId,f.writeServiceId,f.wirteCharactId,buffer).then(succ).catch(err);
|
||||||
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 {
|
} else {
|
||||||
reject(`已连接设备中无法找到此设备`);
|
reject(`已连接设备中无法找到此设备`);
|
||||||
// console.log("警报:已连接设备中无法找到此设备")
|
// console.log("警报:已连接设备中无法找到此设备")
|
||||||
@ -636,36 +642,67 @@ export default {
|
|||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
sendDataNew: function(deviceid, serviceId, characteristicId, buffer) {
|
sendDataNew: function(deviceid, serviceId, characteristicId, buffer) {
|
||||||
|
|
||||||
console.log("准备向设备发送数据,deviceid=" + deviceid);
|
//console.log("准备向设备发送数据,deviceid=" + deviceid+',serviceId='+serviceId+',characteristicId='+characteristicId);
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
let promise = new Promise((succ, err) => {
|
||||||
uni.writeBLECharacteristicValue({
|
uni.writeBLECharacteristicValue({
|
||||||
deviceId: deviceid,
|
deviceId: deviceid,
|
||||||
serviceId: serviceId,
|
serviceId: serviceId,
|
||||||
characteristicId: characteristicId,
|
characteristicId: characteristicId,
|
||||||
value: buffer,
|
value: buffer,
|
||||||
success: () => {
|
success: () => {
|
||||||
console.log("发送数据成功");
|
//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();
|
resolve();
|
||||||
},
|
} else {
|
||||||
fail: (err) => {
|
reject(ex);
|
||||||
console.log("发送数据失败" + JSON.stringify(err));
|
|
||||||
reject(`发送数据失败: ${err.errMsg}`);
|
|
||||||
},
|
|
||||||
complete: function() {
|
|
||||||
console.log("发送数据complete");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}).finally(() => {
|
||||||
|
console.log("完成了")
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
promise.then(resolve).catch(reject);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
10
pages.json
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"pages": [
|
"pages": [
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"path": "pages/common/login/index",
|
"path": "pages/common/login/index",
|
||||||
"style": {
|
"style": {
|
||||||
@ -121,6 +122,13 @@
|
|||||||
"fullscreen": true
|
"fullscreen": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/650/HBY650",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "HBY650"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/common/map/index",
|
"path": "pages/common/map/index",
|
||||||
"style": {
|
"style": {
|
||||||
@ -158,6 +166,8 @@
|
|||||||
"navigationBarTitleText": "分享管理"
|
"navigationBarTitleText": "分享管理"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
],
|
],
|
||||||
"tabBar": {
|
"tabBar": {
|
||||||
"color": "#fff",
|
"color": "#fff",
|
||||||
|
|||||||
@ -144,8 +144,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ble from '../../api/6155/BlueHelper';
|
import ble from '@/api/6155/BlueHelper';
|
||||||
import { deviceReName } from '../../api/common';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@ -242,7 +241,11 @@ import { deviceReName } from '../../api/common';
|
|||||||
id: 'HSXF01061'
|
id: 'HSXF01061'
|
||||||
},
|
},
|
||||||
device: {
|
device: {
|
||||||
deviceId: ''
|
deviceId: '',
|
||||||
|
writeServiceId: '',
|
||||||
|
wirteCharactId: '',
|
||||||
|
notifyServiceid:'',
|
||||||
|
notifyCharactId:''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -299,7 +302,7 @@ import { deviceReName } from '../../api/common';
|
|||||||
content: '是否断开与设备的蓝牙连接?',
|
content: '是否断开与设备的蓝牙连接?',
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
disconnectDevice(these.device.deviceId);
|
ble.disconnectDevice(these.device.deviceId);
|
||||||
|
|
||||||
}
|
}
|
||||||
uni.navigateBack();
|
uni.navigateBack();
|
||||||
@ -332,17 +335,64 @@ import { deviceReName } from '../../api/common';
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
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) {
|
bleValueNotify: function(data) {
|
||||||
console.log("读取到设备发送的数据:" + JSON.stringify(data));
|
console.log("读取到设备发送的数据:" + JSON.stringify(data));
|
||||||
// data.characteristicId
|
// data.characteristicId
|
||||||
// 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('提示', "敬请期待");
|
||||||
@ -400,35 +450,10 @@ import { deviceReName } from '../../api/common';
|
|||||||
// 分包发送图片数据
|
// 分包发送图片数据
|
||||||
var sendImagePackets = function(imageData) {
|
var sendImagePackets = function(imageData) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
// this.isSending = true;
|
|
||||||
// this.progress = 0;
|
|
||||||
// this.currentPacket = 0;
|
|
||||||
|
|
||||||
// 总数据包数
|
// 总数据包数
|
||||||
const totalPackets = 52;
|
const totalPackets = 52;
|
||||||
let currentPacket = 1;
|
let currentPacket = 1;
|
||||||
|
f = these.getDevice();
|
||||||
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 == these.device.deviceId;
|
|
||||||
|
|
||||||
});
|
|
||||||
if (f) {
|
if (f) {
|
||||||
// 发送单个数据包
|
// 发送单个数据包
|
||||||
const sendNextPacket = () => {
|
const sendNextPacket = () => {
|
||||||
@ -527,7 +552,7 @@ import { deviceReName } from '../../api/common';
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -590,8 +615,7 @@ import { deviceReName } from '../../api/common';
|
|||||||
switch (type) {
|
switch (type) {
|
||||||
case "main":
|
case "main":
|
||||||
title = '主灯模式';
|
title = '主灯模式';
|
||||||
items = [
|
items = [{
|
||||||
{
|
|
||||||
text: '强光',
|
text: '强光',
|
||||||
icon: '/static/images/6155/DeviceDetail/qiang.png'
|
icon: '/static/images/6155/DeviceDetail/qiang.png'
|
||||||
},
|
},
|
||||||
@ -692,10 +716,12 @@ import { deviceReName } from '../../api/common';
|
|||||||
}
|
}
|
||||||
dataView.setUint8(5, dataValue); // 数据
|
dataView.setUint8(5, dataValue); // 数据
|
||||||
dataView.setUint16(6, '9C41');
|
dataView.setUint16(6, '9C41');
|
||||||
|
|
||||||
|
let f = this.getDevice();
|
||||||
// 发送数据
|
// 发送数据
|
||||||
ble.LinkBlue(this.device.deviceId, () => {
|
ble.LinkBlue(f.deviceId, () => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
ble.sendData(this.device.deviceId, buffer);
|
ble.sendDataNew(f.deviceId, f.writeServiceId, f.wirteCharactId, buffer);
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -796,10 +822,14 @@ import { deviceReName } from '../../api/common';
|
|||||||
|
|
||||||
|
|
||||||
console.log("dataView.length=" + dataView.byteLength)
|
console.log("dataView.length=" + dataView.byteLength)
|
||||||
|
|
||||||
|
let f = these.getDevice();
|
||||||
|
if (f) {
|
||||||
// 发送数据包
|
// 发送数据包
|
||||||
ble.LinkBlue(these.device.deviceId, () => {
|
ble.LinkBlue(f.deviceId, () => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
ble.sendData(these.device.deviceId, buffer).then(() => {
|
ble.sendDataNew(f.deviceId, f.writeServiceId, f
|
||||||
|
.wirteCharactId, buffer).then(() => {
|
||||||
// 更新进度
|
// 更新进度
|
||||||
console.log(
|
console.log(
|
||||||
`发送文字数据包 ${currentPacket}/${totalPackets}: ${text}`
|
`发送文字数据包 ${currentPacket}/${totalPackets}: ${text}`
|
||||||
@ -818,6 +848,7 @@ import { deviceReName } from '../../api/common';
|
|||||||
}, 0);
|
}, 0);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// }).catch(err => {
|
// }).catch(err => {
|
||||||
// this.isSendingText = false;
|
// this.isSendingText = false;
|
||||||
@ -851,7 +882,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);
|
||||||
@ -864,17 +895,65 @@ import { deviceReName } from '../../api/common';
|
|||||||
dataView.setUint8(3, 0x00); // 数据长度
|
dataView.setUint8(3, 0x00); // 数据长度
|
||||||
dataView.setUint8(4, 0x01); // 数据长度
|
dataView.setUint8(4, 0x01); // 数据长度
|
||||||
dataView.setUint8(5, data); // 数据
|
dataView.setUint8(5, data); // 数据
|
||||||
|
let f = this.getDevice();
|
||||||
|
if (f) {
|
||||||
// 发送数据
|
// 发送数据
|
||||||
ble.LinkBlue(this.device.deviceId, () => {
|
ble.LinkBlue(f.deviceId, () => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
ble.sendData(this.device.deviceId, buffer);
|
ble.sendDataNew(f.deviceId, f.writeServiceId, f.wirteCharactId, buffer);
|
||||||
}, 1000)
|
}, 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>
|
</script>
|
||||||
|
|
||||||
|
|||||||
1813
pages/650/HBY650.vue
Normal file
@ -12,18 +12,16 @@
|
|||||||
{{tab.typeName}}
|
{{tab.typeName}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="uniui-more">
|
|
||||||
<image @click="allMore" src="/static/images/more.png" mode="" class="more"></image>
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<view class="sendFlex" v-if="activeTab && activeTab.id !== ''&& activeTabInfo.communicationMode==0">
|
<view class="sendFlex">
|
||||||
<!-- <view class="callpolice">报警</view> -->
|
|
||||||
|
<view class="callpolice">报警</view>
|
||||||
<view class="Sendmessage" @click="location">位置</view>
|
<view class="Sendmessage" @click="location">位置</view>
|
||||||
<view class="Sendmessage" @click="handleSend">发送信息</view>
|
<view class="Sendmessage" @click="handleSend">发送信息</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<scroll-view class="device-list" scroll-y @scrolltolower="onScrollToLower" :lower-threshold="100"
|
<scroll-view class="device-list" scroll-y @scrolltolower="onScrollToLower" :lower-threshold="100"
|
||||||
style="height:80vh;">
|
style="height:80vh;">
|
||||||
<view v-if="deviceList.length>0">
|
|
||||||
<uni-swipe-action ref="swipeAction">
|
<uni-swipe-action ref="swipeAction">
|
||||||
<block v-for="(item, index) in deviceList" :key="index" :ref="'swipeItem_' + index">
|
<block v-for="(item, index) in deviceList" :key="index" :ref="'swipeItem_' + index">
|
||||||
<uni-swipe-action-item :right-options="Options"
|
<uni-swipe-action-item :right-options="Options"
|
||||||
@ -48,6 +46,7 @@
|
|||||||
<view class="device-status online">已连接</view>
|
<view class="device-status online">已连接</view>
|
||||||
<view class="device-status unline">未连接</view>
|
<view class="device-status unline">未连接</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<image src="/static/images/cires.png" class="circle"></image>
|
<image src="/static/images/cires.png" class="circle"></image>
|
||||||
</uni-swipe-action-item>
|
</uni-swipe-action-item>
|
||||||
@ -58,17 +57,11 @@
|
|||||||
<text v-if="loading">加载中...</text>
|
<text v-if="loading">加载中...</text>
|
||||||
<text v-if="finished">没有更多数据了</text>
|
<text v-if="finished">没有更多数据了</text>
|
||||||
</view>
|
</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>
|
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 删除弹框 -->
|
<!-- 删除弹框 -->
|
||||||
<view class="agreement-mask" v-if="deleteShow" @click="closePopup('delete')">
|
<view class="agreement-mask" v-if="deleteShow">
|
||||||
<view class="agreement-popupC" @click.stop>
|
<view class="agreement-popupC">
|
||||||
<view class="popup-content">
|
<view class="popup-content">
|
||||||
<image src="/static/images/dell.png" mode="" class="svg"></image>
|
<image src="/static/images/dell.png" mode="" class="svg"></image>
|
||||||
<uni-icon class="trash"></uni-icon>
|
<uni-icon class="trash"></uni-icon>
|
||||||
@ -83,14 +76,13 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- =========重命名============== -->
|
<!-- =========重命名============== -->
|
||||||
<view class="agreement-mask" v-if="RenameModel" @click="closePopup('rename')">
|
<view class="agreement-mask" v-if="RenameModel">
|
||||||
<view class="agreement-popupD" @click.stop>
|
<view class="agreement-popupD">
|
||||||
<view class="popup-content">
|
<view class="popup-content">
|
||||||
<view>
|
<view>
|
||||||
<view class="popup-flex">
|
<view class="popup-flex">
|
||||||
<text>设备名称</text>
|
<text>设备名称</text>
|
||||||
<input type="text" v-model="deviceName" placeholder="请输入设备名称" class="popup-input"
|
<input type="text" v-model="deviceName" placeholder="请输入设备名称" class="popup-input" />
|
||||||
@click.stop />
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -111,17 +103,6 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</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>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -140,7 +121,6 @@
|
|||||||
tabs: [],
|
tabs: [],
|
||||||
activeTab: 0,
|
activeTab: 0,
|
||||||
showTooltip: false,
|
showTooltip: false,
|
||||||
showshare: false,
|
|
||||||
Options: [{
|
Options: [{
|
||||||
text: '重命名',
|
text: '重命名',
|
||||||
style: {
|
style: {
|
||||||
@ -172,63 +152,21 @@
|
|||||||
action: 'bluetooth'
|
action: 'bluetooth'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
shareItems: [{
|
|
||||||
text: '所有类型',
|
|
||||||
icon: '/static/images/type.png',
|
|
||||||
action: 'type'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: '所有分享',
|
|
||||||
icon: '/static/images/share.png',
|
|
||||||
action: 'share'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
page: 1, // 当前页码
|
page: 1, // 当前页码
|
||||||
size: 10, // 每页条数
|
size: 10, // 每页条数
|
||||||
total: 0, // 总数据量
|
total: 0, // 总数据量
|
||||||
loading: false,
|
loading: false,
|
||||||
finished: false,
|
finished: false,
|
||||||
deviceId: '',
|
deviceId: '',
|
||||||
deviceName: "", //重命名
|
deviceName: "" //重命名
|
||||||
activeTabInfo: ''
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
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导航切换栏
|
// tab导航切换栏
|
||||||
getTab() {
|
getTab() {
|
||||||
deviceTypeList({}).then((res) => {
|
deviceTypeList({}).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
//console.log("deviceTypeList=" + JSON.stringify(res.data));
|
console.log("deviceTypeList=" + JSON.stringify(res.data));
|
||||||
this.tabs = [{
|
this.tabs = [{
|
||||||
id: '',
|
id: '',
|
||||||
name: '全部设备',
|
name: '全部设备',
|
||||||
@ -248,7 +186,6 @@
|
|||||||
switchTab(tab, index) {
|
switchTab(tab, index) {
|
||||||
this.deviceList = [];
|
this.deviceList = [];
|
||||||
this.activeTab = index;
|
this.activeTab = index;
|
||||||
this.activeTabInfo = tab
|
|
||||||
this.page = 1; // 重置页码
|
this.page = 1; // 重置页码
|
||||||
this.finished = false; // 重
|
this.finished = false; // 重
|
||||||
// 明确传递参数,空字符串改为null或undefined
|
// 明确传递参数,空字符串改为null或undefined
|
||||||
@ -289,11 +226,10 @@
|
|||||||
onScrollToLower() {
|
onScrollToLower() {
|
||||||
this.getData();
|
this.getData();
|
||||||
},
|
},
|
||||||
// 添加扫一三图标
|
|
||||||
scan() {
|
scan() {
|
||||||
this.showTooltip = !this.showTooltip;
|
this.showTooltip = !this.showTooltip;
|
||||||
},
|
},
|
||||||
// 添加设备,扫一扫,蓝牙
|
|
||||||
handleMenuClick(item) {
|
handleMenuClick(item) {
|
||||||
this.showTooltip = false; // 关闭弹窗
|
this.showTooltip = false; // 关闭弹窗
|
||||||
switch (item.action) {
|
switch (item.action) {
|
||||||
@ -303,6 +239,15 @@
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'bluetooth':
|
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({
|
uni.navigateTo({
|
||||||
url: "/pages/common/addBLE/addEquip"
|
url: "/pages/common/addBLE/addEquip"
|
||||||
})
|
})
|
||||||
@ -311,11 +256,8 @@
|
|||||||
},
|
},
|
||||||
// 右滑点击事件处理
|
// 右滑点击事件处理
|
||||||
handleSwipeClick(e, item, index) {
|
handleSwipeClick(e, item, index) {
|
||||||
|
const {content} = e
|
||||||
const {
|
console.log(e, 'eeeee');
|
||||||
content
|
|
||||||
} = e
|
|
||||||
console.log(item, 'eeeee');
|
|
||||||
switch (e.content.text) {
|
switch (e.content.text) {
|
||||||
case '删除':
|
case '删除':
|
||||||
this.handleDeleteDevice(item, index)
|
this.handleDeleteDevice(item, index)
|
||||||
@ -348,8 +290,6 @@
|
|||||||
this.onIntall();
|
this.onIntall();
|
||||||
}, 500);
|
}, 500);
|
||||||
this.deleteShow = false
|
this.deleteShow = false
|
||||||
// 关闭所有滑动项
|
|
||||||
this.$refs.swipeAction.closeAll();
|
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
@ -383,8 +323,6 @@
|
|||||||
}, 500);
|
}, 500);
|
||||||
this.RenameModel = false
|
this.RenameModel = false
|
||||||
this.deviceName = ''
|
this.deviceName = ''
|
||||||
// 关闭所有滑动项
|
|
||||||
this.$refs.swipeAction.closeAll();
|
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
@ -396,19 +334,8 @@
|
|||||||
},
|
},
|
||||||
// 发生短信
|
// 发生短信
|
||||||
handleSend() {
|
handleSend() {
|
||||||
const currentTab = this.tabs[this.activeTab];
|
|
||||||
const deviceType = currentTab.id || 'all';
|
|
||||||
console.log(`跳转到发送信息页面\n当前设备类型: ${deviceType}\n设备类型名称: ${currentTab.typeName}`);
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/common/send/index',
|
url: '/pages/common/send/index'
|
||||||
events: {
|
|
||||||
ack: function(data) {}
|
|
||||||
},
|
|
||||||
success: (res) => {
|
|
||||||
res.eventChannel.emit('deviceSend', {
|
|
||||||
data: deviceType
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 位置
|
// 位置
|
||||||
@ -418,26 +345,19 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleFile(item) {
|
handleFile(item) {
|
||||||
//console.log('item' + JSON.stringify(item));
|
console.log('item' + JSON.stringify(item));
|
||||||
// communicationMode 0是4G 1是蓝牙
|
// communicationMode 0是4G 1是蓝牙
|
||||||
if (item.communicationMode == 0) {
|
if (item.communicationMode == 0) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/6170/deviceControl/index",
|
url: `/pages/6170/deviceControl/index?id=${item.id}`
|
||||||
events: {
|
|
||||||
ack: function(data) {}
|
|
||||||
},
|
|
||||||
success: (res) => {
|
|
||||||
// 页面跳转成功后的回调函数
|
|
||||||
res.eventChannel.emit('deviceControl', {
|
|
||||||
data: item,
|
|
||||||
apiType: 'listA' // 自定义标识,详情哪里根据这个参数不同信息
|
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
})
|
|
||||||
}
|
|
||||||
if (item.typeName == '6155') {
|
if (item.typeName == '6155') {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/6155/deviceDetail",
|
url: "/pages/650/HBY650",
|
||||||
events: {
|
events: {
|
||||||
ack: function(data) {
|
ack: function(data) {
|
||||||
|
|
||||||
@ -456,22 +376,13 @@
|
|||||||
onIntall() {
|
onIntall() {
|
||||||
this.page = 1;
|
this.page = 1;
|
||||||
this.finished = false;
|
this.finished = false;
|
||||||
this.getData(this.deviceType); // 重新加载第一页数据
|
this.getData(); // 重新加载第一页数据
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
onLoad() {
|
onShow() {
|
||||||
this.getTab()
|
this.getTab()
|
||||||
this.onIntall()
|
this.onIntall()
|
||||||
// 绑定页面做了监听,新增成功,刷新页面
|
}
|
||||||
uni.$on('refreshDeviceList', () => {
|
|
||||||
this.getTab() // 刷新数据
|
|
||||||
this.onIntall()
|
|
||||||
});
|
|
||||||
},
|
|
||||||
beforeDestroy() {
|
|
||||||
// 组件销毁前移除监听器
|
|
||||||
uni.$off('refreshDeviceList');
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -492,7 +403,6 @@
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
/* 禁止换行 */
|
/* 禁止换行 */
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -530,21 +440,6 @@
|
|||||||
font-size: 28rpx;
|
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 {
|
.gprs {
|
||||||
width: 28rpx;
|
width: 28rpx;
|
||||||
height: 35rpx;
|
height: 35rpx;
|
||||||
@ -570,6 +465,118 @@
|
|||||||
position: relative;
|
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 {
|
.device-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -654,7 +661,6 @@
|
|||||||
width: 68rpx;
|
width: 68rpx;
|
||||||
height: 50rpx;
|
height: 50rpx;
|
||||||
margin-left: 17%;
|
margin-left: 17%;
|
||||||
object-fit: contain;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.onlines {
|
.onlines {
|
||||||
@ -689,12 +695,6 @@
|
|||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noDATA {
|
|
||||||
text-align: center;
|
|
||||||
color: rgba(255, 255, 255, 0.87);
|
|
||||||
transform: translate(-0%, 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 遮罩层 */
|
/* 遮罩层 */
|
||||||
.agreement-mask {
|
.agreement-mask {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@ -756,7 +756,6 @@
|
|||||||
color: rgba(255, 255, 255, 0.87);
|
color: rgba(255, 255, 255, 0.87);
|
||||||
height: 50rpx;
|
height: 50rpx;
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
align-items: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.popup-input {
|
.popup-input {
|
||||||
@ -813,14 +812,6 @@
|
|||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tooltip-share {
|
|
||||||
position: fixed;
|
|
||||||
right: 18rpx;
|
|
||||||
top: 230rpx;
|
|
||||||
/* 根据导航栏高度调整 */
|
|
||||||
z-index: 9999;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tooltip-arrow {
|
.tooltip-arrow {
|
||||||
width: 0;
|
width: 0;
|
||||||
height: 0;
|
height: 0;
|
||||||
|
|||||||
BIN
static/images/6155/DeviceDetail/Hby650.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
@ -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) {
|
uni.onBluetoothAdapterStateChange(function(res) {
|
||||||
if (!res.available) {
|
if (!res.available) {
|
||||||
isOpen = false
|
isOpen = false
|
||||||
|
|||||||
BIN
unpackage/cache/apk/__UNI__A21EF43_cm.apk
vendored
Normal file
BIN
unpackage/cache/apk/__UNI__F163D2E_cm.apk
vendored
Normal file
1
unpackage/cache/apk/apkurl
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
https://app.liuyingyong.cn/build/download/fc63d0d0-3136-11f0-91c0-d548695e4e4f
|
||||||
1
unpackage/cache/apk/cmManifestCache.json
vendored
Normal file
4
unpackage/cache/certdata
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
andrCertfile=E:/andr-qianming/test.keystore
|
||||||
|
andrCertAlias=testalias
|
||||||
|
andrCertPass=TPDYL0B366pvkrS7cMPwfg==
|
||||||
|
storePassword=TPDYL0B366pvkrS7cMPwfg==
|
||||||
4
unpackage/cache/cloudcertificate/certini
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
[General]
|
||||||
|
andrCertfile=package.keystore
|
||||||
|
andrCertAlias=__UNI__117DAB0
|
||||||
|
andrCertPass="rWkRTuafvGeXqPqYKAx3iw=="
|
||||||
BIN
unpackage/cache/cloudcertificate/package.keystore
vendored
Normal file
BIN
unpackage/cache/wgt/__UNI__A21EF43/.manifest/google-keystore.keystore
vendored
Normal file
BIN
unpackage/cache/wgt/__UNI__A21EF43/.manifest/icon-android-hdpi.png
vendored
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
unpackage/cache/wgt/__UNI__A21EF43/.manifest/icon-android-xhdpi.png
vendored
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
BIN
unpackage/cache/wgt/__UNI__A21EF43/.manifest/icon-android-xxhdpi.png
vendored
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
unpackage/cache/wgt/__UNI__A21EF43/.manifest/icon-android-xxxhdpi.png
vendored
Normal file
|
After Width: | Height: | Size: 16 KiB |
1
unpackage/cache/wgt/__UNI__A21EF43/__uniappchooselocation.js
vendored
Normal file
BIN
unpackage/cache/wgt/__UNI__A21EF43/__uniapperror.png
vendored
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
1
unpackage/cache/wgt/__UNI__A21EF43/__uniappes6.js
vendored
Normal file
1
unpackage/cache/wgt/__UNI__A21EF43/__uniappopenlocation.js
vendored
Normal file
1
unpackage/cache/wgt/__UNI__A21EF43/__uniapppicker.js
vendored
Normal file
8
unpackage/cache/wgt/__UNI__A21EF43/__uniappquill.js
vendored
Normal file
1
unpackage/cache/wgt/__UNI__A21EF43/__uniappquillimageresize.js
vendored
Normal file
1
unpackage/cache/wgt/__UNI__A21EF43/__uniappscan.js
vendored
Normal file
BIN
unpackage/cache/wgt/__UNI__A21EF43/__uniappsuccess.png
vendored
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
25
unpackage/cache/wgt/__UNI__A21EF43/__uniappview.html
vendored
Normal 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>
|
||||||
3
unpackage/cache/wgt/__UNI__A21EF43/androidPrivacy.json
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"prompt" : "template"
|
||||||
|
}
|
||||||
8
unpackage/cache/wgt/__UNI__A21EF43/app-config-service.js
vendored
Normal 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}}}});
|
||||||
1
unpackage/cache/wgt/__UNI__A21EF43/app-config.js
vendored
Normal 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()})([]);
|
||||||
19
unpackage/cache/wgt/__UNI__A21EF43/app-service.js
vendored
Normal file
1
unpackage/cache/wgt/__UNI__A21EF43/app-view.js
vendored
Normal file
1
unpackage/cache/wgt/__UNI__A21EF43/manifest.json
vendored
Normal 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"}
|
||||||
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/images/1.png
vendored
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/images/Frame(1).png
vendored
Normal file
|
After Width: | Height: | Size: 634 B |
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/images/Frame(10).png
vendored
Normal file
|
After Width: | Height: | Size: 597 B |
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/images/Frame(11).png
vendored
Normal file
|
After Width: | Height: | Size: 617 B |
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/images/Frame(12).png
vendored
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/images/Frame(2).png
vendored
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/images/Frame(3).png
vendored
Normal file
|
After Width: | Height: | Size: 692 B |
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/images/Frame(4).png
vendored
Normal file
|
After Width: | Height: | Size: 941 B |
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/images/Frame(5).png
vendored
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/images/Frame(6).png
vendored
Normal file
|
After Width: | Height: | Size: 518 B |
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/images/Frame(7).png
vendored
Normal file
|
After Width: | Height: | Size: 592 B |
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/images/Frame(8).png
vendored
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/images/Frame(9).png
vendored
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/images/Frame.png
vendored
Normal file
|
After Width: | Height: | Size: 575 B |
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/images/Group 16.png
vendored
Normal file
|
After Width: | Height: | Size: 96 KiB |
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/images/Group 17.png
vendored
Normal file
|
After Width: | Height: | Size: 231 KiB |
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/images/Group 6.png
vendored
Normal file
|
After Width: | Height: | Size: 7.8 KiB |
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/images/Group 8.png
vendored
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/images/Mask group(1).png
vendored
Normal file
|
After Width: | Height: | Size: 110 KiB |
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/images/Mask group.png
vendored
Normal file
|
After Width: | Height: | Size: 64 KiB |
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/images/arrow-left (2).png
vendored
Normal file
|
After Width: | Height: | Size: 222 B |
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/images/arrow-left (3).png
vendored
Normal file
|
After Width: | Height: | Size: 283 B |
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/images/arrow-left (4).png
vendored
Normal file
|
After Width: | Height: | Size: 283 B |
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/images/arrow-left.png
vendored
Normal file
|
After Width: | Height: | Size: 222 B |
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/images/biao.png
vendored
Normal file
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 18 KiB |
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/images/logo.png
vendored
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/tabs/home-active.png
vendored
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/tabs/home.png
vendored
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/tabs/orders-active.png
vendored
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/tabs/orders.png
vendored
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/zj.png
vendored
Normal file
|
After Width: | Height: | Size: 296 KiB |
BIN
unpackage/cache/wgt/__UNI__A21EF43/static/zjlogo.png
vendored
Normal file
|
After Width: | Height: | Size: 8.6 KiB |
1
unpackage/cache/wgt/__UNI__A21EF43/view.css
vendored
Normal file
6
unpackage/cache/wgt/__UNI__A21EF43/view.umd.min.js
vendored
Normal file
0
unpackage/dist/build/.automator/app-plus/.automator.json
vendored
Normal file
1
unpackage/dist/build/app-plus/__uniappchooselocation.js
vendored
Normal file
BIN
unpackage/dist/build/app-plus/__uniapperror.png
vendored
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
1
unpackage/dist/build/app-plus/__uniappes6.js
vendored
Normal file
1
unpackage/dist/build/app-plus/__uniappopenlocation.js
vendored
Normal file
1
unpackage/dist/build/app-plus/__uniapppicker.js
vendored
Normal file
8
unpackage/dist/build/app-plus/__uniappquill.js
vendored
Normal file
1
unpackage/dist/build/app-plus/__uniappquillimageresize.js
vendored
Normal file
1
unpackage/dist/build/app-plus/__uniappscan.js
vendored
Normal file
BIN
unpackage/dist/build/app-plus/__uniappsuccess.png
vendored
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
25
unpackage/dist/build/app-plus/__uniappview.html
vendored
Normal 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>
|
||||||
3
unpackage/dist/build/app-plus/androidPrivacy.json
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"prompt" : "template"
|
||||||
|
}
|
||||||
8
unpackage/dist/build/app-plus/app-config-service.js
vendored
Normal 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}}}});
|
||||||
1
unpackage/dist/build/app-plus/app-config.js
vendored
Normal 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()})([]);
|
||||||
19
unpackage/dist/build/app-plus/app-service.js
vendored
Normal file
1
unpackage/dist/build/app-plus/app-view.js
vendored
Normal file
1
unpackage/dist/build/app-plus/manifest.json
vendored
Normal 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"}
|
||||||
BIN
unpackage/dist/build/app-plus/static/images/1.png
vendored
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
unpackage/dist/build/app-plus/static/images/Frame(1).png
vendored
Normal file
|
After Width: | Height: | Size: 634 B |
BIN
unpackage/dist/build/app-plus/static/images/Frame(10).png
vendored
Normal file
|
After Width: | Height: | Size: 597 B |
BIN
unpackage/dist/build/app-plus/static/images/Frame(11).png
vendored
Normal file
|
After Width: | Height: | Size: 617 B |
BIN
unpackage/dist/build/app-plus/static/images/Frame(12).png
vendored
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
unpackage/dist/build/app-plus/static/images/Frame(2).png
vendored
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
unpackage/dist/build/app-plus/static/images/Frame(3).png
vendored
Normal file
|
After Width: | Height: | Size: 692 B |
BIN
unpackage/dist/build/app-plus/static/images/Frame(4).png
vendored
Normal file
|
After Width: | Height: | Size: 941 B |
BIN
unpackage/dist/build/app-plus/static/images/Frame(5).png
vendored
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
unpackage/dist/build/app-plus/static/images/Frame(6).png
vendored
Normal file
|
After Width: | Height: | Size: 518 B |
BIN
unpackage/dist/build/app-plus/static/images/Frame(7).png
vendored
Normal file
|
After Width: | Height: | Size: 592 B |
BIN
unpackage/dist/build/app-plus/static/images/Frame(8).png
vendored
Normal file
|
After Width: | Height: | Size: 1.2 KiB |