diff --git a/.env.development b/.env.development
index ef87718b..076c341c 100644
--- a/.env.development
+++ b/.env.development
@@ -4,13 +4,14 @@ ENV = 'development'
# 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 = 'http://103.3.121.66:7001'
+
+VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
+
# VITE_APP_BASE_API_Url = 'http://192.168.247.200'
# VITE_APP_BASE_API_Url = 'http://aitscdn.jlbank.com.cn:7001'
# VITE_APP_BASE_API_Url = 'http://192.168.108.129'
# dev
-#VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001'
+# VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001'
# sit
# VITE_APP_BASE_API_Url = 'http://25.18.122.91:9786'
@@ -20,13 +21,14 @@ VITE_APP_BASE_API_Url = 'http://103.3.121.66:7001'
# DEV
# app入口
-
+#VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001'
# VITE_APP_BASE_API_Url = 'http://25.16.122.91:9786'
# VITE_APP_BASE_API_Url = 'http://25.18.122.66:9786'
# h5专用地址x2
+
# VITE_APP_BASE_H5_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 = 'http://25.18.122.78:9786'
# VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://192.168.247.200'
# VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.32.154:9602'
diff --git a/.env.development.yh b/.env.development.yh
index 943c5717..0bc26d12 100644
--- a/.env.development.yh
+++ b/.env.development.yh
@@ -6,5 +6,5 @@ VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001'
# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.78:9786'
# VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.32.154:9604'
-# VITE_APP_BASE_H5_API_Url_TRAPRACTICE = 'http://25.64.32.154:9603'
+VITE_APP_BASE_H5_API_Url_TRAPRACTICE = 'http://25.64.32.156:9603'
diff --git a/src/api/common.js b/src/api/common.js
index 4656ddad..3a75acb3 100644
--- a/src/api/common.js
+++ b/src/api/common.js
@@ -169,6 +169,21 @@ export function downloadVoiceFile(url) {
});
});
}
+// 获取音频 通用参数
+export function downloadVoiceParams(url) {
+ const token = getToken();
+ const header = {
+ "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
+ };
+ if (token)
+ header['summary'] = token
+ let baseUrl = get_base_url(url);
+ return {
+ url: `${baseUrl}${url}`,
+ header,
+ timeout: 180000,
+ }
+}
export function getAudioByText(data) {
diff --git a/src/api/preview.js b/src/api/preview.js
index cbf1e63e..86eca834 100644
--- a/src/api/preview.js
+++ b/src/api/preview.js
@@ -10,3 +10,11 @@ export const queryTraStdyInfoPreviewPaging = (data) => {
data
});
};
+export const queryTraListPreviewPaging = (data) => {
+ return request({
+ url: '/trapractice/traPartnerInfo/queryTraPartnerPreviewPaging',
+ method: 'post',
+ toastErrors: true,
+ data
+ });
+};
diff --git a/src/api/sparring.js b/src/api/sparring.js
index 239a1ade..0e6598bc 100644
--- a/src/api/sparring.js
+++ b/src/api/sparring.js
@@ -41,4 +41,44 @@ export const queryTraPartnerCharacterInfoList = (data) => {
method: 'post',
data
});
+};
+// 陪练角色详情 + 对话详情 /traPartnerCharacterInfo/queryTraPartnerCharacterInfoById
+export const queryTraPartnerCharacterInfoById = (data) => {
+ return request({
+ url: base_url + '/traPartnerCharacterInfo/queryTraPartnerCharacterInfoById',
+ method: 'post',
+ data
+ });
+};
+// 结束陪练 /trapractice/traPartnerChatReport/partnerChatReportTrigger?execId=
+export const partnerChatReportTrigger = (data) => {
+ return request({
+ url: base_url + '/traPartnerChatReport/partnerChatReportTrigger',
+ method: 'post',
+ data
+ });
+};
+// 问答提示/trapractice/traPartnerChat/partnerChatPrompt
+export const partnerChatPrompt = (data) => {
+ return request({
+ url: base_url + '/traPartnerChat/partnerChatPrompt',
+ method: 'post',
+ data
+ });
+};
+// 获取报告traPartnerChatReport/partnerChatReport
+export const partnerChatReport = (data) => {
+ return request({
+ url: base_url + '/traPartnerChatReport/partnerChatReport',
+ method: 'post',
+ data
+ });
+};
+// 反馈
+export const insertTraPartnerFeedback = (data) => {
+ return request({
+ url: base_url + '/traPartnerFeedback/insertTraPartnerFeedback',
+ method: 'post',
+ data
+ });
};
\ No newline at end of file
diff --git a/src/api/traRecord.js b/src/api/traRecord.js
new file mode 100644
index 00000000..761429b5
--- /dev/null
+++ b/src/api/traRecord.js
@@ -0,0 +1,58 @@
+import request from '@/api/request'
+const base_url = '/trapractice'
+
+
+/**练习*/
+// 练习列表页
+export const queryPracticeRecordPaging = (data) => {
+ return request({
+ url: base_url + '/traPartnerExecuteHis/queryTraPartnerExecutePaging',
+ method: 'post',
+ toastErrors: true,
+ data:{
+ traType:'01',
+ ...data
+ }
+ });
+};
+// 练习每一项列表
+export const queryPracticeHis = (data) => {
+ return request({
+ url: base_url + '/traPartnerExecuteHis/queryTraPartnerExecuteHisPaging',
+ method: 'post',
+ toastErrors: true,
+ data
+ });
+};
+// 练习详情 通过 exrId 查询
+export const queryPracticeRecordByExrId = (data) => {
+ return request({
+ url: base_url + '/traCrsPractice/queryPracticeRecordByExrId',
+ method: 'post',
+ toastErrors: true,
+ data
+ });
+};
+
+/**考试*/
+export const queryCrsExamRecordPaging = (data) => {
+ return request({
+ url: base_url + '/traPartnerExecuteHis/queryTraPartnerExecutePaging',
+ method: 'post',
+ toastErrors: true,
+ data:{
+ traType:'02',
+ ...data
+ }
+ });
+};
+// 考试每一项列表
+export const queryCrsExamHisByExamId = (data) => {
+ return request({
+ url: base_url + '/traPartnerExecuteHis/queryTraPartnerExecuteHisPaging',
+ method: 'post',
+ toastErrors: true,
+ data
+ });
+};
+
diff --git a/src/common/common.js b/src/common/common.js
index 037c20a2..e6ee8e52 100644
--- a/src/common/common.js
+++ b/src/common/common.js
@@ -1,5 +1,7 @@
+import { get_base_url } from '@/api/request';
// #ifdef APP-PLUS
import showDialog from '@/common/dialogMessage'
+import common from '@/common/common'
// #endif
function msg(title, duration = 1000) {
uni.showToast({
@@ -277,6 +279,65 @@ export function setupKeyboardHeightListener(updateCallback) {
}
+ export const previewFileFnc = ({fileId, getFileSrc, fileName}) => {
+ let userInfo = getUserInfo()
+ let userParams = '/' + (userInfo?.loginName??'')
+ if (getPhoneEnvBool('AND')) {
+ common.navigateTo('/pages/index/preview?fileId=' + fileId +'&fileApiSrc=' + getFileSrc);
+ } else {
+ if (isDownloading.value) return
+ const base_url = get_base_url(getFileSrc);
+ let fileUrl = base_url + getFileSrc + fileId + userParams;
+ const localFilePath = '_doc/pdf_view/' + fileName + '.pdf';
+ isDownloading.value = true
+ downloadFileFnc(fileUrl, localFilePath).then((res) => {
+ uni.openDocument({
+ filePath: res,
+ showMenu: true,
+ success: function() {
+ console.log('打开文档成功');
+ }
+ })
+ }).finally(() => {
+ setTimeout(() => {
+ isDownloading.value = false
+ }, 1000)
+ });
+ }
+ }
+ const downloadFileFnc = async (fileUrl, localFilePath) => {
+ try {
+ //#ifdef APP-PLUS
+ return new Promise((resolve, reject) => {
+ console.log('开始下载:', fileUrl);
+ const dtask = plus.downloader.createDownload(
+ fileUrl, {
+ filename: localFilePath
+ },
+ (d, status) => {
+ if (status === 200) {
+ console.log('保存路径:', d.filename);
+ resolve(d.filename);
+ } else {
+ console.error('文件下载失败:', status);
+ reject(new Error(`下载失败,状态码: ${status}`));
+ }
+ }
+ );
+ dtask.start();
+ });
+ // #endif
+ //#ifdef H5
+ return new Promise((resolve, reject) => {
+ resolve();
+ });
+ // #endif
+ } catch (error) {
+ console.error('创建目录失败:', error);
+ throw error;
+ }
+ };
+
export default {
getPageCache,
diff --git a/src/pages.json b/src/pages.json
index 1348a422..9487bedc 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -510,6 +510,15 @@
"titleNView": false
}
}
+ },
+ {
+ "path": "pages/traRecord/index",
+ "style": {
+ "navigationBarTitleText": "陪练记录页",
+ "app-plus": {
+ "titleNView": false
+ }
+ }
}
],
"tabBar": {
diff --git a/src/pages/course/components/chartSeven.vue b/src/pages/course/components/chartSeven.vue
index fc3878e0..54ff061e 100644
--- a/src/pages/course/components/chartSeven.vue
+++ b/src/pages/course/components/chartSeven.vue
@@ -15,15 +15,15 @@
- 维度分析22:
+ 维度分析:
{{ score }}分
- 维度{{ item }}
- {{ item }}
+ {{ item.gradeDimensName || item.gradeDimens }}
+ {{ item.anlyGrade }}
@@ -31,7 +31,7 @@
export default{
props:{
dataList:{
- default:() => [10,20,30,40,50,60,78],
+ default:() => [],
type: Array
},
score:{
@@ -54,7 +54,7 @@
},
computed:{
dataValue(){
- return this.dataList//.map(t=>t.anlyGrade)
+ return this.dataList.map(t=>t.anlyGrade)
},
chartWidth(){
return this.size + 'rpx'
@@ -119,7 +119,6 @@
dataY: dataY + '%'
});
}
- console.log(vertices)
return vertices;
},
diff --git a/src/pages/course/components/chartSix.vue b/src/pages/course/components/chartSix.vue
index 871c6854..1b2fba48 100644
--- a/src/pages/course/components/chartSix.vue
+++ b/src/pages/course/components/chartSix.vue
@@ -15,15 +15,15 @@
- 维度分析22:
+ 维度分析:
{{ score }}分
- 维度维{{ item }}
- {{ item }}
+ {{ item.gradeDimensName || item.gradeDimens }}
+ {{ item.anlyGrade }}
@@ -31,7 +31,7 @@
export default{
props:{
dataList:{
- default:() => [20,30,40,50,60,78],
+ default:() => [],
type: Array
},
score:{
@@ -54,7 +54,7 @@
},
computed:{
dataValue(){
- return this.dataList//.map(t=>t.anlyGrade)
+ return this.dataList.map(t=>t.anlyGrade)
},
chartWidth(){
return this.size + 'rpx'
@@ -119,7 +119,6 @@
dataY: dataY + '%'
});
}
- console.log(vertices)
return vertices;
},
diff --git a/src/pages/course/components/talkingItem.vue b/src/pages/course/components/talkingItem.vue
index 4ac7555a..5cced8fb 100644
--- a/src/pages/course/components/talkingItem.vue
+++ b/src/pages/course/components/talkingItem.vue
@@ -220,6 +220,7 @@
import VideoPreview from '@/components/image-preview/video-preview.vue';
import {
downloadVoiceFile,
+ downloadVoiceParams,
uploadVoiceFile,
getAudioByText
} from '@/api/common.js';
@@ -238,7 +239,8 @@
useStorageStore
} from '@/store/storage.js';
import {
- onUnload
+ onUnload,
+ onHide
} from '@dcloudio/uni-app';
import Subject from '@/components/examination/subject.vue';
@@ -246,6 +248,7 @@
const storageStore = useStorageStore();
const audioCacheObj = computed(() => storageStore.audioObj);
+ const isGettingId = computed(() => storageStore.getGettingVoiceId);
const props = defineProps({
type: {
default: 0, // 1: userAnswer 0: AIAnswer
@@ -434,12 +437,25 @@
initVoice();
});
onUnload(() => {
- pauseVoice();
+ // pauseVoice();
+ console.log('onUnload')
+ talkVoiceObj.value?.destroy()
+ if(downloadFnc.value && downloadFnc.value.abord) downloadFnc.value?.abord()
+ downloadFnc.value = null
+ });
+ onHide(() => {
+ console.log('onHide')
+ voiceLoading.value = false;
+ if(downloadFnc.value && downloadFnc.value.abord) downloadFnc.value?.abord()
+ downloadFnc.value = null
});
let prevTime = -1;
let pauseTime = -1;
+ const startPlay = ref(false)
+ const voiceIsPlaying = ref(false)
talkVoiceObj.value.onEnded(() => {
console.log('onEnded');
+ voiceIsPlaying.value = false
if(props.activeVoiceId){
emit('changePlay', '');
}
@@ -449,6 +465,8 @@
});
talkVoiceObj.value.onStop(() => {
console.log('onStop');
+ voiceLoading.value = false;
+ voiceIsPlaying.value = false
if(props.activeVoiceId){
emit('changePlay', '');
}
@@ -457,13 +475,22 @@
talkVoiceObj.value.src = '';
});
talkVoiceObj.value.onPause(() => {
+ voiceIsPlaying.value = false
+ voiceLoading.value = false;
prevTime = talkVoiceObj.value.currentTime;
pauseTime = prevTime
+ if(downloadFnc.value && downloadFnc.value.abord) downloadFnc.value?.abord()
+ downloadFnc.value = null
});
talkVoiceObj.value.onPlay(() => {
console.log('onPlay');
prevTime = talkVoiceObj.value.currentTime;
pauseTime = prevTime
+ startPlay.value = true
+ voiceIsPlaying.value = true
+ setTimeout(()=> {
+ startPlay.value= false
+ },300)
emit('changePlay', unref(dataInfo)?.id);
});
@@ -475,7 +502,7 @@
prevTime = talkVoiceObj.value.currentTime;
}
} else {
- if (props.isPlaying && (talkVoiceObj.value.currentTime > 0) && props.activeVoiceId) {
+ if (props.isPlaying && (talkVoiceObj.value.currentTime > 0) && props.activeVoiceId && !startPlay.value) {
console.log(pauseTime , prevTime)
emit('changePlay', '');
}
@@ -491,7 +518,7 @@
// emit('changePlay', '');
});
const pauseVoice = () => {
- console.log('手动')
+ voiceLoading.value = false;
if (!talkVoiceObj.value) return;
talkVoiceObj.value.pause();
emit('changePlay', '');
@@ -510,7 +537,10 @@
playVoice();
}
};
+ const downloadFnc = ref(null)
const playVoice = (readType = 'pgth') => {
+ console.log('playVoice11111111')
+ if(voiceIsPlaying.value) return
let _content = showContent.value;
if (!_content) {
common.msg('没有可以播放的文字信息!');
@@ -518,15 +548,16 @@
}
setTimeout(() => {
emit('changePlay', unref(dataInfo)?.id);
- console.log(1)
// readType 阅读内容类型pgrh段落/qns问题
if (talkVoiceObj.value.src && talkVoiceObj.value.src === itemVoice.value) {
+ if(voiceIsPlaying.value) return
talkVoiceObj.value.play();
return;
}
talkVoiceObj.value.src = '';
if (itemVoice.value) {
setTimeout(() => {
+ if(voiceIsPlaying.value) return
talkVoiceObj.value.src = itemVoice.value;
talkVoiceObj.value.play();
}, 100);
@@ -578,24 +609,53 @@
if (url) {
voiceLoading.value = false;
itemVoice.value = url;
+ if(voiceIsPlaying.value) return
talkVoiceObj.value.src = url;
talkVoiceObj.value.play();
} else {
- downloadVoiceFile(_url)
- .then((res) => {
+ storageStore.setGettingVoiceId(unref(dataInfo)?.id);
+ let _paramsObj = downloadVoiceParams(_url)
+ downloadFnc.value = uni.downloadFile({
+ ..._paramsObj,
+ success(res) {
if (res?.data) {
common.msg(res.data.message);
return;
}
voiceLoading.value = false;
itemVoice.value = res.tempFilePath;
+ if(voiceIsPlaying.value) return
talkVoiceObj.value.src = res.tempFilePath;
- talkVoiceObj.value.play();
- storageStore.setStorage('audio', _url + _params.teachNo, itemVoice.value);
- })
- .catch((err) => {
- voiceLoading.value = false;
- });
+ // 判斷是否在當前頁面
+ if(unref(isGettingId) === unref(dataInfo)?.id){
+ talkVoiceObj.value.play();
+ storageStore.setStorage('audio', _url + _params.teachNo, itemVoice.value);
+ }
+ },
+ complete() {
+ voiceLoading.value = false;
+ downloadFnc.value = null
+ },
+ });
+ // downloadVoiceFile(_url)
+ // .then((res) => {
+ // if (res?.data) {
+ // common.msg(res.data.message);
+ // return;
+ // }
+ // voiceLoading.value = false;
+ // if()
+ // itemVoice.value = res.tempFilePath;
+ // talkVoiceObj.value.src = res.tempFilePath;
+ // // 判斷是否在當前頁面
+ // if(unref(isGettingId) === unref(dataInfo)?.id){
+ // talkVoiceObj.value.play();
+ // storageStore.setStorage('audio', _url + _params.teachNo, itemVoice.value);
+ // }
+ // })
+ // .catch((err) => {
+ // voiceLoading.value = false;
+ // });
}
});
diff --git a/src/pages/course/components/touchBtn.vue b/src/pages/course/components/touchBtn.vue
index 03dddf4b..c8d0ccfe 100644
--- a/src/pages/course/components/touchBtn.vue
+++ b/src/pages/course/components/touchBtn.vue
@@ -1,54 +1,24 @@
-
+
按住说话
-
+
-
-
-
+
+
+
-
+
@@ -72,11 +42,25 @@
\ No newline at end of file
+ .overlay-radio-box {
+ position: absolute;
+ left: 100rpx;
+ top: 5rpx;
+ pointer-events: none;
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
diff --git a/src/pages/courseRecord/components/practiceRecordItem.vue b/src/pages/courseRecord/components/practiceRecordItem.vue
index 94d44492..10da90da 100644
--- a/src/pages/courseRecord/components/practiceRecordItem.vue
+++ b/src/pages/courseRecord/components/practiceRecordItem.vue
@@ -40,7 +40,7 @@
- 练习时长:{{ formatDuration(item_list.exrStartTm, item_list.exrEndTm) }}
+ 练习时长:{{ item_list.stdtTmLenS || '--' }}
@@ -61,7 +61,7 @@
import { computed, ref, reactive } from 'vue';
import common from '@/common/common';
import { queryPracticeHis } from '@/api/courseRecord.js';
- import { useItemList, formatDuration } from '../useItemList.js';
+ import { useItemList } from '../useItemList.js';
const props = defineProps({
item: {
diff --git a/src/pages/courseRecord/components/studyRecordItem.vue b/src/pages/courseRecord/components/studyRecordItem.vue
index 7941a248..446f92ed 100644
--- a/src/pages/courseRecord/components/studyRecordItem.vue
+++ b/src/pages/courseRecord/components/studyRecordItem.vue
@@ -40,7 +40,7 @@
- 学习时长:{{ formatDuration(item_list.startTm, item_list.endTm) }}
+ 学习时长:{{ item_list.stdtTmLenS || '--' }}
@@ -61,7 +61,7 @@
import { computed } from 'vue';
import common from '@/common/common';
import { queryStdyBatchByCrsId } from '@/api/courseRecord.js';
- import { useItemList, formatDuration, secondsToHours } from '../useItemList.js';
+ import { useItemList, secondsToHours } from '../useItemList.js';
const props = defineProps({
item: {
type: Object,
diff --git a/src/pages/courseRecord/useItemList.js b/src/pages/courseRecord/useItemList.js
index 2ff3c9b1..dca33100 100644
--- a/src/pages/courseRecord/useItemList.js
+++ b/src/pages/courseRecord/useItemList.js
@@ -7,25 +7,25 @@ import {
// 计算两个标准时间的时间差值
-export const formatDuration = (startTm, endTm) => {
- if (endTm === null || startTm === null) return "00:00:00";
- // 解析时间字符串为时间戳(毫秒)
- const startTime = new Date(startTm).getTime();
- const endTime = new Date(endTm).getTime();
-
- // 计算时间差(秒),确保为正数
- const seconds = Math.abs(Math.floor((endTime - startTime) / 1000));
- // 计算时、分、秒
- const hours = Math.floor(seconds / 3600);
- const minutes = Math.floor((seconds % 3600) / 60);
- const remainingSeconds = seconds % 60;
-
- // 补零格式化函数(统一处理所有单位)
- const formatNumber = (num) => num.toString().padStart(2, '0');
-
- // 小时、分钟、秒均保持两位数格式
- return `${formatNumber(hours)}:${formatNumber(minutes)}:${formatNumber(remainingSeconds)}`;
-};
+// export const formatDuration = (startTm, endTm) => {
+// if (endTm === null || startTm === null) return "00:00:00";
+// // 解析时间字符串为时间戳(毫秒)
+// const startTime = new Date(startTm).getTime();
+// const endTime = new Date(endTm).getTime();
+//
+// // 计算时间差(秒),确保为正数
+// const seconds = Math.abs(Math.floor((endTime - startTime) / 1000));
+// // 计算时、分、秒
+// const hours = Math.floor(seconds / 3600);
+// const minutes = Math.floor((seconds % 3600) / 60);
+// const remainingSeconds = seconds % 60;
+//
+// // 补零格式化函数(统一处理所有单位)
+// const formatNumber = (num) => num.toString().padStart(2, '0');
+//
+// // 小时、分钟、秒均保持两位数格式
+// return `${formatNumber(hours)}:${formatNumber(minutes)}:${formatNumber(remainingSeconds)}`;
+// };
// 秒数转换成小时,带小数点的小时
export const secondsToHours = (seconds) => {
diff --git a/src/pages/index/dialog.vue b/src/pages/index/dialog.vue
index 85ef606f..ae474ff7 100644
--- a/src/pages/index/dialog.vue
+++ b/src/pages/index/dialog.vue
@@ -1114,6 +1114,7 @@
.talking-list {
height: calc(100% - 772rpx);
+ min-height: 300rpx;
padding: 12rpx 24rpx;
box-sizing: border-box;
min-height: 300rpx;
diff --git a/src/pages/index/preview.vue b/src/pages/index/preview.vue
index bca1f462..e6470716 100644
--- a/src/pages/index/preview.vue
+++ b/src/pages/index/preview.vue
@@ -26,6 +26,7 @@ export default {
data() {
return {
fileId: '',
+ fileApiSrc: '/traask/traFilePreview/',
showUrl: '',
// viewerUrl: '/static/pdf-view/web/viewer.html',
viewerUrl: '/static/view-pdf/pdf.html',
@@ -36,6 +37,9 @@ export default {
},
onLoad(params) {
this.fileId = params.fileId || ''
+ if(params.fileApiSrc) {
+ this.fileApiSrc = params.fileApiSrc
+ }
const userInfo = getUserInfo();
this.userParams = '/' + (userInfo?.loginName??'')
},
@@ -45,8 +49,8 @@ export default {
fileId: this.fileId
})
}else{
- const base_url = get_base_url('/traask/traFilePreview/');
- let fileUrl = base_url + '/traask/traFilePreview/' + this.fileId + this.userParams;
+ const base_url = get_base_url(this.fileApiSrc);
+ let fileUrl = base_url + this.fileApiSrc + this.fileId + this.userParams;
this.showUrl = fileUrl
console.log(this.showUrl,111)
}
@@ -77,9 +81,9 @@ export default {
common.navigateBack()
},
openPdfFn(data) {
- const base_url = get_base_url('/traask/traFilePreview/')
+ const base_url = get_base_url(this.fileApiSrc)
let _id = data?.fileId
- let fileUrl = base_url + '/traask/traFilePreview/' + _id + this.userParams
+ let fileUrl = base_url + this.fileApiSrc + _id + this.userParams
this.showUrl = this.viewerUrl + '?url=' + fileUrl
console.log(this.showUrl)
this.showView = true
diff --git a/src/pages/login/login.vue b/src/pages/login/login.vue
index 02979bcc..1acfe4f0 100644
--- a/src/pages/login/login.vue
+++ b/src/pages/login/login.vue
@@ -354,7 +354,7 @@
.main_div {
display: flex;
flex-direction: column;
- overflow: hidden;
+ // overflow: hidden;
max-height: 100vh;
}
diff --git a/src/pages/me/index.vue b/src/pages/me/index.vue
index cbaf7efd..b09b748d 100644
--- a/src/pages/me/index.vue
+++ b/src/pages/me/index.vue
@@ -98,7 +98,7 @@
-
+
AI陪练记录
diff --git a/src/pages/preview/components/previewAiSparring.vue b/src/pages/preview/components/previewAiSparring.vue
index ee9c7ad0..1a9b36d7 100644
--- a/src/pages/preview/components/previewAiSparring.vue
+++ b/src/pages/preview/components/previewAiSparring.vue
@@ -1,42 +1,67 @@
-
-
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/sparring/chooseRole.vue b/src/pages/sparring/chooseRole.vue
index e7393709..e90b0c5b 100644
--- a/src/pages/sparring/chooseRole.vue
+++ b/src/pages/sparring/chooseRole.vue
@@ -68,6 +68,7 @@
} from "@/api/sparring.js"
import CardSwiper from './components/card-swiper.vue';
const traId = ref('')
+ const talkingType = ref('')
const detailInfo = ref({})
const roleList = ref([])
const currentIndex = ref(0)
@@ -92,10 +93,11 @@
}
const toTip = () => {
- common.navigateTo('/pages/sparring/tip?traId=' + traId.value + '&roleId=' + activeRole.value.chaId)
+ common.navigateTo('/pages/sparring/tip?traId=' + traId.value + '&chaId=' + activeRole.value.chaId + '&type=' + talkingType.value)
}
onLoad((params) => {
traId.value = params.traId;
+ talkingType.value = params.type
});
onMounted(() => {
getDetailInfo()
diff --git a/src/pages/sparring/components/answer.vue b/src/pages/sparring/components/answer.vue
index 15e261fa..68b93536 100644
--- a/src/pages/sparring/components/answer.vue
+++ b/src/pages/sparring/components/answer.vue
@@ -1,20 +1,23 @@
-
+
+
+
+
-
-
+
+
@@ -35,11 +38,24 @@
onMounted,
computed,
ref,
+ unref,
watch,
+ toRefs
} from 'vue'
- import { onUnload } from '@dcloudio/uni-app';
+ import {
+ onUnload
+ } from '@dcloudio/uni-app';
import MarkdownPreview from '@/components/markdown-preview/markdown-preview.vue'
import common from '@/common/common'
+ import {
+ useStorageStore
+ } from '@/store/storage.js';
+ import {
+ downloadFile,
+ downloadVoiceFile
+ } from '@/api/common.js'
+
+ const storageStore = useStorageStore();
const emit = defineEmits(['handleEvents', 'changePlay'])
const props = defineProps({
@@ -47,9 +63,9 @@
default: () => ({}),
type: Object
},
- isLoading: {
- default: false,
- type: Boolean
+ roleInfo: {
+ default: () => ({}),
+ type: Object
},
isAnswering: {
default: false,
@@ -58,31 +74,31 @@
isLast: {
default: false,
type: Boolean
- }
+ },
+ activeVoiceId: {
+ default: '',
+ type: String
+ },
+ isStudy: {
+ default: true,
+ type: Boolean
+ },
})
-
- watch(
- () => props.dataInfo,
- () => {}, {
- deep: true,
- immediate: true
- }
- )
- watch(
- () => props.isLoading,
- () => {}, {
- deep: true,
- immediate: true
- }
- )
-
+ const {
+ isLast,
+ dataInfo,
+ roleInfo,
+ activeVoiceId,
+ isStudy
+ } = toRefs(props)
const isPlaying = ref(false)
+ const voiceIsPlaying = ref(false)
+ const startPlay = ref(false)
+
const mdText = computed(() => {
let _text = (props.dataInfo?.talkingText || '').replace(/\\n/g, `\n`);
return _text
})
- const fileList = computed(() => props.dataInfo?.talkingFiles || [])
- const crsList = computed(() => props.dataInfo?.talkingCrsList || [])
const activeNames = ref([1, 2])
const changeActive = val => {
@@ -110,6 +126,23 @@
const previewCrs = item => {
common.navigateTo('/pages/courseDetail/index?crsId=' + item.crsId)
}
+ const talkVoiceObj = ref(null)
+ const voiceLoading = ref(false)
+ const itemVoice = ref('')
+ // 重播
+ const restartPlay = () => {
+ if (itemVoice.value) {
+ emit('changePlay', '');
+ emit('changePlay', unref(dataInfo)?.id);
+ setTimeout(() => {
+ talkVoiceObj.value.src = itemVoice.value;
+ talkVoiceObj.value.seek(0);
+ talkVoiceObj.value.play();
+ }, 100);
+ } else {
+ playVoice();
+ }
+ };
const playVoice = (readType = 'pgth') => {
let _content = mdText.value;
if (!_content) {
@@ -117,25 +150,92 @@
return;
}
isPlaying.value = true
- voiceLoading.value = true;
setTimeout(() => {
- downloadFile(props.dataInfo?.talkingVoiceId)
- .then((res) => {
- if (res?.data) {
- common.msg(res.data.message);
- return;
- }
- voiceLoading.value = false;
- itemVoice.value = res.tempFilePath;
- talkVoiceObj.value.src = res.tempFilePath;
+ emit('changePlay', unref(dataInfo)?.id);
+ // readType 阅读内容类型pgrh段落/qns问题
+ if (talkVoiceObj.value.src && talkVoiceObj.value.src === itemVoice.value) {
+ if (voiceIsPlaying.value) return
+ talkVoiceObj.value.play();
+ voiceLoading.value = false;
+ return;
+ }
+ talkVoiceObj.value.src = '';
+ if (itemVoice.value) {
+ setTimeout(() => {
+ talkVoiceObj.value.src = itemVoice.value;
+ if (voiceIsPlaying.value) return
talkVoiceObj.value.play();
- })
- .catch((err) => {
- voiceLoading.value = false;
+ }, 100);
+ } else {
+ voiceLoading.value = true;
+ let _params = {
+ chaId: unref(roleInfo)?.chaId || '',
+ execLogId: unref(dataInfo)?.execLogId || '',
+ };
+ let _url =
+ '/trapractice/traPartnerChat/readContent?' +
+ Object.keys(_params)
+ .map((t) => {
+ return encodeURIComponent(t) + '=' + encodeURIComponent(_params[t]);
+ })
+ .join('&');
+ storageStore.getStorageById('audio', _url + _params.teachNo, (url) => {
+ if (url) {
+ voiceLoading.value = false;
+ itemVoice.value = url;
+ talkVoiceObj.value.src = url;
+ if (voiceIsPlaying.value) return
+ talkVoiceObj.value.play();
+ } else {
+ downloadVoiceFile(_url)
+ .then((res) => {
+ if (res?.data) {
+ common.msg(res.data.message);
+ return;
+ }
+ voiceLoading.value = false;
+ itemVoice.value = res.tempFilePath;
+ talkVoiceObj.value.src = res.tempFilePath;
+ if (voiceIsPlaying.value) return
+ talkVoiceObj.value.play();
+ storageStore.setStorage('audio', _url + _params.teachNo, itemVoice.value);
+ })
+ .catch((err) => {
+ voiceLoading.value = false;
+ emit('changePlay', '');
+ });
+ }
});
+
+ }
}, 100);
};
+ const initVoice = () => {
+ talkVoiceObj.value = uni.createInnerAudioContext()
+ talkVoiceObj.value.onEnded(() => {
+ emit('changePlay', '')
+ talkVoiceObj.value.src = ''
+ voiceIsPlaying.value = false
+ })
+ talkVoiceObj.value.onPause(() => {
+ voiceIsPlaying.value = false
+ });
+ talkVoiceObj.value.onPlay(() => {
+ console.log('onPlay');
+ startPlay.value = true
+ voiceIsPlaying.value = true
+ setTimeout(() => {
+ startPlay.value = false
+ }, 300)
+ emit('changePlay', unref(dataInfo)?.id);
+ });
+
+ talkVoiceObj.value.onError(() => {
+ talkVoiceObj.value.src = ''
+ voiceIsPlaying.value = false
+ })
+ }
const pauseVoice = () => {
if (!talkVoiceObj.value) return
talkVoiceObj.value.pause()
@@ -149,18 +249,45 @@
pauseVoice()
})
watch(() => props.dataInfo.talkingVoice, (val) => {
- if (val) {
+ if (val && isStudy.value) {
initVoice()
}
}, {
deep: true,
immediate: true
})
+ watch(
+ () => props.dataInfo,
+ (val) => {
+ if (val.execLogId && isStudy.value) {
+ playVoice()
+ }
+ }, {
+ deep: true,
+ immediate: true
+ }
+ )
+ watch(
+ () => props.activeVoiceId,
+ (val) => {
+ if (val !== props.dataInfo.id) {
+ if (isPlaying.value) {
+ isPlaying.value = false
+ if (!talkVoiceObj.value) return
+ talkVoiceObj.value.pause()
+ }
+ }
+ }, {
+ deep: true,
+ immediate: true
+ }
+ )
\ No newline at end of file
diff --git a/src/pages/sparring/components/question.vue b/src/pages/sparring/components/question.vue
index 96121d50..ac76bc43 100644
--- a/src/pages/sparring/components/question.vue
+++ b/src/pages/sparring/components/question.vue
@@ -16,7 +16,7 @@
@@ -59,7 +59,6 @@ import { onUnload } from '@dcloudio/uni-app';
})
const { activeVoiceId, dataInfo } = toRefs(props)
const emit = defineEmits(['changePlay'])
- watch(() => props.dataInfo, () => {},{deep: true,immediate: true})
// 声音播放初始化
const talkVoiceObj = ref(null)
@@ -78,14 +77,6 @@ import { onUnload } from '@dcloudio/uni-app';
onUnload(()=>{
pauseVoice()
})
- watch(() => props.dataInfo.talkingVoice,(val)=>{
- if(val){
- initVoice()
- }
- },{
- deep: true,
- immediate: true
- })
const pauseVoice = () => {
if(!talkVoiceObj.value) return
talkVoiceObj.value.pause()
@@ -95,7 +86,10 @@ import { onUnload } from '@dcloudio/uni-app';
const playVoice = () =>{
emit('changePlay', unref(dataInfo)?.id)
if(talkVoiceObj.value && talkVoiceObj.value.src) {
- talkVoiceObj.value.play()
+ setTimeout(()=>{
+ talkVoiceObj.value.src = unref(dataInfo).talkingVoice
+ talkVoiceObj.value.play()
+ },300)
return
}else{
talkVoiceObj.value.src = ''
@@ -110,6 +104,14 @@ import { onUnload } from '@dcloudio/uni-app';
}
const initVoice = () => {
talkVoiceObj.value = uni.createInnerAudioContext()
+ talkVoiceObj.value.onPause(()=>{
+ })
+ talkVoiceObj.value.onPlay(()=>{
+ if(isTesting.value){
+ talkVoiceObj.value.pause()
+ isTesting.value = false
+ }
+ })
talkVoiceObj.value.onEnded(()=>{
emit('changePlay', '')
talkVoiceObj.value.src = ''
@@ -117,14 +119,16 @@ import { onUnload } from '@dcloudio/uni-app';
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)
- }
+ itemVoice.value = unref(dataInfo).talkingVoice
+ talkVoiceObj.value.src = itemVoice.value
+ talkVoiceObj.value.play()
+ isTesting.value = true
+ talkVoiceObj.value.pause()
+ setTimeout(()=>{
+ setVoiceTime(0)
+ },100)
}
+ const isTesting= ref(false)
const setVoiceTime = (sum) => {
sum += 1
if(Math.ceil(talkVoiceObj.value.duration)>0){
@@ -139,6 +143,15 @@ import { onUnload } from '@dcloudio/uni-app';
},200)
}
}
+ watch(() => props.dataInfo, () => {},{deep: true,immediate: true})
+ watch(() => props.dataInfo.talkingVoice,(val)=>{
+ if(val){
+ initVoice()
+ }
+ },{
+ deep: true,
+ immediate: true
+ })
\ No newline at end of file
diff --git a/src/pages/sparring/components/talking-preview-item.vue b/src/pages/sparring/components/talking-preview-item.vue
new file mode 100644
index 00000000..e584d157
--- /dev/null
+++ b/src/pages/sparring/components/talking-preview-item.vue
@@ -0,0 +1,180 @@
+
+
+
+
+
+
+
+
+ {{ roleInfo?.chaName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/sparring/components/touchBtn.vue b/src/pages/sparring/components/touchBtn.vue
new file mode 100644
index 00000000..3bfb8f47
--- /dev/null
+++ b/src/pages/sparring/components/touchBtn.vue
@@ -0,0 +1,519 @@
+
+
+
+
+
+ {{'语音对话'}}
+
+
+
+
+
+
+
+
+
+ 松开发送
+
+
+ 取消
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/sparring/detail.vue b/src/pages/sparring/detail.vue
index f0dd10e4..26db1305 100644
--- a/src/pages/sparring/detail.vue
+++ b/src/pages/sparring/detail.vue
@@ -12,21 +12,15 @@
- {{detailInfo.traName}}
-
-
- 已练习次数:{{detailInfo.practiceTimes}}
-
-
- 类型:{{detailInfo.traInterTypName}}
-
-
- 截止时间:{{detailInfo.endTm}}
+ {{ detailInfo.traName }}
+ 已练习次数:{{ detailInfo.practiceTimes }}
+ 类型:{{ detailInfo.traInterTypDesc }}
+ 截止时间:{{ detailInfo.endTm }}
-
- {{item.tagName}}
+
+ {{ item.tagName }}
@@ -37,7 +31,7 @@
陪练介绍
- {{detailInfo.introduction}}
+ {{ detailInfo.introduction }}
@@ -46,7 +40,7 @@
陪练目标
- {{detailInfo.traTarget}}
+ {{ detailInfo.traTarget }}
@@ -54,22 +48,22 @@
陪练预计时长
-
- {{detailInfo.traStartLimit+ ' ~ ' + detailInfo.traEndLimit}} 分钟
-
+ {{ detailInfo.traStartLimit + ' ~ ' + detailInfo.traEndLimit }} 分钟
-
+
陪练参考资料
-
- 文件名称{{item}}.docx
-
+ {{ item.dataName }}.{{ item.dataSuffix }}
-
+
+ 预览陪练
+
+
去练习
去考试
@@ -86,111 +80,58 @@
onShow,
onLoad,
onUnload
- } from '@dcloudio/uni-app';
- import common from '@/common/common';
- import ImagePreview from '@/components/image-preview/image-preview.vue';
+ } from '@dcloudio/uni-app'
+ import common from '@/common/common'
+ import ImagePreview from '@/components/image-preview/image-preview.vue'
import {
queryTraPartnerInfoById
- } from "@/api/sparring.js"
+ } from '@/api/sparring.js'
import {
- getPhoneEnvBool
- } from '@/common/common';
- const traId = ref('')
- const detailInfo = ref({})
- const isDownloading = ref(false)
- const tagsShowList = ref([{
- tagName: '公金业务'
- }, {
- tagName: '初级'
- }, {
- tagName: '销售类'
- }, {
- tagName: '公金业务'
- }, {
- tagName: '初级'
- }, {
- tagName: '销售类'
- }, {
- tagName: '公金业务'
- }, {
- tagName: '初级'
- }, {
- tagName: '销售类'
- }])
+ previewFileFnc
+ } from '@/common/common'
+ const traId = ref('')
+ const detailInfo = ref({
+ traPartnerDataVoList: []
+ })
+ const isLoading = ref(false)
const getDetailInfo = () => {
+ if (isLoading.value) return
+ isLoading.value = true
queryTraPartnerInfoById({
- id: traId.value
- }).then(res => {
- console.log(res)
- detailInfo.value = res.body || {}
+ traId: traId.value
+ })
+ .then(res => {
+ detailInfo.value = res.body || {}
+ })
+ .catch(err => {
+ console.log(err)
+ }).finally(() => {
+ isLoading.value = false
+ })
+ }
+ const previewFile = info => {
+ previewFileFnc({
+ fileId: info.dataId,
+ getFileSrc: '/trapractice/traFilePreview/',
+ fileName: info.dataName
})
}
- const previewFile = (info) => {
- if (getPhoneEnvBool('AND')) {
- common.navigateTo('/pages/index/preview?fileId=' + info.docId);
- } else {
- if (isDownloading.value) return
- const base_url = get_base_url('/traask/traFilePreview/');
- let fileUrl = base_url + '/traask/traFilePreview/' + info.docId + userParams;
- const localFilePath = '_doc/pdf_view/' + info.docName + '.pdf';
- isDownloading.value = true
- downloadFileFnc(fileUrl, localFilePath).then((res) => {
- uni.openDocument({
- filePath: res,
- showMenu: true,
- success: function() {
- console.log('打开文档成功');
- }
- })
- }).finally(() => {
- setTimeout(() => {
- isDownloading.value = false
- }, 1000)
- });
- }
- }
- const downloadFileFnc = async (fileUrl, localFilePath) => {
- try {
- //#ifdef APP-PLUS
- return new Promise((resolve, reject) => {
- console.log('开始下载:', fileUrl);
- const dtask = plus.downloader.createDownload(
- fileUrl, {
- filename: localFilePath
- },
- (d, status) => {
- if (status === 200) {
- console.log('保存路径:', d.filename);
- resolve(d.filename);
- } else {
- console.error('文件下载失败:', status);
- reject(new Error(`下载失败,状态码: ${status}`));
- }
- }
- );
- dtask.start();
- });
- // #endif
- //#ifdef H5
- return new Promise((resolve, reject) => {
- resolve();
- });
- // #endif
- } catch (error) {
- console.error('创建目录失败:', error);
- throw error;
- }
- };
- const toChooseRole = (type) => {
+ const toChooseRole = type => {
common.navigateTo('/pages/sparring/chooseRole?traId=' + traId.value + '&type=' + type)
}
- onLoad((params) => {
- traId.value = params.traId;
- });
+ const isPreview = ref(false)
+ onLoad(params => {
+ traId.value = params.traId
+ isPreview.value = params.isPreview === '1'
+ console.log(params)
+ })
onMounted(() => {
getDetailInfo()
})
+ onShow(() => {
+ getDetailInfo()
+ })
diff --git a/src/pages/traRecord/components/examRecordList.vue b/src/pages/traRecord/components/examRecordList.vue
new file mode 100644
index 00000000..e021485b
--- /dev/null
+++ b/src/pages/traRecord/components/examRecordList.vue
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/traRecord/components/practiceRecordItem.vue b/src/pages/traRecord/components/practiceRecordItem.vue
new file mode 100644
index 00000000..c96a9e80
--- /dev/null
+++ b/src/pages/traRecord/components/practiceRecordItem.vue
@@ -0,0 +1,250 @@
+
+
+
+
+
+
+
+
+ {{ item.traName }}
+
+
+
+ {{ item.maxGrade || '0' }}
+ 历史最高分
+
+
+
+
+ {{ item.executeHisNum || '0' }}
+
+
+ 练习记录
+
+
+
+
+
+
+
+
+
+ 练习时间:{{ item_list.startPracticeTm }}
+
+
+
+ 练习得分:{{item_list.traGrade }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/traRecord/components/practiceRecordList.vue b/src/pages/traRecord/components/practiceRecordList.vue
new file mode 100644
index 00000000..30bc5634
--- /dev/null
+++ b/src/pages/traRecord/components/practiceRecordList.vue
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/traRecord/index.vue b/src/pages/traRecord/index.vue
new file mode 100644
index 00000000..46388ad0
--- /dev/null
+++ b/src/pages/traRecord/index.vue
@@ -0,0 +1,161 @@
+
+
+
+
+
+
+
+
+
+ 陪练记录
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/traRecord/useItemList.js b/src/pages/traRecord/useItemList.js
new file mode 100644
index 00000000..2ff3c9b1
--- /dev/null
+++ b/src/pages/traRecord/useItemList.js
@@ -0,0 +1,112 @@
+import {
+ computed,
+ reactive,
+ nextTick,
+ ref
+} from 'vue';
+
+
+// 计算两个标准时间的时间差值
+export const formatDuration = (startTm, endTm) => {
+ if (endTm === null || startTm === null) return "00:00:00";
+ // 解析时间字符串为时间戳(毫秒)
+ const startTime = new Date(startTm).getTime();
+ const endTime = new Date(endTm).getTime();
+
+ // 计算时间差(秒),确保为正数
+ const seconds = Math.abs(Math.floor((endTime - startTime) / 1000));
+ // 计算时、分、秒
+ const hours = Math.floor(seconds / 3600);
+ const minutes = Math.floor((seconds % 3600) / 60);
+ const remainingSeconds = seconds % 60;
+
+ // 补零格式化函数(统一处理所有单位)
+ const formatNumber = (num) => num.toString().padStart(2, '0');
+
+ // 小时、分钟、秒均保持两位数格式
+ return `${formatNumber(hours)}:${formatNumber(minutes)}:${formatNumber(remainingSeconds)}`;
+};
+
+// 秒数转换成小时,带小数点的小时
+export const secondsToHours = (seconds) => {
+ if (typeof seconds === 'number') {
+ // 转换为小时并保留一位小数
+ return (seconds / 3600).toFixed(1);
+ }
+ return '0.0';
+};
+
+export function useItemList(fetchFunction, item) {
+ const status = ref('loadmore'); // loadmore - 加载前,loading - 加载中,nomore - 没有数据
+ const limit = 5;
+ const page = ref(0);
+ const total = ref(-1);
+ const data_list = reactive([]);
+ const show_list_state = ref(false);
+
+ const list_div_height = computed(() => {
+ const statusHeight = status.value === 'nomore' ? 0 : 100;
+ if (!show_list_state.value) {
+ return '0';
+ } else if (status.value === 'loading') {
+ return data_list.length * 136 + statusHeight + 'rpx';
+ } else {
+ return data_list.length * 136 + statusHeight + 'rpx';
+ }
+ });
+ // 点击获取详情
+ const show_list_click = (num = -1) => {
+ if (num === 0) return;
+ show_list_state.value = !show_list_state.value;
+ if (show_list_state.value) {
+ nextTick(() => {
+ getData('first');
+ });
+ }
+ };
+
+ const getData = (from = '') => {
+ if (from === 'first') {
+ if (total.value !== -1) {
+ return;
+ }
+ status.value = 'loading';
+ total.value = -1;
+ page.value = 1;
+ data_list.length = 0;
+ } else {
+ if (status.value !== 'loadmore' && status.value !== '') return;
+ status.value = 'loading';
+ page.value++;
+ }
+ fetchFunction({
+ page: page.value,
+ limit: limit
+ })
+ .then((res) => {
+ total.value = res.total;
+ data_list.push(...res.body);
+ })
+ .finally(() => {
+ if (data_list.length >= total.value) {
+ status.value = 'nomore';
+ } else {
+ status.value = 'loadmore';
+ }
+ });
+ };
+ const clear = () => {
+ total.value = -1
+ data_list.length = 0
+ show_list_state.value = false
+ }
+ return {
+ status,
+ data_list,
+ show_list_state,
+ list_div_height,
+ show_list_click,
+ getData,
+ clear
+ };
+}
\ No newline at end of file
diff --git a/src/pagesB.json b/src/pagesB.json
index d1d11dc2..d4a3b69b 100644
--- a/src/pagesB.json
+++ b/src/pagesB.json
@@ -116,6 +116,15 @@
"titleNView": false
}
}
- }
+ },
+ {
+ "path": "pages/traRecord/index",
+ "style": {
+ "navigationBarTitleText": "陪练记录页",
+ "app-plus": {
+ "titleNView": false
+ }
+ }
+ },
]
}
\ No newline at end of file
diff --git a/src/static/images/sparring/ask-icon.png b/src/static/images/sparring/ask-icon.png
new file mode 100644
index 00000000..9d86269d
Binary files /dev/null and b/src/static/images/sparring/ask-icon.png differ
diff --git a/src/store/storage.js b/src/store/storage.js
index 62ae21c7..f6baf020 100644
--- a/src/store/storage.js
+++ b/src/store/storage.js
@@ -10,7 +10,8 @@ export const useStorageStore = defineStore('storageStore',{
showPreviewDetail: false,
fileType: 'iamge',
fileId: '',
- fileSrc: ''
+ fileSrc: '',
+ gettingVoiceId: ''
}),
getters:{
imgObj(state){
@@ -37,8 +38,14 @@ export const useStorageStore = defineStore('storageStore',{
getFileSrc(state){
return state.fileSrc
},
+ getGettingVoiceId(state){
+ return state.gettingVoiceId
+ },
},
actions:{
+ setGettingVoiceId(id){
+ return this.gettingVoiceId = id
+ },
setShowPreviewDetail({ status = false, fileType = 'image', fileId = '', fileSrc = '' }){
this.showPreviewDetail = status
this.fileId = fileId