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", "version" : "1",
"prompt" : "template", "prompt" : "template",
"title" : "服务协议和隐私政策", "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" : "同意并接受", "buttonAccept" : "同意并接受",
"buttonRefuse" : "暂不同意", "buttonRefuse" : "暂不同意",
"hrefLoader" : "system", "hrefLoader" : "system",

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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'; url='https://www.pgyer.com/xhwl';
} }
return {os:os,url:url}; 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;
} }
} }