|
|
@@ -594,8 +594,35 @@ Page({
|
|
|
isClickedToggleAromlight: false,//香薰机灯光
|
|
|
intervalId1: null,
|
|
|
intervalId2: null,
|
|
|
-
|
|
|
+ sliderValueHumidifier: '',
|
|
|
+ sliderValueClimate: '',
|
|
|
+ },
|
|
|
+ handleTouchEndHumidifier: function(e) {
|
|
|
+ this.setData({
|
|
|
+ sliderValueHumidifier: '',
|
|
|
+ });
|
|
|
},
|
|
|
+ handleChangingHumidifier: function(e) {
|
|
|
+ // 假设 slider 宽度为屏幕宽度(或某个固定值),这里需要根据实际情况调整
|
|
|
+ const screenWidth = wx.getSystemInfoSync().windowWidth;
|
|
|
+ const sliderValueHumidifier = e.detail.value;
|
|
|
+ this.setData({
|
|
|
+ sliderValueHumidifier: sliderValueHumidifier,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleTouchEndClimate: function(e) {
|
|
|
+ this.setData({
|
|
|
+ sliderValueClimate: '',
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleChangingClimate: function(e) {
|
|
|
+ // 假设 slider 宽度为屏幕宽度(或某个固定值),这里需要根据实际情况调整
|
|
|
+ const screenWidth = wx.getSystemInfoSync().windowWidth;
|
|
|
+ const sliderValueClimate = e.detail.value;
|
|
|
+ this.setData({
|
|
|
+ sliderValueClimate: sliderValueClimate,
|
|
|
+ });
|
|
|
+ },
|
|
|
replaceAll: function(str, find, replace) {
|
|
|
return str.replace(new RegExp(find, 'g'), replace);
|
|
|
},
|