瀏覽代碼

bug 修复

lilei 4 年之前
父節點
當前提交
7041fc1bc5

+ 14 - 11
hybrid/html/video.html

@@ -155,7 +155,7 @@
 						<div class="remarks">
 						<div class="remarks">
 							<a-textarea placeholder="请填写备注内容(选填)" v-model="curZbItem.comments" :rows="4" />
 							<a-textarea placeholder="请填写备注内容(选填)" v-model="curZbItem.comments" :rows="4" />
 						</div>
 						</div>
-						<div class="icons">
+						<div class="icons" @click="takePhotos(2)">
 							<a-icon class="aicon" type="camera" />
 							<a-icon class="aicon" type="camera" />
 						</div>
 						</div>
 					</div>
 					</div>
@@ -273,7 +273,6 @@
 					},
 					},
 					// 获取视频地址成功
 					// 获取视频地址成功
 					getVideoUrlSuccess(url){
 					getVideoUrlSuccess(url){
-						console.log(url)
 						// 重置播放器
 						// 重置播放器
 						this.showYt = false
 						this.showYt = false
 						this.showYtbtns = false
 						this.showYtbtns = false
@@ -386,15 +385,19 @@
 						let obj = this.zbItem[this.activeZbIndex]
 						let obj = this.zbItem[this.activeZbIndex]
 						this.curZbItem = JSON.parse(JSON.stringify(obj))
 						this.curZbItem = JSON.parse(JSON.stringify(obj))
 						// 抓拍
 						// 抓拍
-						this.takePhotos()
+						this.takePhotos(1)
 					},
 					},
 					// 抓拍
 					// 抓拍
-					takePhotos(){
-						this.sendMsg('takePhotos',JSON.stringify({
-							streamId: this.curVideo.streamId,
-							videoPlayerStatus: this.videoPlayerStatus,
-							type: 1
-						}))
+					takePhotos(type){
+						if(!this.curZbItem.taskTargetPhotoVOList||this.curZbItem.taskTargetPhotoVOList.length<6){
+							this.sendMsg('takePhotos',JSON.stringify({
+								streamId: this.curVideo.streamId,
+								videoPlayerStatus: this.videoPlayerStatus,
+								type: type
+							}))
+						}else{
+							this.sendMsg('toast','最多抓拍6张图片')
+						}
 					},
 					},
 					// 拍照成功后,返回图片地址
 					// 拍照成功后,返回图片地址
 					takePhotoSuccess(url){
 					takePhotoSuccess(url){
@@ -402,8 +405,8 @@
 							id: new Date().getTime(),
 							id: new Date().getTime(),
 							photoPath: url
 							photoPath: url
 						}
 						}
