Bläddra i källkod

效音完成提示,分享title滚动

liushengqiang 2 år sedan
förälder
incheckning
7fc94a54d4

+ 11 - 3
src/page-gym/evaluat-model/sound-effect/index.tsx

@@ -1,5 +1,5 @@
 import { defineComponent, onMounted, reactive, ref, watch } from "vue";
-import { Popover, Icon } from "vant";
+import { Popover, Icon, showToast } from "vant";
 import icons from "../icons/index.json";
 import iconChild from "./icons/child.png";
 import DotIcon from "./icons/dot.png";
@@ -37,7 +37,10 @@ export default defineComponent({
 				if (Date.now() - soundEffectData.time > 3000) {
 					console.log("效音完成");
 					soundEffectSuccess.value = true
-					emit("close");
+					showToast('效音完成')
+					setTimeout(() => {
+						emit("close");
+					}, 1000)
 				}
 			}
 		);
@@ -78,11 +81,16 @@ export default defineComponent({
 							<img src={scoreData.src} />
 						</div>
 						<div class={styles.tips}>{soundEffectData.tips[soundEffectData.step]}</div>
-						<div class={styles.steps}>
+						<div style={{display: soundEffectSuccess.value ? 'none' : ''}} class={styles.steps}>
 							<img src={soundEffectData.step === 0 ? DotErrorIcon : DotIcon} />
 							<img src={soundEffectData.step === 1 ? DotActiveIcon : DotIcon} />
 							<img src={soundEffectData.step === 2 ? DotErrorIcon : DotIcon} />
 						</div>
+						<div style={{display: soundEffectSuccess.value ? '' : 'none'}} class={styles.steps}>
+							<img src={DotActiveIcon} />
+							<img src={DotActiveIcon} />
+							<img src={DotActiveIcon} />
+						</div>
 					</div>
 				</div>
 			</div>

+ 4 - 1
src/page-gym/musci-list/choosePartName/index.module.less

@@ -1,6 +1,7 @@
 .container {
   min-width: 260px;
   width: 50vw;
+  height: 85vh;
   max-height: 500px;
   border-radius: 8px;
   padding: 10px;
@@ -11,6 +12,8 @@
     align-items: center;
     justify-content: space-between;
     font-size: 16px;
+    line-height: 16px;
+
 
     .title {
       position: relative;
@@ -31,7 +34,7 @@
 
   .picker {
     padding: 20px 0;
-
+    height: calc(85vh - 80px);
     :global {
       .van-picker-column__item {
         font-size: 16px;

+ 5 - 1
src/page-gym/musci-list/choosePartName/index.tsx

@@ -2,6 +2,7 @@ import { computed, defineComponent, ref } from "vue";
 import { Picker, Button, PickerOption, Icon } from "vant";
 import styles from "./index.module.less";
 import state from "/src/state";
+import { getInstrumentName } from "/src/constant/instruments";
 
 export default defineComponent({
 	name: "choosePartName",
@@ -10,8 +11,10 @@ export default defineComponent({
 		const selectIndex = ref(0);
 		const columns = computed(() => {
 			return state.partListNames.map((n: any, index: number) => {
+				const trackName = getInstrumentName(n);
+				const examSongName = n + (trackName ? `(${trackName})` : "");
 				return {
-					text: n,
+					text: examSongName,
 					value: index,
 				};
 			});
@@ -26,6 +29,7 @@ export default defineComponent({
 					class={styles.picker}
 					showToolbar={false}
 					columns={columns.value}
+					visibleOptionNum={4}
 					onChange={(row) => {
 						selectIndex.value = row.selectedValues[0];
 					}}

+ 3 - 4
src/page-gym/musci-list/index.tsx

@@ -86,6 +86,7 @@ export default defineComponent({
 				"part-index": musicData.selectedPartIndex,
 			});
 			const nextUrl = `${location.origin + location.pathname}?${searchStr}#/detail/${musicData.row.id}?${hashSearchStr}`;
+			console.log("🚀 ~ nextUrl:", nextUrl);
 			location.replace(nextUrl);
 		};
 		/** 去开通会员 */
@@ -120,10 +121,8 @@ export default defineComponent({
 					<Popup v-model:show={musicData.partShow} teleport="body" defaultStyle={false}>
 						<ChoosePartName
 							onClose={(index: number) => {
-								if (index) {
-									musicData.selectedPartIndex = index;
-									openWevView();
-								}
+								musicData.selectedPartIndex = index;
+								openWevView();
 								musicData.partShow = false;
 							}}
 						/>

+ 5 - 1
src/report-share/gym-share/share-top/index.tsx

@@ -12,6 +12,7 @@ import "plyr/dist/plyr.css";
 import Plyr from "plyr";
 import { nextTick } from "vue";
 import { browser } from "/src/utils";
+import { getInstrumentName } from "/src/constant/instruments";
 
 type IItemType = "intonation" | "cadence" | "integrity";
 
@@ -69,6 +70,9 @@ export default defineComponent({
 			});
 		};
 
+		const trackName = getInstrumentName(state.track);
+		const examSongName = state.examSongName + (trackName ? ` - ${state.track} (${trackName})` : "");
+
 
 		return () => (
 			<div class={styles.headerTop}>
@@ -76,7 +80,7 @@ export default defineComponent({
 					<div class={styles.back} onClick={handleBack}>
 						<img src={iconBack} />
 					</div>
-					<Title text={state.examSongName} />
+					<Title text={examSongName} />
 				</div>
 				<div class={styles.center}>
 					<div class={styles.cItem}>

+ 0 - 1
src/view/evaluating/index.tsx

@@ -314,7 +314,6 @@ export const handleEndEvaluat = (isComplete = false) => {
 	showLoadingToast({
 		message: "评分中",
 		duration: 0,
-		forbidClick: true,
 	});
 	evaluatingData.isComplete = isComplete;
 	// 如果开启了摄像头, 结束录制视频