Forráskód Böngészése

[app]升级代码,发布稳定版本

wzz 2 éve
szülő
commit
3db90f07e9

+ 13 - 13
code/HBX/App.vue

@@ -1,6 +1,6 @@
 <script>
 	import {
-		
+
 	} from './common/api.js'
 	import {getAuthsArr,BeforeNavigateTo} from './common/utils.js'
 	//#ifdef APP-PLUS
@@ -23,33 +23,33 @@
 			//#ifdef APP-PLUS
 		   setTimeout(() =>{
 			//   APPUpdate()
-		   },5000)	
+		   },5000)
 			const _handlePush =(message) => {
 				uni.switchTab({
 					url:'/pages/native/news'
 				})
 				console.log(message)
-			};  
-			plus.push.addEventListener('click', (message) => {  
-				_handlePush(message);  
-			});  
-			plus.push.addEventListener('receive',(message) => {  
-				_handlePush(message);  
-			});  
-			// #endif  
+			};
+			plus.push.addEventListener('click', (message) => {
+				_handlePush(message);
+			});
+			plus.push.addEventListener('receive',(message) => {
+				_handlePush(message);
+			});
+			// #endif
 		},
 		onShow: function() {
-			
+
 			console.log('App Show')
 		},
 		onHide: function() {
 			uni.closeSocket();
 			console.log('App Hide')
 		}
-	}
+    }
 </script>
 
 <style lang="scss">
 @import "@/static/iconfont.css";
 @import '@/common/common.css';
-</style>
+</style>

+ 18 - 2
code/HBX/common/api.js

@@ -64,6 +64,14 @@ export function updatePassword(data) { //修改密码
 	)
 }
 
