Bläddra i källkod

feat:宁录更新

yf_elsa.cui 1 månad sedan
förälder
incheckning
9980bface0

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "宁录智控",
     "appid" : "__UNI__4A1DC76",
     "description" : "",
-    "versionName" : "1.14.10",
-    "versionCode" : 11410,
+    "versionName" : "1.1.1",
+    "versionCode" : 111,
     "transformPx" : false,
     "sassImplementationName" : "node-sass",
     /* 5+App特有相关 */

+ 1 - 1
pages/environment/equipment.vue

@@ -356,7 +356,7 @@
 		onLoad(option) {
 			this.$forceUpdate()
 			this.eqinfo.item = JSON.parse(option.shebei)
-			console.log(JSON.parse(option.shebei))
+			console.log(JSON.parse(option.shebei),'接受的值')
 
 			if (!this.eqinfo.item.iccid) {
 				this.getbaseinfo(this.eqinfo.item.equip_id)

+ 16 - 0
pages/equipList/index.vue

@@ -392,6 +392,15 @@ export default {
             url: '../environment/equipment?shebei=' + JSON.stringify(obj),
           });
           break;
+		  case 44:
+		  uni.navigateTo({
+		    url:
+		      '/pages/webview?device_id=' +
+		      item.imei+
+		      '&accessToken=' +
+		      this.accessToken+'&type=dgp',
+		  });
+		  break;
         case 6:
           uni.navigateTo({
             url:
@@ -612,6 +621,13 @@ export default {
             url: `../cb/wenshizs/detail?devBid=${item.devBid}&devName=${item.device_name}&devStatus=${item.devStatus}`,
           });
           break;
+		  case 43:
+		    item.addtime = item.uptime;
+			uni.navigateTo({
+				url: "../fmSys/details?info=" + JSON.stringify(item)
+			})
+		    break;
+
         default:
           item.addtime = item.uptime;
           item.type = this.type_id;

+ 2 - 0
pages/fmSys/details.vue

@@ -1,5 +1,6 @@
 <template>
 	<view class="fm-page">
+		<!-- <view class="status_bar"></view> -->
 		<uni-nav-bar left-icon="back" background-color='rgba(0,0,0,0)' title="闸门" @clickLeft="clickLeft">
 			<!-- 	<view class="self-title">标题栏</view>
 			<template v-slot:left><view class="self-back"><uni-icons type="arrowleft" size="24"></uni-icons></view></template>
@@ -537,6 +538,7 @@
 			width: 100%;
 			min-height: 100%;
 			background: linear-gradient(180deg, #f5f6fa00 0%, #F5F6FA 23.64%, #F5F6FA 100%), linear-gradient(102deg, #BFEADD 6.77%, #B8F1E7 40.15%, #B9EEF5 84.02%);
+			padding-top: 44rpx;
 		}
 
 		.fm-content {

+ 12 - 1
pages/fourBase/basefacility.vue

@@ -105,7 +105,7 @@
 				switch (items.equip_type){
 					case 5 :
 						uni.navigateTo({
-							url: "../environment/equipment?shebei=" + JSON.stringify(items)
+							url: "../environment/equipment?shebei=" + item
 						})
 					break
 					case 6 :
@@ -113,6 +113,17 @@
 							url: "/pages/webview?device_id=" + items.device_id + "&accessToken=" + this.accessToken
 						})
 					break
+					case 43:
+					  
+								uni.navigateTo({
+									url: "../fmSys/details?info=" + item
+								})
+					  break;
+					case 44 :
+						uni.navigateTo({
+							url: "/pages/webview?device_id=" + items.device_id + "&accessToken=" + this.accessToken +'&type=dgp'
+						})
+					break
 					case 10 :
 						uni.navigateTo({
 							url: '/pages/cb/xy2.0/particulars?info=' + item

+ 1 - 1
pages/index/index.vue

@@ -9,7 +9,7 @@
 					{{hello}}
 				</view>
 				<view class="">
-					{{$isneutral?"欢迎登录云飞智控":"欢迎登录智控"}}
+					{{$isneutral?"欢迎登录云飞智控":"欢迎登录宁录智控"}}
 				</view>
 			</view>
 		</view>

+ 2 - 2
pages/irrigate/index.vue

@@ -198,7 +198,7 @@
 					pageIndex: 1,
 					tf: false,
 				}, {
-					name: '阀门控制器',
+					name: '阀',
 					type: 'fm', //阀门控制器
 					list: [],
 					pageIndex: 1,
@@ -570,7 +570,7 @@
 							case 400:
 								this.equipArr[4].tf = true
 								break;
-							case 398:
+							case 407:
 								this.equipArr[5].tf = true
 								break;
 						}

+ 1 - 1
pages/login/login.vue

@@ -2,7 +2,7 @@
   <view class="bg-img">
     <!-- <view class="status_bar"></view> -->
     <view class="apptitle" @longpress="logoTime">
-      {{ $isneutral ? '云飞智控' : '智控' }}
+      {{ $isneutral ? '云飞智控' : '宁录智控' }}
     </view>
     <view class="set" @click="set" v-if="setTF">
       <u-icon name="setting-fill" size="50" color="#fff"></u-icon>

+ 4 - 2
pages/webview.vue

@@ -11,14 +11,16 @@
 			return {
 				url: '',
 				device_id: '',
-				accessToken: ''
+				accessToken: '',
+				type:''
 			}
 		},
 		onLoad(options) {
 			this.device_id = options.device_id
 			this.accessToken = options.accessToken
+			this.type = options.type
 			// this.url = "http://8.136.98.49/#/recognition"
-			this.url = "/static/h52.html?device_id=" + this.device_id + "&accessToken=" + this.accessToken
+			this.url = "/static/h52.html?device_id=" + this.device_id + "&accessToken=" + this.accessToken + "&type="+ this.type
 			// uni.setStorage({
 			// 	key: 'obj',
 			// 	data: JSON.stringify({

+ 107 - 46
static/h52.html

@@ -187,12 +187,13 @@
 		//上下左右和拍照
 		var str = window.location.search.substr(1)
 		var arr = str.split('&')
-		// console.log(str);
+		console.log(str,arr);
 		var device_id = arr[0].split('=')[1]
 		// console.log(device_id);
 		var accessToken = arr[1].split('=')[1]
-		var token=localStorage.getItem('session_key')
-		// console.log(accessToken)
+		var videoType = arr[2]?.split('=')[1]
+		var token = localStorage.getItem('session_key')
+		console.log(videoType)
 		window._configCamera = configCamera;
 		window._stopConfigCamera = stopConfigCamera;
 		window._postPic = postPic;
@@ -203,9 +204,13 @@
 					// 云联的拍照特殊处理
 					player.screenshot('yunlianPlayer')
 				} else {
+					let url = "http://47.110.79.22:9000/api/api_gateway?method=camera.camera_manage.camera_takephoto"
+					if(videoType=='dgp'){
+						url = "http://47.110.79.22:9000/api/api_gateway?method=camera.camera_manage.multi_camera_takephoto"
+					}
 					$.ajax({
 						type: "POST",
-						url: "https://wx.hnyfwlw.com/api/api_gateway?method=camera.camera_manage.camera_takephoto",
+						url: url,
 						data: {
 							device_id: device_id,
 							token
@@ -221,16 +226,23 @@
 				}
 
 			} else {
-				//上下左右、放大、缩小
-				$.ajax({
-					type: "POST",
-					url: "https://wx.hnyfwlw.com/api/api_gateway?method=camera.camera_manage.ctrl_camera",
-					data: {
+				let url = "http://47.110.79.22:9000/api/api_gateway?method=camera.camera_manage.ctrl_camera"
+				let postData = {
 						device_id: device_id,
-						ctrl: ctrl,
-						movenum: movenum,
 						token
 					}
+				if(videoType=='dgp'){
+					url = "http://47.110.79.22:9000/api/api_gateway?method=camera.camera_manage.multi_ctrl_camera"
+					postData.ctrl = movenum
+				}else{
+					postData.ctrl = ctrl
+					postData.movenum = movenum
+				}
+				//上下左右、放大、缩小
+				$.ajax({
+					type: "POST",
+					url: url,
+					data: postData
 				}).then((res) => {
 					$('#dialog').html('指令下发成功,请等待...').stop().show(500).delay(3000).hide(500)
 				})
@@ -238,13 +250,13 @@
 		}
 
 		function stopConfigCamera() {
-			if (player) {
-				// 云联监控不需要这个指令
+
+			if(videoType=='dgp'){
 				return
 			}
 			$.ajax({
 				type: "POST",
-				url: "https://wx.hnyfwlw.com/api/api_gateway?method=camera.camera_manage.ctrl_camera",
+				url: "http://47.110.79.22:9000/api/api_gateway?method=camera.camera_manage.ctrl_camera",
 				data: {
 					device_id: device_id,
 					ctrl: "stop",
@@ -260,12 +272,12 @@
 			form.append('token', token)
 			$.ajax({
 				type: "POST",
-				url: "https://wx.hnyfwlw.com/api/api_gateway?method=camera.camera_manage.save_camera_photo",
-				contentType : false,
-				processData : false,
+				url: "http://47.110.79.22:9000/api/api_gateway?method=camera.camera_manage.save_camera_photo",
+				contentType: false,
+				processData: false,
 				data: form
 			}).then((res) => {
-			
+
 				if (res.message == '') {
 					$('#dialog').html('拍照成功').stop().show(500).delay(1500).hide(500)
 				} else {
@@ -316,32 +328,26 @@
 
 		$('.videoBtnPlay').click(function() {
 			$('.videoBtnPlay').hide()
-			$.ajax({
-				type: "POST",
-				url: "https://wx.hnyfwlw.com/api/api_gateway?method=camera.camera_manage.addr_camera",
-				// url: "http://192.168.0.117:8003/api/api_gateway?method=camera.camera_manage.addr_camera",
-				data: {
-					device_id: device_id,
-					token
-					// device_id: 'FA8690323-1',
-					// token: localStorage.getItem('session_key')
-				}
-			}).then((res) => {
-				// console.log(JSON.stringify(res))
-				if (res.message == '') {
-					var data = null
-					if (typeof res.data == 'string') {
-						data = eval('(' + res.data + ')');
-					} else {
-						data = res.data;
+			if (videoType == 'dgp') {
+				$.ajax({
+					type: "POST",
+					url: "http://47.110.79.22:9000/api/api_gateway?method=camera.camera_manage.multi_addr_camera",
+					data: {
+						device_id: device_id,
+						token
 					}
-					console.log(data, 'data');
-					if (data.type_id == 2) {
-						// 大华云联
-						initYunlianPlayer(data.rtsp)
+				}).then((res) => {
+					// console.log(JSON.stringify(res))
+					if (res.message == '') {
+						var data = null
+						if (typeof res.data == 'string') {
+							data = eval('(' + res.data + ')');
+						} else {
+							data = res.data;
+						}
+						console.log(data, 'data');
 
-					} else {
-						let hlsHdSrc = data.type_id == 0 ? data.hls : data.hlsHd;
+						let hlsHdSrc = data.rtmp;
 						var playHtml =
 							`<video id="myPlayer"   poster='' controls playsInline  webkit-playsinline src=${hlsHdSrc}  style="width:100%; height:100%;"></video>`;
 						$("#box").html(playHtml)
@@ -360,13 +366,68 @@
 						myVideo.on('play', function() {
 							console.log('开始播放')
 						})
+
+
+					} else {
+						alert(res.message)
 					}
 
-				} else {
-					alert(res.message)
-				}
+				})
 
-			})
+			} else {
+				$.ajax({
+					type: "POST",
+					url: "http://47.110.79.22:9000/api/api_gateway?method=camera.camera_manage.addr_camera",
+					// url: "http://192.168.0.117:8003/api/api_gateway?method=camera.camera_manage.addr_camera",
+					data: {
+						device_id: device_id,
+						token
+						// device_id: 'FA8690323-1',
+						// token: localStorage.getItem('session_key')
+					}
+				}).then((res) => {
+					// console.log(JSON.stringify(res))
+					if (res.message == '') {
+						var data = null
+						if (typeof res.data == 'string') {
+							data = eval('(' + res.data + ')');
+						} else {
+							data = res.data;
+						}
+						console.log(data, 'data');
+						if (data.type_id == 2) {
+							// 大华云联
+							initYunlianPlayer(data.rtsp)
+
+						} else {
+							let hlsHdSrc = data.type_id == 0 ? data.hls : data.hlsHd;
+							var playHtml =
+								`<video id="myPlayer"   poster='' controls playsInline  webkit-playsinline src=${hlsHdSrc}  style="width:100%; height:100%;"></video>`;
+							$("#box").html(playHtml)
+							var myVideo = videojs(`myPlayer`, {
+								controls: true,
+								autoplay: 'play',
+								url: hlsHdSrc,
+								sources: [{
+									type: 'application/x-mpegURL',
+									src: hlsHdSrc,
+								}],
+							}, function onPlayerReady() {
+								myVideo.play()
+								console.log('准备好了')
+							});
+							myVideo.on('play', function() {
+								console.log('开始播放')
+							})
+						}
+
+					} else {
+						alert(res.message)
+					}
+
+				})
+
+			}
 
 		})
 		document.addEventListener('UniAppJSBridgeReady', function() {

+ 1 - 1
util/neutral.js

@@ -3,7 +3,7 @@ export default {
   isneutral: false, //智控
   developAPI:'http://218.28.198.186:10508',//测试环境访问地址
   // productAPI:'http://8.136.98.49:8002',//生产环境
-  productAPI:'https://api.hnyfwlw.com',//生产环境
+  productAPI:'http://47.110.79.22:9000',//生产环境
   // imageURL:'http://www.hnyfwlw.com:8006',//图片访问路径
   imageURL:'https://s3.hnyfwlw.com/webstaticimg',//图片访问路径
 };