From 7f48ad7939773a9bc02aad98dbc5e11a35d132e1 Mon Sep 17 00:00:00 2001
From: zuoxiao <zuoxiao>
Date: 星期二, 19 八月 2025 15:42:32 +0800
Subject: [PATCH] 更新项目配置,启用URL检查功能;修改监测页面状态管理逻辑,优化在线状态的判断方式,提升用户体验和代码可读性。
---
pages/stationMonitor/stationMonitor.js | 359 --------------
project.private.config.json | 2
utils/projectConfig.js | 4
pages/stationMonitor/stationMonitor.wxml | 91 +--
pages/stationMonitor/stationMonitor.wxss | 969 +++++----------------------------------
5 files changed, 186 insertions(+), 1,239 deletions(-)
diff --git a/pages/stationMonitor/stationMonitor.js b/pages/stationMonitor/stationMonitor.js
index 1e45df5..df58747 100644
--- a/pages/stationMonitor/stationMonitor.js
+++ b/pages/stationMonitor/stationMonitor.js
@@ -387,7 +387,7 @@
return {
id: item.id,
name: item.name,
- online: true, // 榛樿鍦ㄧ嚎锛屽疄闄呴」鐩腑鍙兘闇�瑕侀澶栫殑鐘舵�佹鏌�
+ onLine: true, // 榛樿鍦ㄧ嚎锛屽疄闄呴」鐩腑鍙兘闇�瑕侀澶栫殑鐘舵�佹鏌�
lastUpdate: new Date().toLocaleString(), // 褰撳墠鏃堕棿浣滀负鏈�鍚庢洿鏂版椂闂�
isPlaying: false, // 瑙嗛鎾斁鐘舵��
hslUrl: rtmpUrl, // 浣跨敤鐢熸垚鐨凴TMP URL
@@ -432,356 +432,12 @@
- /**
- * 鎵归噺鑾峰彇鎵�鏈夋憚鍍忓ご鐨凥LS鎾斁鍦板潃
- */
- batchGetHlsUrls(cameraList) {
- if (!cameraList || cameraList.length === 0) {
- console.log('鎽勫儚澶村垪琛ㄤ负绌猴紝鏃犻渶鑾峰彇鎾斁鍦板潃');
- return;
- }
- console.log('寮�濮嬫壒閲忚幏鍙栨挱鏀惧湴鍧�锛屾憚鍍忓ご鏁伴噺:', cameraList.length);
-
- // 涓烘瘡涓憚鍍忓ご鑾峰彇鎾斁鍦板潃
- cameraList.forEach((camera, index) => {
- // 寤惰繜鑾峰彇锛岄伩鍏嶅悓鏃跺彂璧峰お澶氳姹�
- setTimeout(() => {
- this.getHlsUrlForCamera(camera);
- }, index * 500); // 姣忎釜璇锋眰闂撮殧500ms
- });
- },
-
- /**
- * 鎾斁瑙嗛
- */
- playVideo(e) {
- const camera = e.currentTarget.dataset.camera;
- console.log('=== 鎾斁瑙嗛寮�濮� ===');
- console.log('鎽勫儚澶翠俊鎭�:', camera);
- console.log('璁惧淇℃伅:', this.data.deviceInfo);
- console.log('璁惧鐗瑰畾閰嶇疆:', this.data.deviceSpecificConfig);
-
- if (!camera.online) {
- console.log('鎽勫儚澶寸绾匡紝鏃犳硶鎾斁');
- wx.showToast({
- title: '璁惧绂荤嚎锛屾棤娉曟挱鏀�',
- icon: 'error'
- });
- return;
- }
-
- if (!camera.hslUrl) {
- console.log('鏃犳挱鏀惧湴鍧�锛屾棤娉曟挱鏀�');
- wx.showToast({
- title: '鏆傛棤鎾斁鍦板潃锛岃绋嶅悗閲嶈瘯',
- icon: 'error'
- });
- return;
- }
-
- if (camera.isLoadingUrl) {
- console.log('姝e湪鍔犺浇URL锛屾棤娉曟挱鏀�');
- wx.showToast({
- title: '姝e湪鑾峰彇鎾斁鍦板潃锛岃绋嶅��',
- icon: 'none'
- });
- return;
- }
-
- console.log('寮�濮嬫挱鏀捐棰戯紝鎾斁鍦板潃:', camera.hslUrl);
- console.log('褰撳墠椤甸潰鏁版嵁鐘舵��:', {
- cameraList: this.data.cameraList,
- activeTab: this.data.activeTab,
- isLoading: this.data.isLoading
- });
-
- // 妫�鏌RL鏍煎紡
- if (camera.hslUrl.startsWith('rtmp://')) {
- console.log('妫�娴嬪埌RTMP URL鏍煎紡锛屽紑濮嬫挱鏀�');
-
- // 鏇存柊鎾斁鐘舵��
- const cameraList = this.data.cameraList.map(item => {
- if (item.id === camera.id) {
- return {
- ...item,
- isPlaying: true
- };
- }
- return item;
- });
-
- this.setData({
- cameraList: cameraList
- });
-
- // 鏄剧ず鎾斁鎴愬姛鎻愮ず
- wx.showToast({
- title: `寮�濮嬫挱鏀� ${camera.name}`,
- icon: 'success'
- });
-
- console.log(`鎾斁鐘舵�佸凡鏇存柊锛屾憚鍍忓ご ${camera.name} 寮�濮嬫挱鏀綬TMP娴乣);
- } else {
- console.log('URL鏍煎紡涓嶆槸RTMP锛屾棤娉曟挱鏀�');
- wx.showToast({
- title: '鎾斁鍦板潃鏍煎紡涓嶆纭�',
- icon: 'error'
- });
- }
-
- console.log('=== 鎾斁瑙嗛缁撴潫 ===');
- },
-
- /**
- * 鏆傚仠瑙嗛
- */
- pauseVideo(e) {
- const camera = e.currentTarget.dataset.camera;
- console.log('鏆傚仠鎽勫儚澶�:', camera.name);
-
- // 鏇存柊瑙嗛鎾斁鐘舵��
- const cameraList = this.data.cameraList.map(item => {
- if (item.id === camera.id) {
- return {
- ...item,
- isPlaying: false
- };
- }
- return item;
- });
-
- this.setData({
- cameraList: cameraList
- });
- },
-
- /**
- * 鍋滄瑙嗛
- */
- stopVideo(e) {
- const camera = e.currentTarget.dataset.camera;
- console.log('鍋滄鎽勫儚澶�:', camera.name);
-
- // 鏇存柊瑙嗛鎾斁鐘舵��
- const cameraList = this.data.cameraList.map(item => {
- if (item.id === camera.id) {
- return {
- ...item,
- isPlaying: false
- };
- }
- return item;
- });
-
- this.setData({
- cameraList: cameraList
- });
- },
+
+
- /**
- * 鐩存挱鎾斁鍣ㄧ姸鎬佸彉鍖�
- */
- onLivePlayerStateChange(e) {
- const camera = e.currentTarget.dataset.camera;
- console.log('鐩存挱鎾斁鍣ㄧ姸鎬佸彉鍖�:', camera.name, e.detail);
-
- const {
- code
- } = e.detail;
-
- // 鏄剧ず鐘舵�佷俊鎭粰鐢ㄦ埛
- let statusText = '';
- let isPlaying = false;
-
- switch (code) {
- case 2001:
- statusText = '宸茬粡杩炴帴鏈嶅姟鍣�';
- break;
- case 2002:
- statusText = '宸茬粡杩炴帴 RTMP 鏈嶅姟鍣�,寮�濮嬫媺娴�';
- isPlaying = true;
- break;
- case 2003:
- statusText = '缃戠粶鎺ユ敹鍒伴涓棰戞暟鎹寘(IDR)';
- isPlaying = true;
- break;
- case 2004:
- statusText = '瑙嗛鎾斁寮�濮�';
- isPlaying = true;
- break;
- case 2005:
- statusText = '瑙嗛鎾斁杩涘害';
- isPlaying = true;
- break;
- case 2006:
- statusText = '瑙嗛鎾斁缁撴潫';
- isPlaying = false;
- break;
- case 2007:
- statusText = '瑙嗛鎾斁Loading';
- isPlaying = true;
- break;
- case 2008:
- statusText = '瑙g爜鍣ㄥ惎鍔�';
- isPlaying = true;
- break;
- case 2009:
- statusText = '瑙嗛鍒嗚鲸鐜囨敼鍙�';
- isPlaying = true;
- break;
- case 2101:
- statusText = '缃戠粶鏂繛锛屼笖缁忓娆¢噸杩炴姠鏁戞棤鏁�';
- isPlaying = false;
- break;
- case 2102:
- statusText = '鑾峰彇鍔犻�熸媺娴佸湴鍧�澶辫触';
- isPlaying = false;
- break;
- case 2103:
- statusText = '褰撳墠瑙嗛甯цВ鐮佸け璐�';
- isPlaying = false;
- break;
- case 2104:
- statusText = '缃戠粶鏂繛, 宸插惎鍔ㄨ嚜鍔ㄩ噸杩�';
- isPlaying = false;
- break;
- case 2105:
- statusText = '缃戠粶鏉ユ柇杩�, 涓旂粡澶氭閲嶈繛鎶㈡晳鏃犳晥';
- isPlaying = false;
- break;
- case 2106:
- statusText = '缃戠粶鏉ユ柇杩�, 涓旂粡澶氭閲嶈繛鎶㈡晳鏃犳晥';
- isPlaying = false;
- break;
- default:
- statusText = `鏈煡鐘舵�佺爜: ${code}`;
- break;
- }
-
- console.log(`鎽勫儚澶� ${camera.name} 鐘舵��: ${statusText}`);
-
- // 鏇存柊鎾斁鐘舵��
- const cameraList = this.data.cameraList.map(item => {
- if (item.id === camera.id) {
- return {
- ...item,
- isPlaying: isPlaying
- };
- }
- return item;
- });
-
- this.setData({
- cameraList: cameraList
- });
- },
-
- /**
- * 鐩存挱鎾斁鍣ㄧ綉缁滅姸鎬�
- */
- onLivePlayerNetStatus(e) {
- const camera = e.currentTarget.dataset.camera;
- console.log('鐩存挱鎾斁鍣ㄧ綉缁滅姸鎬�:', camera.name, e.detail);
- },
-
- /**
- * 鐩存挱鎾斁鍣ㄩ敊璇�
- */
- onLivePlayerError(e) {
- const camera = e.currentTarget.dataset.camera;
- console.error('鐩存挱鎾斁鍣ㄩ敊璇�:', camera.name, e.detail);
-
- wx.showToast({
- title: '鐩存挱鎾斁澶辫触',
- icon: 'error'
- });
-
- // 鏇存柊鎾斁鐘舵��
- const cameraList = this.data.cameraList.map(item => {
- if (item.id === camera.id) {
- return {
- ...item,
- isPlaying: false
- };
- }
- return item;
- });
-
- this.setData({
- cameraList: cameraList
- });
- },
-
- /**
- * 鍏ㄥ睆鎾斁瑙嗛
- */
- fullscreenVideo(e) {
- const camera = e.currentTarget.dataset.camera;
- console.log('鍏ㄥ睆鎾斁:', camera.name);
-
- if (!camera.online) {
- wx.showToast({
- title: '鎽勫儚澶寸绾�',
- icon: 'error'
- });
- return;
- }
-
- // 浣跨敤RTMP URL杩涜鍏ㄥ睆鎾斁
- if (camera.hslUrl) {
- console.log('鍏ㄥ睆瑙嗛URL:', camera.hslUrl);
-
- wx.showModal({
- title: '鍏ㄥ睆鎾斁',
- content: `鍗冲皢鍏ㄥ睆鎾斁 ${camera.name} 鐨勮棰戞祦`,
- confirmText: '寮�濮嬫挱鏀�',
- success: (res) => {
- if (res.confirm) {
- // 杩欓噷鍙互璺宠浆鍒板叏灞忚棰戞挱鏀鹃〉闈�
- wx.showToast({
- title: '姝e湪鍔犺浇鍏ㄥ睆瑙嗛...',
- icon: 'loading'
- });
-
- // 妯℃嫙鍏ㄥ睆瑙嗛鍔犺浇
- setTimeout(() => {
- wx.showToast({
- title: '鍏ㄥ睆鎾斁涓�',
- icon: 'success'
- });
- }, 1500);
- }
- }
- });
- } else {
- wx.showToast({
- title: '鍏ㄥ睆瑙嗛鍦板潃鏃犳晥',
- icon: 'error'
- });
- }
- },
-
- /**
- * 鎽勫儚澶磋缃�
- */
- cameraSettings(e) {
- const camera = e.currentTarget.dataset.camera;
- console.log('鎽勫儚澶磋缃�:', camera.name);
-
- wx.showActionSheet({
- itemList: ['浜戝彴鎺у埗', '褰曞儚璁剧疆', '鐢昏川璋冭妭', '鎶ヨ璁剧疆'],
- success: (res) => {
- const actions = ['浜戝彴鎺у埗', '褰曞儚璁剧疆', '鐢昏川璋冭妭', '鎶ヨ璁剧疆'];
- wx.showToast({
- title: `${actions[res.tapIndex]}鍔熻兘寮�鍙戜腑`,
- icon: 'none'
- });
- }
- });
- },
/**
* 鑾峰彇姘旇薄绔欏垪琛紙鍏煎鎬ф柟娉曪紝鐜板湪璋冪敤缁熶竴鎺ュ彛锛�
@@ -849,8 +505,6 @@
windDirectionAngle: content.windDirection, // 椋庡悜瑙掑害
// 鍦ㄧ嚎鐘舵��
onLine: content.onLine,
- // 璁$畻鍦ㄧ嚎鐘舵��
- online: content.onLine === 1,
// 鏍煎紡鍖栨樉绀烘暟鎹�
lastUpdate: content.dt || new Date().toLocaleString()
};
@@ -903,7 +557,7 @@
windSpeed: 0.00,
windDirection: '鍖�',
windDirectionAngle: 0,
- onLine: 1,
+ onLine: false,
online: true,
lastUpdate: new Date().toLocaleString()
};
@@ -1071,8 +725,7 @@
soilTemperature4: 0.00,
soilTemperature5: 0.00,
// 鍦ㄧ嚎鐘舵��
- onLine: 1,
- online: true,
+ onLine: false,
lastUpdate: new Date().toLocaleString()
};
@@ -1240,7 +893,7 @@
stirTime: 0,
stirDuration: 300,
injectDuration: 300,
- onLine: 1,
+ onLine: false,
mixingEnabled: false,
fertilizingEnabled: false,
lastUpdate: new Date().toLocaleString()
diff --git a/pages/stationMonitor/stationMonitor.wxml b/pages/stationMonitor/stationMonitor.wxml
index 1aa0714..7723357 100644
--- a/pages/stationMonitor/stationMonitor.wxml
+++ b/pages/stationMonitor/stationMonitor.wxml
@@ -47,8 +47,8 @@
<!-- 鐘舵�佹爮 -->
<view class="status-bar">
<view class="status-item">
- <view class="status-indicator {{currentWeatherStation.online ? 'online' : 'offline'}}"></view>
- <text class="status-text">{{currentWeatherStation.online ? '鍦ㄧ嚎' : '绂荤嚎'}}</text>
+ <view class="status-indicator {{currentWeatherStation.onLine === true ? 'online' : 'offline'}}"></view>
+ <text class="status-text">{{currentWeatherStation.onLine === true ? '鍦ㄧ嚎' : '绂荤嚎'}}</text>
</view>
<view class="refresh-btn" bind:tap="refreshWeatherData">
<image class="refresh-icon" src="/images/refresh.svg" />
@@ -65,7 +65,7 @@
</view>
<view class="data-content">
<text class="data-label">绌烘皵婀垮害(%)</text>
- <text class="data-value">{{currentWeatherStation.humidity || '--'}}%</text>
+ <text class="data-value">{{currentWeatherStation.humidity !== null && currentWeatherStation.humidity !== undefined ? currentWeatherStation.humidity : '--'}}%</text>
</view>
</view>
@@ -76,7 +76,7 @@
</view>
<view class="data-content">
<text class="data-label">绌烘皵娓╁害(鈩�)</text>
- <text class="data-value">{{currentWeatherStation.temperature || '--'}}掳C</text>
+ <text class="data-value">{{currentWeatherStation.temperature !== null && currentWeatherStation.temperature !== undefined ? currentWeatherStation.temperature : '--'}}掳C</text>
</view>
</view>
@@ -87,7 +87,7 @@
</view>
<view class="data-content">
<text class="data-label">绱绾�(mW/m虏)</text>
- <text class="data-value">{{currentWeatherStation.uv || '--'}}</text>
+ <text class="data-value">{{currentWeatherStation.uv !== null && currentWeatherStation.uv !== undefined ? currentWeatherStation.uv : '--'}}</text>
</view>
</view>
@@ -98,7 +98,7 @@
</view>
<view class="data-content">
<text class="data-label">鍏夌収寮哄害(lm/銕�)</text>
- <text class="data-value">{{currentWeatherStation.light || '--'}} lux</text>
+ <text class="data-value">{{currentWeatherStation.light !== null && currentWeatherStation.light !== undefined ? currentWeatherStation.light : '--'}} lux</text>
</view>
</view>
@@ -109,7 +109,7 @@
</view>
<view class="data-content">
<text class="data-label">闆ㄩ噺(mm)</text>
- <text class="data-value">{{currentWeatherStation.rainfall || '--'}} mm</text>
+ <text class="data-value">{{currentWeatherStation.rainfall !== null && currentWeatherStation.rainfall !== undefined ? currentWeatherStation.rainfall : '--'}} mm</text>
</view>
</view>
@@ -120,7 +120,7 @@
</view>
<view class="data-content">
<text class="data-label">椋庨��(m/s)</text>
- <text class="data-value">{{currentWeatherStation.windSpeed || '--'}} m/s</text>
+ <text class="data-value">{{currentWeatherStation.windSpeed !== null && currentWeatherStation.windSpeed !== undefined ? currentWeatherStation.windSpeed : '--'}} m/s</text>
</view>
</view>
@@ -133,7 +133,7 @@
<text class="data-label">椋庡悜</text>
<view class="wind-direction-display">
<!-- <image class="wind-arrow" src="/images/wind-arrow.svg" style="transform: rotate({{currentWeatherStation.windDirectionAngle || 0}}deg)" /> -->
- <text class="data-value">{{currentWeatherStation.windDirection || '--'}}</text>
+ <text class="data-value">{{currentWeatherStation.windDirection !== null && currentWeatherStation.windDirection !== undefined ? currentWeatherStation.windDirection : '--'}}</text>
</view>
</view>
</view>
@@ -166,14 +166,14 @@
</view>
</picker>
</view>
-
+
<!-- 鍦熷¥澧掓儏淇℃伅鍗$墖 -->
<view wx:if="{{currentSoilStation}}" class="weather-info-card">
<!-- 鐘舵�佹爮 -->
<view class="status-bar">
<view class="status-item">
- <view class="status-indicator {{currentSoilStation.online ? 'online' : 'offline'}}"></view>
- <text class="status-text">{{currentSoilStation.online ? '鍦ㄧ嚎' : '绂荤嚎'}}</text>
+ <view class="status-indicator {{currentSoilStation.onLine === true ? 'online' : 'offline'}}"></view>
+ <text class="status-text">{{currentSoilStation.onLine === true ? '鍦ㄧ嚎' : '绂荤嚎'}}</text>
</view>
<view class="refresh-btn" bind:tap="refreshSoilData">
<image class="refresh-icon" src="/images/refresh.svg" />
@@ -190,7 +190,7 @@
</view>
<view class="data-content">
<text class="data-label">鍦熷¥婀垮害1(%)</text>
- <text class="data-value">{{currentSoilStation.soilHumidity1 || '--'}}%</text>
+ <text class="data-value">{{currentSoilStation.soilHumidity1 !== null && currentSoilStation.soilHumidity1 !== undefined ? currentSoilStation.soilHumidity1 : '--'}}%</text>
</view>
</view>
@@ -200,7 +200,7 @@
</view>
<view class="data-content">
<text class="data-label">鍦熷¥娓╁害1(鈩�)</text>
- <text class="data-value">{{currentSoilStation.soilTemperature1 || '--'}}掳C</text>
+ <text class="data-value">{{currentSoilStation.soilTemperature1 !== null && currentSoilStation.soilTemperature1 !== undefined ? currentSoilStation.soilTemperature1 : '--'}}掳C</text>
</view>
</view>
@@ -211,7 +211,7 @@
</view>
<view class="data-content">
<text class="data-label">鍦熷¥婀垮害2(%)</text>
- <text class="data-value">{{currentSoilStation.soilHumidity2 || '--'}}%</text>
+ <text class="data-value">{{currentSoilStation.soilHumidity2 !== null && currentSoilStation.soilHumidity2 !== undefined ? currentSoilStation.soilHumidity2 : '--'}}%</text>
</view>
</view>
@@ -221,7 +221,7 @@
</view>
<view class="data-content">
<text class="data-label">鍦熷¥娓╁害2(鈩�)</text>
- <text class="data-value">{{currentSoilStation.soilTemperature2 || '--'}}掳C</text>
+ <text class="data-value">{{currentSoilStation.soilTemperature2 !== null && currentSoilStation.soilTemperature2 !== undefined ? currentSoilStation.soilTemperature2 : '--'}}掳C</text>
</view>
</view>
@@ -232,7 +232,7 @@
</view>
<view class="data-content">
<text class="data-label">鍦熷¥婀垮害3(%)</text>
- <text class="data-value">{{currentSoilStation.soilHumidity3 || '--'}}%</text>
+ <text class="data-value">{{currentSoilStation.soilHumidity3 !== null && currentSoilStation.soilHumidity3 !== undefined ? currentSoilStation.soilHumidity3 : '--'}}%</text>
</view>
</view>
@@ -242,7 +242,7 @@
</view>
<view class="data-content">
<text class="data-label">鍦熷¥娓╁害3(鈩�)</text>
- <text class="data-value">{{currentSoilStation.soilTemperature3 || '--'}}掳C</text>
+ <text class="data-value">{{currentSoilStation.soilTemperature3 !== null && currentSoilStation.soilTemperature3 !== undefined ? currentSoilStation.soilTemperature3 : '--'}}掳C</text>
</view>
</view>
@@ -253,7 +253,7 @@
</view>
<view class="data-content">
<text class="data-label">鍦熷¥婀垮害4(%)</text>
- <text class="data-value">{{currentSoilStation.soilHumidity4 || '--'}}%</text>
+ <text class="data-value">{{currentSoilStation.soilHumidity4 !== null && currentSoilStation.soilHumidity4 !== undefined ? currentSoilStation.soilHumidity4 : '--'}}%</text>
</view>
</view>
@@ -263,7 +263,7 @@
</view>
<view class="data-content">
<text class="data-label">鍦熷¥娓╁害4(鈩�)</text>
- <text class="data-value">{{currentSoilStation.soilTemperature4 || '--'}}掳C</text>
+ <text class="data-value">{{currentSoilStation.soilTemperature4 !== null && currentSoilStation.soilTemperature4 !== undefined ? currentSoilStation.soilTemperature4 : '--'}}掳C</text>
</view>
</view>
@@ -274,7 +274,7 @@
</view>
<view class="data-content">
<text class="data-label">鍦熷¥婀垮害5(%)</text>
- <text class="data-value">{{currentSoilStation.soilHumidity5 || '--'}}%</text>
+ <text class="data-value">{{currentSoilStation.soilHumidity5 !== null && currentSoilStation.soilHumidity5 !== undefined ? currentSoilStation.soilHumidity5 : '--'}}%</text>
</view>
</view>
@@ -284,7 +284,7 @@
</view>
<view class="data-content">
<text class="data-label">鍦熷¥娓╁害5(鈩�)</text>
- <text class="data-value">{{currentSoilStation.soilTemperature5 || '--'}}掳C</text>
+ <text class="data-value">{{currentSoilStation.soilTemperature5 !== null && currentSoilStation.soilTemperature5 !== undefined ? currentSoilStation.soilTemperature5 : '--'}}掳C</text>
</view>
</view>
</view>
@@ -324,8 +324,8 @@
<!-- 鐘舵�佹爮 -->
<view class="status-bar">
<view class="status-item">
- <view class="status-indicator {{currentFertilizerStation.onLine === 1 ? 'online' : 'offline'}}"></view>
- <text class="status-text">{{currentFertilizerStation.onLine === 1 ? '鍦ㄧ嚎' : '绂荤嚎'}}</text>
+ <view class="status-indicator {{currentFertilizerStation.onLine === true ? 'online' : 'offline'}}"></view>
+ <text class="status-text">{{currentFertilizerStation.onLine === true ? '鍦ㄧ嚎' : '绂荤嚎'}}</text>
</view>
<view class="refresh-btn" bind:tap="refreshFertilizerData">
<image class="refresh-icon" src="/images/refresh.svg" />
@@ -340,13 +340,13 @@
<!-- 鎼呮媽寮�鍏� -->
<view class="switch-item">
<text class="switch-label">鎼呮媽</text>
- <switch class="custom-switch" checked="{{currentFertilizerStation.mixingEnabled}}" bindchange="toggleMixing" disabled="{{currentFertilizerStation.onLine !== 1}}" color="#07c160" />
+ <switch class="custom-switch" checked="{{currentFertilizerStation.mixingEnabled}}" bindchange="toggleMixing" disabled="{{currentFertilizerStation.onLine !== true}}" color="#07c160" />
</view>
<!-- 娉ㄨ偉寮�鍏� -->
<view class="switch-item">
<text class="switch-label">娉ㄨ偉</text>
- <switch class="custom-switch" checked="{{currentFertilizerStation.fertilizingEnabled}}" bindchange="toggleFertilizing" disabled="{{currentFertilizerStation.onLine !== 1}}" color="#07c160" />
+ <switch class="custom-switch" checked="{{currentFertilizerStation.fertilizingEnabled}}" bindchange="toggleFertilizing" disabled="{{currentFertilizerStation.onLine !== true}}" color="#07c160" />
</view>
</view>
</view>
@@ -362,7 +362,7 @@
</view>
<view class="data-content">
<text class="data-label">鑲ユ枡娴侀噺(鍗�)</text>
- <text class="data-value">{{currentFertilizerStation.manureFlow || '--'}} L</text>
+ <text class="data-value">{{currentFertilizerStation.manureFlow !== null && currentFertilizerStation.manureFlow !== undefined ? currentFertilizerStation.manureFlow : '--'}} L</text>
</view>
</view>
@@ -373,7 +373,7 @@
</view>
<view class="data-content">
<text class="data-label">娉ㄨ偉鏃堕暱(绉�)</text>
- <text class="data-value">{{currentFertilizerStation.manureTime || '--'}} s</text>
+ <text class="data-value">{{currentFertilizerStation.manureTime !== null && currentFertilizerStation.manureTime !== undefined ? currentFertilizerStation.manureTime : '--'}} s</text>
</view>
</view>
@@ -384,7 +384,7 @@
</view>
<view class="data-content">
<text class="data-label">鎼呮媽鏃堕暱(绉�)</text>
- <text class="data-value">{{currentFertilizerStation.stirTime || '--'}} s</text>
+ <text class="data-value">{{currentFertilizerStation.stirTime !== null && currentFertilizerStation.stirTime !== undefined ? currentFertilizerStation.stirTime : '--'}} s</text>
</view>
</view>
@@ -395,7 +395,7 @@
</view>
<view class="data-content">
<text class="data-label">鎼呮媽璁惧畾鏃堕棿(绉�)</text>
- <text class="data-value">{{currentFertilizerStation.stirDuration || '--'}} s</text>
+ <text class="data-value">{{currentFertilizerStation.stirDuration !== null && currentFertilizerStation.stirDuration !== undefined ? currentFertilizerStation.stirDuration : '--'}} s</text>
</view>
</view>
@@ -406,7 +406,7 @@
</view>
<view class="data-content">
<text class="data-label">娉ㄨ偉璁惧畾鏃堕棿(绉�)</text>
- <text class="data-value">{{currentFertilizerStation.injectDuration || '--'}} s</text>
+ <text class="data-value">{{currentFertilizerStation.injectDuration !== null && currentFertilizerStation.injectDuration !== undefined ? currentFertilizerStation.injectDuration : '--'}} s</text>
</view>
</view>
</view>
@@ -435,13 +435,13 @@
<!-- 鎽勫儚澶村悕绉� -->
<view class="camera-header">
<text class="camera-name">{{item.name}}</text>
- <view class="camera-status {{item.online ? 'online' : 'offline'}}">
- <text>{{item.online ? '鍦ㄧ嚎' : '绂荤嚎'}}</text>
+ <view class="camera-status {{item.onLine === true ? 'online' : 'offline'}}">
+ <text>{{item.onLine === true ? '鍦ㄧ嚎' : '绂荤嚎'}}</text>
</view>
</view>
<!-- 鎽勫儚澶磋棰� -->
- <view class="camera-video-container" style="height: {{deviceSpecificConfig.videoHeight}}rpx;">
+ <view class="camera-video-container" >
<!-- 鍔犺浇鐘舵�� -->
<view wx:if="{{item.isLoadingUrl}}" class="video-loading">
<view class="loading-spinner"></view>
@@ -459,28 +459,13 @@
</view>
<!-- 姝e父鎾斁鐘舵�� -->
- <view wx:elif="{{item.online && item.hslUrl}}" class="video-wrapper">
+ <view wx:elif="{{item.onLine && item.hslUrl}}" class="video-wrapper">
<!-- 鐩存挱鎾斁鍣ㄧ粍浠� -->
- <ezplayer
- id="ezplayer-{{item.id}}"
- accessToken="{{item.accessToken}}"
- url="{{item.hslUrl}}"
- deviceSerial="{{item.deviceSerial}}"
- channelNo="1"
- width="300rpx"
- height="300rpx"
- plugins="talk,voice,capture,ptz,privacy,mirror"
- watermark="澶х"
- autoPlay="{{true}}"
- theme="{{ { showFullScreenBtn: true, showHdBtn: true, showTimeLine: true } }}"
- bind:handleError="handleError"
- bind:onControlEvent="onControlEvent"
- style="width: 100vw; height: 100%; max-width: 100vw; min-width: 100vw; position: absolute; left: 0; right: 0; top: 0; bottom: 0; overflow: hidden; margin: 0; padding: 0; transform: none; border: none; border-radius: 0; box-shadow: none; background: transparent;"
- />
+ <ezplayer class="video-wrapper-ezplayer" id="ezplayer-{{item.id}}" accessToken="{{item.accessToken}}" url="{{item.hslUrl}}" deviceSerial="{{item.deviceSerial}}" channelNo="1" plugins="capture,ptz,mirror" watermark="澶х" autoPlay="{{true}}" theme="{{ { showFullScreenBtn: true, showHdBtn: true, showTimeLine: true } }}" bind:handleError="handleError" bind:onControlEvent="onControlEvent" />
</view>
<!-- 绂荤嚎鐘舵�佹樉绀� -->
- <view wx:elif="{{!item.online}}" class="video-offline">
+ <view wx:elif="{{!item.onLine}}" class="video-offline">
<image class="offline-icon" src="/images/camera.svg" />
<text class="offline-text">璁惧绂荤嚎</text>
</view>
@@ -492,7 +477,7 @@
</view>
</view>
-
+
</view>
</view>
diff --git a/pages/stationMonitor/stationMonitor.wxss b/pages/stationMonitor/stationMonitor.wxss
index 1a97158..b377ea2 100644
--- a/pages/stationMonitor/stationMonitor.wxss
+++ b/pages/stationMonitor/stationMonitor.wxss
@@ -18,7 +18,8 @@
padding: 0;
margin: 0;
background-color: #f5f5f5;
- height: 100vh; /* 鍥哄畾楂樺害涓鸿鍙i珮搴� */
+ height: 100vh;
+ /* 鍥哄畾楂樺害涓鸿鍙i珮搴� */
width: 100%;
box-sizing: border-box;
/* 闃叉浠讳綍婊氬姩 */
@@ -40,13 +41,16 @@
background-color: #fff;
padding: 4rpx 0;
width: 100%;
- flex-shrink: 0; /* 闃叉琚帇缂� */
+ flex-shrink: 0;
+ /* 闃叉琚帇缂� */
box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.05);
border-bottom: 1rpx solid #eaeaea;
- position: sticky; /* 浣跨敤sticky瀹氫綅 */
+ position: sticky;
+ /* 浣跨敤sticky瀹氫綅 */
top: 0;
z-index: 9999;
- background-color: #fff; /* 纭繚鑳屾櫙鑹� */
+ background-color: #fff;
+ /* 纭繚鑳屾櫙鑹� */
/* 鍑忓皬tabs楂樺害 */
height: 100rpx;
box-sizing: border-box;
@@ -152,12 +156,17 @@
box-sizing: border-box;
/* 浣跨敤flex: 1濉厖鍓╀綑绌洪棿 */
flex: 1;
- min-height: 0; /* 鍏佽flex椤圭洰鏀剁缉 */
- overflow-y: auto; /* 鍨傜洿婊氬姩 */
- overflow-x: hidden; /* 闅愯棌姘村钩婊氬姩 */
+ min-height: 0;
+ /* 鍏佽flex椤圭洰鏀剁缉 */
+ overflow-y: auto;
+ /* 鍨傜洿婊氬姩 */
+ overflow-x: hidden;
+ /* 闅愯棌姘村钩婊氬姩 */
/* 闅愯棌婊氬姩鏉� */
- -ms-overflow-style: none; /* IE and Edge */
- scrollbar-width: none; /* Firefox */
+ -ms-overflow-style: none;
+ /* IE and Edge */
+ scrollbar-width: none;
+ /* Firefox */
/* 涓簍abs鐣欏嚭绌洪棿 */
margin-top: 0;
}
@@ -186,6 +195,7 @@
opacity: 0;
transform: translateY(20rpx);
}
+
to {
opacity: 1;
transform: translateY(0);
@@ -466,31 +476,32 @@
.tab-name {
font-size: 20rpx;
}
-
+
.tab-icon {
width: 40rpx;
height: 40rpx;
}
-
+
.tab-item {
padding: 16rpx 2rpx;
- width: 25%; /* 纭繚灏忓睆骞曚笅涔熷潎鍒� */
+ width: 25%;
+ /* 纭繚灏忓睆骞曚笅涔熷潎鍒� */
}
-
+
/* 姘旇薄绔欐暟鎹」鍝嶅簲寮忓瓧浣� */
.weather-data-item .data-label {
font-size: 22rpx;
}
-
+
.weather-data-item .data-value {
font-size: 28rpx;
}
-
+
.weather-data-item .data-icon {
width: 50rpx;
height: 50rpx;
}
-
+
.weather-data-item .data-icon image {
width: 32rpx;
height: 32rpx;
@@ -502,30 +513,30 @@
.tab-name {
font-size: 18rpx;
}
-
+
.tab-icon {
width: 36rpx;
height: 36rpx;
}
-
+
.tab-item {
padding: 12rpx 1rpx;
}
-
+
/* 姘旇薄绔欐暟鎹」瓒呭皬灞忓箷鍝嶅簲寮忓瓧浣� */
.weather-data-item .data-label {
font-size: 20rpx;
}
-
+
.weather-data-item .data-value {
font-size: 24rpx;
}
-
+
.weather-data-item .data-icon {
width: 46rpx;
height: 46rpx;
}
-
+
.weather-data-item .data-icon image {
width: 30rpx;
height: 30rpx;
@@ -536,81 +547,44 @@
.camera-list {
display: flex;
flex-direction: column;
- /* gap: 20rpx; */
- margin: 0;
- width: 100%;
- box-sizing: border-box;
- /* 纭繚鍦ㄤ笉鍚岃澶囦笂鐨勪竴鑷存�� */
- max-width: 100vw;
- overflow-x: hidden;
- /* 鏂板锛氱Щ闄ゅ乏鍙冲唴杈硅窛锛岀‘淇濆畬鍏ㄥ~鍏� */
- /* padding: 0; */
- /* 鏂板锛氬己鍒剁害鏉燂紝闃叉ezplayer瓒呭嚭 */
- /* contain: layout style paint; */
- /* 鏂板锛氬己鍒跺乏瀵归綈锛屾棤浠讳綍杈硅窛 */
- /* left: 0 !important;
- right: 0 !important; */
+ gap: 20rpx;
+
}
.camera-item {
- width: 100%;
- max-width: 100%;
- min-width: 0;
background: white;
- border-radius: 16rpx;
- /* 绉婚櫎宸﹀彸鍐呰竟璺濓紝纭繚瀹屽叏濉厖 */
- padding: 24rpx 0;
- box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);
- box-sizing: border-box;
- margin: 0;
- position: relative;
- overflow: hidden;
- /* 纭繚鍦ㄤ笉鍚岃澶囦笂鐨勬樉绀轰竴鑷存�� */
- flex-shrink: 0;
- flex-grow: 0;
- /* 鏂板锛氬己鍒剁害鏉燂紝闃叉ezplayer瓒呭嚭 */
- contain: layout style paint;
- /* 鏂板锛氬己鍒跺乏瀵归綈锛屾棤浠讳綍杈硅窛 */
- left: 0 !important;
- right: 0 !important;
+ border-radius: 12rpx;
+ margin-bottom: 10rpx;
+
+ box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
}
/* 鎽勫儚澶村ご閮� */
.camera-header {
- width: 100%;
- max-width: 100%;
- min-width: 0;
display: flex;
justify-content: space-between;
align-items: center;
- margin-bottom: 20rpx;
- box-sizing: border-box;
- /* 闃叉鏂囧瓧婧㈠嚭 */
- overflow: hidden;
- margin: 20rpx 10rpx;
+ margin-bottom: 16rpx;
+ margin-top: 15rpx;
+ margin-left: 15rpx;
+ margin-right: 15rpx;
}
.camera-name {
- font-size: 32rpx;
+ font-size: 28rpx;
font-weight: 600;
color: #333;
flex: 1;
- min-width: 0;
- /* 鏂囧瓧婧㈠嚭澶勭悊 */
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.camera-status {
- padding: 8rpx 16rpx;
- border-radius: 20rpx;
- font-size: 24rpx;
+ padding: 6rpx 12rpx;
+ border-radius: 16rpx;
+ font-size: 22rpx;
font-weight: 500;
- white-space: nowrap;
- flex-shrink: 0;
- /* 纭繚鐘舵�佹爣绛句笉琚帇缂� */
- min-width: fit-content;
}
.camera-status.online {
@@ -629,52 +603,42 @@
.camera-video-container {
position: relative;
width: 100%;
- max-width: 100%;
- min-width: 0;
- /* height: 400rpx; */
- /* 绉婚櫎鎵�鏈夎楗版�ф牱寮忥紝纭繚瀹屽叏濉厖 */
- border-radius: 0;
+ height: 100%;
+ border-radius: 8rpx;
overflow: hidden;
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- background-color: transparent;
- border: none;
- /* 纭繚鍦ㄤ笉鍚岃澶囦笂鐨勬樉绀轰竴鑷存�� */
- flex-shrink: 0;
- /* 闃叉ezplayer瓒呭嚭瀹瑰櫒 - 寮哄寲绾︽潫 */
- overflow: hidden !important;
- /* 鏂板锛氱粷瀵瑰畾浣嶇害鏉� */
- position: relative !important;
- /* 鏂板锛氬己鍒跺搴︾害鏉燂紝闃叉ezplayer瓒呭嚭 */
- max-width: 100vw !important;
- /* 鏂板锛氱‘淇濆鍣ㄤ笉浼氳秴鍑虹埗鍏冪礌 */
- contain: layout style paint !important;
- /* 鏂板锛氬己鍒跺乏瀵归綈锛岄槻姝㈠彸绉� */
- left: 0 !important;
- right: 0 !important;
- /* 鏂板锛氬己鍒跺~鍏呮暣涓睆骞� */
- /* width: 100vw !important;
- min-width: 100vw !important; */
+ background-color: #f5f5f5;
}
-/* 绉婚櫎璋冭瘯杈规锛岄伩鍏嶅奖鍝峞zplayer鏄剧ず */
-/* 鍔犺浇鐘舵�� */
-.video-loading {
- width: 100%;
- height: 100%;
- max-width: 100%;
- min-width: 0;
+
+/* 瑙嗛鐘舵�佹牱寮� */
+.video-loading,
+.video-error,
+.video-offline,
+.video-no-url {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
- background-color: #f8f9fa;
- /* 纭繚鍦ㄤ笉鍚岃澶囦笂鐨勬樉绀轰竴鑷存�� */
- flex-shrink: 0;
+ height: 100%;
+ text-align: center;
}
+.video-loading {
+ background-color: #f8f9fa;
+}
+
+.video-error {
+ background-color: #fff2f0;
+ border: 1rpx solid #ffccc7;
+}
+
+.video-offline,
+.video-no-url {
+ background-color: #f5f5f5;
+}
+
+/* 鍔犺浇鍔ㄧ敾 */
.loading-spinner {
width: 60rpx;
height: 60rpx;
@@ -683,8 +647,6 @@
border-radius: 50%;
animation: spin 1s linear infinite;
margin-bottom: 16rpx;
- /* 纭繚鍔ㄧ敾鍦ㄤ笉鍚岃澶囦笂鐨勪竴鑷存�� */
- flex-shrink: 0;
}
@keyframes spin {
@@ -692,650 +654,75 @@
100% { transform: rotate(360deg); }
}
-.loading-text {
- font-size: 26rpx;
+.loading-text,
+.error-text,
+.offline-text,
+.no-url-text {
+ font-size: 24rpx;
color: #666;
- font-weight: 500;
- text-align: center;
- /* 纭繚鏂囧瓧鍦ㄤ笉鍚岃澶囦笂鐨勪竴鑷存�� */
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- max-width: 100%;
-}
-
-/* 閿欒鐘舵�� */
-.video-error {
- width: 100%;
- height: 100%;
- max-width: 100%;
- min-width: 0;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- background-color: #fff2f0;
- border: 1rpx solid #ffccc7;
- /* 纭繚鍦ㄤ笉鍚岃澶囦笂鐨勬樉绀轰竴鑷存�� */
- flex-shrink: 0;
-}
-
-.error-icon {
- width: 80rpx;
- height: 80rpx;
- opacity: 0.6;
- margin-bottom: 16rpx;
- filter: grayscale(100%) brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%);
- /* 纭繚鍥炬爣鍦ㄤ笉鍚岃澶囦笂鐨勪竴鑷存�� */
- flex-shrink: 0;
+ margin-top: 8rpx;
}
.error-text {
- font-size: 26rpx;
color: #ff4d4f;
- font-weight: 500;
- margin-bottom: 20rpx;
- text-align: center;
- /* 纭繚鏂囧瓧鍦ㄤ笉鍚岃澶囦笂鐨勪竴鑷存�� */
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- max-width: 100%;
}
+/* 鍥炬爣鏍峰紡 */
+.error-icon,
+.offline-icon,
+.no-url-icon {
+ width: 60rpx;
+ height: 60rpx;
+ opacity: 0.5;
+}
+
+/* 閲嶈瘯鎸夐挳 */
.retry-btn {
display: flex;
align-items: center;
- gap: 8rpx;
- padding: 12rpx 24rpx;
+ gap: 6rpx;
+ padding: 8rpx 16rpx;
background-color: #ff4d4f;
color: white;
border: none;
- border-radius: 20rpx;
- font-size: 24rpx;
- transition: all 0.3s ease;
- /* 纭繚鎸夐挳鍦ㄤ笉鍚岃澶囦笂鐨勪竴鑷存�� */
- flex-shrink: 0;
- min-width: fit-content;
+ border-radius: 16rpx;
+ font-size: 22rpx;
+ margin-top: 12rpx;
}
.retry-btn:active {
background-color: #cf1322;
- transform: scale(0.98);
}
.retry-icon {
- width: 24rpx;
- height: 24rpx;
- filter: brightness(0) invert(1);
- /* 纭繚鍥炬爣鍦ㄤ笉鍚岃澶囦笂鐨勪竴鑷存�� */
- flex-shrink: 0;
-}
-
-/* 鏃犳挱鏀惧湴鍧�鐘舵�� */
-.video-no-url {
- width: 100%;
- height: 100%;
- max-width: 100%;
- min-width: 0;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- background-color: #f5f5f5;
- /* 纭繚鍦ㄤ笉鍚岃澶囦笂鐨勬樉绀轰竴鑷存�� */
- flex-shrink: 0;
-}
-
-.no-url-icon {
- width: 80rpx;
- height: 80rpx;
- opacity: 0.4;
- margin-bottom: 16rpx;
- filter: grayscale(100%);
- /* 纭繚鍥炬爣鍦ㄤ笉鍚岃澶囦笂鐨勪竴鑷存�� */
- flex-shrink: 0;
-}
-
-.no-url-text {
- font-size: 26rpx;
- color: #999;
- font-weight: 500;
- text-align: center;
- /* 纭繚鏂囧瓧鍦ㄤ笉鍚岃澶囦笂鐨勪竴鑷存�� */
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- max-width: 100%;
-}
-
-.video-wrapper {
- position: relative;
- width: 100%;
- height: 100%;
- max-width: 100%;
- min-width: 0;
- display: flex;
- align-items: center;
- justify-content: center;
- /* 纭繚鍦ㄤ笉鍚岃澶囦笂鐨勬樉绀轰竴鑷存�� */
- flex-shrink: 0;
- /* 闃叉鍐呭婧㈠嚭 */
- overflow: hidden !important;
- /* 鏂板锛氱粷瀵瑰畾浣嶇害鏉� */
- position: relative !important;
- /* 鏂板锛氱Щ闄ゆ墍鏈夎竟璺濆拰鍐呰竟璺� */
- margin: 0 !important;
- padding: 0 !important;
- /* 鏂板锛氬己鍒跺乏瀵归綈 */
- left: 0 !important;
- right: 0 !important;
-}
-
-/* ezplayer缁勪欢鏍峰紡浼樺寲 - 淇瓒呭嚭灞忓箷闂 */
-.video-wrapper ezplayer {
- width: 100% !important;
- height: 100% !important;
- max-width: 100% !important;
- min-width: 0 !important;
- border-radius: 12rpx;
- overflow: hidden !important;
- /* 纭繚鍦ㄤ笉鍚岃澶囦笂鐨勬樉绀轰竴鑷存�� */
- flex-shrink: 0;
- /* 闃叉瓒呭嚭灞忓箷鐨勫叧閿缃� */
- position: absolute !important;
- left: 0 !important;
- right: 0 !important;
- top: 0 !important;
- bottom: 0 !important;
- /* 寮哄埗绾︽潫灏哄 - 淇鏈�灏忓搴﹂棶棰� */
- max-width: 100% !important;
- max-height: 100% !important;
- /* 鏂板锛氬己鍒剁害鏉熷埌鐖跺鍣� */
- transform: none !important;
- transform-origin: center center !important;
- /* 鏂板锛氱‘淇濅笉瓒呭嚭杈圭晫 */
- clip-path: inset(0 0 0 0) !important;
- /* 鏂板锛氶槻姝换浣曞舰寮忕殑婧㈠嚭 */
- contain: layout style paint !important;
- /* 鏂板锛氬己鍒跺搴︾害鏉燂紝瑕嗙洊ezplayer鐨勬渶灏忓搴﹂檺鍒� */
- min-width: 0 !important;
- min-height: 0 !important;
- /* 鏂板锛氱‘淇濈粍浠跺畬鍏ㄧ害鏉熷湪瀹瑰櫒鍐� */
- box-sizing: border-box !important;
- /* 鏂板锛氱Щ闄ゆ墍鏈夎竟璺濆拰鍐呰竟璺� */
- margin: 0 !important;
- padding: 0 !important;
- /* 鏂板锛氬己鍒跺畬鍏ㄥ~鍏呭鍣� */
- inset: 0 !important;
-}
-
-/* 閽堝ezplayer缁勪欢鐨勭壒娈婄害鏉� */
-.video-wrapper ezplayer {
- /* 纭繚缁勪欢涓嶄細瓒呭嚭鐖跺鍣� */
- box-sizing: border-box !important;
- /* 闃叉姘村钩婊氬姩 */
- overflow-x: hidden !important;
- overflow-y: hidden !important;
- /* 纭繚鍦╢lex瀹瑰櫒涓殑琛屼负 */
- flex: 0 0 auto !important;
- /* 闃叉缂╂斁闂 */
- transform-origin: top left !important;
- /* 纭繚杈规鍦嗚鐢熸晥 */
- border-radius: 12rpx !important;
- /* 鏂板锛氬己鍒跺昂瀵哥害鏉� */
- min-width: 0 !important;
- min-height: 0 !important;
- /* 鏂板锛氶槻姝换浣曞舰寮忕殑鎷変几 */
- flex-basis: auto !important;
- flex-grow: 0 !important;
- flex-shrink: 0 !important;
- /* 鏂板锛氱‘淇濆畾浣嶆纭� */
- position: absolute !important;
- top: 0 !important;
- left: 0 !important;
- right: 0 !important;
- bottom: 0 !important;
- /* 鏂板锛氬己鍒跺搴﹀拰楂樺害 */
- width: 100% !important;
- height: 100% !important;
-}
-
-/* 鏂板锛氫笓闂ㄥ鐞唀zplayer鏆傚仠鐘舵�佺殑鏍峰紡 */
-.video-wrapper ezplayer[data-paused="true"],
-.video-wrapper ezplayer.paused {
- /* 寮哄埗绾︽潫瀹藉害锛岄槻姝㈣秴鍑哄睆骞� */
- width: 100% !important;
- max-width: 100% !important;
- min-width: 0 !important;
- /* 纭繚缁勪欢瀹屽叏鍦ㄥ鍣ㄥ唴 */
- position: absolute !important;
- left: 0 !important;
- right: 0 !important;
- /* 闃叉浠讳綍褰㈠紡鐨勬孩鍑� */
- overflow: hidden !important;
- /* 寮哄埗绾︽潫鍒扮埗瀹瑰櫒 */
- contain: layout style paint !important;
-}
-
-/* 鏂板锛氫娇鐢–SS Grid寮哄埗绾︽潫ezplayer */
-.video-wrapper {
- display: grid !important;
- grid-template-columns: 1fr !important;
- grid-template-rows: 1fr !important;
- place-items: stretch !important;
-}
-
-/* 鏂板锛氬彧閽堝鎽勫儚澶寸浉鍏冲厓绱犲己鍒剁害鏉� */
-.camera-list,
-.camera-item,
-.camera-video-container,
-.video-wrapper,
-.camera-header,
-.camera-name,
-.camera-status,
-.camera-video-container > ezplayer,
-.video-wrapper > ezplayer {
- max-width: 100% !important;
- min-width: 0 !important;
- box-sizing: border-box !important;
- overflow: hidden !important;
-}
-
-/* 鏂板锛氬己鍒剁Щ闄ゆ墍鏈夊彲鑳界殑杈硅窛鍜岃楗� */
-.camera-list,
-.camera-item,
-.camera-video-container,
-.video-wrapper {
- margin: 0 !important;
- padding: 0 !important;
- border: none !important;
- border-radius: 0 !important;
- box-shadow: none !important;
- background: transparent !important;
-}
-
-/* 鏂板锛氱壒鍒拡瀵筫zplayer鐨勫己鍒剁害鏉� */
-ezplayer {
- width: 100vw !important;
- height: 100% !important;
- max-width: 100vw !important;
- max-height: 100% !important;
- min-width: 100vw !important;
- min-height: 0 !important;
- position: absolute !important;
- left: 0 !important;
- right: 0 !important;
- top: 0 !important;
- bottom: 0 !important;
- overflow: hidden !important;
- box-sizing: border-box !important;
- contain: layout style paint !important;
- /* 鏂板锛氬己鍒跺~鍏呮暣涓睆骞曞搴� */
- margin: 0 !important;
- padding: 0 !important;
- transform: none !important;
- transform-origin: center center !important;
- /* 鏂板锛氬己鍒剁Щ闄ゆ墍鏈夎楗� */
- border: none !important;
- border-radius: 0 !important;
- box-shadow: none !important;
- background: transparent !important;
- /* 鏂板锛氬己鍒剁害鏉熷埌灞忓箷杈圭紭 */
- inset: 0 !important;
-}
-
-.video-wrapper ezplayer {
- grid-column: 1 !important;
- grid-row: 1 !important;
- place-self: stretch !important;
- /* 寮哄埗瀹屽叏濉厖缃戞牸鍗曞厓鏍� */
- width: 100% !important;
- height: 100% !important;
- max-width: 100% !important;
- max-height: 100% !important;
- min-width: 0 !important;
- min-height: 0 !important;
-}
-
-/* 瑙嗛鍖呰鍣ㄧ殑缁濆瀹氫綅绾︽潫 */
-.video-wrapper {
- position: relative;
- width: 100%;
- height: 100%;
- max-width: 100%;
- min-width: 0;
- display: flex;
- align-items: center;
- justify-content: center;
- /* 纭繚鍦ㄤ笉鍚岃澶囦笂鐨勬樉绀轰竴鑷存�� */
- flex-shrink: 0;
- /* 闃叉鍐呭婧㈠嚭 */
- overflow: hidden !important;
- /* 鏂板锛氱粷瀵瑰畾浣嶇害鏉� */
- position: relative !important;
-}
-
-.live-player {
- width: 100%;
- height: 100%;
- max-width: 100%;
- min-width: 0;
- background-color: #000;
- border-radius: 12rpx;
- /* 纭繚鍦ㄤ笉鍚岃澶囦笂鐨勬樉绀轰竴鑷存�� */
- flex-shrink: 0;
-}
-
-.video-overlay {
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background: rgba(0, 0, 0, 0.3);
- display: flex;
- align-items: center;
- justify-content: center;
- z-index: 10;
-}
-
-.play-overlay {
- width: 80rpx;
- height: 80rpx;
- background: rgba(0, 0, 0, 0.6);
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- transition: all 0.3s ease;
-}
-
-.play-overlay:active {
- transform: scale(0.9);
-}
-
-.play-icon {
- width: 40rpx;
- height: 40rpx;
+ width: 20rpx;
+ height: 20rpx;
filter: brightness(0) invert(1);
}
-.video-info {
- position: absolute;
- bottom: 0;
- left: 0;
- right: 0;
- background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
- padding: 20rpx 16rpx 16rpx;
- color: white;
- display: flex;
- justify-content: space-between;
- align-items: center;
-}
-
-.video-time {
- font-size: 24rpx;
- opacity: 0.9;
-}
-
-.video-status {
- font-size: 22rpx;
- opacity: 0.8;
- color: #52c41a;
-}
-
-/* 鎾斁鎺у埗鎸夐挳 */
-.video-controls {
- position: absolute;
- top: 16rpx;
- right: 16rpx;
- display: flex;
- gap: 12rpx;
- z-index: 20;
-}
-
-.control-btn {
- width: 60rpx;
- height: 60rpx;
- background: rgba(0, 0, 0, 0.6);
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- transition: all 0.3s ease;
-}
-
-.control-btn:active {
- transform: scale(0.9);
- background: rgba(0, 0, 0, 0.8);
-}
-
-.control-icon {
- width: 32rpx;
- height: 32rpx;
- filter: brightness(0) invert(1);
-}
-
-/* 璋冭瘯鎸夐挳 */
-.debug-controls {
- position: absolute;
- bottom: 16rpx;
- right: 16rpx;
- z-index: 20;
-}
-
-.debug-btn {
- padding: 8rpx 16rpx;
- background: rgba(255, 0, 0, 0.7);
- border-radius: 20rpx;
- font-size: 20rpx;
- color: white;
-}
-
-/* 绂荤嚎鐘舵�� */
-.video-offline {
+/* 瑙嗛鎾斁鍣ㄥ鍣� */
+.video-wrapper {
width: 100%;
height: 100%;
- max-width: 100%;
- min-width: 0;
- background-color: #f5f5f5;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- border-radius: 12rpx;
- /* 纭繚鍦ㄤ笉鍚岃澶囦笂鐨勬樉绀轰竴鑷存�� */
- flex-shrink: 0;
}
-.offline-icon {
- width: 80rpx;
- height: 80rpx;
- opacity: 0.4;
- margin-bottom: 16rpx;
- filter: grayscale(100%);
- /* 纭繚鍥炬爣鍦ㄤ笉鍚岃澶囦笂鐨勪竴鑷存�� */
- flex-shrink: 0;
-}
-
-.offline-text {
- font-size: 28rpx;
- color: #999;
- font-weight: 500;
- text-align: center;
- /* 纭繚鏂囧瓧鍦ㄤ笉鍚岃澶囦笂鐨勪竴鑷存�� */
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- max-width: 100%;
-}
-
-/* 鎿嶄綔鎸夐挳 */
-.camera-actions {
+.video-wrapper-ezplayer {
width: 100%;
- max-width: 100%;
- min-width: 0;
- display: flex;
- gap: 16rpx;
- box-sizing: border-box;
- /* 纭繚鍦ㄤ笉鍚岃澶囦笂鐨勬樉绀轰竴鑷存�� */
- flex-shrink: 0;
+ height: 100%;
}
-.action-btn {
- flex: 1;
- height: 72rpx;
- border-radius: 36rpx;
- font-size: 26rpx;
- border: none;
- display: flex;
- align-items: center;
- justify-content: center;
- gap: 8rpx;
- transition: all 0.3s ease;
- box-sizing: border-box;
- /* 纭繚鎸夐挳鍦ㄤ笉鍚岃澶囦笂鐨勪竴鑷存�� */
- min-width: 0;
- overflow: hidden;
-}
-.action-btn.primary {
- background-color: #1890FF;
- color: white;
-}
-.action-btn.primary:active {
- background-color: #096dd9;
- transform: scale(0.98);
-}
-.action-btn.secondary {
- background-color: #f5f5f5;
- color: #666;
- border: 1rpx solid #d9d9d9;
-}
-.action-btn.secondary:active {
- background-color: #e8e8e8;
- transform: scale(0.98);
-}
-/* 绂佺敤鐘舵�� */
-.action-btn[disabled] {
- background-color: #f5f5f5 !important;
- color: #bfbfbf !important;
- border-color: #d9d9d9 !important;
- cursor: not-allowed;
- opacity: 0.6;
- /* 纭繚绂佺敤鐘舵�佸湪涓嶅悓璁惧涓婄殑涓�鑷存�� */
- transform: none !important;
-}
-.action-btn[disabled]:active {
- transform: none !important;
- background-color: #f5f5f5 !important;
-}
-.action-btn.primary[disabled] {
- background-color: #d9d9d9 !important;
- color: #bfbfbf !important;
-}
-.action-btn.secondary[disabled] {
- background-color: #f5f5f5 !important;
- color: #bfbfbf !important;
- border-color: #d9d9d9 !important;
-}
-.action-icon {
- width: 32rpx;
- height: 32rpx;
- /* 纭繚鍥炬爣鍦ㄤ笉鍚岃澶囦笂鐨勪竴鑷存�� */
- flex-shrink: 0;
-}
-/* 鍝嶅簲寮忎紭鍖� - 纭繚鍦ㄤ笉鍚岃澶囦笂鐨勪竴鑷存�� */
-@media (max-width: 400px) {
- .camera-item {
- padding: 20rpx;
- margin-bottom: 16rpx;
- }
-
- .camera-header {
- margin-bottom: 16rpx;
- }
-
- .camera-name {
- font-size: 28rpx;
- }
-
- .camera-status {
- font-size: 22rpx;
- padding: 6rpx 12rpx;
- }
-
- .camera-video-container {
- height: 320rpx;
- margin-bottom: 16rpx;
- }
-
- .action-btn {
- height: 64rpx;
- font-size: 24rpx;
- }
-
- .action-icon {
- width: 28rpx;
- height: 28rpx;
- }
-}
-/* 纭繚鍦ㄤ笉鍚岃澶囦笂鐨勪竴鑷存�� - 棰濆鐨勫吋瀹规�у鐞� */
-.camera-item {
- /* 闃叉鍦ㄤ笉鍚岃澶囦笂鐨勫竷灞�宸紓 */
- transform: translateZ(0);
- backface-visibility: hidden;
- perspective: 1000px;
-}
-.camera-video-container {
- /* 闃叉鍦ㄤ笉鍚岃澶囦笂鐨勬樉绀哄樊寮� */
- transform: translateZ(0);
- backface-visibility: hidden;
-}
-
-/* 淇鍙兘鐨勬孩鍑洪棶棰� */
-.camera-list {
- max-width: 100%;
- overflow: hidden;
- /* 纭繚鍦ㄤ笉鍚岃澶囦笂鐨勪竴鑷存�� */
- transform: translateZ(0);
-}
-
-.camera-item {
- overflow: hidden;
- /* 纭繚鍦ㄤ笉鍚岃澶囦笂鐨勪竴鑷存�� */
- transform: translateZ(0);
-}
-
-/* 閽堝鐪熸満鐨勭壒娈婁紭鍖� */
-@media screen and (max-device-width: 750px) {
- .camera-item {
- /* 鐪熸満涓婂彲鑳介渶瑕佺◢寰皟鏁撮棿璺� */
- margin-bottom: 16rpx;
- }
-
- .camera-video-container {
- /* 鐪熸満涓婂彲鑳介渶瑕佺◢寰皟鏁撮珮搴� */
- height: 380rpx;
- }
-
- .action-btn {
- /* 鐪熸満涓婂彲鑳介渶瑕佺◢寰皟鏁撮珮搴� */
- height: 68rpx;
- }
-}
/* 鍦熷¥澧掓儏绔欎笓鐢ㄦ牱寮� */
.weather-data-item.soil-item {
@@ -1400,8 +787,10 @@
display: flex;
flex-direction: column;
gap: 8rpx;
- min-width: 0; /* 闃叉鍐呭婧㈠嚭 */
- overflow: hidden; /* 闅愯棌婧㈠嚭鍐呭 */
+ min-width: 0;
+ /* 闃叉鍐呭婧㈠嚭 */
+ overflow: hidden;
+ /* 闅愯棌婧㈠嚭鍐呭 */
}
.weather-data-item.soil-item .data-label {
@@ -1409,9 +798,12 @@
color: #333;
font-weight: 500;
line-height: 1.4;
- white-space: nowrap; /* 闃叉鏍囩鎹㈣ */
- overflow: hidden; /* 闅愯棌婧㈠嚭鍐呭 */
- text-overflow: ellipsis; /* 鏄剧ず鐪佺暐鍙� */
+ white-space: nowrap;
+ /* 闃叉鏍囩鎹㈣ */
+ overflow: hidden;
+ /* 闅愯棌婧㈠嚭鍐呭 */
+ text-overflow: ellipsis;
+ /* 鏄剧ず鐪佺暐鍙� */
}
.weather-data-item.soil-item .data-value {
@@ -1419,9 +811,12 @@
color: #1890ff;
font-weight: 700;
line-height: 1.2;
- white-space: nowrap; /* 闃叉鏁板�兼崲琛� */
- overflow: hidden; /* 闅愯棌婧㈠嚭鍐呭 */
- text-overflow: ellipsis; /* 鏄剧ず鐪佺暐鍙� */
+ white-space: nowrap;
+ /* 闃叉鏁板�兼崲琛� */
+ overflow: hidden;
+ /* 闅愯棌婧㈠嚭鍐呭 */
+ text-overflow: ellipsis;
+ /* 鏄剧ず鐪佺暐鍙� */
}
/* 鍦熷¥澧掓儏绔欏浘鏍囦紭鍖� */
@@ -1451,30 +846,30 @@
grid-template-columns: 1fr 1fr;
gap: 12rpx;
}
-
+
.weather-data-item.soil-item {
padding: 16rpx;
margin-bottom: 8rpx;
}
-
+
.weather-data-item.soil-item .data-label {
font-size: 22rpx;
}
-
+
.weather-data-item.soil-item .data-value {
font-size: 28rpx;
}
-
+
.weather-data-item.soil-item .data-icon {
width: 50rpx;
height: 50rpx;
}
-
+
.weather-data-item.soil-item .data-icon image {
width: 32rpx;
height: 32rpx;
}
-}
+}
/* 瓒呭皬灞忓箷鍝嶅簲寮忎紭鍖� */
@media (max-width: 320px) {
@@ -1482,25 +877,25 @@
grid-template-columns: 1fr 1fr;
gap: 8rpx;
}
-
+
.weather-data-item.soil-item {
padding: 12rpx;
margin-bottom: 6rpx;
}
-
+
.weather-data-item.soil-item .data-label {
font-size: 20rpx;
}
-
+
.weather-data-item.soil-item .data-value {
font-size: 24rpx;
}
-
+
.weather-data-item.soil-item .data-icon {
width: 46rpx;
height: 46rpx;
}
-
+
.weather-data-item.soil-item .data-icon image {
width: 30rpx;
height: 30rpx;
@@ -1707,138 +1102,52 @@
padding: 12rpx 16rpx;
margin-bottom: 16rpx;
}
-
+
.section-title {
font-size: 24rpx;
margin-bottom: 12rpx;
}
-
+
.switch-container {
gap: 40rpx;
}
-
+
.switch-item {
gap: 12rpx;
}
-
+
.switch-label {
font-size: 22rpx;
}
-
+
.custom-switch {
transform: scale(1.0);
}
-
+
.monitoring-data .data-grid {
grid-template-columns: 1fr;
gap: 16rpx;
}
-
+
.monitoring-data .data-item {
padding: 20rpx;
}
-
+
.monitoring-data .data-item .data-label {
font-size: 24rpx;
}
-
+
.monitoring-data .data-item .data-value {
font-size: 32rpx;
}
-
+
.monitoring-data .data-item .data-icon {
width: 50rpx;
height: 50rpx;
}
-
+
.monitoring-data .data-item .data-icon image {
width: 32rpx;
height: 32rpx;
}
-}
-
-/* ezplayer缁勪欢鏍峰紡 - 闃叉鍙樺舰鍜岃秴鍑哄睆骞� */
-.video-wrapper ezplayer {
- /* 鍩虹灏哄绾︽潫 */
- width: 100% !important;
- height: 100% !important;
- max-width: 100% !important;
- max-height: 100% !important;
- min-width: 0 !important;
- min-height: 0 !important;
-
- /* 浣嶇疆绾︽潫 */
- position: relative !important;
- left: 0 !important;
- right: 0 !important;
- top: 0 !important;
- bottom: 0 !important;
-
- /* 婧㈠嚭鎺у埗 */
- overflow: hidden !important;
- clip-path: inset(0 0 0 0) !important;
-
- /* 鍙樻崲绾︽潫 */
- transform: none !important;
- transform-origin: center center !important;
-
- /* 甯冨眬绾︽潫 */
- contain: layout style paint !important;
- flex-basis: auto !important;
- flex-grow: 0 !important;
- flex-shrink: 0 !important;
-
- /* 鐩掓ā鍨嬬害鏉� */
- box-sizing: border-box !important;
- margin: 0 !important;
- padding: 0 !important;
-
- /* 娓叉煋浼樺寲 */
- backface-visibility: hidden !important;
- perspective: 1000px !important;
- will-change: auto !important;
-
- /* 鐪熸満鐗规畩澶勭悊 */
- -webkit-transform: none !important;
- -webkit-transform-origin: center center !important;
- -webkit-backface-visibility: hidden !important;
- -webkit-perspective: 1000px !important;
-}
-
-/* 鐪熸満涓婄殑鐗规畩绾︽潫 */
-@media screen and (max-device-width: 750px) {
- .video-wrapper ezplayer {
- /* 鐪熸満涓婃洿涓ユ牸鐨勭害鏉� */
- max-width: 100vw !important;
- max-height: 100vh !important;
- left: 0 !important;
- right: 0 !important;
- top: 0 !important;
- bottom: 0 !important;
-
- /* 闃叉鐪熸満涓婄殑缂╂斁闂 */
- -webkit-transform: scale(1) !important;
- transform: scale(1) !important;
-
- /* 鐪熸満涓婄殑婧㈠嚭鎺у埗 */
- overflow: hidden !important;
- clip: rect(0, auto, auto, 0) !important;
- }
-}
-
-/* 鏆傚仠鐘舵�佺殑鐗规畩澶勭悊 */
-.video-wrapper ezplayer[data-paused="true"] {
- /* 鏆傚仠鏃朵繚鎸佸昂瀵� */
- width: 100% !important;
- height: 100% !important;
- max-width: 100% !important;
- max-height: 100% !important;
-
- /* 鏆傚仠鏃堕槻姝㈠彉褰� */
- transform: none !important;
- -webkit-transform: none !important;
-
- /* 鏆傚仠鏃剁殑婧㈠嚭鎺у埗 */
- overflow: hidden !important;
- clip-path: inset(0 0 0 0) !important;
-}
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/project.private.config.json b/project.private.config.json
index e555d42..fd2b01a 100644
--- a/project.private.config.json
+++ b/project.private.config.json
@@ -3,7 +3,7 @@
"projectname": "irrigate_user",
"setting": {
"compileHotReLoad": true,
- "urlCheck": false
+ "urlCheck": true
},
"libVersion": "3.9.1"
}
\ No newline at end of file
diff --git a/utils/projectConfig.js b/utils/projectConfig.js
index 543a770..d2aa764 100644
--- a/utils/projectConfig.js
+++ b/utils/projectConfig.js
@@ -4,8 +4,8 @@
URL_233: 'https://wanzheng.dayuyanjiuyuan.top/',
URL_55: 'https://irrigate.dayuyanjiuyuan.top/',
URL_166: 'https://wanzheng.dayuyanjiuyuan.top/frp/',
- // URL_121: 'https://shifanqu1.dayuyanjiuyuan.top/',
- URL_121: 'https://wanzheng.dayuyanjiuyuan.top/frp/',
+ URL_121: 'https://shifanqu1.dayuyanjiuyuan.top/',
+ // URL_121: 'https://wanzheng.dayuyanjiuyuan.top/frp/',
URL_87: 'http://192.168.10.87:54321/'
};
--
Gitblit v1.8.0