|
@@ -33,6 +33,7 @@ type TCriteria = "frequency" | "amplitude" | "decibels";
|
|
|
export default defineComponent({
|
|
|
name: "evaluat-model",
|
|
|
setup() {
|
|
|
+ const query = getQuery()
|
|
|
const evaluatModel = reactive({
|
|
|
tips: true,
|
|
|
evaluatUpdateAudio: false,
|
|
@@ -76,7 +77,6 @@ export default defineComponent({
|
|
|
return index >= startIndex && index <= endIndex;
|
|
|
});
|
|
|
starTime = times[0].sourceRelativeTime || times[0].relativeTime;
|
|
|
- console.log("🚀 ~ times", times);
|
|
|
}
|
|
|
let measureIndex = -1;
|
|
|
let recordMeasure = -1;
|
|
@@ -135,7 +135,6 @@ export default defineComponent({
|
|
|
};
|
|
|
/** 生成数据 */
|
|
|
const hanldeCreateData = async () => {
|
|
|
- const query = getQuery()
|
|
|
const behaviorId = localStorage.getItem("behaviorId") || undefined;
|
|
|
const rate = state.speed / state.originSpeed;
|
|
|
const content = {
|
|
@@ -221,6 +220,25 @@ export default defineComponent({
|
|
|
}
|
|
|
}
|
|
|
);
|
|
|
+ /** 监听评测结束 */
|
|
|
+ watch(() => evaluatingData.resulstMode, () => {
|
|
|
+ // 评测结束, 并且完整评测
|
|
|
+ if (evaluatingData.resulstMode && evaluatingData.isComplete){
|
|
|
+ /** 有单元测验时,存储分数缓存 */
|
|
|
+ postMessage({
|
|
|
+ api: 'setCache',
|
|
|
+ content: {
|
|
|
+ key: 'h5-orchestra-unit',
|
|
|
+ value: JSON.stringify({
|
|
|
+ musicId: query.id || '',
|
|
|
+ unitId: query.unitId || '',
|
|
|
+ questionId: query.questionId || '',
|
|
|
+ score: evaluatingData.resultData?.score || 0,
|
|
|
+ }),
|
|
|
+ },
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
return () => (
|
|
|
<div>
|
|
|
<Transition name="pop-center">
|