+export function updateMsgStatus(data) { //修改消息接收
+	return new RequestFun().fetch(
+		'/app/user/updateMsgStatus',
+		'POST',
+		data
+	)
+}
+
 export function addTask(data) { //创建任务
 	return new RequestFun().fetch(
 		'/app/task/addTask',
@@ -142,6 +150,14 @@ export function readAll(data) { //全部标记已读
 	)
 }
 
+export function getReadNum(data) { //全部标记已读
+    return new RequestFun().fetch(
+        '/app/data/getNewMsgCount',
+        'GET',
+        data
+    )
+}
+
 export function readMsg(data) { //标记已读
 	return new RequestFun().fetch(
 		'/app/data/readMsg',
@@ -159,7 +175,7 @@ export function getCheckData(data,complete) { //查询巡检数据
 	)
 }
 
-export function getImage(data,) { //查询巡检图片
+export function getImage(data) { //查询巡检图片
 	return new RequestFun().fetch(
 		`/app/data/getImage`,
 		'GET',
@@ -167,4 +183,4 @@ export function getImage(data,) { //查询巡检图片
 		null,
 		'Blob'
 	)
-}
+}

+ 2 - 1
code/HBX/common/common.css

@@ -200,6 +200,7 @@
 	line-height: 50rpx;
 	font-size: 28rpx;
 	background: #FFF;
+	padding-right: 20rpx !important;
 }
 
 .uni-input-time {
@@ -219,4 +220,4 @@
 ::placeholder{
 	font-size: 28rpx;
 }
-	/* #endif */
+	/* #endif */

+ 7 - 6
code/HBX/common/request.js

@@ -6,11 +6,11 @@ class ReqestConfig {
 	constructor() {
 		this.params = {
 			'content-type': "application/json",
-			timeout: 16000,
-			header: {
-				appId: uni.getStorageSync('storage_users').uid,
-				authorization: uni.getStorageSync('storage_token')
-			}
+            timeout: 16000,
+            header: {
+                appId: uni.getStorageSync('storage_users').uid,
+                authorization: uni.getStorageSync('storage_token')
+            }
 		}
 
 	}
@@ -21,9 +21,10 @@ class RequestFun extends ReqestConfig {
 		super(arg)
 	}
 	fetch(url, method, data, complete = null, responseType = 'text') {
+        // console.log(uni.getStorageSync("xjappserver").url+':'+uni.getStorageSync("xjappserver").port)
 		return new Promise((resolve, reject) => {
 			uni.request({
-				url: api_config + url, //
+				url: "http://"+uni.getStorageSync("xjappserver").url+':'+uni.getStorageSync("xjappserver").port + url, //
 				...this.params,
 				responseType: responseType,
 				method: method,

+ 9 - 7
code/HBX/components/dl-product-class/index.nvue

@@ -1,7 +1,7 @@
 <template>
 	<view class="pages" :style="{ height: screenHeight + 'px' }" v-if="dataList">
 		<view class="pages-left" :style="{ height: screenHeight + 'px' }">
-			<scroll-view :style="{ height: screenHeight + 'px' }" scroll-y class="pages-left" :show-scrollbar="false">
+			<scroll-view :style="{ height: screenHeight + 'px' }" scroll-y class="pages-left" :show-scrollbar="true">
 				<view class="pages-left-li" v-for="(item, index) in dataList" :key="index" @click="tabClick(item, index)">
 					<text class="pages-left-li-txt" :class="{ 'pages-left-li-act': tabIndex == index }">{{ item.name }}</text>
 				</view>
@@ -26,7 +26,7 @@
 									<image class="img"  src="../../static/robot.png" mode=""></image>
 								</view>
 							</view>
-							
+
 							<text class="pages-right-box-div-name">{{child.robotName}}</text>
 							<view class="pages-right-box-div-line">
 								<text></text>
@@ -86,11 +86,11 @@
 			}
 		},
 		created() {
-			
+
 		},
 		mounted() {
 			this.screenHeight = uni.getSystemInfoSync().windowHeight
-			
+
 		},
 		methods: {
 			changeCheck(child,e){
@@ -101,6 +101,7 @@
 					}).then(res =>{
 						child.followed = 1
 						uni.$emit("backhome")
+						uni.$emit("backhomes")
 					}).catch(e =>{
 						child.followed = 0
 					})
@@ -111,6 +112,7 @@
 						robotId:child.robotId
 					}).then(res =>{
 						uni.$emit("backhome")
+						uni.$emit("backhomes")
 						child.followed = 0
 					}).catch(e =>{
 						child.followed = 1
@@ -181,7 +183,7 @@
 			&-li {
 				height: 95rpx;
 				box-sizing: border-box;
-				
+
 				&-txt {
 					line-height: 95rpx;
 					text-align: center;
@@ -265,7 +267,7 @@
 						}
 					}
 				}
-				
+
 			}
 
 			&-li {
@@ -287,4 +289,4 @@
 			}
 		}
 	}
-</style>
+</style>

+ 2 - 2
code/HBX/components/uni-list.vue

@@ -5,10 +5,10 @@
 	</list>
 	<!-- #endif -->
 	<!-- #ifdef APP-NVUE -->
-	<list ref="list" class="uni-list" :show-scrollbar="false" :enableBackToTop="enableBackToTop"  loadmoreoffset="15" :scroll-y="scrollY" @loadmore="loadMore">
+	<list ref="list" class="uni-list" :show-scrollbar="true" :enableBackToTop="enableBackToTop"  loadmoreoffset="15" :scroll-y="scrollY" @loadmore="loadMore">
 		<slot />
 	</list>
-	<!-- #endif --> 
+	<!-- #endif -->
 	<!-- #ifdef H5 || MP-WEIXIN || MP-QQ -->
 	<scroll-view class="uni-list" :enableBackToTop="enableBackToTop" :scroll-y="scrollY" @scrolltolower="loadMore">
 		<slot />

+ 17 - 15
code/HBX/config.js

@@ -1,16 +1,18 @@
-let api_config = ""
+var api_config = ""
 let upload_url = ""
 let H5_url = ""
 let update_url = ""
 let ws_url = ''
-
+var server_url = 'http://192.168.1.144:8088'
+var surl = "http://"+uni.getStorageSync("xjappserver").url+':'+uni.getStorageSync("xjappserver").port
+server_url = surl
 if(process.env.NODE_ENV === 'development'){  //开发环境
-	api_config = "http://192.168.1.144:8088"
-	upload_url = "http://192.168.1.144:8088"
-	H5_url = "http://192.168.1.144:8088/apph5/#/"
-	update_url = "http://192.168.1.144:8088/apph5/downLoad/update.txt"
+	api_config = server_url
+	upload_url = server_url
+	H5_url = server_url+"/apph5/#/"
+	update_url = server_url+"/apph5/downLoad/update.txt"
 	ws_url = "ws://192.168.20.126:8081"
-	
+
 	// api_config = "http://192.168.20.132:8081"  //测试环境
 	// upload_url = "http://rtso-file.siwill.com"
 	// H5_url = "http://192.168.20.132:8070/apph5/#/"
@@ -18,19 +20,19 @@ if(process.env.NODE_ENV === 'development'){  //开发环境
 	// ws_url = "ws://192.168.20.132:8081"
 }
 else{
-	 
-	api_config = "http://192.168.1.144:8088"  //测试环境
-	upload_url = "http://192.168.1.144:8088"
-	H5_url = "http://192.168.1.144:8088/apph5/#/"
-	update_url = "http://192.168.1.144:8088/apph5/downLoad/update.txt"
+
+	api_config = server_url  //测试环境
+	upload_url = server_url
+	H5_url = server_url+"/apph5/#/"
+	update_url = server_url+"/apph5/downLoad/update.txt"
 	ws_url = "ws://192.168.20.132:8081"
-	
+
 	// api_config = "http://192.168.20.126:8081"     //开发环境
 	// upload_url = "http://192.168.20.79:9000"
 	// H5_url = "http://192.168.20.126:8070/apph5/#/"
 	// update_url = "http://192.168.20.126:8070/apph5/downLoad/update.txt"
 	// ws_url = "ws://192.168.20.126:8081"
-	
+
 	// api_config = "http://rtso-api.siwill.com"  //生产环境
 	// upload_url = "http://rtso-file.siwill.com"
 	// H5_url = "http://rtso.siwill.com/apph5/#/"
@@ -38,4 +40,4 @@ else{
 	// ws_url = "ws://rtso-api.siwill.com"
 }
 
-export  {upload_url,api_config,H5_url,update_url,ws_url}
+export  {upload_url,api_config,H5_url,update_url,ws_url}

+ 2 - 2
code/HBX/manifest.json

@@ -2,8 +2,8 @@
     "name" : "智能巡检",
     "appid" : "__UNI__C9C3F53",
     "description" : "",
-    "versionName" : "1.0001",
-    "versionCode" : 10001,
+    "versionName" : "1.0005",
+    "versionCode" : 10005,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {

+ 1 - 1
code/HBX/package-lock.json

@@ -4,7 +4,7 @@
   "dependencies": {
     "crypto-js": {
       "version": "4.1.1",
-      "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz",
+      "resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.1.1.tgz",
       "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw=="
     }
   }

+ 6 - 0
code/HBX/pages.json

@@ -119,6 +119,12 @@
 		},
 
 		{
+			"path": "pages/webview/changeConfig",
+			"style": {
+				"navigationBarTitleText": "服务代理设置"
+			}
+		},
+		{
 			"path": "pages/webview/changePassword",
 			"style": {
 				"navigationBarTitleText": "修改密码"

+ 3 - 3
code/HBX/pages/native/datalist/inProcess.nvue

@@ -1,7 +1,7 @@
 <template>
 	<view class="tabs">
 		<!--顶部横向滚动-->
-		<scroll-view ref="tabbar1" id="tab-bar" class="tab-bar" :scroll="false" :scroll-x="true" :show-scrollbar="false"
+		<scroll-view ref="tabbar1" id="tab-bar" class="tab-bar" :scroll="false" :scroll-x="true" :show-scrollbar="true"
 			:scroll-into-view="scrollInto" >
 			<view style="flex-direction: column;">
 				<view style="flex-direction: row;">
@@ -17,7 +17,7 @@
 				</view>
 			</view>
 		</scroll-view>
-		
+
 		<!--列表左右滑动-->
 		<swiper class="tab-box" ref="swiper1" :current="tabIndex" :duration="300" @change="onswiperchange"
 			@transition="onswiperscroll" @animationfinish="animationfinish" @onAnimationEnd="animationfinish">
@@ -78,7 +78,7 @@
 			this.tabbarWidth = 0;
 			this.tabListSize = {};
 			this._touchTabIndex = 0;
- 
+
 			// #ifndef MP-ALIPAY
 			this.pageList = this.$refs.page;
 			// #endif

+ 89 - 8
code/HBX/pages/native/login.vue

@@ -25,8 +25,9 @@
 				</checkbox-group>
 				<button elevation="3px" class="nv-but" type="primary" :disabled="loading" :loading="loading"
 					@click="login">登录</button>
+				<view class="nv-server" @click="changeConfig">服务代理设置</view>
 			</view>
-		</view> 
+		</view>
 	</view>
 </template>
 
@@ -36,11 +37,13 @@
 		getUser
 	} from '../../common/api.js'
 	import {
-		getAuthsArr
+		getAuthsArr,
+        BeforeNavigateTo
 	} from '../../common/utils.js'
 	import {
 		Encrypt
 	} from '@/common/aes.js';
+    import {api_config} from '@/config.js'
 	export default {
 		data() {
 			return {
@@ -71,7 +74,7 @@
 			}
 		},
 		mounted() {
-			
+
 		},
 		onShow() {
 			this.clientInfo = plus.push.getClientInfo().clientid
@@ -81,6 +84,13 @@
 			}
 		},
 		methods: {
+            changeConfig() {console.log(1234)
+                uni.navigateTo({
+                        animationType: 'pop-in',
+                        animationDuration: 300,
+                    	url: '../../pages/webview/changeConfig',
+            })
+            },
 			changeValue(e){
 				if(e.target.value && e.target.value[0]){
 					this.checked = true
@@ -112,7 +122,69 @@
 						...this.user,
 						// password: Encrypt(this.user.password, this.keys.tokenKey),
 				}
-				getToken(params).then(res => {
+       /* export function getToken(data) { //登录接口
+            return new RequestFun().fetch(
+                '/app/user/loginApp',
+                'POST',
+                data
+            )
+        }
+
+        export function getUser(data) { //查看个人信息
+            return new RequestFun().fetch(
+                `/app/user/getUserInfo`,
+                'GET',
+                data
+            )
+        }*/
+        /*var sseverUrl = "http://"+uni.getStorageSync("xjappserver").url+':'+uni.getStorageSync("xjappserver").port
+        uni.request({
+            url: sseverUrl+'/app/user/loginApp', //仅为示例,并非真实接口地址。
+            data: params,
+            header: {
+                appId: uni.getStorageSync('storage_users').uid,
+                authorization: uni.getStorageSync('storage_token')
+            },
+
+            method: "POST",
+            success: (res) => {
+            console.log(111111);
+            console.log(res);
+
+			this.$store.dispatch("setToken", res.data.data.userId)
+			this.checked ?  uni.setStorageSync('XJAPP-PASSWORD', {
+					...this.user
+			}) : uni.removeStorageSync('XJAPP-PASSWORD')
+			uni.request({
+			        url: sseverUrl+'/app/user/getUserInfo', //仅为示例,并非真实接口地址。
+			        data: {
+                        userId:res.data.data.userId
+					},
+			        header: {
+			            appId: uni.getStorageSync('storage_users').uid,
+			            authorization: uni.getStorageSync('storage_token')
+			        },
+
+			        method: "GET",
+			        success: (response) => {
+			        console.log(222222);
+			        console.log(response);
+					this.$store.dispatch("setUsers",response.data.data)
+						this.loading = false
+						uni.switchTab({
+							url: "/pages/native/work"
+						});
+
+			}
+			})
+    },
+        fail: (e) => {console.log(e)
+            this.loading = false
+            plus.nativeUI.toast("无法连接服务器,请检查服务代理设置")
+
+		}
+    })*/
+        getToken(params).then(res => {
 					this.$store.dispatch("setToken", res.userId)
 					this.checked ?  uni.setStorageSync('XJAPP-PASSWORD', {
 						 ...this.user
@@ -120,12 +192,13 @@
 					getUser({
 						userId:res.userId
 					}).then(response => {
+						uni.setStorageSync("getRealNews",response.msgStatus)
 						this.$store.dispatch("setUsers",response)
 						this.loading = false
 						uni.switchTab({
 							url: "/pages/native/work"
 						});
-						
+
 					}).catch(e => {
 						this.loading = false
 					})
@@ -134,6 +207,8 @@
 					this.loading = false
 					console.log(e)
 				})
+
+        	this.loading = false
 			}
 		}
 	}
@@ -198,17 +273,23 @@
 			.nv-but {
 				height: 88rpx;
 				line-height: 88rpx;
-				background: #0581FD; 
+				background: #0581FD;
 				border-radius: 16rpx;
 				font-weight: bold;
 				font-size: 38rpx;
 				box-shadow: #BBBBBB 0 0 10px;
-				margin: 30rpx 40rpx 180rpx 40rpx;
+				margin: 30rpx 40rpx 20rpx 40rpx;
+			}
+			.nv-server{
+				margin-bottom: 110rpx;
+				margin-right: 40rpx;
+				text-align: right;
+				color: #0581FD;
 			}
 			.checkbox{
 				margin: 20rpx 42rpx 0 42rpx;
 				display: flex;
-				align-items: center; 
+				align-items: center;
 				font-size: 24rpx;
 			}
 			.n-input {

+ 26 - 16
code/HBX/pages/native/my.nvue

@@ -31,7 +31,7 @@
 		<view class="m-list">
 			<text class="icon m-4">&#xe602;</text>
 			<text class="m-t">接受新消息通知  </text>
-			<switch class="m-r" color="#3EAB3E" style="transform:scale(0.8);margin-left: 280rpx;"  checked @change="switchChange" />
+			<switch class="m-r" color="#3EAB3E" style="transform:scale(0.8);margin-left: 280rpx;" :checked="newCheck"  @change="switchChange" />
 		</view>
 		<view class="m-list m-center" @click="infoSet">
 			<text class="icon m-5">&#xe621;</text>
@@ -48,7 +48,7 @@
 			<text class="m-t">帮助与反馈</text>
 			<text class="m-r icon">&#xe65f;</text>
 		</view>
-		
+
 		<view class=" m-b" @click="remove">
 			<text class="m-t">退出登录</text>
 		</view>
@@ -68,7 +68,8 @@
 	import {
 		getUser,
 		updateIcon,
-		exit
+		exit,
+		updateMsgStatus
 	} from '@/common/api.js'
 	import permision from "@/js_sdk/wa-permission/permission.js"
 	import {
@@ -114,11 +115,12 @@
 				users: {
 
 				},
-				version: ""
+				version: "",
+				newCheck:false
 			}
 		},
 		onShow() {
-			
+            this.newCheck = uni.getStorageSync("getRealNews")==1?true:false;
 		},
 		methods: {
 			infoSet(){
@@ -127,7 +129,7 @@
 			chooseImg(){
 				let that =this
 				uni.chooseImage({
-				    count: 1, 
+				    count: 1,
 				    sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
 				    success: function (res) {
 						uni.compressImage({
@@ -139,20 +141,20 @@
 						   		let fileReader = new plus.io.FileReader();
 						   		fileReader.readAsDataURL( file );
 						   		fileReader.onloadend = function(evt) {
-						   			
+
 						   			updateIcon({
 						   				icon:evt.target.result,
 						   				userId:that.$store.state.Token
 						   			}).then(e =>{
 						   				that.users.icon = evt.target.result
 						   			})
-						   			
+
 						   		}
 						   	});
-						   }) 
+						   })
 						  }
 						})
-						
+
 				    }
 				});
 			},
@@ -200,7 +202,15 @@
 				}, true)
 			},
 			switchChange(e){
-				
+				uni.setStorageSync("getRealNews",e.detail.value?1:0)
+				updateMsgStatus({
+					 userId: this.$store.state.Token,
+					 status:e.detail.value?1:0
+				}).then(res => {console.log(res)
+
+				}).catch(e => {
+				     console.log(e)
+				})
 			},
 			changePass(){
 				BeforeNavigateTo({
@@ -261,7 +271,7 @@
 	.m-page {
 		/*#ifdef MP-WEIXIN*/
 		height: 100vh;
-		
+
 		/*#endif*/
 		.banner{
 			width: 750rpx;
@@ -286,7 +296,7 @@
 			.m-1,.m-2,.m-3,.m-4,.m-5,.m-6,.m-7{
 				font-size: 34rpx;
 				width: 50rpx;
-				
+
 			}
 			.m-1{color: #F34E4E;}
 			.m-2{color: #3EAB3E;}
@@ -304,7 +314,7 @@
 				flex: 1;
 				text-align: right;
 				color: #999;
-				justify-content: flex-end; 
+				justify-content: flex-end;
 				font-size: 32rpx;
 			}
 		}
@@ -342,7 +352,7 @@
 			.h-t1 {
 				color: #fff;
 				font-size: 36rpx;
-				
+
 			}
 
 			.h-t2 {
@@ -350,7 +360,7 @@
 				padding-top: 15rpx;
 				font-size: 34rpx;
 			}
-			
+
 			.h-t3{
 				color: #fff;
 				padding-top: 15rpx;

+ 24 - 20
code/HBX/pages/native/notice/inProcess.nvue

@@ -2,13 +2,13 @@
 	<view class="wrapper">
 		<image class="banner" src="../../../static/bg.png" mode=""></image>
 		<view class="tabs">
-			
+
 			<view class="tab-box">
 				<newsPage class="page-item"  ref="pageRp"></newsPage>
 			</view>
 		</view>
 	</view>
-	
+
 </template>
 
 <script>
@@ -20,21 +20,35 @@
 		data() {
 			return {
 				newsid: "",
+				tabClick: false, // true 表示是两次点击中的第一次点了 tabBar
 			}
-		}, 
+		},
+		onTabItemTap(e) {
+		            // tab 点击时执行,此处直接接收单击事件
+		            // console.log(e)
+		            if (this.tabClick) { // 200ms 内再次点击
+		                // 这里就是模拟的双击事件,可以写类似数据刷新相关处理
+							this.$refs.pageRp.requestParams.pageIndex = 1;
+					this.$refs.pageRp.loadData(true);
+		            }
+		            this.tabClick = true
+		            setTimeout(() => {
+		                this.tabClick = false // 200ms 内没有第二次点击,就当作单击
+		            }, 200)
+		        },
 		onNavigationBarButtonTap(e) {
 			if(this.$refs.pageRp.dataList.length > 0){
 				uni.navigateTo({
 					url:'/pages/webview/popupNews',
 				})
 			}
-			
+
 		},
 		onReady() {
 			this.$refs.pageRp.loadData();
 		},
 		methods: {
-			
+
 		}
 	}
 </script>
@@ -52,7 +66,7 @@
 		width: 750rpx;
 		height: 320rpx;
 		position: fixed;
-		top: 0; 
+		top: 0;
 		left: 0;
 		right: 0;
 	}
@@ -64,16 +78,16 @@
 		position: fixed;
 		top: 0;
 		bottom: 0;
-		left:20rpx; 
+		left:20rpx;
 		right: 20rpx;
 		background-color: #fff;
-		
+
 	}
 
 	.tab-bar {
 		/* #ifdef APP-PLUS */
 		width: 750rpx;
-		
+
 		/* #endif */
 		height: 42px;
 		flex-direction: row;
@@ -82,16 +96,6 @@
 		/* #endif */
 	}
 
-	/* #ifndef APP-NVUE */
-	.tab-bar ::-webkit-scrollbar {
-		display: none;
-		width: 0 !important;
-		height: 0 !important;
-		-webkit-appearance: none;
-		background: transparent;
-	}
-
-	/* #endif */
 
 	.scroll-view-indicator {
 		position: relative;
@@ -132,7 +136,7 @@
 		overflow: hidden;
 		left: 20rpx;
 		padding:30rpx;
-		top: 5rpx; 
+		top: 5rpx;
 		right:20rpx;
 		bottom: 0;
 	}

+ 71 - 14
code/HBX/pages/native/notice/itemPage.nvue

@@ -1,9 +1,9 @@
 <template>
 	<view class="page-news">
-		<uni-list ref="list" class="listview" :Showscrollbar="false" :enableBackToTop="true" :scroll-y="true" @scrolltolower="loadMore()">
+		<uni-list ref="list" class="listview" :Showscrollbar="true" :enableBackToTop="true" :scroll-y="true" @scrolltolower="loadMore()">
 			<uni-refresh class="refresh" @refresh="onrefresh" @pullingdown="onpullingdown"
 				:display="refreshing ? 'show' : 'hide'">
-				<div class="refresh-view"> 
+				<div class="refresh-view">
 					<image class="refresh-icon" :src="refreshIcon" :style="{width: (refreshing || pulling) ? 0: '32px'}"
 						:class="{'refresh-icon-active': refreshFlag}"></image>
 					<uni-load-more v-if="refreshing" class="loading-icon" status="loading"
@@ -11,11 +11,11 @@
 					<text class="loading-text">{{refreshText}}</text>
 				</div>
 			</uni-refresh>
-			<uni-cell v-for="(item, index) in dataList" :key="item.id">
-				<news-item :newsItem="item" @click="goDetail(item)"></news-item>
-			</uni-cell>
+				<uni-cell v-for="(item, index) in dataList" :key="item.id">
+					<news-item :newsItem="item" @click="goDetail(item)"></news-item>
+				</uni-cell>
 			<uni-cell>
-				<view class="loading-more">
+				<view id="loading-more" class="loading-more">
 					<view class="creatView" v-if="isNoData">
 						<image class="imsa" src="../../../static/nodata.png" mode=""></image>
 						<text class="c-te">暂无消息</text>
@@ -36,7 +36,8 @@
 	import newsItem from './detailPage.nvue';
 	import {
 		getMessageList,
-		readAll
+		readAll,
+		getReadNum
 	} from '@/common/api.js'
 	export default {
 		components: {
@@ -75,7 +76,18 @@
 				refreshIcon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAB5QTFRFcHBw3Nzct7e39vb2ycnJioqK7e3tpqam29vb////D8oK7wAAAAp0Uk5T////////////ALLMLM8AAABxSURBVHja7JVBDoAgDASrjqj//7CJBi90iyYeOHTPMwmFZrHjYyyFYYUy1bwUZqtJIYVxhf1a6u0R7iUvWsCcrEtwJHp8MwMdvh2amHduiZD3rpWId9+BgPd7Cc2LIkPyqvlQvKxKBJ//Qwq/CacAAwDUv0a0YuKhzgAAAABJRU5ErkJggg=="
 			}
 		},
+		onShow() {
+		    this.loadData(true);
+		},
 		created() {
+					 var that = this;
+                     /* setInterval(function(){
+                        if(uni.getStorageSync("getRealNews")==1){
+                        console.log("+++++++++实时告警请求--------------")
+							that.requestParams.pageIndex = 1;
+					        that.loadData(true);
+                        }
+                     },5000) */
 			this.pullTimer = null;
 			this.requestParams = {
 				pageIndex: 1,
@@ -95,6 +107,15 @@
 				})
 			})
 		},
