修改一堆bug
This commit is contained in:
+5
-3
@@ -5,7 +5,7 @@ ENV = 'development'
|
|||||||
|
|
||||||
# VITE_APP_BASE_API_Url = 'https://aits.jlbank.com.cn:7001'
|
# VITE_APP_BASE_API_Url = 'https://aits.jlbank.com.cn:7001'
|
||||||
|
|
||||||
VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
|
# VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
|
||||||
|
|
||||||
|
|
||||||
# VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002'
|
# VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002'
|
||||||
@@ -16,7 +16,9 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
|
|||||||
# dev
|
# dev
|
||||||
# VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001'
|
# VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001'
|
||||||
# sit
|
# sit
|
||||||
#VITE_APP_BASE_API_Url = 'http://25.18.122.91:9786'
|
|
||||||
|
VITE_APP_BASE_API_Url = 'http://25.18.122.91:9786'
|
||||||
|
|
||||||
# UAT
|
# UAT
|
||||||
# VITE_APP_BASE_API_Url = 'http://25.18.122.78:9786'
|
# VITE_APP_BASE_API_Url = 'http://25.18.122.78:9786'
|
||||||
|
|
||||||
@@ -28,7 +30,7 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
|
|||||||
# VITE_APP_BASE_API_Url = 'http://25.18.122.66:9786'
|
# VITE_APP_BASE_API_Url = 'http://25.18.122.66:9786'
|
||||||
|
|
||||||
# h5专用地址x2
|
# h5专用地址x2
|
||||||
|
# VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.32.150:9601'
|
||||||
# dev
|
# dev
|
||||||
#VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001'
|
#VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001'
|
||||||
# sit
|
# sit
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ ENV = 'development.yh'
|
|||||||
|
|
||||||
VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001'
|
VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001'
|
||||||
|
|
||||||
#VITE_APP_BASE_H5_API_Url = 'http://25.18.122.91:9786'
|
VITE_APP_BASE_H5_API_Url = 'http://25.18.122.91:9786'
|
||||||
# VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.32.154:9604'
|
# VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.32.154:9604'
|
||||||
# VITE_APP_BASE_H5_API_Url_TRAPRACTICE = 'http://25.64.32.156:9603'
|
# VITE_APP_BASE_H5_API_Url_TRAPRACTICE = 'http://25.64.32.156:9603'
|
||||||
# VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.32.154:9601'
|
# VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.32.154:9601'
|
||||||
|
|||||||
+3
-2
@@ -1,10 +1,11 @@
|
|||||||
import request from '@/api/request'
|
import request from '@/api/request'
|
||||||
|
|
||||||
export const prepareApi = (name) => {
|
export const prepareApi = (data) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/trapractice/audio/session/prepare?name=' + name,
|
url: '/trapractice/traPartnerVoiceCall/voiceCallPrepare' ,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
toastErrors: true,
|
toastErrors: true,
|
||||||
|
data,
|
||||||
baseUrl: 'http://25.64.32.157:9603'
|
baseUrl: 'http://25.64.32.157:9603'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -20,7 +20,8 @@
|
|||||||
<view class="img-div">
|
<view class="img-div">
|
||||||
<image-preview :src="item.pointsBadgeImg" class="img" mode="aspectFit"></image-preview>
|
<image-preview :src="item.pointsBadgeImg" class="img" mode="aspectFit"></image-preview>
|
||||||
</view>
|
</view>
|
||||||
<view class="points-msg-div">{{ item.pointsBadgeName }}</view>
|
<view class="points-title-div">{{ item.pointsBadgeName }}</view>
|
||||||
|
<view class="points-msg-div" v-if="item.remark">{{ item.remark }}</view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
<view class="doct_icon right" @click="doct_click(1)" v-show="multiple">
|
<view class="doct_icon right" @click="doct_click(1)" v-show="multiple">
|
||||||
@@ -30,7 +31,6 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="button-div">
|
<view class="button-div">
|
||||||
<uv-button
|
<uv-button
|
||||||
class="button"
|
class="button"
|
||||||
@@ -56,16 +56,14 @@
|
|||||||
const popup = ref(null);
|
const popup = ref(null);
|
||||||
const current = ref(0);
|
const current = ref(0);
|
||||||
const opacity = ref(1);
|
const opacity = ref(1);
|
||||||
let CloseComplete
|
let CloseComplete;
|
||||||
const badgesList = ref([]);
|
const badgesList = ref([]);
|
||||||
const pointsList = ref([]);
|
const pointsList = ref([]);
|
||||||
const multiple = computed(() => badgesList.value.length > 1);
|
const multiple = computed(() => badgesList.value.length > 1);
|
||||||
const titleNumberText = ['', '两', '三', '四', '五', '六', '七', '八', '九', '十'];
|
const titleNumberText = ['', '两', '三', '四', '五', '六', '七', '八', '九', '十'];
|
||||||
|
|
||||||
const title = computed(() =>
|
const title = computed(() =>
|
||||||
badgesList.value.length === 1
|
badgesList.value.length === 1 ? '恭喜你获得徽章' : `恭喜你获得${titleNumberText[badgesList.value.length - 1]}枚徽章`
|
||||||
? '恭喜你获得徽章'
|
|
||||||
: `恭喜你获得${titleNumberText[badgesList.value.length - 1]}枚徽章`
|
|
||||||
);
|
);
|
||||||
const buttonColor = 'linear-gradient( 270deg, #F81758 0%, #FFA062 100%)';
|
const buttonColor = 'linear-gradient( 270deg, #F81758 0%, #FFA062 100%)';
|
||||||
const customStyle = {
|
const customStyle = {
|
||||||
@@ -101,7 +99,7 @@
|
|||||||
// 点击
|
// 点击
|
||||||
const clickFun = (status = true) => {
|
const clickFun = (status = true) => {
|
||||||
emits('confirm', status, pointsList.value, badgesList.value, () => {});
|
emits('confirm', status, pointsList.value, badgesList.value, () => {});
|
||||||
CloseComplete(status, pointsList.value, badgesList.value)
|
CloseComplete(status, pointsList.value, badgesList.value);
|
||||||
};
|
};
|
||||||
|
|
||||||
const open = (points = [], badges = [], complete = () => {}) => {
|
const open = (points = [], badges = [], complete = () => {}) => {
|
||||||
@@ -110,7 +108,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log('badges', badges);
|
console.log('badges', badges);
|
||||||
CloseComplete = complete
|
CloseComplete = complete;
|
||||||
badgesList.value = badges;
|
badgesList.value = badges;
|
||||||
pointsList.value = points;
|
pointsList.value = points;
|
||||||
opacity.value = 1;
|
opacity.value = 1;
|
||||||
@@ -118,8 +116,7 @@
|
|||||||
uni.$emit('update_me_data', true);
|
uni.$emit('update_me_data', true);
|
||||||
popup.value.open('center');
|
popup.value.open('center');
|
||||||
};
|
};
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {});
|
||||||
});
|
|
||||||
defineExpose({ open, close });
|
defineExpose({ open, close });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -130,20 +127,28 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
.swiper {
|
.swiper {
|
||||||
height: 660rpx;
|
height: 700rpx;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
margin: 0 50rpx;
|
margin: 0 50rpx;
|
||||||
|
// background-color: red;
|
||||||
.swiper-item-div {
|
.swiper-item-div {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
// justify-content: center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
|
.points-title-div {
|
||||||
|
margin-top: 40rpx;
|
||||||
|
// position: absolute;
|
||||||
|
// bottom: 60rpx;
|
||||||
|
}
|
||||||
.points-msg-div {
|
.points-msg-div {
|
||||||
position: absolute;
|
margin: 30rpx 20rpx 0 20rpx;
|
||||||
bottom: -30rpx;
|
// position: absolute;
|
||||||
|
// bottom: 0rpx;
|
||||||
}
|
}
|
||||||
.img-div {
|
.img-div {
|
||||||
|
margin-top: 60rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -215,15 +220,21 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.points-msg-div {
|
.points-title-div {
|
||||||
height: 120rpx;
|
// height: 120rpx;
|
||||||
font-family: PingFangSC, PingFang SC;
|
font-family: PingFangSC, PingFang SC;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
color: #dec38c;
|
color: #dec38c;
|
||||||
line-height: 120rpx;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-style: normal;
|
}
|
||||||
|
.points-msg-div {
|
||||||
|
// height: 120rpx;
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #dec38c;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
.button-div {
|
.button-div {
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
|
|||||||
@@ -75,6 +75,8 @@
|
|||||||
<view class="org">
|
<view class="org">
|
||||||
{{ data_info.isAnony === 'N' ? data_info.orgIdName : '机构不显示' }}
|
{{ data_info.isAnony === 'N' ? data_info.orgIdName : '机构不显示' }}
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="fl1"></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right animate-right">
|
<view class="right animate-right">
|
||||||
@@ -195,7 +197,6 @@
|
|||||||
comId
|
comId
|
||||||
});
|
});
|
||||||
const pkData = pkDataBody.body;
|
const pkData = pkDataBody.body;
|
||||||
// 下面两行是给后端擦屁股,后端传回的数值为空
|
|
||||||
pkData.orgId = orgId;
|
pkData.orgId = orgId;
|
||||||
pkData.papersId = papersId;
|
pkData.papersId = papersId;
|
||||||
pkData.userId = data_info.userId;
|
pkData.userId = data_info.userId;
|
||||||
@@ -214,6 +215,7 @@
|
|||||||
});
|
});
|
||||||
// 2. 执行匹配成功动画(等待1.5秒)
|
// 2. 执行匹配成功动画(等待1.5秒)
|
||||||
await new Promise((resolve) => setTimeout(resolve, 600));
|
await new Promise((resolve) => setTimeout(resolve, 600));
|
||||||
|
|
||||||
// 3. 清除计时器
|
// 3. 清除计时器
|
||||||
if (practiceTimeTimer) {
|
if (practiceTimeTimer) {
|
||||||
clearInterval(practiceTimeTimer);
|
clearInterval(practiceTimeTimer);
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="title-view">
|
<view class="title-view">
|
||||||
<!-- <view class="title-info">考试排行榜</view> -->
|
|
||||||
<image
|
<image
|
||||||
class="title-image"
|
class="title-image"
|
||||||
src="@/static/images/competition/ranking/ranking_title.png"
|
src="@/static/images/competition/ranking/ranking_title.png"
|
||||||
@@ -226,6 +225,8 @@
|
|||||||
height: 108rpx;
|
height: 108rpx;
|
||||||
border-bottom: 2rpx solid #efefef;
|
border-bottom: 2rpx solid #efefef;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
|
||||||
&.list-header {
|
&.list-header {
|
||||||
height: 54rpx;
|
height: 54rpx;
|
||||||
@@ -262,7 +263,7 @@
|
|||||||
font-size: 25rpx;
|
font-size: 25rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.item-1 {
|
&.item-1 {
|
||||||
border-bottom: 0;
|
border-bottom: 0;
|
||||||
margin-bottom: 8rpx;
|
margin-bottom: 8rpx;
|
||||||
@@ -312,9 +313,9 @@
|
|||||||
color: #06f;
|
color: #06f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.rank-column {
|
.rank-column {
|
||||||
width: 170rpx;
|
width: 130rpx;
|
||||||
padding-left: 40rpx;
|
padding-left: 40rpx;
|
||||||
float: left;
|
float: left;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
@@ -327,7 +328,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.user-column {
|
.user-column {
|
||||||
width: 300rpx;
|
// background-color: red;
|
||||||
|
// width: 330rpx;
|
||||||
|
flex: 1;
|
||||||
float: left;
|
float: left;
|
||||||
padding: 15rpx 0;
|
padding: 15rpx 0;
|
||||||
|
|
||||||
@@ -338,7 +341,6 @@
|
|||||||
float: left;
|
float: left;
|
||||||
background-color: #eee;
|
background-color: #eee;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
|
|
||||||
.avatar-image {
|
.avatar-image {
|
||||||
width: 77rpx;
|
width: 77rpx;
|
||||||
height: 77rpx;
|
height: 77rpx;
|
||||||
@@ -346,8 +348,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.user-name {
|
.user-name {
|
||||||
float: left;
|
// float: left;
|
||||||
width: calc(100% - 77rpx);
|
// width: calc(100% - 77rpx);
|
||||||
padding-left: 18rpx;
|
padding-left: 18rpx;
|
||||||
padding-right: 18rpx;
|
padding-right: 18rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -361,10 +363,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.user-org {
|
.user-org {
|
||||||
float: left;
|
|
||||||
width: calc(100% - 77rpx);
|
|
||||||
padding-left: 18rpx;
|
padding-left: 18rpx;
|
||||||
padding-right: 18rpx;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@@ -376,7 +375,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.score-column {
|
.score-column {
|
||||||
width: 126rpx;
|
// background-color: yellow;
|
||||||
|
width: 88rpx;
|
||||||
|
padding-right: 10rpx;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
float: left;
|
float: left;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
@@ -386,7 +387,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.time-column {
|
.time-column {
|
||||||
width: 100rpx;
|
width: 130rpx;
|
||||||
|
padding-right: 26rpx;
|
||||||
|
// background-color: #06f;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
float: left;
|
float: left;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
|||||||
@@ -215,7 +215,7 @@
|
|||||||
console.log('调用它');
|
console.log('调用它');
|
||||||
pointAndBadgesRun('11');
|
pointAndBadgesRun('11');
|
||||||
}
|
}
|
||||||
}, delayTime);
|
}, delayTime * 1000);
|
||||||
});
|
});
|
||||||
}, mode.value === 'pk_result'?0:1000);
|
}, mode.value === 'pk_result'?0:1000);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -148,7 +148,8 @@ $primary-color: #ffe271; // 文字颜色
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
// background-color: red;
|
||||||
|
width: 60%;
|
||||||
.avatar-img-div {
|
.avatar-img-div {
|
||||||
width: 120rpx;
|
width: 120rpx;
|
||||||
height: 120rpx;
|
height: 120rpx;
|
||||||
@@ -163,32 +164,39 @@ $primary-color: #ffe271; // 文字颜色
|
|||||||
.name {
|
.name {
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
margin-bottom: 100rpx;
|
margin-bottom: 50rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
|
// background-color: red;
|
||||||
}
|
}
|
||||||
.org {
|
.org {
|
||||||
|
// background-color: red;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 30rpx;
|
font-size: 25rpx;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
text-align: center;
|
// white-space: nowrap;
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
// text-overflow: ellipsis;
|
||||||
width: 160rpx;
|
// width: 160rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.information-div-left {
|
.information-div-left {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0%;
|
top: 0%;
|
||||||
left: 0%;
|
left: 0%;
|
||||||
transform: translate(24%, -20%);
|
transform: translate(10%, -20%);
|
||||||
|
.org {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.information-div-right {
|
.information-div-right {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0%;
|
right: 0%;
|
||||||
top: 0%;
|
top: 0%;
|
||||||
transform: translate(-24%, -20%);
|
transform: translate(-10%, -20%);
|
||||||
|
.org {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -296,7 +296,13 @@
|
|||||||
let _res = await getPermission()
|
let _res = await getPermission()
|
||||||
if (_res) {
|
if (_res) {
|
||||||
hasPermission.value = true
|
hasPermission.value = true
|
||||||
showOverlayTalking(obj);
|
setTimeout(()=>{
|
||||||
|
if(!isGettingPermission.value){
|
||||||
|
showOverlayTalking(obj);
|
||||||
|
}else{
|
||||||
|
isGettingPermission.value = false
|
||||||
|
}
|
||||||
|
},100)
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
showOverlayTalking(obj);
|
showOverlayTalking(obj);
|
||||||
@@ -310,18 +316,17 @@
|
|||||||
let _recordPerm = await permission.requestAndroidPermission('android.permission.RECORD_AUDIO');
|
let _recordPerm = await permission.requestAndroidPermission('android.permission.RECORD_AUDIO');
|
||||||
if (_recordPerm !== 1) {
|
if (_recordPerm !== 1) {
|
||||||
showTalkingModel.value = false;
|
showTalkingModel.value = false;
|
||||||
common.show('提示信息', '当前页面需要使用的录音权限,是否前往开启?', true, '取消', '确定').then((res) => {
|
let res = await common.show('提示信息', '当前页面需要使用的录音权限,是否前往开启?', true, '取消', '确定')
|
||||||
if (res) {
|
if (res) {
|
||||||
// 去开启权限
|
// 去开启权限
|
||||||
permission.gotoAppPermissionSetting();
|
permission.gotoAppPermissionSetting();
|
||||||
} else {
|
} else {
|
||||||
// 取消
|
// 取消
|
||||||
common.navigateBack();
|
common.navigateBack();
|
||||||
}
|
}
|
||||||
});
|
|
||||||
return false
|
return false
|
||||||
} else {
|
} else {
|
||||||
isGettingPermission.value = false
|
// isGettingPermission.value = false
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -340,10 +345,10 @@
|
|||||||
return false
|
return false
|
||||||
} else if (_state === 'not determined') {
|
} else if (_state === 'not determined') {
|
||||||
// startRecord()
|
// startRecord()
|
||||||
isGettingPermission.value = false
|
// isGettingPermission.value = false
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
isGettingPermission.value = false
|
// isGettingPermission.value = false
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
{{'语音对话'}}
|
{{'语音对话'}}
|
||||||
</view>
|
</view>
|
||||||
</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)">
|
mask-background-color="rgba(0,0,0,0.9)">
|
||||||
<view class="overlay-box">
|
<view class="overlay-box">
|
||||||
<view class="circle-bg-box">
|
<view class="circle-bg-box">
|
||||||
@@ -239,7 +239,13 @@
|
|||||||
let _res = await getPermission()
|
let _res = await getPermission()
|
||||||
if (_res) {
|
if (_res) {
|
||||||
hasPermission.value = true
|
hasPermission.value = true
|
||||||
showOverlayTalking(obj);
|
setTimeout(()=>{
|
||||||
|
if(!isGettingPermission.value){
|
||||||
|
showOverlayTalking(obj);
|
||||||
|
}else{
|
||||||
|
isGettingPermission.value = false
|
||||||
|
}
|
||||||
|
},100)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
showOverlayTalking(obj);
|
showOverlayTalking(obj);
|
||||||
@@ -253,18 +259,17 @@
|
|||||||
let _recordPerm = await permission.requestAndroidPermission('android.permission.RECORD_AUDIO');
|
let _recordPerm = await permission.requestAndroidPermission('android.permission.RECORD_AUDIO');
|
||||||
if (_recordPerm !== 1) {
|
if (_recordPerm !== 1) {
|
||||||
showTalkingModel.value = false;
|
showTalkingModel.value = false;
|
||||||
common.show('提示信息', '当前页面需要使用的录音权限,是否前往开启?', true, '取消', '确定').then((res) => {
|
let res = await common.show('提示信息', '当前页面需要使用的录音权限,是否前往开启?', true, '取消', '确定')
|
||||||
if (res) {
|
if (res) {
|
||||||
// 去开启权限
|
// 去开启权限
|
||||||
permission.gotoAppPermissionSetting();
|
permission.gotoAppPermissionSetting();
|
||||||
} else {
|
} else {
|
||||||
// 取消
|
// 取消
|
||||||
common.navigateBack();
|
common.navigateBack();
|
||||||
}
|
}
|
||||||
});
|
|
||||||
return false
|
return false
|
||||||
} else {
|
} else {
|
||||||
isGettingPermission.value = false
|
// isGettingPermission.value = false
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -283,10 +288,10 @@
|
|||||||
return false
|
return false
|
||||||
} else if (_state === 'not determined') {
|
} else if (_state === 'not determined') {
|
||||||
// startRecord()
|
// startRecord()
|
||||||
isGettingPermission.value = false
|
// isGettingPermission.value = false
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
isGettingPermission.value = false
|
// isGettingPermission.value = false
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -359,8 +364,12 @@
|
|||||||
};
|
};
|
||||||
onShow(()=>{
|
onShow(()=>{
|
||||||
// stopRecord()
|
// stopRecord()
|
||||||
|
// if(isGettingPermission.value){
|
||||||
|
// hideOverlayTalking()
|
||||||
|
// }
|
||||||
})
|
})
|
||||||
onHide(()=>{
|
onHide(()=>{
|
||||||
|
console.log('onHide')
|
||||||
isGettingPermission.value = true
|
isGettingPermission.value = true
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -251,12 +251,14 @@
|
|||||||
isLoading.value = false
|
isLoading.value = false
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
showLoading.value = false
|
showLoading.value = false
|
||||||
if(isPass.value && isOver.value && canLoad.value){
|
if(isPass.value && isOver.value){
|
||||||
pointAndBadgesRun(talkingType.value === '01' ? '07': '08', '', ()=>{})
|
pointAndBadgesRun(talkingType.value === '01' ? '07': '08', '', ()=>{})
|
||||||
}
|
}
|
||||||
}, 800)
|
}, 800)
|
||||||
} else {
|
} else {
|
||||||
setTimeout(getData, 2000)
|
if(canLoad.value){
|
||||||
|
setTimeout(getData, 2000)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}).catch(()=>{
|
}).catch(()=>{
|
||||||
isLoading.value = false
|
isLoading.value = false
|
||||||
@@ -276,6 +278,7 @@
|
|||||||
const isOver = ref(false)
|
const isOver = ref(false)
|
||||||
const goBack = () => {
|
const goBack = () => {
|
||||||
if(isOver.value){
|
if(isOver.value){
|
||||||
|
console.log(3)
|
||||||
common.navigateBack(3)
|
common.navigateBack(3)
|
||||||
}else{
|
}else{
|
||||||
common.navigateBack()
|
common.navigateBack()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<talkCom ref="talkComRef"/>
|
<talkCom ref="talkComRef" />
|
||||||
<ImagePreview class="show-box-avatar" :src="detailInfo.ossAddr" :isCache="true">
|
<ImagePreview class="show-box-avatar" :src="detailInfo.ossAddr" :isCache="true">
|
||||||
</ImagePreview>
|
</ImagePreview>
|
||||||
<view class="show-box">
|
<view class="show-box">
|
||||||
@@ -20,7 +20,8 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import {
|
import {
|
||||||
onLoad
|
onLoad,
|
||||||
|
onBackPress
|
||||||
} from '@dcloudio/uni-app'
|
} from '@dcloudio/uni-app'
|
||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
@@ -32,6 +33,7 @@
|
|||||||
partnerChatReportTrigger
|
partnerChatReportTrigger
|
||||||
} from "@/api/sparring.js"
|
} from "@/api/sparring.js"
|
||||||
import ImagePreview from '@/components/image-preview/image-preview.vue';
|
import ImagePreview from '@/components/image-preview/image-preview.vue';
|
||||||
|
import common from '@/common/common';
|
||||||
|
|
||||||
const traId = ref('')
|
const traId = ref('')
|
||||||
const chaId = ref('')
|
const chaId = ref('')
|
||||||
@@ -47,12 +49,36 @@
|
|||||||
detailInfo.value = {
|
detailInfo.value = {
|
||||||
...res.body
|
...res.body
|
||||||
}
|
}
|
||||||
talkComRef.value.prepare()
|
talkComRef.value.prepare({
|
||||||
|
traId: traId.value,
|
||||||
|
chaId: chaId.value,
|
||||||
|
traTyp: talkingType.value
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const timeShow = ref('12:11')
|
const timeShow = ref('12:11')
|
||||||
const closeTalking = () => {
|
const closeTalking = () => {
|
||||||
talkComRef.value.close()
|
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) => {
|
onLoad((params) => {
|
||||||
traId.value = params.traId;
|
traId.value = params.traId;
|
||||||
@@ -61,6 +87,7 @@
|
|||||||
isPreview.value = params.isPreview === '1'
|
isPreview.value = params.isPreview === '1'
|
||||||
getDetailInfo()
|
getDetailInfo()
|
||||||
});
|
});
|
||||||
|
onBackPress((res) => res.from === 'backbutton');
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.show-box {
|
.show-box {
|
||||||
|
|||||||
@@ -24,7 +24,8 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
baseName: 'wangwu',
|
baseName: 'wangwu',
|
||||||
context: null
|
context: null,
|
||||||
|
isGetting: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -36,6 +37,7 @@
|
|||||||
// this.prepare()
|
// this.prepare()
|
||||||
},
|
},
|
||||||
beforeUnmount() {
|
beforeUnmount() {
|
||||||
|
this.isGetting = false
|
||||||
this.stop()
|
this.stop()
|
||||||
this.close()
|
this.close()
|
||||||
},
|
},
|
||||||
@@ -86,18 +88,31 @@
|
|||||||
switchCamera() {},
|
switchCamera() {},
|
||||||
startPreview() {},
|
startPreview() {},
|
||||||
stopPreview() {},
|
stopPreview() {},
|
||||||
prepare() {
|
prepare({traId, chaId, traTyp}) {
|
||||||
prepareApi(this.baseName).then(res => {
|
if(!this.isGetting){
|
||||||
|
this.isGetting = true
|
||||||
|
return
|
||||||
|
}
|
||||||
|
prepareApi({
|
||||||
|
traId: traId,
|
||||||
|
chaId: chaId,
|
||||||
|
traTyp: traTyp,
|
||||||
|
}).then(res => {
|
||||||
console.log(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 => {
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
if (err === 'prepare') {
|
|
||||||
this.initPusher()
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
initPusher() {
|
initPusher() {
|
||||||
console.log(1)
|
console.log('rtmp://25.18.122.148:9605/voice_in/' + this.baseName)
|
||||||
pusher = new plus.video.LivePusher('pusher-box', {
|
pusher = new plus.video.LivePusher('pusher-box', {
|
||||||
url: 'rtmp://25.18.122.148:9605/voice_in/' + this.baseName,
|
url: 'rtmp://25.18.122.148:9605/voice_in/' + this.baseName,
|
||||||
"enable-camera": true,
|
"enable-camera": true,
|
||||||
|
|||||||
Reference in New Issue
Block a user