Parcourir la source

websocekt升级

shilin il y a 4 ans
Parent
commit
257309d6c1

+ 3 - 3
components/detail/Detail.vue

@@ -141,7 +141,7 @@ export default {
 			// 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
 			this.socketTask_targetdetail_target = uni.connectSocket({
 				// 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
-				url: 'ws://'+this.backStageIp+':'+this.backStagePort+'/websocket/pageNumber_8/functionNumber_1',
+				url: 'ws://'+this.backStageIp+':'+this.backStagePort+'/websocket/pageNumber_8/functionNumber_1/all',
 				success(data) {
 					console.log('websocket连接成功');
 				}
@@ -198,7 +198,7 @@ export default {
 			// 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
 			this.socketTask_targetdetail_curve = uni.connectSocket({
 				// 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
-				url: 'ws://'+this.backStageIp+':'+this.backStagePort+'/websocket/pageNumber_8/functionNumber_2',
+				url: 'ws://'+this.backStageIp+':'+this.backStagePort+'/websocket/pageNumber_8/functionNumber_2/all',
 				success(data) {
 					console.log('websocket连接成功');
 				}
@@ -291,7 +291,7 @@ export default {
 			// 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
 			this.socketTask_targetdetail_histogram = uni.connectSocket({
 				// 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
-				url: 'ws://'+this.backStageIp+':'+this.backStagePort+'/websocket/pageNumber_8/functionNumber_3',
+				url: 'ws://'+this.backStageIp+':'+this.backStagePort+'/websocket/pageNumber_8/functionNumber_3/all',
 				success(data) {
 					console.log('websocket连接成功');
 				}

+ 5 - 5
components/weatherProphethomepage/WeatherProphethomepage.vue

@@ -1068,7 +1068,7 @@
 				// 按小时数据
 				this.socketTaskHour = uni.connectSocket({
 					// 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
-					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_3/functionNumber_2',
+					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_3/functionNumber_2/all',
 					success(data) {
 						console.log("websocket连接成功");
 					},
@@ -1076,7 +1076,7 @@
 				// 今天数据
 				this.socketTaskToday = uni.connectSocket({
 					// 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
-					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_2/functionNumber_1',
+					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_2/functionNumber_1/all',
 					success(data) {
 						console.log("websocket连接成功");
 					},
@@ -1152,7 +1152,7 @@
 				// 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
 				this.socketTask7 = uni.connectSocket({
 					// 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
-					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_3/functionNumber_1',
+					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_3/functionNumber_1/all',
 					success(data) {
 						console.log("websocket连接成功");
 					},
@@ -1202,7 +1202,7 @@
 				let _this = this;
 				this.socketTask8_15 = uni.connectSocket({
 					// 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
-					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_4/functionNumber_1',
+					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_4/functionNumber_1/all',
 					success(data) {
 						console.log("websocket连接成功");
 					},
@@ -1250,7 +1250,7 @@
 				// 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
 				this.socketTask40 = uni.connectSocket({
 					// 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
-					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_5/functionNumber_1',
+					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_5/functionNumber_1/all',
 					success(data) {
 						console.log("websocket连接成功");
 					},

+ 2 - 2
components/weatherProphethomepage/weatherDetail/Detail.vue

@@ -266,7 +266,7 @@
 				// 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
 				this.socketTask = uni.connectSocket({
 					// 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
-					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_3/functionNumber_2',
+					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_3/functionNumber_2/all',
 					success(data) {
 						console.log("websocket连接成功");
 					},
@@ -319,7 +319,7 @@
 				// } else {
 				// 	console.log("您的浏览器支持WebSocket");
 				// 	//实现化WebSocket对象,指定要连接的服务器地址与端口  建立连接
-				// 	this.socket = new WebSocket("ws://49.4.78.143:8081/websocket/pageNumber_3/functionNumber_2");
+				// 	this.socket = new WebSocket("ws://49.4.78.143:8081/websocket/pageNumber_3/functionNumber_2/all");
 				// 	this.openSocket();
 				// 	//获得消息事件
 				// 	this.socket.onmessage = function onMessage(message) {

+ 5 - 5
components/windStationCardDetail/WindStationCardDetail.vue

@@ -273,7 +273,7 @@
 				// 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
 				this.socketTask_comprehensive_target = uni.connectSocket({
 					// 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
-					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_7/functionNumber_1',
+					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_7/functionNumber_1/all',
 					success(data) {
 						console.log('websocket连接成功');
 					}
@@ -307,7 +307,7 @@
 				// 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
 				this.socketTask_windpowerstationdetail_springbox_target = uni.connectSocket({
 					// 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
-					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_7/functionNumber_2',
+					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_7/functionNumber_2/all',
 					success(data) {
 						console.log('websocket连接成功');
 					}
@@ -331,7 +331,7 @@
 				// 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
 				this.socketTask_index_windSpeed_power_target_detail = uni.connectSocket({
 					// 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
-					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_7/functionNumber_3',
+					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_7/functionNumber_3/all',
 					success(data) {
 						console.log('websocket连接成功');
 					}
@@ -355,7 +355,7 @@
 				// 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
 				this.socketTask_windpowerstationdetail_twentyfourhourlinechart_target = uni.connectSocket({
 					// 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
-					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_7/functionNumber_4',
+					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_7/functionNumber_4/all',
 					success(data) {
 						console.log('websocket连接成功');
 					}
@@ -383,7 +383,7 @@
 							// 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
 							this.socketTask_windpowerstationdetail_sevendaycolumn_target = uni.connectSocket({
 								// 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
-								url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_7/functionNumber_5',
+								url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_7/functionNumber_5/all',
 								success(data) {
 									console.log('websocket连接成功');
 								}

+ 1 - 1
pages/forecast/Forecast.vue

@@ -581,7 +581,7 @@ export default {
 			// 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
 			this.socketTask_bracelet = uni.connectSocket({
 				/* 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】 */
-				url: 'ws://' + _this.backStageIp + ':' + _this.backStagePort + '/websocket/pageNumber_9/functionNumber_1',
+				url: 'ws://' + _this.backStageIp + ':' + _this.backStagePort + '/websocket/pageNumber_9/functionNumber_1/all',
 				success(data) {
 					console.log('websocket连接成功');
 				}

+ 10 - 10
pages/index/Index.vue

@@ -652,7 +652,7 @@
 				// 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
 				this.socketTask_index_curve_columnar_five_loss = uni.connectSocket({
 					// 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
-					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_6/functionNumber_7',
+					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_6/functionNumber_7/all',
 					success(data) {
 						console.log('websocket连接成功');
 					}
@@ -853,7 +853,7 @@
 				// 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
 				this.socketTask_index_windStation_card = uni.connectSocket({
 					// 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
-					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_6/functionNumber_8',
+					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_6/functionNumber_8/all',
 					success(data) {
 						console.log('websocket连接成功');
 					}
@@ -877,7 +877,7 @@
 				// 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
 				this.socketTask_index_windStation_card = uni.connectSocket({
 					// 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
-					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_6/functionNumber_8',
+					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_6/functionNumber_8/all',
 					success(data) {
 						console.log('websocket连接成功');
 					}
@@ -924,8 +924,8 @@
 				// 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
 				this.socketTask_index_curve_columnar_windSpeed_power = uni.connectSocket({
 					// 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
-					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_6/functionNumber_6',
-					/* url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_7/functionNumber_4', */
+					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_6/functionNumber_6/all',
+					/* url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_7/functionNumber_4/all', */
 					success(data) {
 						console.log('websocket连接成功');
 					}
@@ -1544,7 +1544,7 @@
 				// 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
 				this.socketTask_target_comprehensive_indicators = uni.connectSocket({
 					// 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
-					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_6/functionNumber_1',
+					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_6/functionNumber_1/all',
 					success(data) {
 						console.log('websocket连接成功');
 					}
@@ -1577,7 +1577,7 @@
 				// 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
 				this.socketTask_target_windSpeed_power = uni.connectSocket({
 					// 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
-					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_6/functionNumber_2',
+					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_6/functionNumber_2/all',
 					success(data) {
 						console.log('websocket连接成功');
 					}
@@ -1609,7 +1609,7 @@
 				// 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
 				this.socketTask_index_windturbine_status = uni.connectSocket({
 					// 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
-					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_6/functionNumber_3',
+					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_6/functionNumber_3/all',
 					success(data) {
 						console.log('websocket连接成功');
 					}
@@ -1652,7 +1652,7 @@
 				// 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
 				this.socketTask_index_electricQuantity = uni.connectSocket({
 					// 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
-					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_6/functionNumber_4',
+					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_6/functionNumber_4/all',
 					success(data) {
 						console.log('websocket连接成功');
 					}
@@ -1688,7 +1688,7 @@
 				// 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
 				this.socketTask_index_target_basic_indicators = uni.connectSocket({
 					// 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
-					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_6/functionNumber_5',
+					url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_6/functionNumber_5/all',
 					success(data) {
 						console.log('websocket连接成功');
 					}