Merge branch 'develop' into 'sit'
Develop See merge request K17_AITS/tra-app!157
This commit is contained in:
+3
-3
@@ -1,7 +1,7 @@
|
||||
# 开发环境
|
||||
ENV = 'development'
|
||||
# 'development'
|
||||
VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002'
|
||||
VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
|
||||
# UAT
|
||||
# VITE_APP_BASE_API_Url = 'http://25.18.122.78:9786'
|
||||
|
||||
@@ -32,12 +32,12 @@ VITE_APP_BASE_H5_API_Url = 'http://25.18.122.92:9786'
|
||||
# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.78:9786'
|
||||
|
||||
# 任东
|
||||
# VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.16.130:9601'
|
||||
VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.16.130:9601'
|
||||
VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.130:9602'
|
||||
|
||||
# VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.16.140:9604'
|
||||
# 张建成
|
||||
#VITE_APP_BASE_H5_API_Url_TRAASK = 'http://25.64.16.144:9605'
|
||||
# VITE_APP_BASE_H5_API_Url_TRAASK = 'http://25.64.16.144:9605'
|
||||
# VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.144:9602'
|
||||
# 王洋洋
|
||||
# VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.16.140:9604'
|
||||
|
||||
@@ -466,12 +466,10 @@
|
||||
pauseVoice();
|
||||
});
|
||||
let prevTime = -1;
|
||||
let activeTime = -1;
|
||||
talkVoiceObj.value.onEnded(() => {
|
||||
console.log('onEnded');
|
||||
emit('changePlay', '');
|
||||
prevTime = -1;
|
||||
activeTime = -1;
|
||||
talkVoiceObj.value.src = '';
|
||||
});
|
||||
talkVoiceObj.value.onStop(() => {
|
||||
|
||||
@@ -269,6 +269,7 @@ const pageObj = ref({
|
||||
total: 0
|
||||
})
|
||||
const getMoreList = flag => {
|
||||
console.log(activeTab.value)
|
||||
if (!flag) {
|
||||
if (pageObj.value.total <= pageObj.value.page * pageObj.value.limit) return
|
||||
pageObj.value.page += 1
|
||||
@@ -298,6 +299,14 @@ const getMoreList = flag => {
|
||||
case '最新':
|
||||
break
|
||||
case '推荐':
|
||||
queryCrsInfoByRecmdApi(pageObj.value)
|
||||
.then(res => {
|
||||
courseListBase.value = courseListBase.value.concat(res.body || [])
|
||||
pageObj.value.total = res.total
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = false
|
||||
})
|
||||
break
|
||||
case '生产线':
|
||||
queryCrsInfoByPrdLineApi({
|
||||
@@ -360,6 +369,7 @@ const changeTab = item => {
|
||||
queryCrsInfoByRecmdApi(pageObj.value)
|
||||
.then(res => {
|
||||
courseListBase.value = res.body || []
|
||||
pageObj.value.total = res.total
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = false
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
</view>
|
||||
<view class="qns-desc">你的答案:</view>
|
||||
<view class="ans-list">
|
||||
<esQuestionAnswer v-for="item in dataInfo.analyContentVos" :dataInfo="item" :intrctWay="item.ossKey?'02':'01'"/>
|
||||
<esQuestionAnswer v-for="item in dataInfo.analyContentVos" :dataInfo="item" :intrctWay="item.ossKey?'02':'01'"
|
||||
:activeVoiceId="activeVoiceId" @changePlay="changePlay" />
|
||||
</view>
|
||||
<view class="analysis_div">
|
||||
<view class="analysis_title">
|
||||
@@ -37,17 +38,25 @@
|
||||
talkingVoice: ''
|
||||
}),
|
||||
type: Object
|
||||
},
|
||||
activeVoiceId: {
|
||||
default: '',
|
||||
type: String
|
||||
}
|
||||
});
|
||||
const {
|
||||
dataInfo
|
||||
dataInfo,
|
||||
activeVoiceId
|
||||
} = toRefs(props);
|
||||
|
||||
const intrctWay = computed(() => {
|
||||
console.log('props.intrctWay', props.intrctWay);
|
||||
return props.intrctWay;
|
||||
});
|
||||
const emit = defineEmits(['changePlay', 'buutton_click']);
|
||||
const changePlay = (val) => {
|
||||
console.log('esq')
|
||||
emit('changePlay', val)
|
||||
}
|
||||
watch(
|
||||
() => props.dataInfo,
|
||||
() => {}, {
|
||||
@@ -57,7 +66,7 @@
|
||||
);
|
||||
const initData = (item) => {
|
||||
return {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
// 声音播放初始化
|
||||
@@ -74,81 +83,11 @@
|
||||
const showContent = computed(() => {
|
||||
return props.text || props.dataInfo.anserResult || '';
|
||||
});
|
||||
onMounted(() => {
|
||||
initVoice();
|
||||
});
|
||||
onUnload(() => {
|
||||
pauseVoice();
|
||||
});
|
||||
watch(
|
||||
() => props.dataInfo.talkingVoice,
|
||||
(val) => {
|
||||
if (val) {
|
||||
initVoice();
|
||||
}
|
||||
}, {
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
);
|
||||
|
||||
// 按钮点击
|
||||
const buutton_click = (type) => {
|
||||
emit('buutton_click', type, props.dataInfo);
|
||||
};
|
||||
const pauseVoice = () => {
|
||||
if (!talkVoiceObj.value) return;
|
||||
talkVoiceObj.value.pause();
|
||||
isPlaying.value = false;
|
||||
emit('changePlay', '');
|
||||
};
|
||||
const playVoice = () => {
|
||||
emit('changePlay', unref(dataInfo)?.id);
|
||||
if (talkVoiceObj.value && talkVoiceObj.value.src) {
|
||||
talkVoiceObj.value.play();
|
||||
return;
|
||||
} else {
|
||||
talkVoiceObj.value.src = '';
|
||||
if (unref(dataInfo).talkingVoice) {
|
||||
setTimeout(() => {
|
||||
talkVoiceObj.value.src = unref(dataInfo).talkingVoice;
|
||||
talkVoiceObj.value.play();
|
||||
isPlaying.value = true;
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
};
|
||||
const initVoice = () => {
|
||||
talkVoiceObj.value = uni.createInnerAudioContext();
|
||||
talkVoiceObj.value.onEnded(() => {
|
||||
emit('changePlay', '');
|
||||
talkVoiceObj.value.src = '';
|
||||
});
|
||||
talkVoiceObj.value.onError(() => {
|
||||
talkVoiceObj.value.src = '';
|
||||
});
|
||||
if (unref(dataInfo).intrctWay === '02') {
|
||||
itemVoice.value = unref(dataInfo).talkingVoice;
|
||||
talkVoiceObj.value.src = itemVoice.value;
|
||||
setTimeout(() => {
|
||||
setVoiceTime(0);
|
||||
}, 100);
|
||||
}
|
||||
};
|
||||
const setVoiceTime = (sum) => {
|
||||
sum += 1;
|
||||
if (Math.ceil(talkVoiceObj.value.duration) > 0) {
|
||||
voiceTime.value = (Math.ceil(talkVoiceObj.value.duration) || 1) + 's';
|
||||
} else {
|
||||
if (sum === 20) {
|
||||
voiceTime.value = 0 + 's';
|
||||
return;
|
||||
}
|
||||
setTimeout(() => {
|
||||
setVoiceTime(sum);
|
||||
}, 200);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@@ -164,6 +103,7 @@
|
||||
text-align: center;
|
||||
line-height: 46rpx;
|
||||
}
|
||||
|
||||
.question_text {
|
||||
font-family: PingFangSC;
|
||||
font-weight: 500;
|
||||
@@ -174,11 +114,13 @@
|
||||
font-style: normal;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.qns-desc{
|
||||
|
||||
.qns-desc {
|
||||
font-size: 30rpx;
|
||||
margin-top: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.talking-info {
|
||||
padding: 20rpx;
|
||||
border-radius: 15rpx;
|
||||
@@ -325,35 +267,40 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.question-info{
|
||||
|
||||
.question-info {
|
||||
margin-bottom: 20rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
.ans-list{
|
||||
|
||||
.ans-list {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.analysis_div {
|
||||
width: 100%;
|
||||
|
||||
.analysis_title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin: 12rpx 0 28rpx 0;
|
||||
|
||||
|
||||
.success_answer {
|
||||
font-size: 30rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
|
||||
.your_answer {
|
||||
.success {
|
||||
color: #15b859;
|
||||
}
|
||||
|
||||
.error {
|
||||
color: #f5212d;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.analysis_note {
|
||||
font-family: PingFangSC;
|
||||
font-weight: 500;
|
||||
@@ -364,5 +311,4 @@
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="talking-info-es" v-if="intrctWay === '02'">
|
||||
<view :class="['talking-gif', 'is-play']">
|
||||
<view :class="['talking-gif', isPlaying ?'is-play':'']">
|
||||
<CommonLoading color="#fff" v-show="voiceLoading" />
|
||||
</view>
|
||||
<view class="right-time">{{ voiceTime }}</view>
|
||||
@@ -14,10 +14,12 @@
|
||||
</view>
|
||||
<view class="btns-cont">
|
||||
<view class="play-btn">
|
||||
<image class="icon" @click="playVoice" src="@/static/images/course/play-blue.png"
|
||||
<image class="icon" @click="playVoice" src="@/static/images/course/play-blue.png" v-show="!isPlaying"
|
||||
style="width: 100%; height: 100%"></image>
|
||||
<image class="icon" v-show="isPlaying" @click.stop="pauseVoice" src="@/static/images/course/stop-blue.png"
|
||||
style="width: 100%;height: 100%;"></image>
|
||||
</view>
|
||||
<view class="text-btn" @click.stop="translateVoice()">文</view>
|
||||
<!-- <view class="text-btn" @click.stop="translateVoice()">文</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- 01纯文字 -->
|
||||
@@ -80,7 +82,6 @@
|
||||
} = toRefs(props);
|
||||
|
||||
const intrctWay = computed(() => {
|
||||
console.log('props.intrctWay', props.intrctWay);
|
||||
return props.intrctWay;
|
||||
});
|
||||
const emit = defineEmits(['changePlay', 'buutton_click']);
|
||||
@@ -91,6 +92,12 @@
|
||||
immediate: true
|
||||
}
|
||||
);
|
||||
watch(() => props.activeVoiceId, (val) => {
|
||||
if (val != dataInfo.value.ossAddr) {
|
||||
pauseVoice();
|
||||
isPlaying.value = false
|
||||
}
|
||||
})
|
||||
// 声音播放初始化
|
||||
const talkVoiceObj = ref(null);
|
||||
|
||||
@@ -107,21 +114,21 @@
|
||||
});
|
||||
onMounted(() => {
|
||||
initVoice();
|
||||
watch(
|
||||
() => props.dataInfo.ossAddr,
|
||||
(val) => {
|
||||
if (val) {
|
||||
initVoice();
|
||||
}
|
||||
}, {
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
);
|
||||
});
|
||||
onUnload(() => {
|
||||
pauseVoice();
|
||||
});
|
||||
watch(
|
||||
() => props.dataInfo.ossAddr,
|
||||
(val) => {
|
||||
if (val) {
|
||||
initVoice();
|
||||
}
|
||||
}, {
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
);
|
||||
|
||||
// 按钮点击
|
||||
const buutton_click = (type) => {
|
||||
@@ -134,7 +141,7 @@
|
||||
emit('changePlay', '');
|
||||
};
|
||||
const playVoice = () => {
|
||||
emit('changePlay', unref(dataInfo)?.id);
|
||||
emit('changePlay', unref(dataInfo)?.ossAddr);
|
||||
if (talkVoiceObj.value && talkVoiceObj.value.src) {
|
||||
talkVoiceObj.value.play();
|
||||
return;
|
||||
@@ -142,7 +149,8 @@
|
||||
talkVoiceObj.value.src = '';
|
||||
if (unref(dataInfo).ossAddr) {
|
||||
setTimeout(() => {
|
||||
talkVoiceObj.value.src = unref(dataInfo).ossAddr;
|
||||
talkVoiceObj.value.src =
|
||||
'http://25.18.122.92:9786/traoss/tras3/show//S3F0250181221042025091814253800004818633' //unref(dataInfo).ossAddr;
|
||||
talkVoiceObj.value.play();
|
||||
isPlaying.value = true;
|
||||
}, 100);
|
||||
@@ -151,13 +159,42 @@
|
||||
};
|
||||
const initVoice = () => {
|
||||
talkVoiceObj.value = uni.createInnerAudioContext();
|
||||
let prevTime = -1;
|
||||
talkVoiceObj.value.onEnded(() => {
|
||||
emit('changePlay', '');
|
||||
prevTime = -1;
|
||||
talkVoiceObj.value.src = '';
|
||||
});
|
||||
talkVoiceObj.value.onError(() => {
|
||||
talkVoiceObj.value.onStop(() => {
|
||||
emit('changePlay', '');
|
||||
prevTime = -1;
|
||||
talkVoiceObj.value.src = '';
|
||||
});
|
||||
talkVoiceObj.value.onPause(() => {
|
||||
prevTime = talkVoiceObj.value.currentTime;
|
||||
emit('changePlay', '');
|
||||
});
|
||||
talkVoiceObj.value.onError(() => {
|
||||
prevTime = -1;
|
||||
emit('changePlay', '');
|
||||
});
|
||||
talkVoiceObj.value.onPlay(() => {
|
||||
prevTime = talkVoiceObj.value.currentTime;
|
||||
emit('changePlay', unref(dataInfo)?.ossAddr);
|
||||
});
|
||||
talkVoiceObj.value.onTimeUpdate(() => {
|
||||
if (props.activeVoiceId === unref(dataInfo)?.ossAddr) {
|
||||
setTimeout(() => {
|
||||
if (talkVoiceObj.value.currentTime !== prevTime) {
|
||||
if (talkVoiceObj.value.currentTime > 0) {
|
||||
prevTime = talkVoiceObj.value.currentTime;
|
||||
}
|
||||
} else {
|
||||
emit('changePlay', '');
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
});
|
||||
if (unref(dataInfo).intrctWay === '02') {
|
||||
itemVoice.value = unref(dataInfo).ossAddr;
|
||||
talkVoiceObj.value.src = itemVoice.value;
|
||||
@@ -202,8 +239,8 @@
|
||||
padding-left: 168rpx;
|
||||
|
||||
&.is-play {
|
||||
background: url(@/static/images/course/voice-white.gif) no-repeat;
|
||||
background-size: contain;
|
||||
background: url(@/static/images/course/voice-white.gif) no-repeat !important;
|
||||
background-size: contain !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -9,9 +9,9 @@
|
||||
</view>
|
||||
<scroll-view class="talking-list" :scroll-y="true" :scroll-top="scrollTop" :show-scrollbar="false"
|
||||
:scroll-with-animation="true">
|
||||
<talkingItem v-for="item in talkingList" :type="item.type"
|
||||
:dataInfo="item" :activeVoiceId="activeVoiceTalkingItemId" :isPlaying="activeVoiceTalkingItemId === item.id"
|
||||
:voiceRate="chooseRate"/>
|
||||
<talkingItem v-for="item in talkingList" :type="item.type" @changePlay="changePlay" :dataInfo="item"
|
||||
:activeVoiceId="activeVoiceTalkingItemId" :isPlaying="activeVoiceTalkingItemId === item.id"
|
||||
:voiceRate="chooseRate" />
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -32,12 +32,12 @@
|
||||
} from '@/api/courseRecord.js'
|
||||
import common from '@/common/common';
|
||||
import talkingItem from './components/talkingItem.vue'
|
||||
|
||||
|
||||
const stdyId = ref('')
|
||||
const scrollTop = ref(0)
|
||||
const showOrder = ref(1)
|
||||
const pgrphNum = ref(1)
|
||||
|
||||
|
||||
const activeVoiceTalkingItemId = ref('')
|
||||
const chooseRate = ref('1.0')
|
||||
const recordTitle = ref('')
|
||||
@@ -46,35 +46,38 @@
|
||||
recordTitle.value = params.crsName || '课程学习记录'
|
||||
getRecordInfo()
|
||||
})
|
||||
const changePlay = val => {
|
||||
activeVoiceTalkingItemId.value = val
|
||||
}
|
||||
const talkingRecord = ref([])
|
||||
const talkingList = computed(()=>{
|
||||
const talkingList = computed(() => {
|
||||
let _arr = []
|
||||
talkingRecord.value.forEach((t,index)=> {
|
||||
talkingRecord.value.forEach((t, index) => {
|
||||
_arr.push({
|
||||
...t,
|
||||
id: 'prgh-'+index,
|
||||
chatContent:( t.pgrphContent || ''),
|
||||
titleNum: '知识点'+(index+1)+':',
|
||||
title:t.title,
|
||||
id: 'prgh-' + index,
|
||||
chatContent: (t.pgrphContent || ''),
|
||||
titleNum: '知识点' + (index + 1) + ':',
|
||||
title: t.title,
|
||||
type: 3
|
||||
})
|
||||
if(t.qnsInfoVos && t.qnsInfoVos.length>0){
|
||||
t.qnsInfoVos.forEach((k,indexk)=>{
|
||||
if(k.qnsTyp === 'ES'){
|
||||
if (t.qnsInfoVos && t.qnsInfoVos.length > 0) {
|
||||
t.qnsInfoVos.forEach((k, indexk) => {
|
||||
if (k.qnsTyp === 'ES') {
|
||||
_arr.push({
|
||||
...k,
|
||||
chatContent: (k.qnsContent || ''),
|
||||
titleNum: '问题'+(indexk+1)+':',
|
||||
titleNum: '问题' + (indexk + 1) + ':',
|
||||
type: 8,
|
||||
id: 'qns-'+index+'-'+indexk,
|
||||
id: 'qns-' + index + '-' + indexk,
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
_arr.push({
|
||||
...k,
|
||||
chatContent:(k.qnsContent || ''),
|
||||
titleNum: '问题'+(indexk+1)+':',
|
||||
chatContent: (k.qnsContent || ''),
|
||||
titleNum: '问题' + (indexk + 1) + ':',
|
||||
type: 8,
|
||||
id: 'qns-'+index+'-'+indexk,
|
||||
id: 'qns-' + index + '-' + indexk,
|
||||
isQuestion: true,
|
||||
my_answer: [],
|
||||
backend_answer: [],
|
||||
@@ -95,16 +98,15 @@
|
||||
const backRouter = () => {
|
||||
common.navigateBack()
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
.course-record-page {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
|
||||
.top-bg {
|
||||
background: linear-gradient(16deg, rgba(234, 246, 255, 0) 0%, #e6eafd 100%);
|
||||
height: 480rpx;
|
||||
@@ -128,7 +130,7 @@
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
|
||||
padding-top: var(--status-bar-height);
|
||||
|
||||
.body-title {
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
</view>
|
||||
<view class="user-column">
|
||||
<view class="avatar-box">
|
||||
<image-preview v-if="item.ossAddr" class="avatar-image" :src="userRankObj.ossAddr" mode="aspectFit"></image-preview>
|
||||
<image-preview v-if="userRankObj.ossAddr" class="avatar-image" :src="userRankObj.ossAddr" mode="aspectFit"></image-preview>
|
||||
<image class="avatar-image" v-else :src="defaultAvatarSrc"></image>
|
||||
</view>
|
||||
<view class="user-name">{{userRankObj.userName}}</view>
|
||||
|
||||
@@ -180,9 +180,12 @@
|
||||
<view class="right">
|
||||
<view class="title ellipsis-text">{{ item.crsName }}</view>
|
||||
<view class="note ellipsis-text">
|
||||
更新:{{ (item.mtTime || '').substr(0, 10) }} 丨已学:{{ item.accmStdyCnt }}
|
||||
更新:{{ (item.mtTime || '').substr(0, 10) }}
|
||||
</view>
|
||||
<view class="button_div">
|
||||
<view class="note ellipsis-text">
|
||||
已学:{{ item.accmStdyCnt }}人次
|
||||
</view>
|
||||
<view class="button">去学习</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -220,9 +223,12 @@
|
||||
<view class="right">
|
||||
<view class="title ellipsis-text">{{ item.crsName }}</view>
|
||||
<view class="note ellipsis-text">
|
||||
更新:{{ (item.mtTime || '').substr(0, 10) }} 丨已学:{{ item.accmStdyCnt }}
|
||||
更新:{{ (item.mtTime || '').substr(0, 10) }}
|
||||
</view>
|
||||
<view class="button_div">
|
||||
<view class="note ellipsis-text">
|
||||
已学:{{ item.accmStdyCnt }}人次
|
||||
</view>
|
||||
<view class="button">去学习</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -259,9 +265,12 @@
|
||||
<view class="right">
|
||||
<view class="title ellipsis-text">{{ item.crsName }}</view>
|
||||
<view class="note ellipsis-text">
|
||||
更新:{{ (item.mtTime || '').substr(0, 10) }} 丨已学:{{ item.accmStdyCnt }}
|
||||
更新:{{ (item.mtTime || '').substr(0, 10) }}
|
||||
</view>
|
||||
<view class="button_div">
|
||||
<view class="note ellipsis-text">
|
||||
已学:{{ item.accmStdyCnt }}人次
|
||||
</view>
|
||||
<view class="button">去学习</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -559,8 +568,7 @@
|
||||
|
||||
.button_div {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
justify-content: space-between;
|
||||
.button {
|
||||
text-align: center;
|
||||
line-height: 62rpx;
|
||||
|
||||
Reference in New Issue
Block a user