-						console.log(this.curZbItem.taskTargetPhotoVOList)
-						if(this.curZbItem.taskTargetPhotoVOList){
+						console.log(JSON.stringify(this.curZbItem))
+						if(!this.curZbItem.hasOwnProperty('taskTargetPhotoVOList')){
 							this.curZbItem.taskTargetPhotoVOList = [obj]
 							this.curZbItem.taskTargetPhotoVOList = [obj]
 						}else{
 						}else{
 							this.curZbItem.taskTargetPhotoVOList.push(obj)
 							this.curZbItem.taskTargetPhotoVOList.push(obj)

+ 6 - 3
pages/shopTour/shopTour.vue

@@ -29,6 +29,12 @@
 			onmessage(event) {
 			onmessage(event) {
 				let data = event.detail.data[0]
 				let data = event.detail.data[0]
 				// console.log(data)
 				// console.log(data)
+				if(data.action == 'toast'){
+					uni.showToast({
+						icon:'none',
+						title: data.msg
+					})
+				}
 				// webview 窗口传过来的页面状态
 				// webview 窗口传过来的页面状态
 				if(data.action == 'getWinStatus'){
 				if(data.action == 'getWinStatus'){
 					let d = JSON.parse(data.msg)
 					let d = JSON.parse(data.msg)
@@ -201,7 +207,6 @@
 			// 查询任务明细
 			// 查询任务明细
 			getTaskDetail(){
 			getTaskDetail(){
 				getTaskDetail({id:this.taskId}).then(res => {
 				getTaskDetail({id:this.taskId}).then(res => {
-					console.log(res,'getTaskDetail')
 					this.assessSchemeId = res.data.assessSchemeId // 方案id
 					this.assessSchemeId = res.data.assessSchemeId // 方案id
 					this.wv.evalJS("vm.getTaskDetail('"+JSON.stringify(res.data)+"')")
 					this.wv.evalJS("vm.getTaskDetail('"+JSON.stringify(res.data)+"')")
 				})
 				})
@@ -209,7 +214,6 @@
 			// 任务考评项目明细
 			// 任务考评项目明细
 			getTaskItem(){
 			getTaskItem(){
 				getTaskItem({id:this.taskId}).then(res => {
 				getTaskItem({id:this.taskId}).then(res => {
-					console.log(res,this.taskId,'getTaskItem')
 					this.wv.evalJS("vm.getTaskItem('"+JSON.stringify(res.data)+"')")
 					this.wv.evalJS("vm.getTaskItem('"+JSON.stringify(res.data)+"')")
 				})
 				})
 			},
 			},
@@ -237,7 +241,6 @@
 			},
 			},
 			// 获取视频地址
 			// 获取视频地址
 			getStoreVideoUrl(item){
 			getStoreVideoUrl(item){
-				console.log({streamId:item.streamId,outProtocol:"hls"})
 				getVideoUrl({streamId:item.streamId,outProtocol:"hls"}).then(res=>{
 				getVideoUrl({streamId:item.streamId,outProtocol:"hls"}).then(res=>{
 					console.log(res)
 					console.log(res)
 					if(res.status == 200&&res.data){
 					if(res.status == 200&&res.data){

+ 0 - 2
pages/videoShopTour/videoShopTour.vue

@@ -76,10 +76,8 @@
 			},
 			},
 			//  开始巡店
 			//  开始巡店
 			goPage(item){
 			goPage(item){
-				console.log(item)
 				// 判断当前门店是否已绑定设备
 				// 判断当前门店是否已绑定设备
 				findStoreVsDevice({storeCode:item.code}).then(res=>{
 				findStoreVsDevice({storeCode:item.code}).then(res=>{
-					console.log(res)
 					if(res.data.length){
 					if(res.data.length){
 						// 门店下的设备
 						// 门店下的设备
 						this.$u.vuex('vuex_storeVideoList',res.data)
 						this.$u.vuex('vuex_storeVideoList',res.data)

文件差異過大導致無法顯示
+ 0 - 0
unpackage/dist/dev/app-plus/app-service.js


+ 14 - 11
unpackage/dist/dev/app-plus/hybrid/html/video.html

@@ -155,7 +155,7 @@
 						<div class="remarks">
 						<div class="remarks">
 							<a-textarea placeholder="请填写备注内容(选填)" v-model="curZbItem.comments" :rows="4" />
 							<a-textarea placeholder="请填写备注内容(选填)" v-model="curZbItem.comments" :rows="4" />
 						</div>
 						</div>
-						<div class="icons">
+						<div class="icons" @click="takePhotos(2)">
 							<a-icon class="aicon" type="camera" />
 							<a-icon class="aicon" type="camera" />
 						</div>
 						</div>
 					</div>
 					</div>
@@ -273,7 +273,6 @@
 					},
 					},
 					// 获取视频地址成功
 					// 获取视频地址成功
 					getVideoUrlSuccess(url){
 					getVideoUrlSuccess(url){
-						console.log(url)
 						// 重置播放器
 						// 重置播放器
 						this.showYt = false
 						this.showYt = false
 						this.showYtbtns = false
 						this.showYtbtns = false
@@ -386,15 +385,19 @@
 						let obj = this.zbItem[this.activeZbIndex]
 						let obj = this.zbItem[this.activeZbIndex]
 						this.curZbItem = JSON.parse(JSON.stringify(obj))
 						this.curZbItem = JSON.parse(JSON.stringify(obj))
 						// 抓拍
 						// 抓拍
-						this.takePhotos()
+						this.takePhotos(1)
 					},
 					},
 					// 抓拍
 					// 抓拍
-					takePhotos(){
-						this.sendMsg('takePhotos',JSON.stringify({
-							streamId: this.curVideo.streamId,
-							videoPlayerStatus: this.videoPlayerStatus,
-							type: 1
-						}))
+					takePhotos(type){
+						if(!this.curZbItem.taskTargetPhotoVOList||this.curZbItem.taskTargetPhotoVOList.length<6){
+							this.sendMsg('takePhotos',JSON.stringify({
+								streamId: this.curVideo.streamId,
+								videoPlayerStatus: this.videoPlayerStatus,
+								type: type
+							}))
+						}else{
+							this.sendMsg('toast','最多抓拍6张图片')
+						}
 					},
 					},
 					// 拍照成功后,返回图片地址
 					// 拍照成功后,返回图片地址
 					takePhotoSuccess(url){
 					takePhotoSuccess(url){
@@ -402,8 +405,8 @@
 							id: new Date().getTime(),
 							id: new Date().getTime(),
 							photoPath: url
 							photoPath: url
 						}
 						}
-						console.log(this.curZbItem.taskTargetPhotoVOList)
-						if(this.curZbItem.taskTargetPhotoVOList){
+						console.log(JSON.stringify(this.curZbItem))
+						if(!this.curZbItem.hasOwnProperty('taskTargetPhotoVOList')){
 							this.curZbItem.taskTargetPhotoVOList = [obj]
 							this.curZbItem.taskTargetPhotoVOList = [obj]
 						}else{
 						}else{
 							this.curZbItem.taskTargetPhotoVOList.push(obj)
 							this.curZbItem.taskTargetPhotoVOList.push(obj)

部分文件因文件數量過多而無法顯示