大網照片

This commit is contained in:
lvyuankang 2024-08-27 19:41:15 +08:00
parent 555aa845fd
commit 7c42a590a6
3 changed files with 47 additions and 11 deletions

View File

@ -38,6 +38,7 @@ export class voiceService {
switch (state) {
case 'idle': // 成功调用reset接口后触发该状态机上报
// callBack('idle');
console.log('jiangsong AVPlayer idle')
if(this.type==3){
if(this.mediaArray.length&&!this.endFlag){
this.mediaArray.splice(0,1)
@ -96,6 +97,7 @@ export class voiceService {
if (error != null) {
console.log(`jiangsong callback getRawFd failed error code: ${error.code}, message: ${error.message}.`);
} else {
console.log('jiangsongjiangsong',this.avPlayer)
if (this.avPlayer) {
this.avPlayer.fdSrc = value;
}
@ -128,6 +130,7 @@ export class voiceService {
}
playAudio(param) {
console.log('jiangsong')
this.endFlag=false
this.mediaArray = []
this.type = param.type

View File

@ -19,6 +19,7 @@ import { voiceService } from '../common/service/voiceService';
import errorMsgDialog from './compontents/errorMsgDialog'
import { getSyncData } from '../common/service/initable';
import GetDistance from '../common/utils/GetDistance'
// import VoiceAnnounce from './judgeSDK/utils/voiceAnnouncements';
@Entry
@ -144,7 +145,7 @@ struct Index {
if (this.loading) {
return
}
if(judgeConfig.isTrajectoryOpen){
if (judgeConfig.isTrajectoryOpen) {
router.pushUrl({
url: 'pages/UserInfo',
}, router.RouterMode.Single)
@ -374,10 +375,13 @@ struct Index {
console.log('globalThis.singlePlay', globalThis.singlePlay)
if (globalThis.singlePlay == undefined || globalThis.singlePlay == null) {
this.vocObj.playAudio({
type: 1,
name: 'welcome.wav'
})
console.log('tttttttt')
setTimeout(()=>{
this.vocObj.playAudio({
type: 1,
name: 'welcome.wav'
})
},500)
globalThis.singlePlay = false
}
this.isSingle = globalThis.singlePlay

View File

@ -121,6 +121,7 @@ struct UserInfo {
async onPageShow() {
this.updateTimeLimit = false
this.ksksLimit = false
this.currentUser=EmptyCandidateObject
console.log('响应头地址响应头地址')
const mediaTest = new FilePhoto(this.context);
this.filePhoto = new FilePhoto(this.context);
@ -140,14 +141,23 @@ struct UserInfo {
this.list = await getSyncData('USERLIST')
// @ts-ignore
const data = await getSyncData('USER')
console.log('useruser,',JSON.stringify(this.list))
console.log('useruser1,',JSON.stringify(data))
const user = data[0]
if (user && Number(user.kssycs)) {
let flag=false
this.list.forEach(res => {
if (res.sfzmhm == user.sfzmhm) {
flag=true
res.kssycs = user.kssycs
this.getCurrentStudent(res.sfzmhm)
}
})
if(!flag){
this.currentUser=(this.list.length?this.list[0]:EmptyCandidateObject)
}
}
else if (user && (user.kssycs == '0' || user.kssycs == '')) {
console.log('datadatadatadata')
@ -157,7 +167,10 @@ struct UserInfo {
this.pageIndex = 0
this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4)
if (this.dataList.length) {
this.currentUser = this.dataList[0]
setTimeout(()=>{
this.currentUser = this.dataList[0]
globalThis.lsh=this.currentUser.lsh
},200)
} else {
this.currentUser = EmptyCandidateObject
}
@ -244,7 +257,10 @@ struct UserInfo {
if (!flag) {
globalThis.lsh = '0000000000000'
await upDateTableByArray('USER', [])
this.currentUser = this.list[0]
setTimeout(()=>{
this.currentUser = this.list[0]
},200)
// promptAction.showToast({
// message: '未匹配到对应下载学员',
// duration: 3000
@ -505,12 +521,19 @@ struct UserInfo {
listData.kszp = this.photo + listData.kszp
listData.ksmjzp = this.photo + listData.ksmjzp
})
console.log('this.listthis.list',)
await upDateTableByArray('USERLIST', this.list || [])
dataList = this.list.length > 4 ? this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4) : this.list;
this.dataList = dataList
if (this.dataList.length) {
this.currentUser = this.dataList[0]
setTimeout(()=>{
this.currentUser = this.dataList[0]
globalThis.lsh=this.currentUser.lsh
},200)
// this.currentUser = this.dataList[0]
console.log('this.currentUser1',JSON.stringify(this.currentUser))
} else {
this.currentUser = EmptyCandidateObject
}
@ -518,6 +541,8 @@ struct UserInfo {
this.lsh = this.currentUser.lsh
globalThis.lsh = this.lsh
globalThis.ksyh = this.currentUser.ksy1sfzmhm || this.currentUser.ksy2sfzmhm
console.log('globalThis.ksyh',this.currentUser.ksy1sfzmhm)
console.log('this.currentUse3' + JSON.stringify(this.currentUser))
this.pageIndex = 0
getSyncData('USER').then(data => {
@ -832,11 +857,15 @@ struct UserInfo {
.backgroundImage(item.sfzmhm != this.currentUser.sfzmhm ? $r('app.media.userbox2') : $r('app.media.userboxbg'))
.backgroundImageSize({ width: '100%', height: '100%' })
.onClick(() => {
this.currentUser=EmptyCandidateObject
globalThis.lsh = item.lsh;
if (this.isExamStart && !globalThis.singlePlay) {
return
}
this.currentUser = item
setTimeout(()=>{
this.currentUser = item
},200)
console.log('this.current',JSON.stringify(this.currentUser.ksmjzp))
})
})
@ -858,7 +887,6 @@ struct UserInfo {
Row() {
Column() {
if (this.currentUser['kszp']) {
Avatar({
ratio: this.ratio,
url: this.currentUser['kszp'] ? this.currentUser['kszp'] : ''
@ -1063,6 +1091,7 @@ struct Avatar {
.margin({ bottom: 10 * this.ratio, right: 58 * this.ratio, left: 55 * this.ratio })
.backgroundColor('orange')
.border({ color: '#fff', width: 1, style: BorderStyle.Solid })
.syncLoad(true)
}
}
}
@ -1104,7 +1133,7 @@ struct LabelBlock {
Row() {
Text(this.label).fontSize(20 * this.ratio).fontColor('#99948A')
Row() {
Text(decodeURIComponent(this.value) || '')
Text(decodeURIComponent(this.value||'')|| '')
.fontColor('#fff')
.textAlign(TextAlign.Center)
.width('100%')