fix:提交视频文件mock数据
This commit is contained in:
		
							parent
							
								
									e65c48f1eb
								
							
						
					
					
						commit
						8ec6377f77
					
				| @ -4,13 +4,13 @@ | ||||
|       { | ||||
|         "name": "default", | ||||
|         "material": { | ||||
|           "certpath": "/Users/surenjun/.ohos/config/openharmony/auto_ohos_default_subject-two_com.oh.dts.cer", | ||||
|           "storePassword": "0000001B0C5B52D8C8C6F415D4216EAD2848AA4A376B36FD72006E4072C15BA3D11E6E65C0D1FFA92A6D86", | ||||
|           "certpath": "/Users/wangzhongjie/.ohos/config/openharmony/auto_ohos_default_subject-two_com.oh.dts.cer", | ||||
|           "storePassword": "0000001BC865153A35BD7DDD2950D70622A2081C58D17D2F5BBE67AE83F469B41A05EED0BB09AA66043089", | ||||
|           "keyAlias": "debugKey", | ||||
|           "keyPassword": "0000001B8DCA3C8913C86858A0CDEAEB6BEE0DC29FCE9932930CA1FFE68FFF84341736AADF81F056CDD683", | ||||
|           "profile": "/Users/surenjun/.ohos/config/openharmony/auto_ohos_default_subject-two_com.oh.dts.p7b", | ||||
|           "keyPassword": "0000001BB839AC92D8CB8AF4765ADD271E687C74C82EC1D0ED2072093ADB1E831C3E99148406836748BCD7", | ||||
|           "profile": "/Users/wangzhongjie/.ohos/config/openharmony/auto_ohos_default_subject-two_com.oh.dts.p7b", | ||||
|           "signAlg": "SHA256withECDSA", | ||||
|           "storeFile": "/Users/surenjun/.ohos/config/openharmony/auto_ohos_default_subject-two_com.oh.dts.p12" | ||||
|           "storeFile": "/Users/wangzhongjie/.ohos/config/openharmony/auto_ohos_default_subject-two_com.oh.dts.p12" | ||||
|         } | ||||
|       } | ||||
|     ], | ||||
|  | ||||
| @ -1,4 +1,5 @@ | ||||
| import {User} from "../pages/interfaces" | ||||
| // 候选人数据
 | ||||
