diff --git a/manifest.json b/manifest.json index a68c6a2..a203e42 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,8 @@ "name" : "物联网可视化", "appid" : "__UNI__604B8F1", "description" : "", - "versionName" : "1.0.25", - "versionCode" : 1025, + "versionName" : "1.0.26", + "versionCode" : 1026, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { diff --git a/pages/video/video-detail.vue b/pages/video/video-detail.vue index 213a0bc..8065bc9 100644 --- a/pages/video/video-detail.vue +++ b/pages/video/video-detail.vue @@ -1,10 +1,22 @@ @@ -59,11 +98,19 @@ mixins: [MescrollMixin], data(){ return { + customStyle: { + padding: '30rpx 30rpx', // 注意驼峰命名,并且值必须用引号包括,因为这是对象 + margin:'0' + }, + customStyle2: { + padding: '30rpx 40rpx', // 注意驼峰命名,并且值必须用引号包括,因为这是对象 + margin:'0' + }, upOption:{ noMoreSize: 4, textNoMore: '---- 已经到底啦 ----', empty:{ - tip: '~ 搜索无数据 ~' // 提示 + tip: '~ 暂无监控设备 ~' // 提示 } }, dataList:[], @@ -84,6 +131,9 @@ let curPageData = res.data && res.data.list; let curPageLen = curPageData && curPageData.length || 0; let totalSize = res.data.totalCount; + curPageData.forEach((item,index)=>{ + curPageData[index].channelList = [] + }) this.$nextTick(()=>{ // 隐藏下拉刷新和上拉加载的状态; this.mescroll.endBySize(curPageLen, totalSize); @@ -101,32 +151,137 @@ this.$u.toast('服务器开小差了呢,请您稍后再试') }) }, - goDetail(item){ - console.log("跳转详情",item); - let obj = { - url:encodeURIComponent(item.url), - name:item.label - } - uni.navigateTo({ - url:'./video-detail?obj='+encodeURIComponent(JSON.stringify(item)) + getChanneList(id,index){ + console.log("id",id,index) + this.$api.videoApi.getVideoChannelList({pid: id,page:1,pageSize:999}).then(res => { + if(res.code == 0){ + if(res.data.list && res.data.list.length>0){ + console.log("this.dataList[index]",this.dataList[index]) + this.$nextTick(()=>{ + this.$set(this.dataList[index],'channelList',res.data.list) + }) + }else{ + this.$u.toast('通道为空'); + this.$nextTick(()=>{ + this.$set(this.dataList[index],'channelList',[]) + }) + } + + }else{ + this.$u.toast(res.msg); + } + }, error => { + this.$u.toast('服务器开小差了呢,请您稍后再试') }) + }, + goDetail(index,i){ + console.log("111") + let deviceObj = this.dataList[index]; + let channeObj = this.dataList[index].channelList[i]; + if(channeObj.hdlUrl){ + uni.navigateTo({ + url:'./video-detail?deviceObj='+encodeURIComponent(JSON.stringify(deviceObj))+ '&channeObj='+encodeURIComponent(JSON.stringify(channeObj)) + }) + }else{ + this.$u.toast('获取通道地址错误') + } + } } } - \ No newline at end of file