ccjgmwz 3 лет назад
Родитель
Сommit
5fedb89038

+ 4 - 0
.hbuilderx/debug.config.json

@@ -0,0 +1,4 @@
+{
+    "rootPathIndex": 1,
+    "webRoot": "${projectDir}"
+}

+ 2 - 2
config/index.js

@@ -1,7 +1,7 @@
 const dev = {
 	baseUrl: 'https://www.zthymaoyi.com',
-	baseUrlNew: 'http://192.168.1.107:8090/',
-	// baseUrlNew: 'http://api1.eliangeyun.com/',
+	// baseUrlNew: 'http://192.168.1.107:8090/',
+	baseUrlNew: 'http://api1.eliangeyun.com/',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false
 }

+ 5 - 3
manifest.json

@@ -2,8 +2,8 @@
     "name" : "易粮易运",
     "appid" : "__UNI__7297DA2",
     "description" : "易粮易运——为天下粮食人服务的App",
-    "versionName" : "1.1.15",
-    "versionCode" : 1114,
+    "versionName" : "1.1.18",
+    "versionCode" : 1118,
     "transformPx" : false,
     /* SDK配置 */
     "quickapp" : {},
@@ -186,7 +186,9 @@
         "modules" : {
             "SQLite" : {},
             "Push" : {},
-            "Maps" : {}
+            "Maps" : {},
+            "LivePusher" : {},
+            "VideoPlayer" : {}
         },
         "splashscreen" : {
             "waiting" : false

+ 12 - 6
pages.json

@@ -311,12 +311,18 @@
 				"navigationStyle": "custom"
 			}
 		},
-		// {
-		// 	"path": "pages/user/report",
-		// 	"style": {
-		// 		"navigationBarTitleText": "数据报表"
-		// 	}
-		// },
+		{
+			"path": "pages/user/report",
+			"style": {
+				"navigationBarTitleText": "数据报表"
+			}
+		},
+		{
+			"path": "pages/user/mintor",
+			"style": {
+				"navigationBarTitleText": "库点监控"
+			}
+		},
 		{
 			"path": "pages/buy/transaction",
 			"style": {

+ 0 - 1
pages/public/login_account_number.vue

@@ -117,7 +117,6 @@
 							console.log("loginQuickly",res)
 							if(res1.data.code==200){
 								uni.setStorageSync('pcUserInfo', res1.data.data)
-								// debugger
 								helper.getListByUserId()
 							}
 							else{

+ 49 - 10
pages/user/depotMonitoring.vue

@@ -13,13 +13,20 @@
 		<view class="content">
 			<view class='title'>监控视频</view>
 			<view class="video-list">
-				<view class="video-list-item" v-for="(item,index) in videoList" :key="index">
-					<view class="img-content" v-show="!item.isPlay">
-						<image class="img play" src="../../static/img/play-btn.png" mode=""  @click="playVideo(item)"></image>
+					<view  class=" cu-list grid col-4 no-border">
+						<view class="cu-item" style='text-align:center;' v-for="(item,index) in videoList" 
+							@click="gridClick(item)"  >
+							<view v-if="item.Status == 'ON'">
+								<image v-if="item.SnapURL" :src="'https://live.eliangeyun.com'+item.SnapURL" class="sign1"></image>
+								<view v-else style="background-color: #008000;" class="sign1">
+									<image  src="../../static/img/play-btn.png" style="width: 80rpx;height: 80rpx;margin-top: 40rpx;"  ></image>
+								</view>
+							</view>
+						</view>
 					</view>
-					<iframe class='video-iframe' v-show="item.isPlay"  :src="item.src" width="" height="" allowfullscreen="true"
+					<!-- <iframe class='video-iframe' v-show="item.isPlay"  :src="item.src" width="" height="" allowfullscreen="true"
 						webkitallowfullscreen="true" mozallowfullscreen="true"
-						allow="autoplay; fullscreen; microphone;"></iframe>
+						allow="autoplay; fullscreen; microphone;"></iframe> -->
 				</view>
 			</view>
 		</view>
@@ -108,11 +115,23 @@
 					})
 				}
 			})
+			var that = this
+			uni.request({
+			    url:  'https://live.eliangeyun.com/api/v1/device/channellist',
+			    method: 'GET',
+			    success: (res) => {		
+			    	if (res.statusCode === 200) {
+						that.videoList = res.data.ChannelList
+			    	}
+			    },
+				fail:(res)=> {
+					console.log("fail::",res)
+				}
+			})
 			this.$api.doRequest('get', '/openServiceInfo/selectCommonCompany', {
 				phone: this.userInfo.phone
 			}).then(res => {
 				if (res.data.code == 200) {
-					debugger
 					this.init(res.data.data[0].compId)
 				}
 			})
@@ -174,14 +193,19 @@
 						this.binNumber = '暂无'
 					}
 				})
+				
 			},
 			warehousechange(e) {
 				this.warehouseName = this.warehouseList[e[0]].warehouseName
 				console.log(this.warehouseName)
 			},
-			playVideo(item){
-				console.log(item)
-				item.isPlay = true
+			gridClick(item){
+				var param = "https://live.eliangeyun.com/play.html?serial="+item.DeviceID+"&code="+item.ID+"&aspect=fullscreen"
+				uni.setStorageSync("mintor",param)
+				uni.navigateTo({
+					url:'/pages/user/mintor'
+				})
+				console.log("param",param)
 			}
 		}
 	}
@@ -190,7 +214,22 @@
 	page {
 		background: #F5F6FA;
 	}
-
+	
+	.cu-list>.cu-item:after {
+		border: none;
+	}
+	
+	.sign {
+		width: 35px;
+		height: 35px;
+		top: 4px;
+	}
+	
+	.sign1 {
+		width: 76px;
+		height: 76px;
+		top: 4px;
+	}
 	.wrap {
 		background: #fff;
 		margin: 10px;

+ 22 - 0
pages/user/mintor.vue

@@ -0,0 +1,22 @@
+<template>
+    <web-view  :src="url"></web-view>
+</template>
+
+<script>
+	export default {
+        data() {
+            return {
+                url:"",
+            }
+        },
+        onShow(){
+			this.url = uni.getStorageSync("mintor")
+        }
+    }
+</script>
+    
+
+
+<style>
+
+</style>

+ 12 - 3
pages/user/report.vue

@@ -1,16 +1,25 @@
 <template>
-    <web-view :src="url"></web-view>
+    <web-view  :src="url"></web-view>
+    <!-- <web-view v-if="flag" :src="url"></web-view> -->
+	<!-- <iframe v-else :src="url" width="340" height="360" allowfullscreen allow="autoplay; fullscreen; microphone;"></iframe> -->
 </template>
 
 <script>
 	export default {
         data() {
             return {
-                url:"https://datav.aliyuncs.com/share/235518097ffd673bc1eb05011b9a02b6"
+                url:"https://datav.aliyuncs.com/share/235518097ffd673bc1eb05011b9a02b6",
+				flag:true
             }
         },
         onLoad: function(option) {
-            // this.url = option.url;
+			if(option.url){
+				this.url = option.url;
+				uni.setNavigationBarTitle({
+					title:"库点监控"
+				})
+				this.flag = false
+			}
         },
         methods: {
         }

+ 1 - 1
pages/user/user.vue

@@ -317,7 +317,7 @@
 				}
 				return false
 			},
-			isShow(){debugger
+			isShow(){
 				for(let k = 0;k<this.gridList1.length;k++){
 					if(k==6){
 						this.gridList1[k].show = this.getRoles('reportData.view')