| export const CandidateData: Array<User> = [ | ||||
|   { | ||||
|     sfzmhm: '342323199501470011', | ||||
|  | ||||
							
								
								
									
										35
									
								
								entry/src/main/ets/mock/VideoData.ets
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								entry/src/main/ets/mock/VideoData.ets
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,35 @@ | ||||
| import { VideoConfig } from '../pages/interfaces' | ||||
| 
 | ||||
| // 视频配置默认数据 | ||||
| export const VideoConfigData: VideoConfig = { | ||||
|   videoNum: '1', | ||||
|   spls: '1', | ||||
|   wz: '0,0', | ||||
|   faceFlag: false, | ||||
|   shuiying: true, | ||||
|   pztd: '2', | ||||
|   ljlx: '', | ||||
|   ip: '192.168.36.94', | ||||
|   port: '554', | ||||
|   userName: 'admin', | ||||
|   pwd: '12345qwe', | ||||
|   td1: '1', | ||||
|   td2: '2', | ||||
|   td3: '3', | ||||
|   td4: '4', | ||||
|   videoRecord1: false, | ||||
|   videoRecord2: true, | ||||
|   videoRecord3: false, | ||||
|   videoRecord4: false, | ||||
|   text1: '', | ||||
|   text2: '', | ||||
|   text3: '', | ||||
|   dolt: '', | ||||
|   fontSize: '', | ||||
|   rlls: '1', | ||||
|   spzd4: false, | ||||
|   spzd3: false, | ||||
|   spzd2: false, | ||||
|   spzd1: false, | ||||
|   zdyz: '5', | ||||
| } | ||||
							
								
								
									
										3
									
								
								entry/src/main/ets/mock/index.ets
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								entry/src/main/ets/mock/index.ets
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,3 @@ | ||||
| export * from "./CandidateData" | ||||
| 
 | ||||
| export * from "./VideoData" | ||||
| @ -13,7 +13,7 @@ import common from '@ohos.app.ability.common'; | ||||
| import { User, VideoConfig } from './interfaces'; | ||||
| import WebRTCVoice from './webRTC/'; | ||||
| import promptAction from '@ohos.promptAction'; | ||||
| import { CandidateData, EmptyCandidateObject } from '../mock/CandidateData'; | ||||
| import { CandidateData, EmptyCandidateObject } from '../mock'; | ||||
| import { getSyncData } from '../common/service/initable'; | ||||
| 
 | ||||
| @Entry | ||||
|  | ||||
| @ -1,10 +1,12 @@ | ||||
| import TopLogo from './compontents/topLogo' | ||||
| import FileUtil from '../common/utils/File' | ||||
| import { VideoConfig } from './interfaces' | ||||
| import TopLogo from './compontents/topLogo'; | ||||
| import FileUtil from '../common/utils/File'; | ||||
| import { VideoConfig } from './interfaces'; | ||||
| import common from '@ohos.app.ability.common'; | ||||
| import promptAction from '@ohos.promptAction' | ||||
| import { startRecordVideo, endRecordVideo,takePhoto } from '../common/service/videoService' | ||||
| import { GlobalConfig } from '../config/index' | ||||
| import promptAction from '@ohos.promptAction'; | ||||
| import { endRecordVideo, startRecordVideo, takePhoto } from '../common/service/videoService'; | ||||
| import { GlobalConfig } from '../config/index'; | ||||
| import { VideoConfigData } from '../mock'; | ||||
| 
 | ||||
| @Entry | ||||
| @Component | ||||
| struct Index { | ||||
| @ -21,74 +23,10 @@ struct Index { | ||||
|   } | ||||
|   @State isAutoPlay: boolean = true | ||||
|   @State showFlag: boolean = false | ||||
|   private vocObj = null; | ||||
|   @State showControls: boolean = false | ||||
|   private fileUtil: FileUtil | ||||
|   @State @Watch('outClick') outFlag: boolean = false; | ||||
|   @State oldParam: VideoConfig = { | ||||
|     videoNum:'1', | ||||
|     spls: '1', | ||||
|     wz: '0,0', | ||||
|     faceFlag: false, | ||||
|     shuiying: true, | ||||
|     pztd: '2', | ||||
|     ljlx: '', | ||||
|     ip: '192.168.36.94', | ||||
|     port: '554', | ||||
|     userName: 'admin', | ||||
|     pwd: '12345qwe', | ||||
|     td1: '1', | ||||
|     td2: '2', | ||||
|     td3: '3', | ||||
|     td4: '4', | ||||
|     videoRecord1: false, | ||||
|     videoRecord2: true, | ||||
|     videoRecord3: false, | ||||
|     videoRecord4: false, | ||||
|     text1: '', | ||||
|     text2: '', | ||||
|     text3: '', | ||||
|     dolt: '', | ||||
|     fontSize: '', | ||||
|     rlls: '1', | ||||
|     spzd4:false, | ||||
|     spzd3:false, | ||||
|     spzd2:false, | ||||
|     spzd1:false, | ||||
|     zdyz:'5', | ||||
|   } | ||||
|   @State param: VideoConfig = { | ||||
|     videoNum:'1', | ||||
|     spls: '1', | ||||
|     wz: '0,0', | ||||
|     faceFlag: false, | ||||
|     shuiying: true, | ||||
|     pztd: '2', | ||||
|     ljlx: '', | ||||
|     ip: '192.168.36.94', | ||||
|     port: '554', | ||||
|     userName: 'admin', | ||||
|     pwd: '12345qwe', | ||||
|     td1: '1', | ||||
|     td2: '2', | ||||
|     td3: '3', | ||||
|     td4: '4', | ||||
|     videoRecord1: false, | ||||
|     videoRecord2: true, | ||||
|     videoRecord3: false, | ||||
|     videoRecord4: false, | ||||
|     text1: '', | ||||
|     text2: '', | ||||
|     text3: '', | ||||
|     dolt: '', | ||||
|     fontSize: '', | ||||
|     rlls: '1', | ||||
|     spzd4:false, | ||||
|     spzd3:false, | ||||
|     spzd2:false, | ||||
|     spzd1:false, | ||||
|     zdyz:'5', | ||||
|   } | ||||
|   @State oldParam: VideoConfig = VideoConfigData | ||||
|   @State param: VideoConfig = VideoConfigData | ||||
|   @State openFlag: boolean = true | ||||
|   @State lsArr: Array<any> = [ | ||||
|     { key: '第一路' }, | ||||
| @ -96,7 +34,8 @@ struct Index { | ||||
|     { key: '第三路' }, | ||||
|     { key: '第四路' }, | ||||
|   ] | ||||
| 
 | ||||
|   private vocObj = null; | ||||
|   private fileUtil: FileUtil | ||||
|   private context = getContext(this) as common.UIAbilityContext; | ||||
|   private controller1: VideoController = new VideoController() | ||||
|   private controller2: VideoController = new VideoController() | ||||
| @ -319,7 +258,8 @@ struct Index { | ||||
|                 .width(34 * this.ratio) | ||||
|                 .height(26 * this.ratio) | ||||
|                 .fontSize(this.inputFontSize * this.ratio) | ||||
|                 .margin({ left: 10 * this.ratio, right: 15 * this.ratio }).onChange((value: string) => { | ||||
|                 .margin({ left: 10 * this.ratio, right: 15 * this.ratio }) | ||||
|                 .onChange((value: string) => { | ||||
|                   this.param.zdyz = value | ||||
|                 }) | ||||
|               // Text('k').fontColor('#333333').fontSize(16 * this.ratio) | ||||
| @ -339,6 +279,7 @@ struct Index { | ||||
|                 Row() { | ||||
|                   Row() { | ||||
|                   }.width(70 * this.ratio) | ||||
| 
 | ||||
|                   Text('IP地址') | ||||
|                     .width(158 * this.ratio) | ||||
|                     .fontSize(16 * this.ratio) | ||||
| @ -620,14 +561,18 @@ struct Index { | ||||
|     this.fileUtil = fileUtil | ||||
|     this.getVideoConfig() | ||||
|   } | ||||
| 
 | ||||
|   async getfilehandleCode(td) { | ||||
|     const record_handle = await startRecordVideo(this.param, td, this.context, 'lp') | ||||
|     this.rocordHandleObj['rocord_handle'+td] = record_handle | ||||
|   } | ||||
| 
 | ||||
|   outClick() { | ||||
|     this.openFlag = false | ||||
|   } | ||||
| 
 | ||||
|   sleep = (delay) => new Promise((resolve) => setTimeout(resolve, delay)) | ||||
| 
 | ||||
|   async onPageShow() { | ||||
|   } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user