1
0
forked from dyf/APP

Compare commits

...

2 Commits

Author SHA1 Message Date
fc88bd6f7d 一些小优化 2026-02-10 15:45:45 +08:00
63214ded3b 优化蓝牙扫描动画看起来更平滑,安卓修改隐私和协议的链接 2026-02-09 16:07:03 +08:00
9 changed files with 60 additions and 49 deletions

View File

@ -2,7 +2,7 @@
"version" : "1",
"prompt" : "template",
"title" : "服务协议和隐私政策",
"message" : "  请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href=\"https://dmsapp.skf.com.cn/HummerService/Resource/Template/1765175615670.html\">《服务协议》</a>和<a href=\"https://dmsapp.skf.com.cn/HummerService/Resource/Template/1765176086420.html\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
"message" : "  请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href=\"https://cnxhyc.com/jquan/2026/02/09/80806c4209c74bd0a223415683ec300d.html\">《服务协议》</a>和<a href=\"https://cnxhyc.com/jquan/2026/02/09/4a4d05227c1242d1a505b98586704c39.html\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
"buttonAccept" : "同意并接受",
"buttonRefuse" : "暂不同意",
"hrefLoader" : "system",

View File

@ -6,4 +6,8 @@ export function deviceSendAlarmMessage(data) {
method: 'post',
data: data
})
}
export function deviceDefaultAlarm(data){
return Promise.reject(data);
}

View File

@ -2,7 +2,7 @@
"name" : "星汉物联",
"appid" : "__UNI__A21EF43",
"description" : "设备管控",
"versionName" : "1.0.16",
"versionName" : "1.0.17",
"versionCode" : "100",
"transformPx" : false,
/* 5+App */

View File

@ -715,7 +715,7 @@
return new Promise((resolve, reject) => {
// 创建RGB565格式的像素数据
// console.log("pixels=",pixels);
const arr = ble.convertToRGB565(pixels, 'bgr');
const arr = Common.convertToRGB565(pixels, 'bgr');
var list = [];
let index = 0; // 用于追踪arr的当前位置

View File

@ -1029,7 +1029,7 @@ import request, { baseURL } from '@/utils/request.js';
});
these.Status.BottomMenu.show = false;
these.rgb565Data = ble.convertToRGB565(data.piexls);
these.rgb565Data = Common.convertToRGB565(data.piexls);
setTimeout(function() {
sendImagePackets().catch(() => {

View File

@ -1848,7 +1848,7 @@
these.Status.BottomMenu.show = false;
these.picPath = data.picPath;
these.rgb565Data = ble.convertToRGB565(data.piexls);
these.rgb565Data = Common.convertToRGB565(data.piexls);
setTimeout(function() {
sendImagePackets().catch(() => {

View File

@ -481,7 +481,10 @@
}
plus.android.requestPermissions(
['android.permission.BLUETOOTH','android.permission.BLUETOOTH_ADMIN','android.permission.ACCESS_FINE_LOCATION','android.permission.ACCESS_COARSE_LOCATION'],
['android.permission.BLUETOOTH', 'android.permission.BLUETOOTH_ADMIN',
'android.permission.ACCESS_FINE_LOCATION',
'android.permission.ACCESS_COARSE_LOCATION'
],
(result) => {
if (result.granted && result.granted.length > 0) {
console.log('定位权限已授予');
@ -533,22 +536,24 @@
return;
}
}
showLoading(these,{text:'正在刷新'})
showLoading(these, {
text: '正在刷新'
})
let time = null;
let startSearch = () => {
if(time!==null){
clearTimeout(time);
if (time !== null) {
clearTimeout(time);
}
time = setTimeout(() => {
these.EquipMents = [];
these.PairEquip = [];
ble.StartSearch().then(result => {
console.log("开始搜索成功",result);
}).catch(err => {
console.log("开始搜索成功", result);
}).catch(err => {
console.error("开始搜索失败:", err);
if (err.code === 10001) {
these.showOpenSetting();
@ -557,9 +562,9 @@
title: '提示',
content: '出现错误:' + err.msg
});
}
}).finally(()=>{
}).finally(() => {
hideLoading(these);
});
}, 200);
@ -905,11 +910,11 @@
position: absolute;
border-radius: 50%;
background-color: #bbe60033;
animation: expand 4s infinite ease-out;
display: inline-block;
transform: translate(-50%, -50%);
border: 1rpx solid #bbe6003d;
animation: expand 5s infinite ease-in-out;
animation: expand 4s infinite ease-in-out;
}
.circle:nth-child(2) {
@ -927,17 +932,16 @@
opacity: 0.8;
}
80% {
width: 18.75rem;
height: 18.75rem;
opacity: 0.2;
90% {
width: 18rem;
height: 18rem;
opacity: 0;
}
100% {
width: 0.5rem;
height: 0.5rem;
opacity: 0.5;
width: 0rem;
height: 0rem;
opacity: 0;
}
}

View File

@ -2030,29 +2030,7 @@ class BleHelper {
}
//将点阵数据转换成RGB565
convertToRGB565(pixels, type) {
if (!type) {
type = 'rgb';
}
const result = new Uint16Array(pixels.length / 4);
let index = 0;
for (let i = 0; i < pixels.length; i += 4) {
let r = pixels[i];
let g = pixels[i + 1];
let b = pixels[i + 2];
let a = pixels[i + 3];
if (type == 'bgr') {
result[index++] = ((b & 0xF8) << 8) | ((g & 0xFC) << 3) | (r >> 3);
} else {
result[index++] = ((r & 0xF8) << 8) | ((g & 0xFC) << 3) | (b >> 3);
}
}
return result;
}

View File

@ -462,5 +462,30 @@ export default {
url='https://www.pgyer.com/xhwl';
}
return {os:os,url:url};
},
//将点阵数据转换成RGB565
convertToRGB565(pixels, type) {
if (!type) {
type = 'rgb';
}
const result = new Uint16Array(pixels.length / 4);
let index = 0;
for (let i = 0; i < pixels.length; i += 4) {
let r = pixels[i];
let g = pixels[i + 1];
let b = pixels[i + 2];
let a = pixels[i + 3];
if (type == 'bgr') {
result[index++] = ((b & 0xF8) << 8) | ((g & 0xFC) << 3) | (r >> 3);
} else {
result[index++] = ((r & 0xF8) << 8) | ((g & 0xFC) << 3) | (b >> 3);
}
}
return result;
}
}