font-size修改
This commit is contained in:
		
							parent
							
								
									2a78525e42
								
							
						
					
					
						commit
						6abd03b0b8
					
				| @ -17,19 +17,15 @@ import promptAction from '@ohos.promptAction'; | |||||||
| import FilePhoto from './judgeSDK/utils/filePhoto'; | import FilePhoto from './judgeSDK/utils/filePhoto'; | ||||||
| import { getSyncData, upDateTableByArray } from '../common/service/initable'; | import { getSyncData, upDateTableByArray } from '../common/service/initable'; | ||||||
| import { CandidateData, EmptyCandidateObject } from '../mock/CandidateData'; | import { CandidateData, EmptyCandidateObject } from '../mock/CandidateData'; | ||||||
| import BoardPrePareSetPopup from './compontents/judge/BoardPrePareSetPopup' | import BoardPrePareSetPopup from './compontents/judge/BoardPrePareSetPopup'; | ||||||
| import LoadingPopup from './compontents/judge/LoadingPopup'; | import LoadingPopup from './compontents/judge/LoadingPopup'; | ||||||
| import VoiceAnnounce from './judgeSDK/utils/voiceAnnouncements'; | import VoiceAnnounce from './judgeSDK/utils/voiceAnnouncements'; | ||||||
| import { JudgeConfig } from '../config/judge'; |  | ||||||
| import { judgeConfig } from './judgeSDK/utils/judgeConfig'; | import { judgeConfig } from './judgeSDK/utils/judgeConfig'; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @Entry | @Entry | ||||||
| @Component | @Component | ||||||
| struct UserInfo { | struct UserInfo { | ||||||
|   private filePhoto: FilePhoto |  | ||||||
|   private avPlayer |  | ||||||
| 
 |  | ||||||
|   @State pageIndex: number = 0 |   @State pageIndex: number = 0 | ||||||
|   @State ratio: number = 1700 / 960 |   @State ratio: number = 1700 / 960 | ||||||
|   @State index: number = 0 |   @State index: number = 0 | ||||||
| @ -48,9 +44,12 @@ struct UserInfo { | |||||||
|   @State isBoardPrePareSetPopupOpen: boolean = false |   @State isBoardPrePareSetPopupOpen: boolean = false | ||||||
|   @State isFirstBoardPrePareSetPopupBtnShow: boolean = false |   @State isFirstBoardPrePareSetPopupBtnShow: boolean = false | ||||||
|   @State isBoardPrePareSetPopupShow: boolean = false |   @State isBoardPrePareSetPopupShow: boolean = false | ||||||
|   @State isLoadingPopupVisible:boolean = false; |   @State isLoadingPopupVisible: boolean = false; | ||||||
|   @State loadingText:string = '正在认证监管信息,请稍后...' |   @State loadingText: string = '正在认证监管信息,请稍后...' | ||||||
|   @State sczbkf:{xmdm:number,kfdm:string}[] = [] |   @State sczbkf: { | ||||||
|  |     xmdm: number, | ||||||
|  |     kfdm: string | ||||||
|  |   }[] = [] | ||||||
|   @State currentUser: User = EmptyCandidateObject |   @State currentUser: User = EmptyCandidateObject | ||||||
|   @State dataList: Array<User> = [] |   @State dataList: Array<User> = [] | ||||||
|   @State list: Array<User> = [] |   @State list: Array<User> = [] | ||||||
| @ -63,7 +62,7 @@ struct UserInfo { | |||||||
|   @State idCard: string = ''; |   @State idCard: string = ''; | ||||||
|   @State grantDept: string = ''; |   @State grantDept: string = ''; | ||||||
|   //是否已经开始考试 |   //是否已经开始考试 | ||||||
|   @State isExamStart:boolean = false; |   @State isExamStart: boolean = false; | ||||||
|   @State effectDate: string = ''; |   @State effectDate: string = ''; | ||||||
|   @State interval: any = null; |   @State interval: any = null; | ||||||
|   @State studentRefreshStatue: string = '0'; |   @State studentRefreshStatue: string = '0'; | ||||||
| @ -87,7 +86,10 @@ struct UserInfo { | |||||||
|       return photoBase64 |       return photoBase64 | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|   private AccountTable = new AccountTable(() => {}, USER); |   private filePhoto: FilePhoto | ||||||
|  |   private avPlayer | ||||||
|  |   private AccountTable = new AccountTable(() => { | ||||||
|  |   }, USER); | ||||||
|   private context = getContext(this) as common.UIAbilityContext; |   private context = getContext(this) as common.UIAbilityContext; | ||||||
|   private labelBlocks = [ |   private labelBlocks = [ | ||||||
|     { label: '考生姓名', key: 'xm' }, |     { label: '考生姓名', key: 'xm' }, | ||||||
| @ -514,12 +516,12 @@ struct UserInfo { | |||||||
|     this.currentUser.id = '1' |     this.currentUser.id = '1' | ||||||
|     const avPlayer = this.avPlayer; |     const avPlayer = this.avPlayer; | ||||||
|     this.isLoadingPopupVisible = true |     this.isLoadingPopupVisible = true | ||||||
|     avPlayer.playAudio([`voice/监管通信中.mp3`],false,async ()=>{ |     avPlayer.playAudio([`voice/监管通信中.mp3`], false, async () => { | ||||||
|       const code = await this.beginExam(); |       const code = await this.beginExam(); | ||||||
|       if (code != 1) { |       if (code != 1) { | ||||||
|         promptAction.showToast({ |         promptAction.showToast({ | ||||||
|           message:'开始考试接口调用失败!', |           message: '开始考试接口调用失败!', | ||||||
|           duration:4000 |           duration: 4000 | ||||||
|         }) |         }) | ||||||
|         return |         return | ||||||
|       } |       } | ||||||
| @ -543,30 +545,30 @@ struct UserInfo { | |||||||
|   // 检测车门、熄火信号 |   // 检测车门、熄火信号 | ||||||
|   async checkSignal(): Promise<boolean> { |   async checkSignal(): Promise<boolean> { | ||||||
|     const {isCheckFireOpen} = judgeConfig |     const {isCheckFireOpen} = judgeConfig | ||||||
|     return new Promise((resolve,reject)=>{ |     return new Promise((resolve, reject) => { | ||||||
|       if(isCheckFireOpen){ |       if (isCheckFireOpen) { | ||||||
|         resolve(true) |         resolve(true) | ||||||
|         // return |         // return | ||||||
|       } |       } | ||||||
|       console.info('socketTag[PLC.UdpClient]', '注册udp回调') |       console.info('socketTag[PLC.UdpClient]', '注册udp回调') | ||||||
|       let plcValue =  globalThis.udpClient.getCurrentMessage(); |       let plcValue = globalThis.udpClient.getCurrentMessage(); | ||||||
|       console.info('surenjun',plcValue) |       console.info('surenjun', plcValue) | ||||||
|       const msgArr = plcValue.split(',') || '' |       const msgArr = plcValue.split(',') || '' | ||||||
|       const mkg = msgArr[14]; |       const mkg = msgArr[14]; | ||||||
|       const fdjzs = msgArr[25]; |       const fdjzs = msgArr[25]; | ||||||
|       if(mkg == 1){ |       if (mkg == 1) { | ||||||
|         this.avPlayer.playAudio(['voice/关门.mp3']) |         this.avPlayer.playAudio(['voice/关门.mp3']) | ||||||
|         promptAction.showToast({ |         promptAction.showToast({ | ||||||
|           message:'请关闭车门', |           message: '请关闭车门', | ||||||
|           duration:4000 |           duration: 4000 | ||||||
|         }) |         }) | ||||||
|         reject(false) |         reject(false) | ||||||
|       } |       } | ||||||
|       if(fdjzs*1 > 0){ |       if (fdjzs * 1 > 0) { | ||||||
|         this.avPlayer.playAudio(['voice/熄火.mp3']) |         this.avPlayer.playAudio(['voice/熄火.mp3']) | ||||||
|         promptAction.showToast({ |         promptAction.showToast({ | ||||||
|           message:'请熄火', |           message: '请熄火', | ||||||
|           duration:4000 |           duration: 4000 | ||||||
|         }) |         }) | ||||||
|         reject(false) |         reject(false) | ||||||
|       } |       } | ||||||
| @ -847,7 +849,7 @@ struct UserInfo { | |||||||
|       } |       } | ||||||
| 
 | 
 | ||||||
|       // loading |       // loading | ||||||
|       if(this.isLoadingPopupVisible){ |       if (this.isLoadingPopupVisible) { | ||||||
|         LoadingPopup({ |         LoadingPopup({ | ||||||
|           title: this.loadingText, |           title: this.loadingText, | ||||||
|         }) |         }) | ||||||
| @ -887,7 +889,7 @@ struct CommText { | |||||||
| 
 | 
 | ||||||
|   build() { |   build() { | ||||||
|     Text(this.text) |     Text(this.text) | ||||||
|       .fontSize(16 * this.ratio) |       .fontSize(19.5 * this.ratio) | ||||||
|       .lineHeight(30 * this.ratio) |       .lineHeight(30 * this.ratio) | ||||||
|       .fontWeight(500) |       .fontWeight(500) | ||||||
|       .fontColor(this.color) |       .fontColor(this.color) | ||||||
| @ -913,9 +915,13 @@ struct LabelBlock { | |||||||
| 
 | 
 | ||||||
|   build() { |   build() { | ||||||
|     Row() { |     Row() { | ||||||
|       Text(this.label).fontSize(16 * this.ratio).fontColor('#99948A') |       Text(this.label).fontSize(18 * this.ratio).fontColor('#99948A') | ||||||
|       Row() { |       Row() { | ||||||
|         Text(decodeURIComponent(this.value)).fontColor('#fff').textAlign(TextAlign.Center).width('100%') |         Text(decodeURIComponent(this.value)) | ||||||
|  |           .fontColor('#fff') | ||||||
|  |           .textAlign(TextAlign.Center) | ||||||
|  |           .width('100%') | ||||||
|  |           .fontSize(20 * this.ratio) | ||||||
|       } |       } | ||||||
|       .commLabelStyle() |       .commLabelStyle() | ||||||
|     }.margin({ bottom: 10 * this.ratio }) |     }.margin({ bottom: 10 * this.ratio }) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user