+		onPageScroll(e){ //根据距离顶部距离是否显示回到顶部按钮
+		console.log(111111111111)
+		    if(e.scrollTop>600){ //当距离大于600时显示回到顶部按钮
+		        this.topState = true
+		    }else{ //当距离小于600时显示回到顶部按钮
+		console.log(111111111111)
+		        this.topState = false
+		    }
+		},
 		methods: {
 			loadData(refresh) {
 				if (this.isLoading) {
@@ -102,6 +123,21 @@
 				}
 				this.isLoading = true;
 				this.isNoData = false;
+				getReadNum({
+					 userId: this.$store.state.Token
+                }).then(res => {
+                     if(res==0){
+                        uni.hideTabBarRedDot({ //隐藏红点
+                          index: 2
+                        })
+                     }else{
+                        uni.showTabBarRedDot({ //显示红点
+                          index: 2
+                        })
+                     }
+                }).catch(e => {
+                     console.log(e)
+                })
 				getMessageList({
 					...this.requestParams,
 					 userId: this.$store.state.Token
@@ -117,7 +153,7 @@
 						}
 						this.pullTimer = setTimeout(() => {
 							this.pulling = false;
-						}, 1000);
+						}, 500);
 					}
 				}).then(result => {
 					let data_list = result;
@@ -144,10 +180,14 @@
 			},
 			loadMore(e) {
 				if (this.isNoData) {
-					return 
+					return
 				}
 				++this.requestParams.pageIndex;
 				this.loadData();
+				let info = uni.createSelectorQuery().select("#loading-more");  
+				         info.boundingClientRect(function(data) { //data - 各种参数  
+				             console.log(data.top)  
+				      }).exec() 
 			},
 			clear() {
 				this.dataList = [];
@@ -155,6 +195,7 @@
 				this.requestParams.pageIndex = 1;
 			},
 			goDetail(detail) {
+				var that = this
 				uni.navigateTo({
 					url:'/pages/webview/newsDetail'
 				})
@@ -170,6 +211,22 @@
 				// 	}
 				// })
 				detail.readFlag = 1
+
+				getReadNum({
+					 userId: that.$store.state.Token
+                }).then(res => {
+                     if(res==0){
+                        uni.hideTabBarRedDot({ //隐藏红点
+                          index: 2
+                        })
+                     }else{
+                        uni.showTabBarRedDot({ //显示红点
+                          index: 2
+                        })
+                     }
+                }).catch(e => {
+                     console.log(e)
+                })
 			},
 			refreshData() {
 				if (this.isLoading) {
@@ -210,9 +267,9 @@
 	.creatView {
 		display: flex;
 		justify-content: center;
-		align-items: center; 
+		align-items: center;
 		flex-direction: column;
-		
+
 	}
 	.c-te{
 		color: #0581FD;
@@ -236,9 +293,9 @@
 
 	.page-news {
 		flex: 1;
-		flex-direction: column; 
+		flex-direction: column;
 		position: absolute;
-		
+
 		left: 0;
 		top: 0;
 		right: 0;
@@ -246,7 +303,7 @@
 	}
 
 	.listview {
-		position: absolute; 
+		position: absolute;
 		left: 0;
 		background-color: #F9F9F9;
 		top: 0;

+ 125 - 45
code/HBX/pages/native/plan.vue

@@ -1,5 +1,6 @@
 <template>
 	<view class="nv-work">
+		<view style="position: fixed;z-index: 99;">
 		<image class="banner" src="../../static/bg.png"></image>
 		<picker class="selectTap" mode="selector" :value="pickeIndex" range-key="robotName" :range="robotList"
 			@change="changePicker">
@@ -19,32 +20,53 @@
 		<view :class="[{secHeight:isSelect}]" :style="{height:heiIndex}" class="selcontent">
 			<view class="vv">
 				<view class="v1" v-for="(item,index) in robotList" :key="index" @click="changePicker(index)">
-					<text class="vt1">{{item.robotName}}</text> 
-				</view> 
+					<text class="vt1">{{item.robotName}}</text>
+				</view>
 			</view>
-			
+
 		</view> -->
+		
 		<view class="nv-header-list">
 			<view class="h-l-li">
-				<text class="icon iconfont icon-zhukongtongxin"
-					:style="{color:robotStatus.wifiCom == 1?'#23E274':'#FB4925'}"></text>
-				<text class="h-l-li-t">通讯状态</text>
+				<text class="icon iconfont icon-jizhan-copy-copy-copy"
+					:style="{color:robotStatus.wifiCom == 1?'#23E274':'#ffffff'}"></text>
+				<text v-if="robotStatus.wifiCom == 1" class="h-l-li-t">在线</text>
+				<text v-if="robotStatus.wifiCom != 1" class="h-l-li-t">离线</text>
 			</view>
-			<view class="h-l-li">
-				<text class="icon iconfont icon-80dianliang"
-					:style="{color:robotStatus.cap && robotStatus.cap >50 ?'#23E274':'#FB4925'}"></text>
+			<view class="h-l-li" v-if="robotStatus.wifiCom == 1">
+				<text class="icon iconfont icon-dianchi-gaodianliang"
+					:style="{color:robotStatus.cap && robotStatus.cap >50 ?'#23E274':'#E8A71C'}"></text>
 				<text class="h-l-li-t">电量{{robotStatus.cap}}%</text>
 			</view>
-			<view class="h-l-li">
-				<text class="icon iconfont icon-line-batterychargechongdianzhuangtai-01"
-					:style="{color:!robotStatus.chargingtfStatus?'#FB4925':' #23E274'}"></text>
-				<text class="h-l-li-t">充电状态</text>
+			<view class="h-l-li" v-if="robotStatus.wifiCom != 1">
+				<text class="icon iconfont icon-dianchi-gaodianliang"
+					style="color:#ffffff"></text>
+				<text class="h-l-li-t">电量未知</text>
+			</view>	
+			<view class="h-l-li" v-if="robotStatus.wifiCom == 1">
+					<text class="icon iconfont icon-weichongdian"
+							style="color:#ffffff" v-if="!robotStatus.chargingtfStatus"></text>
+					<text class="icon iconfont icon-dianchi-chongdian"
+							style="color:#23E274" v-if="robotStatus.chargingtfStatus"></text>
+					<text class="h-l-li-t" v-if="robotStatus.chargingtfStatus">正在充电</text>
+					<text class="h-l-li-t" v-if="!robotStatus.chargingtfStatus">未充电</text>
 			</view>
-			<view class="h-l-li">
-				<text class="icon iconfont icon-guzhang"
+			<view class="h-l-li" v-if="robotStatus.wifiCom != 1">
+				<text class="icon iconfont icon-dianchi-chongdian"
+					style="color:#ffffff"></text>
+				<text class="h-l-li-t">充电未知</text>
+			</view>	
+			<view class="h-l-li" v-if="robotStatus.wifiCom == 1">
+				<text class="icon iconfont icon-luzhang"
 					:style="{color:robotStatus.openRadarStatus == false?'#23E274':'#FB4925'}"></text>
-				<text class="h-l-li-t">有无障碍</text>
+				<text v-if="robotStatus.openRadarStatus" class="h-l-li-t">有障碍</text>
+				<text v-if="!robotStatus.openRadarStatus" class="h-l-li-t">无障碍</text>
 			</view>
+			<view class="h-l-li" v-if="robotStatus.wifiCom != 1">
+				<text class="icon iconfont icon-luzhang"
+					style="color:#ffffff"></text>
+				<text class="h-l-li-t">障碍未知</text>
+			</view>	
 		</view>
 		<view class="nv-top" elevation="3px">
 			<view class="left bg1">
@@ -68,7 +90,9 @@
 				</view>
 			</view>
 		</view>
-
+		</view>
+		<view class="nv-list-box">
+			<scroll-view class='left' scroll-y @scrolltolower="scroll" style="height: calc(100vh - 360rpx);">
 		<view class="nv-list" elevation="3px" v-for="(item,index) in taskList" :key="index"
 			:style="{marginTop:index== 0 ? '80rpx' :'0'}">
 
@@ -171,6 +195,14 @@
 				<view></view>
 			</view>
 		</view>
+			</scroll-view>
+		</view>
+	<uni-popup ref="popup" :mask-click="false">
+		<view style="background: #ffffff;">
+			<text style="padding: 40rpx;padding-top: 60rpx;padding-bottom: 60rpx;font-size: 22rpx;color: #666666;display: block;">无数据,请先关注机器人</text>
+			<button type="primary" size="mini" @click="confirmGo" style="color: #ffffff;background: #0581FD;border: none;border-radius: 0;display: block;">去关注</button>
+		</view>
+	</uni-popup>
 	</view>
 </template>
 
@@ -218,9 +250,15 @@
 				url:'/pages/webview/homeSelect'
 			})
 		},
-		onLoad() {
+		onReady(){
 			this.getRobot()
+		},
+		onShow() {
+            // console.log("______________________________+++++++++++_____________________")
+
+            uni.$off('HpopLog1');
 			uni.$on('HpopLog1', (data) => {
+
 				addTask({
 					robotId: this.robotData.robotId
 				}).then(res => {
@@ -233,15 +271,16 @@
 				}).catch(e => {
 					console.log(e)
 				})
-			
+
 			});
-			uni.$on("backhome", () => {
+            uni.$off('backhome');
+			uni.$on("backhome", () => {console.log("plan++++++++++++++++++++++++")
 				this.onOff = false
 				this.loading = true
 				this.noData = false
 				this.getRobot()
 			})
-		}, 
+		},
 		async onPullDownRefresh() {
 			this.onOff = false
 			this.loading = true
@@ -267,7 +306,20 @@
 			]),
 		},
 		methods: {
-			showSelect() { 
+			scroll(){
+					if (this.onOff) {
+						return
+					}
+					++this.pageIndex
+					this.currentTask()
+			},
+			confirmGo(value) {
+			    this.$refs.popup.close()
+				uni.navigateTo({
+					url:'/pages/native/robot'
+				})
+			},
+			showSelect() {
 				let index = this.robotList.length * 70 +60
 				this.isSelect ? this.heiIndex = `0rpx` :this.heiIndex = `${index}rpx`
 				this.isSelect = !this.isSelect
@@ -284,7 +336,7 @@
 			},
 			openDialog() {
 				uni.navigateTo({
-					url:'/pages/webview/popupHome',
+					url:'/pages/webview/popupTask',
 				})
 			},
 			async getRobot() {
@@ -294,15 +346,24 @@
 				this.robotList = res.filter(item => {
 					return item.followed == 1
 				}) || []
-				this.robotName = this.robotList[0].robotName
-				this.robotData = this.robotList[0]
-				this.getRobotStauts()
-				this.currentTask()
+                if(this.robotList.length >0){
+                    this.robotName = this.robotList[0].robotName
+                    this.robotData = this.robotList[0]
+                    this.getRobotStauts()
+                    this.currentTask()
+					this.$refs.popup.close()
+                }
+                else{
+                    this.robotName = null
+                    this.robotData = {}
+                    this.robotStatus = {}
+                    this.$refs.popup.open()
+                }
 			},
 			taskStatus(type) {
 				switch (type) {
 					case 0:
-						return '待执行'
+						return '等待中'
 					case 1:
 						return '正在执行'
 					case 2:
@@ -312,18 +373,20 @@
 					case 4:
 						return '已超期'
 					case 5:
-						return '暂停'
+						return '暂停'
 				}
 			},
 			changeType(item) {
 				item.show = item.show == undefined ? false : !item.show
 			},
 			changePicker(e) {
+				// console.log(e)
 				this.heiIndex = `0rpx`
-				this.isSelect = false 
+				this.isSelect = false
 				let data = this.robotList[e.target.value]
-				
-				this.loading = true 
+                // console.log(data.robotId)
+
+				this.loading = true
 				this.pickeIndex = e.target.value
 				this.robotData = data
 				this.robotName = data.robotName
@@ -347,22 +410,32 @@
 					if (res.length < 10) this.onOff = true
 					if (this.taskList.length == 0) {
 						this.noData = true, this.onOff = false
+					}else{
+						this.noData = false
+						this.onOff = false
 					}
 					this.loading = false
 				}).catch(e => {
 					this.loading = false
-					this.noData = true
-					this.onOff = false
+					if (this.taskList.length == 0) {
+						this.noData = true, this.onOff = false
+					}else{
+						this.noData = false
+						this.onOff = true
+					}
 					console.log(e)
 				})
+					
 			},
 			getRobotStauts() {
 				getRobotStauts({
 					robotId: this.robotData.robotId
 				}).then(res => {
+					console.log(res)
 					this.robotStatus = res
 				}).catch(e => {
 					console.log(e)
+					this.robotStatus = {}
 				})
 			}
 		}
@@ -534,30 +607,30 @@
 			top: 80rpx;
 			left: 20rpx;
 			right: 20rpx;
-			
-			z-index: 9999999999;  
+
+			z-index: 9999999999;
 			display: block;
-			overflow: scroll; 
+			overflow: scroll;
 			background-color: #46A0F9;
 			height: 0;
-			border-radius: 15rpx;   
+			border-radius: 15rpx;
 			border-bottom-right-radius: 15rpx;
 			.vv{
 				padding: 30rpx 0;
 				align-items: center;
 				text-align: center;
-				
-				width: 100%; 
+
+				width: 100%;
 			}
-			.v1 { 
-				padding: 13rpx; 
+			.v1 {
+				padding: 13rpx;
 				display: block;
 				.vt1 {
 					display: block;
 					color: #fff;
-					font-size:30rpx; 
+					font-size:30rpx;
 				}
-				.active{ 
+				.active{
 					color: #46A0F9;
 				}
 			}
@@ -582,7 +655,14 @@
 				padding: 0 10rpx 0 5rpx;
 			}
 		}
-
+		.nv-list-box{
+			position: absolute;
+			width: calc(100% - 4rpx);
+			height: calc(100% - 360rpx);
+			overflow: auto;
+			top: 400rpx;
+			z-index: 1;
+		}
 		.nv-list {
 			position: relative;
 			overflow: hidden;

+ 35 - 4
code/HBX/pages/native/robot.nvue

@@ -14,7 +14,7 @@
 			</view>
 
 		</view>
-	</view> 
+	</view>
 </template>
 
 <script>
@@ -33,6 +33,7 @@
 			uniRefresh,
 			robotList,
 			uniLoadMore,
+				tabClick: false, // true 表示是两次点击中的第一次点了 tabBar
 		},
 		props: {
 			nid: {
@@ -63,6 +64,7 @@
 			}
 		},
 		created() {
+                     console.log(545454545454566666666666)
 			this.pullTimer = null;
 			this.loadData()
 		},
@@ -85,9 +87,10 @@
 						}
 						this.pullTimer = setTimeout(() => {
 							this.pulling = false;
-						}, 1000); 
+						}, 1000);
 					}
 				}).then(result => {
+					console.log(result)
 					let data_list = result;
 					let namelist = []
 					let arr = []
@@ -112,7 +115,34 @@
 					}catch(e){
 						console.log(e)
 					}
+					console.log(arr)
+					console.log(88888888888888)
+					/* function removeByValue(arr, val) {
+					   for(var i = 0; i < arr.length; i++) {
+					    if(arr[i] == val) {
+					     arr.splice(i, 1);
+						 removeByValue(arr, null)
+					     break;
+					    }
+					   }
+					  } */
+					  var ind = -1;
+					  function removeByName(){
+							for(var i = 0; i < arr.length; i++) {
+							 if(arr[i] == null) {
+							  ind = i;
+							  break;
+							 }
+							 }
+						  if(ind!=-1){
+							arr.splice(ind, 1); ind = -1;
+						  	removeByName();
+						  }
+					  }
+					  removeByName();
+					  
 					this.dataList = arr;
+					console.log(this.dataList)
 					if (this.dataList.length == 0) {
 						this.isNoData = true
 					}
@@ -126,6 +156,7 @@
 				this.dataList = [];
 			},
 			refreshData() {
+					console.log(88888888888888)
 				if (this.isLoading) {
 					return;
 				}
@@ -163,9 +194,9 @@
 	.creatView {
 		display: flex;
 		justify-content: center;
-		align-items: center; 
+		align-items: center;
 		flex-direction: column;
-		
+
 	}
 	.c-te{
 		color: #0581FD;

+ 84 - 32
code/HBX/pages/native/work.nvue

@@ -16,7 +16,7 @@
 				<text @click="changeVideo(2)" :class="[{active:Aindex == 2},{t2:true}]">红外视频</text>
 			</view>
 			<view class="videoBox">
-				<video :controls="false" class="myVideo" object-fit="fill" poster="" :src="videoSrc" @error="videoErrorCallback"
+				<video controls="true" :enable-play-gesture="true" class="myVideo" object-fit="fill" :src="videoSrc" @error="videoErrorCallback" :autoplay="true"
 					></video>
 			</view>
 		</view>
@@ -26,10 +26,11 @@
 					<text class="icons">&#xe6f9;</text>
 					<text class="t2 ">环境</text>
 				</view>
-				<uni-transition ref="ani" :show="true">
-					<uni-icons @click="refresh" class="" type="refreshempty" color="#999" size="24"></uni-icons>
-				</uni-transition>
-				
+				<view>
+					<image src="/static/loadings.gif" v-if="!refreshShow" mode="" style="width: 32rpx;height: 32rpx;"></image>
+					<uni-icons @click="refresh" v-if="refreshShow" class="" type="refreshempty" color="#999" size="24"></uni-icons>
+				</view>
+
 			</view>
 			<view class="center">
 				<view class="ul">
@@ -40,7 +41,7 @@
 							<text class="t2"  :style="{color:item.isWarning ?'#ED8B5A':''}">{{item.value || '-'}}</text>
 						<!-- 	<text class="t3">{{item.unit}}</text> -->
 						</view>
-						
+
 					</view>
 					<view class="empty" v-if="envirList.length== 0 && !loading">
 						<text class="icon emptyicon">&#xe604;</text>
@@ -57,6 +58,12 @@
 			</uni-popup-dialog>
 		</uni-popup>
 
+	<uni-popup ref="popup" :mask-click="false">
+		<view style="background: #ffffff;">
+			<text style="padding: 40rpx;padding-top: 60rpx;padding-bottom: 60rpx;font-size: 22rpx;color: #666666;;">无数据,请先关注机器人</text>
+			<button type="primary" size="mini" @click="confirmGo" style="color: #ffffff;background: #0581FD;border: none;border-radius: 0;">去关注</button>
+		</view>
+	</uni-popup>
 	</view>
 </template>
 
@@ -77,7 +84,7 @@
 	import {
 		getRobotList,
 		addTask,
-		getEnvData
+		getEnvData,getReadNum
 	} from '@/common/api.js'
 	export default {
 		data() {
@@ -86,12 +93,13 @@
 				robotName: '-',
 				robotData: null,
 				pickerList: [],
-				loading:true,
+				loading:false,
 				pickeIndex:0,
 				step:1,
 				Aindex: 1,
 				videoSrc: '',
-				envirList: []
+				envirList: [],
+				refreshShow:true
 			}
 		},
 		onLoad() {
@@ -103,27 +111,54 @@
 			// 	} else {
 			// 		//this.judgeIosPermission()
 			// 	}
-				
+
 			// })
+
+			var that = this;
+			setInterval(function(){
+				if(uni.getStorageSync("getRealNews")==1){
+				getReadNum({
+            		userId: that.$store.state.Token
+                            }).then(res => {
+                                 if(res==0){
+                                    uni.hideTabBarRedDot({ //隐藏红点
+                                      index: 2
+                                    })
+                                 }else{
+                                    uni.showTabBarRedDot({ //显示红点
+                                      index: 2
+                                    })
+                                 }
+                            }).catch(e => {
+                                 console.log(e)
+                            })
+						}
+			},5000)
+            uni.$off('DpopLog1');
 			uni.$on('DpopLog1', (data) => {
 				addTask({
 					robotId: this.robotData.robotId
 				}).then(res => {
-					
+                    uni.showToast({
+                        title: '操作成功',
+                        duration: 2000
+                    })
 				}).catch(e => {
 					console.log(e)
 				})
 			});
+            uni.$off('xBpopLog2');
 			uni.$on('xBpopLog2', (data) => {
 				setTimeout(() =>{
 					const csubNVue1 = uni.getSubNVueById('DpopLog1')
 					csubNVue1.show('fade-in', 300, () => {
-					
+
 					});
 				},300)
-				
+
 			});
-			uni.$on("backhome",() =>{
+            uni.$off('backhomes');
+			uni.$on("backhomes",() =>{console.log("work++++++++++++++++++++++++")
 				this.robotName = ""
 				this.envirList = []
 				this.pickerList = []
@@ -133,12 +168,24 @@
 		},
 		mounted() {
 			this.getRobotList()
-			
+
 		},
 		onReady() {
 			this.$refs.ani.init({
 			})
 		},
+		onShow() {
+			if(this.pickerList.length >0){
+				this.Aindex = 1
+				this.changePicker(1)
+			}else{
+				this.Aindex = 1
+				this.videoSrc = `rtsp://admin:admin@192.168.1.1:554/h265/ch01/main/av_stream`
+				this.$refs.popup.open()
+			}
+			this.getEnvData()
+		},
+
 		computed: {
 			...mapGetters([
 				'Token'
@@ -150,17 +197,18 @@
 			})
 		},
 		methods: {
-			refresh(){
-				this.$refs.ani.step({
-					rotate:`${720*this.step}`
-				},{
-					timingFunction: 'ease',
-					duration: 1000
+			confirmGo(value) {
+			    this.$refs.popup.close()
+				uni.navigateTo({
+					url:'/pages/native/robot'
 				})
-				this.$refs.ani.run(()=>{
-				    this.step+=1
-				})
-				this.getEnvData()
+			},
+			refresh(){
+				this.refreshShow = false;
+				var that = this;
+				setTimeout(function(){
+					that.getEnvData()
+				},800)
 			},
 			getRobotList(){
 				getRobotList().then(res => {
@@ -170,14 +218,17 @@
 					if(this.pickerList.length >0){
 						this.robotName = this.pickerList[0].robotName
 						this.robotData = this.pickerList[0]
+						// console.log(this.robotData)
 						//this.videoSrc = 'rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov'
-						this.videoSrc = `rtsp://${this.robotData.ptzLoginUser}:${this.robotData.ptzPassword}@${this.robotData.ip}:554/h264/ch01/main/av_stream`
+						this.videoSrc = `rtsp://${this.robotData.ptzLoginUser}:${this.robotData.ptzPassword}@${this.robotData.domainName}:554/h265/ch01/main/av_stream`
 						this.getEnvData()
+						this.$refs.popup.close()
 					}
 					else{
+						this.$refs.popup.open()
 						this.robotName = null
 						this.robotData = null
-						this.videoSrc = null
+						this.videoSrc = `rtsp://admin:admin@192.168.1.1:554/h265/ch01/main/av_stream`
 					}
 				})
 			},
@@ -187,9 +238,11 @@
 				}).then(res => {
 					this.envirList = res
 					this.loading = false
+					this.refreshShow = true;
 				}).catch(e => {
 					this.envirList = []
 					this.loading = false
+					this.refreshShow = true;
 					console.log(e)
 				})
 			},
@@ -197,10 +250,9 @@
 				this.Aindex = index
 				index == 1 ?
 					this.videoSrc =
-					`rtsp://${this.robotData.ptzLoginUser}:${this.robotData.ptzPassword}@${this.robotData.ip}:554/h264/ch01/main/av_stream` :
+					`rtsp://${this.robotData.ptzLoginUser}:${this.robotData.ptzPassword}@${this.robotData.ip}:554/h265/ch01/main/av_stream` :
 					this.videoSrc =
-					`rtsp://${this.robotData.ptzLoginUser}:${this.robotData.ptzPassword}@${this.robotData.ip}:554/h264/ch02/main/av_stream`
-					
+					`rtsp://${this.robotData.ptzLoginUser}:${this.robotData.ptzPassword}@${this.robotData.ip}:554/h265/ch02/main/av_stream`
 
 			},
 			changePicker(e) {
@@ -244,7 +296,7 @@
 					case 'FIRE':
 						return '\ue669'
 					case 'O2':
-						return '\ue635'	
+						return '\ue635'
 					case 'MQ':
 						return '\ue625'
 					case 'LIGHT':
@@ -398,7 +450,7 @@
 					animation-duration: 1s;
 					animation-iteration-count: 3;
 				}
-				
+
 				.t2 {
 					color: #333;
 					font-size: 30rpx;

+ 117 - 0
code/HBX/pages/webview/changeConfig.vue

@@ -0,0 +1,117 @@
+<template>
+	<view class="pages">
+		<uni-forms class="form" :value="dataObj" ref="formData" :rules="rules"  :border="true"
+			label-width="100">
+			<uni-forms-item label="服务地址" name="url" :required="true" label-width="100">
+				<input v-model="dataObj.url" type="text"
+					class="uni-input" placeholder="例如:192.168.1.125" />
+			</uni-forms-item>
+			<uni-forms-item label="端口号" name="port" :required="true" label-width="100">
+				<input v-model="dataObj.port" type="text"
+					   class="uni-input" placeholder="例如:8081" />
+			</uni-forms-item>
+		</uni-forms>
+		<button class="but" type="default" :loading="loading" :disabled="loading" @tap="changePass">确认</button>
+	</view>
+</template>
+
+<script>
+	import {
+		updateMobile,
+	} from '@/common/api.js'
+    import {
+        api_config
+    } from "@/config.js"
+	export default {
+		data() {
+			return {
+				dataObj: {
+					url: "",
+					port:""
+				},
+				loading: false,
+				rules: {
+                    url: {
+						rules: [{
+								required: true,
+								errorMessage: '请输入服务地址',
+							},
+							{
+								validateFunction: function(rule, value, data, callback) {
+									if (!(/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/.test(data.url))) {
+										callback('请输入正确的服务地址')
+									}
+									return true
+								}
+							}
+						]
+					},
+                    port: {
+                        rules: [{
+                            required: true,
+                            errorMessage: '请输入端口号',
+                        },
+                            {
+                                validateFunction: function(rule, value, data, callback) {
+                                    if (!(/^([0-9]|[1-9]\d|[1-9]\d{2}|[1-9]\d{3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])$/.test(data.port))) {
+                                        callback('请输入正确端口号')
+                                    }
+                                    return true
+                                }
+                            }
+                        ]
+                    },
+				}
+			}
+		},
+		onReady() {
+		        this.$refs.formData.setRules(this.rules)
+		    },
+        onShow() {
+            this.dataObj.url = uni.getStorageSync("xjappserver").url
+            this.dataObj.port = uni.getStorageSync("xjappserver").port
+        },
+		methods: {
+			changePass() {
+                this.$refs['formData'].validate().then(result => {
+                    uni.setStorageSync("xjappserver", {
+                    url:this.dataObj.url,
+                    port:this.dataObj.port,
+					})
+                console.log("+++++++++++++++++++++++++++++++")
+					plus.nativeUI.toast('操作成功')
+                console.log("+++++++++++++++++++++++++++++++")
+                // api_config = this.dataObj.url+":"+this.dataObj.port
+                console.log(api_config)
+					setTimeout(() =>{
+
+						/*uni.navigateBack({
+
+						})*/
+                uni.redirectTo({
+                    animationType: 'pop-in',
+                    animationDuration: 300,
+                    url: '../../pages/native/login',
+                })
+					},1000)
+				})
+				.catch(errors => {
+						console.log("验证不通过=>", errors);
+				})
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.form {
+		border-bottom: 1px solid #EEEEEE;
+	}
+
+	.but {
+		width: 600rpx;
+		margin-top: 420rpx;
+		background-color: #0099FF;
+		color: #fff;
+	}
+</style>

+ 5 - 5
code/HBX/pages/webview/changeEmail.vue

@@ -3,7 +3,7 @@
 		<uni-forms class="form" :value="dataObj" ref="formData" :rules="rules"  :border="true"
 			label-width="100">
 			<uni-forms-item label="新邮箱" name="email" :required="true" label-width="100">
-				<input :value="dataObj.email" type="password" @input="binddata('email',$event.detail.value)"
+				<input :value="dataObj.email" type="text" @input="binddata('email',$event.detail.value)"
 					class="uni-input" placeholder="请输入新邮箱" />
 			</uni-forms-item>
 		</uni-forms>
@@ -20,7 +20,7 @@
 			return {
 				dataObj: {
 					email: ""
-				}, 
+				},
 				loading: false,
 				rules: {
 					email: {
@@ -61,12 +61,12 @@
 						uni.$emit("changeUser",true)
 						plus.nativeUI.toast('修改成功')
 						setTimeout(() =>{
-							
+
 							uni.navigateBack({
-								
+
 							})
 						},1000)
-						
+
 					}).catch(e =>{
 						this.loading = false
 					})

+ 10 - 6
code/HBX/pages/webview/changePassword.vue

@@ -47,9 +47,11 @@
 						},
 						{
 							validateFunction: function(rule, value, data, callback) {
-								let reg = /(?=.*([a-zA-Z].*))(?=.*[0-9].*)[a-zA-Z0-9-*/+.~!@#$%^&*()]{6,20}$/;
-								if (!reg.test(value)) {
-									callback('密码由6-20位数字、字母和字符组成,区分大小写')
+								// let reg = /(?=.*([a-zA-Z].*))(?=.*[0-9].*)[a-zA-Z0-9-*/+.~!@#$%^&*()]{6,20}$/;
+								// console.log(value)
+                                if (value.length>20||value.length<6) {
+								// if (!reg.test(value)) {
+									callback('密码长度6-20位')
 								}
 								return true
 							}
@@ -109,10 +111,10 @@
 										url: '/pages/native/login'
 									});
 								},1000)
-								
+
 							})
 						},2000)
-						
+
 					}).catch(e =>{
 						console.log(e)
 						plus.nativeUI.toast(e.data.msg)
@@ -130,7 +132,9 @@
 	.form {
 		border-bottom: 1px solid #EEEEEE;
 	}
-
+	.uni-input{
+		padding: 0 15rpx;
+	}
 	.but {
 		width: 600rpx;
 		margin-top: 420rpx;

+ 5 - 5
code/HBX/pages/webview/changePhone.vue

@@ -3,7 +3,7 @@
 		<uni-forms class="form" :value="dataObj" ref="formData" :rules="rules"  :border="true"
 			label-width="100">
 			<uni-forms-item label="新手机号" name="mobile" :required="true" label-width="100">
-				<input :value="dataObj.mobile" type="password" @input="binddata('mobile',$event.detail.value)"
+				<input :value="dataObj.mobile" type="text" @input="binddata('mobile',$event.detail.value)"
 					class="uni-input" placeholder="请输入新手机号" />
 			</uni-forms-item>
 		</uni-forms>
@@ -20,7 +20,7 @@
 			return {
 				dataObj: {
 					mobile: ""
-				}, 
+				},
 				loading: false,
 				rules: {
 					mobile: {
@@ -60,12 +60,12 @@
 						uni.$emit("changeUser",true)
 						plus.nativeUI.toast('修改成功')
 						setTimeout(() =>{
-							
+
 							uni.navigateBack({
-								
+
 							})
 						},1000)
-						
+
 					}).catch(e =>{
 						this.loading = false
 					})

+ 6 - 6
code/HBX/pages/webview/homeSelect.vue

@@ -22,7 +22,7 @@
 
 <script>
 	var domModule = weex.requireModule('dom');
-	
+
 	domModule.addRule('fontFace', {
 		'fontFamily': "iconfont",
 		'src': "url('/static/iconfont.ttf')"
@@ -30,11 +30,11 @@
 	export default {
 		data(){
 			return {
-				
+
 			}
 		},
 		mounted() {
-			
+
 		},
 		methods:{
 			close() {
@@ -73,7 +73,7 @@
 	}
 </style>
 <style scoped lang="scss">
-	
+
 	.mask {
 		position: fixed;
 		left: 0;
@@ -87,12 +87,12 @@
 		align-items: center;
 		background-color: rgba(0, 0, 0, 0.4);
 	}
-	
+
 	.iconTop{
 		font-family: iconfont;
 		color: #484848;
 		text-align: right;
-		display: flex; 
+		display: flex;
 		font-size: 20px;
 		margin-bottom: -22rpx;
 		margin-left: 180rpx;

+ 17 - 1
code/HBX/pages/webview/newsDetail.vue

@@ -26,7 +26,7 @@
 </template>
 
 <script>
-	import {readMsg} from '@/common/api.js'
+	import {readMsg,getReadNum} from '@/common/api.js'
 	export default {
 		data() {
 			return {
@@ -39,10 +39,26 @@
 			}
 		},
 		mounted() {
+			var that = this;
 			this.dataObj = uni.getStorageSync("newsDetailxjapp")
 			readMsg({
 				msgId:this.dataObj.id
 			}).then(res =>{
+				getReadNum({
+					 userId: that.$store.state.Token
+                }).then(res => {
+                     if(res==0){
+                        uni.hideTabBarRedDot({ //隐藏红点
+                          index: 2
+                        })
+                     }else{
+                        uni.showTabBarRedDot({ //显示红点
+                          index: 2
+                        })
+                     }
+                }).catch(e => {
+                     console.log(e)
+                })
 				console.log(res)
 			}).catch(e =>{
 				console.log(e)

+ 6 - 6
code/HBX/pages/webview/popSelect.vue

@@ -22,7 +22,7 @@
 
 <script>
 	var domModule = weex.requireModule('dom');
-	
+
 	domModule.addRule('fontFace', {
 		'fontFamily': "iconfont",
 		'src': "url('/static/iconfont.ttf')"
@@ -30,11 +30,11 @@
 	export default {
 		data(){
 			return {
-				
+
 			}
 		},
 		mounted() {
-			
+
 		},
 		methods:{
 			close() {
@@ -73,7 +73,7 @@
 	}
 </style>
 <style scoped lang="scss">
-	
+
 	.mask {
 		position: fixed;
 		left: 0;
@@ -87,12 +87,12 @@
 		align-items: center;
 		background-color: rgba(0, 0, 0, 0.4);
 	}
-	
+
 	.iconTop{
 		font-family: iconfont;
 		color: #484848;
 		text-align: right;
-		display: flex; 
+		display: flex;
 		font-size: 20px;
 		margin-bottom: -22rpx;
 		margin-left: 180rpx;

+ 1 - 1
code/HBX/pages/webview/popupHome.vue

@@ -26,7 +26,7 @@
 		methods: {
 			confirm() {
 				uni.$emit('DpopLog1', {
-				    content: 'comfirm'  
+				    content: 'comfirm'
 				});
 			},
 			close() {

+ 1 - 1
code/HBX/pages/webview/popupTask.vue

@@ -26,7 +26,7 @@
 		methods: {
 			confirm() {
 				uni.$emit('HpopLog1', {
-				    content: 'comfirm'  
+				    content: 'comfirm'
 				});
 			},
 			close() {

+ 29 - 1
code/HBX/static/iconfont.css

@@ -1,6 +1,6 @@
 @font-face {
   font-family: "iconfont"; /* Project id 3046192 */
-  src: url('@/static/iconfont.ttf?t=1644809060477') format('truetype');
+  src: url('@/static/iconfont.ttf?t=1646980552149') format('truetype');
 }
 
 .iconfont {
@@ -11,6 +11,34 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-luzhang:before {
+  content: "\e610";
+}
+
+.icon-jizhan-copy-copy-copy:before {
+  content: "\e60a";
+}
+
+.icon-luzhang1:before {
+  content: "\e60c";
+}
+
+.icon-dianchi-chongdian:before {
+  content: "\e7a3";
+}
+
+.icon-dianchi-gaodianliang:before {
+  content: "\e7a5";
+}
+
+.icon-weichongdian:before {
+  content: "\e629";
+}
+
+.icon-shuaxin:before {
+  content: "\ec08";
+}
+
 .icon-sanjiaoxing1:before {
   content: "\e649";
 }

BIN
code/HBX/static/iconfont.ttf


BIN
code/HBX/static/iconfont2.ttf


+ 1 - 1
code/HBX/uni_modules/uni-data-picker/components/uni-data-pickerview/uni-data-pickerview.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="uni-data-pickerview">
-		<scroll-view class="selected-area" scroll-x="true" scroll-y="false" :show-scrollbar="false">
+		<scroll-view class="selected-area" scroll-x="true" scroll-y="true" :show-scrollbar="true">
 			<view class="selected-list">
 				<template v-for="(item,index) in selected">
 					<view class="selected-item"