Merge branch 'api10' of http://88.22.24.105:3000/harmony_car/subject-two into api10
This commit is contained in:
		
						commit
						5910f134a2
					
				| @ -65,10 +65,10 @@ export interface VideoConfig { | ||||
|   dolt?: string, | ||||
|   fontSize?: string | ||||
|   rlls?: string, | ||||
|   spzd4: boolean, | ||||
|   spzd3: boolean, | ||||
|   spzd2: boolean, | ||||
|   spzd1: boolean, | ||||
|   spzd4?: boolean, | ||||
|   spzd3?: boolean, | ||||
|   spzd2?: boolean, | ||||
|   spzd1?: boolean, | ||||
|   zdyz?: string, | ||||
| } | ||||
| 
 | ||||
|  | ||||
| @ -1,29 +1,20 @@ | ||||
| import { takePhoto } from '../../../service/videoService'; | ||||
| import { takePhoto } from '../../../utils/Video'; | ||||
| import promptAction from '@ohos.promptAction'; | ||||
| import { judgeConfig } from './judgeConfig'; | ||||
| import FileUtils from '../../../utils/FileUtils'; | ||||
| 
 | ||||
| interface Params { | ||||
|   userName: string | ||||
|   pwd: string | ||||
|   ip: string | ||||
|   port: string | ||||
|   rlls: string | ||||
|   pztd: string | ||||
| } | ||||
| import {VideoConfig} from '../../../model/Common' | ||||
| import common from '@ohos.app.ability.common'; | ||||
| 
 | ||||
| export default class FilePhoto { | ||||
|   public mediaTest | ||||
|   private params: Params | ||||
|   private context: any | ||||
|   private params: VideoConfig | ||||
|   private context:common.UIAbilityContext | ||||
|   public getPhoto = async () => { | ||||
|     const { params } = this; | ||||
|     if (!judgeConfig.isPhotoOpen) { | ||||
|       return '' | ||||
|     } else { | ||||
|       try { | ||||
|         console.info('surenjun', '拍照开始') | ||||
|         const res = await takePhoto(params, this.context, 'pz/', 2); | ||||
|         const res = await takePhoto(this.params, this.context, 'pz/', 2); | ||||
|         console.info('surenjun', '拍照结束' + JSON.stringify(res)) | ||||
|         return res.base64 | ||||
|       } catch (e) { | ||||
| @ -38,21 +29,20 @@ export default class FilePhoto { | ||||
|   } | ||||
|   private fileUtil: FileUtils | ||||
| 
 | ||||
|   constructor(context) { | ||||
|   constructor(context:common.UIAbilityContext) { | ||||
|     (async () => { | ||||
|       //TODO 309参数 获取拍照摄像头拍照通道 | ||||
|       const fileUtil = new FileUtils(context) | ||||
|       const strConfig = | ||||
|         await fileUtil.readFile('/mnt/hmdfs/100/account/device_view/local/files/duolun/config/config3.txt'); | ||||
|       const config = JSON.parse(strConfig) | ||||
|       const { userName, ip, pwd, port, rlls, pztd } = config | ||||
|       const config: VideoConfig = JSON.parse(strConfig as string) | ||||
|       this.params = { | ||||
|         userName, | ||||
|         pwd, | ||||
|         ip, | ||||
|         port, | ||||
|         rlls, | ||||
|         pztd | ||||
|         userName:config.userName, | ||||
|         pwd:config.pwd, | ||||
|         ip:config.ip, | ||||
|         port:config.port, | ||||
|         rlls:config.rlls, | ||||
|         pztd:config.pztd, | ||||
|       } | ||||
|       this.context = context | ||||
|       this.fileUtil = fileUtil | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user