修改一堆bug
This commit is contained in:
@@ -75,6 +75,8 @@
|
||||
<view class="org">
|
||||
{{ data_info.isAnony === 'N' ? data_info.orgIdName : '机构不显示' }}
|
||||
</view>
|
||||
|
||||
<view class="fl1"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right animate-right">
|
||||
@@ -195,7 +197,6 @@
|
||||
comId
|
||||
});
|
||||
const pkData = pkDataBody.body;
|
||||
// 下面两行是给后端擦屁股,后端传回的数值为空
|
||||
pkData.orgId = orgId;
|
||||
pkData.papersId = papersId;
|
||||
pkData.userId = data_info.userId;
|
||||
@@ -214,6 +215,7 @@
|
||||
});
|
||||
// 2. 执行匹配成功动画(等待1.5秒)
|
||||
await new Promise((resolve) => setTimeout(resolve, 600));
|
||||
|
||||
// 3. 清除计时器
|
||||
if (practiceTimeTimer) {
|
||||
clearInterval(practiceTimeTimer);
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="title-view">
|
||||
<!-- <view class="title-info">考试排行榜</view> -->
|
||||
<image
|
||||
class="title-image"
|
||||
src="@/static/images/competition/ranking/ranking_title.png"
|
||||
@@ -226,6 +225,8 @@
|
||||
height: 108rpx;
|
||||
border-bottom: 2rpx solid #efefef;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
|
||||
|
||||
&.list-header {
|
||||
height: 54rpx;
|
||||
@@ -262,7 +263,7 @@
|
||||
font-size: 25rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
&.item-1 {
|
||||
border-bottom: 0;
|
||||
margin-bottom: 8rpx;
|
||||
@@ -312,9 +313,9 @@
|
||||
color: #06f;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.rank-column {
|
||||
width: 170rpx;
|
||||
width: 130rpx;
|
||||
padding-left: 40rpx;
|
||||
float: left;
|
||||
font-weight: 600;
|
||||
@@ -327,7 +328,9 @@
|
||||
}
|
||||
|
||||
.user-column {
|
||||
width: 300rpx;
|
||||
// background-color: red;
|
||||
// width: 330rpx;
|
||||
flex: 1;
|
||||
float: left;
|
||||
padding: 15rpx 0;
|
||||
|
||||
@@ -338,7 +341,6 @@
|
||||
float: left;
|
||||
background-color: #eee;
|
||||
border-radius: 50%;
|
||||
|
||||
.avatar-image {
|
||||
width: 77rpx;
|
||||
height: 77rpx;
|
||||
@@ -346,8 +348,8 @@
|
||||
}
|
||||
|
||||
.user-name {
|
||||
float: left;
|
||||
width: calc(100% - 77rpx);
|
||||
// float: left;
|
||||
// width: calc(100% - 77rpx);
|
||||
padding-left: 18rpx;
|
||||
padding-right: 18rpx;
|
||||
overflow: hidden;
|
||||
@@ -361,10 +363,7 @@
|
||||
}
|
||||
|
||||
.user-org {
|
||||
float: left;
|
||||
width: calc(100% - 77rpx);
|
||||
padding-left: 18rpx;
|
||||
padding-right: 18rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
@@ -376,7 +375,9 @@
|
||||
}
|
||||
|
||||
.score-column {
|
||||
width: 126rpx;
|
||||
// background-color: yellow;
|
||||
width: 88rpx;
|
||||
padding-right: 10rpx;
|
||||
text-align: right;
|
||||
float: left;
|
||||
font-weight: 600;
|
||||
@@ -386,7 +387,9 @@
|
||||
}
|
||||
|
||||
.time-column {
|
||||
width: 100rpx;
|
||||
width: 130rpx;
|
||||
padding-right: 26rpx;
|
||||
// background-color: #06f;
|
||||
text-align: right;
|
||||
float: left;
|
||||
font-weight: 600;
|
||||
|
||||
@@ -215,7 +215,7 @@
|
||||
console.log('调用它');
|
||||
pointAndBadgesRun('11');
|
||||
}
|
||||
}, delayTime);
|
||||
}, delayTime * 1000);
|
||||
});
|
||||
}, mode.value === 'pk_result'?0:1000);
|
||||
});
|
||||
|
||||
@@ -148,7 +148,8 @@ $primary-color: #ffe271; // 文字颜色
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
// background-color: red;
|
||||
width: 60%;
|
||||
.avatar-img-div {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
@@ -163,32 +164,39 @@ $primary-color: #ffe271; // 文字颜色
|
||||
.name {
|
||||
font-size: 30rpx;
|
||||
margin-top: 20rpx;
|
||||
margin-bottom: 100rpx;
|
||||
margin-bottom: 50rpx;
|
||||
font-weight: 600;
|
||||
font-size: 36rpx;
|
||||
color: #ffffff;
|
||||
// background-color: red;
|
||||
}
|
||||
.org {
|
||||
// background-color: red;
|
||||
font-weight: 400;
|
||||
font-size: 30rpx;
|
||||
font-size: 25rpx;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
// white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
width: 160rpx;
|
||||
// text-overflow: ellipsis;
|
||||
// width: 160rpx;
|
||||
}
|
||||
}
|
||||
.information-div-left {
|
||||
position: absolute;
|
||||
top: 0%;
|
||||
left: 0%;
|
||||
transform: translate(24%, -20%);
|
||||
transform: translate(10%, -20%);
|
||||
.org {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
.information-div-right {
|
||||
position: absolute;
|
||||
right: 0%;
|
||||
top: 0%;
|
||||
transform: translate(-24%, -20%);
|
||||
transform: translate(-10%, -20%);
|
||||
.org {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -296,7 +296,13 @@
|
||||
let _res = await getPermission()
|
||||
if (_res) {
|
||||
hasPermission.value = true
|
||||
showOverlayTalking(obj);
|
||||
setTimeout(()=>{
|
||||
if(!isGettingPermission.value){
|
||||
showOverlayTalking(obj);
|
||||
}else{
|
||||
isGettingPermission.value = false
|
||||
}
|
||||
},100)
|
||||
}
|
||||
}else{
|
||||
showOverlayTalking(obj);
|
||||
@@ -310,18 +316,17 @@
|
||||
let _recordPerm = await permission.requestAndroidPermission('android.permission.RECORD_AUDIO');
|
||||
if (_recordPerm !== 1) {
|
||||
showTalkingModel.value = false;
|
||||
common.show('提示信息', '当前页面需要使用的录音权限,是否前往开启?', true, '取消', '确定').then((res) => {
|
||||
if (res) {
|
||||
// 去开启权限
|
||||
permission.gotoAppPermissionSetting();
|
||||
} else {
|
||||
// 取消
|
||||
common.navigateBack();
|
||||
}
|
||||
});
|
||||
let res = await common.show('提示信息', '当前页面需要使用的录音权限,是否前往开启?', true, '取消', '确定')
|
||||
if (res) {
|
||||
// 去开启权限
|
||||
permission.gotoAppPermissionSetting();
|
||||
} else {
|
||||
// 取消
|
||||
common.navigateBack();
|
||||
}
|
||||
return false
|
||||
} else {
|
||||
isGettingPermission.value = false
|
||||
// isGettingPermission.value = false
|
||||
return true
|
||||
}
|
||||
} else {
|
||||
@@ -340,10 +345,10 @@
|
||||
return false
|
||||
} else if (_state === 'not determined') {
|
||||
// startRecord()
|
||||
isGettingPermission.value = false
|
||||
// isGettingPermission.value = false
|
||||
return true
|
||||
} else {
|
||||
isGettingPermission.value = false
|
||||
// isGettingPermission.value = false
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
{{'语音对话'}}
|
||||
</view>
|
||||
</view>
|
||||
<uni-popup ref="talkModelRef" type="bottom" @click="showTalkingModel = false"
|
||||
<uni-popup ref="talkModelRef" type="bottom" @click="hideOverlayTalking"
|
||||
mask-background-color="rgba(0,0,0,0.9)">
|
||||
<view class="overlay-box">
|
||||
<view class="circle-bg-box">
|
||||
@@ -239,7 +239,13 @@
|
||||
let _res = await getPermission()
|
||||
if (_res) {
|
||||
hasPermission.value = true
|
||||
showOverlayTalking(obj);
|
||||
setTimeout(()=>{
|
||||
if(!isGettingPermission.value){
|
||||
showOverlayTalking(obj);
|
||||
}else{
|
||||
isGettingPermission.value = false
|
||||
}
|
||||
},100)
|
||||
}
|
||||
} else {
|
||||
showOverlayTalking(obj);
|
||||
@@ -253,18 +259,17 @@
|
||||
let _recordPerm = await permission.requestAndroidPermission('android.permission.RECORD_AUDIO');
|
||||
if (_recordPerm !== 1) {
|
||||
showTalkingModel.value = false;
|
||||
common.show('提示信息', '当前页面需要使用的录音权限,是否前往开启?', true, '取消', '确定').then((res) => {
|
||||
if (res) {
|
||||
// 去开启权限
|
||||
permission.gotoAppPermissionSetting();
|
||||
} else {
|
||||
// 取消
|
||||
common.navigateBack();
|
||||
}
|
||||
});
|
||||
let res = await common.show('提示信息', '当前页面需要使用的录音权限,是否前往开启?', true, '取消', '确定')
|
||||
if (res) {
|
||||
// 去开启权限
|
||||
permission.gotoAppPermissionSetting();
|
||||
} else {
|
||||
// 取消
|
||||
common.navigateBack();
|
||||
}
|
||||
return false
|
||||
} else {
|
||||
isGettingPermission.value = false
|
||||
// isGettingPermission.value = false
|
||||
return true
|
||||
}
|
||||
} else {
|
||||
@@ -283,10 +288,10 @@
|
||||
return false
|
||||
} else if (_state === 'not determined') {
|
||||
// startRecord()
|
||||
isGettingPermission.value = false
|
||||
// isGettingPermission.value = false
|
||||
return true
|
||||
} else {
|
||||
isGettingPermission.value = false
|
||||
// isGettingPermission.value = false
|
||||
return true
|
||||
}
|
||||
}
|
||||
@@ -359,8 +364,12 @@
|
||||
};
|
||||
onShow(()=>{
|
||||
// stopRecord()
|
||||
// if(isGettingPermission.value){
|
||||
// hideOverlayTalking()
|
||||
// }
|
||||
})
|
||||
onHide(()=>{
|
||||
console.log('onHide')
|
||||
isGettingPermission.value = true
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -251,12 +251,14 @@
|
||||
isLoading.value = false
|
||||
setTimeout(() => {
|
||||
showLoading.value = false
|
||||
if(isPass.value && isOver.value && canLoad.value){
|
||||
if(isPass.value && isOver.value){
|
||||
pointAndBadgesRun(talkingType.value === '01' ? '07': '08', '', ()=>{})
|
||||
}
|
||||
}, 800)
|
||||
} else {
|
||||
setTimeout(getData, 2000)
|
||||
if(canLoad.value){
|
||||
setTimeout(getData, 2000)
|
||||
}
|
||||
}
|
||||
}).catch(()=>{
|
||||
isLoading.value = false
|
||||
@@ -276,6 +278,7 @@
|
||||
const isOver = ref(false)
|
||||
const goBack = () => {
|
||||
if(isOver.value){
|
||||
console.log(3)
|
||||
common.navigateBack(3)
|
||||
}else{
|
||||
common.navigateBack()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<talkCom ref="talkComRef"/>
|
||||
<talkCom ref="talkComRef" />
|
||||
<ImagePreview class="show-box-avatar" :src="detailInfo.ossAddr" :isCache="true">
|
||||
</ImagePreview>
|
||||
<view class="show-box">
|
||||
@@ -20,7 +20,8 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import {
|
||||
onLoad
|
||||
onLoad,
|
||||
onBackPress
|
||||
} from '@dcloudio/uni-app'
|
||||
import {
|
||||
ref,
|
||||
@@ -32,6 +33,7 @@
|
||||
partnerChatReportTrigger
|
||||
} from "@/api/sparring.js"
|
||||
import ImagePreview from '@/components/image-preview/image-preview.vue';
|
||||
import common from '@/common/common';
|
||||
|
||||
const traId = ref('')
|
||||
const chaId = ref('')
|
||||
@@ -47,12 +49,36 @@
|
||||
detailInfo.value = {
|
||||
...res.body
|
||||
}
|
||||
talkComRef.value.prepare()
|
||||
talkComRef.value.prepare({
|
||||
traId: traId.value,
|
||||
chaId: chaId.value,
|
||||
traTyp: talkingType.value
|
||||
})
|
||||
})
|
||||
}
|
||||
const timeShow = ref('12:11')
|
||||
const closeTalking = () => {
|
||||
talkComRef.value.close()
|
||||
overTalking()
|
||||
}
|
||||
const overTalking = () => {
|
||||
partnerChatReportTrigger({
|
||||
execId: execId.value,
|
||||
traId: traId.value,
|
||||
talkingType: isPreview.value? 'preview' : 'practice'
|
||||
}).then(res=>{
|
||||
watchFlag.value = 1;
|
||||
socketStore?.closeSocket();
|
||||
changePlayItemId('')
|
||||
common.navigateTo('/pages/sparring/result?isOver=1&traId='
|
||||
+ traId.value
|
||||
+ '&execId='
|
||||
+ execId.value
|
||||
+ '&type='
|
||||
+ talkingType.value
|
||||
+ '&isPreview='
|
||||
+ (isPreview.value ?'1':''))
|
||||
})
|
||||
}
|
||||
onLoad((params) => {
|
||||
traId.value = params.traId;
|
||||
@@ -61,6 +87,7 @@
|
||||
isPreview.value = params.isPreview === '1'
|
||||
getDetailInfo()
|
||||
});
|
||||
onBackPress((res) => res.from === 'backbutton');
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.show-box {
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
data() {
|
||||
return {
|
||||
baseName: 'wangwu',
|
||||
context: null
|
||||
context: null,
|
||||
isGetting: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -36,6 +37,7 @@
|
||||
// this.prepare()
|
||||
},
|
||||
beforeUnmount() {
|
||||
this.isGetting = false
|
||||
this.stop()
|
||||
this.close()
|
||||
},
|
||||
@@ -86,18 +88,31 @@
|
||||
switchCamera() {},
|
||||
startPreview() {},
|
||||
stopPreview() {},
|
||||
prepare() {
|
||||
prepareApi(this.baseName).then(res => {
|
||||
prepare({traId, chaId, traTyp}) {
|
||||
if(!this.isGetting){
|
||||
this.isGetting = true
|
||||
return
|
||||
}
|
||||
prepareApi({
|
||||
traId: traId,
|
||||
chaId: chaId,
|
||||
traTyp: traTyp,
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if(res.body.prepare){
|
||||
this.baseName = res.body.sid
|
||||
this.initPusher()
|
||||
}else{
|
||||
setTimeout(()=> {
|
||||
this.prepare({traId, chaId, traTyp})
|
||||
},2000)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
if (err === 'prepare') {
|
||||
this.initPusher()
|
||||
}
|
||||
})
|
||||
},
|
||||
initPusher() {
|
||||
console.log(1)
|
||||
console.log('rtmp://25.18.122.148:9605/voice_in/' + this.baseName)
|
||||
pusher = new plus.video.LivePusher('pusher-box', {
|
||||
url: 'rtmp://25.18.122.148:9605/voice_in/' + this.baseName,
|
||||
"enable-camera": true,
|
||||
|
||||
Reference in New Issue
Block a user