1
0
forked from dyf/APP

体验性小优化

This commit is contained in:
liub
2026-03-19 17:25:41 +08:00
parent 75b9f27965
commit 1fcaf8a9a4
5 changed files with 41 additions and 29 deletions

View File

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

View File

@ -194,7 +194,7 @@
<view class="slider-container"> <view class="slider-container">
<slider min="10" max="100" step="10" :disabled="false" :value="formData.sta_LightDimmer" <slider min="10" max="100" step="10" :disabled="false" :value="formData.sta_LightDimmer"
activeColor="#bbe600" backgroundColor="#686767" block-size="20" block-color="#ffffffde" activeColor="#bbe600" backgroundColor="#686767" block-size="20" block-color="#ffffffde"
@change="onBrightnessChanging" @changing="onBrightnessChanging" class="custom-slider" /> @change="onBrightnessChanged" @changing="onBrightnessChanging" class="custom-slider" />
</view> </view>
<view class="line"></view> <view class="line"></view>
@ -206,7 +206,7 @@
<view class="slider-container"> <view class="slider-container">
<slider min="0.5" max="10" step="0.5" :disabled="false" :value="formData.sta_LightFreq" <slider min="0.5" max="10" step="0.5" :disabled="false" :value="formData.sta_LightFreq"
activeColor="#bbe600" backgroundColor="#686767" block-size="20" block-color="#ffffffde" activeColor="#bbe600" backgroundColor="#686767" block-size="20" block-color="#ffffffde"
@change="onFreqChanging" @changing="onFreqChanging" class="custom-slider" /> @change="onFreqChanged" @changing="onFreqChanging" class="custom-slider" />
</view> </view>
<view class="line"></view> <view class="line"></view>
@ -218,7 +218,7 @@
<view class="slider-container"> <view class="slider-container">
<slider min="1" max="8" step="1" :disabled="false" :value="formData.sta_VoiceVolume" <slider min="1" max="8" step="1" :disabled="false" :value="formData.sta_VoiceVolume"
activeColor="#bbe600" backgroundColor="#686767" block-size="20" block-color="#ffffffde" activeColor="#bbe600" backgroundColor="#686767" block-size="20" block-color="#ffffffde"
@change="onVolumeChanging" @changing="onVolumeChanging" class="custom-slider" /> @change="onVolumeChanged" @changing="onVolumeChanging" class="custom-slider" />
</view> </view>
@ -850,9 +850,11 @@
}); });
}, },
onFreqChanging(e){
this.formData.sta_LightFreq = e.detail.value;
},
//频率 //频率
onFreqChanging(e) { onFreqChanged(e) {
let f = this.getDevice(); let f = this.getDevice();
// #ifdef APP-PLUS // #ifdef APP-PLUS
if (!f) { if (!f) {
@ -897,8 +899,11 @@
}, 100); }, 100);
}, },
onVolumeChanging(e){
this.formData.sta_VoiceVolume = e.detail.value;
},
//音量 //音量
onVolumeChanging(e) { onVolumeChanged(e) {
let f = this.getDevice(); let f = this.getDevice();
// #ifdef APP-PLUS // #ifdef APP-PLUS
if (!f) { if (!f) {
@ -938,8 +943,11 @@
}, 100); }, 100);
}, },
onBrightnessChanging(e){
this.formData.sta_LightDimmer = e.detail.value;
},
// 亮度调节 // 亮度调节
onBrightnessChanging(e) { onBrightnessChanged(e) {
let f = this.getDevice(); let f = this.getDevice();
// #ifdef APP-PLUS // #ifdef APP-PLUS
if (!f) { if (!f) {

View File

@ -74,7 +74,7 @@
<view class="slider-container"> <view class="slider-container">
<slider min="1" max="100" step="1" :disabled="false" :value="formData.liangDu" activeColor="#bbe600" <slider min="1" max="100" step="1" :disabled="false" :value="formData.liangDu" activeColor="#bbe600"
backgroundColor="#00000000" block-size="20" block-color="#ffffffde" @change="sliderChange" backgroundColor="#00000000" block-size="20" block-color="#ffffffde" @change="sliderChange" @changing="sliderChanging"
class="custom-slider" /> class="custom-slider" />
</view> </view>
@ -1784,6 +1784,9 @@
}); });
}, },
sliderChanging(evt){
this.formData.liangDu = evt.detail.value;
},
sliderChange: function(evt) { sliderChange: function(evt) {
if (!this.permissions.includes('1') && this.Status.apiType !== 'listA') { if (!this.permissions.includes('1') && this.Status.apiType !== 'listA') {
@ -1834,10 +1837,10 @@
dataView.setUint8(0, 0x55); // 帧头 dataView.setUint8(0, 0x55); // 帧头
dataView.setUint8(1, 0x07); // 帧类型:亮度调节 dataView.setUint8(1, 0x07); // 帧类型:亮度调节
dataView.setUint8(2, 0x01); // 包序号 dataView.setUint8(2, 0x01);
dataView.setUint8(3, 0x00); // 包序号 dataView.setUint8(3, 0x00);
dataView.setUint8(4, 0x01); // 数据长度 dataView.setUint8(4, 0x01); //
dataView.setUint8(5, liangDu); // 数据长度 dataView.setUint8(5, liangDu); // 数据
let f = this.getDevice(); let f = this.getDevice();
if (f) { if (f) {

View File

@ -74,7 +74,7 @@
<view class="slider-container"> <view class="slider-container">
<slider min="1" max="100" step="1" :disabled="false" :value="formData.liangDu" activeColor="#bbe600" <slider min="1" max="100" step="1" :disabled="false" :value="formData.liangDu" activeColor="#bbe600"
backgroundColor="#00000000" block-size="20" block-color="#ffffffde" @change="sliderChange" backgroundColor="#00000000" block-size="20" block-color="#ffffffde" @change="sliderChange"
@changing="sliderChange" class="custom-slider" /> @changing="sliderChanging" class="custom-slider" />
</view> </view>
</view> </view>
@ -1394,6 +1394,10 @@ debugger;
}); });
}, },
sliderChanging(evt){
this.formData.liangDu = evt.detail.value;
},
sliderChange: function(evt) { sliderChange: function(evt) {
this.formData.liangDu = evt.detail.value; this.formData.liangDu = evt.detail.value;
clearTimeout(BrighInteval) clearTimeout(BrighInteval)

View File

@ -378,17 +378,11 @@
// hideLoading(these); // hideLoading(these);
if (these.device) { if (!these.device) {
clearInterval(this.Status.intval);
showLoading(these, {
text: '蓝牙连接已恢复,正在验证设备'
});
setTimeout(() => {
these.DeviceVerdict(res.deviceId);
}, 0);
} else {
hideLoading(these); hideLoading(these);
}else{
clearInterval(this.Status.intval);
these.DeviceVerdict(res.deviceId);
} }
@ -420,7 +414,7 @@
showLoading(these, { showLoading(these, {
text: '正在验证设备' text: '正在验证设备'
}); });
setTimeout(() => { setTimeout(() => {
these.DeviceVerdict(f.deviceId); these.DeviceVerdict(f.deviceId);
}, 0); }, 0);
@ -690,6 +684,7 @@
this.Status.intval = setInterval(() => { this.Status.intval = setInterval(() => {
this.Status.time = this.Status.time - 1; this.Status.time = this.Status.time - 1;
if (this.Status.time < 0) { if (this.Status.time < 0) {
hideLoading(these);
console.log("停止倒计时", this.Status.time); console.log("停止倒计时", this.Status.time);
clearInterval(this.Status.intval) clearInterval(this.Status.intval)
this.Status.intval = null; this.Status.intval = null;
@ -708,7 +703,10 @@
return; return;
} }
hideLoading(these); updateLoading(these, {
text: "等待设备上报Mac地址," + these.Status.time + 's'
});
}, 1000); }, 1000);
@ -744,8 +742,7 @@
}); });
return; return;
} }
// console.log("验证设备")
these.DeviceVerdict(item.deviceId);
} }
let execLink = () => { let execLink = () => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
@ -993,7 +990,7 @@
box-sizing: border-box; box-sizing: border-box;
padding: 20rpx; padding: 20rpx;
border-radius: 8px; border-radius: 8px;
background: #1a1a1a; background: #1a1a1a9e;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
flex-wrap: nowrap; flex-wrap: nowrap;