liushengqiang hace 2 años
padre
commit
23629becc0
Se han modificado 2 ficheros con 5 adiciones y 25 borrados
  1. 5 2
      src/report-share/gym-share/index.tsx
  2. 0 23
      src/report-share/gym-share/main.ts

+ 5 - 2
src/report-share/gym-share/index.tsx

@@ -12,6 +12,7 @@ import { musicPracticeRecordGetLastEvaluationMusicalNotesPlayStats, sysMusicScor
 import ShareTop from "./share-top";
 import Note from "./note";
 import { addMeasureScore } from "/src/view/evaluating";
+import { useRoute } from "vue-router";
 
 const colorsClass: any = {
 	RIGHT: styles.right,
@@ -26,6 +27,8 @@ export default defineComponent({
 	name: "music-list",
 	setup() {
 		const query: any = getQuery();
+		const route = useRoute()
+		const paramsId = route.params.id as string;
 		const scoreData: any = reactive({
 			videoFilePath: "", // 回放视频路径
 			cadence: 0,
@@ -114,8 +117,8 @@ export default defineComponent({
 		};
 
 		onMounted(async () => {
-			(window as any).appName = "colexiu";
-			const res = await musicPracticeRecordGetLastEvaluationMusicalNotesPlayStats(query.id);
+			(window as any).appName = "gym";
+			const res = await musicPracticeRecordGetLastEvaluationMusicalNotesPlayStats(paramsId);
 			state.partIndex = Number(res?.data?.partIndex);
 			detailData.musicalNotesPlayStats = res?.data?.musicalNotesPlayStats?.notesData || [];
 			detailData.userMeasureScore = res?.data?.userMeasureScore || {};

+ 0 - 23
src/report-share/gym-share/main.ts

@@ -1,23 +0,0 @@
-import "vant/lib/index.css";
-import "@varlet/ui/es/popup/style/index";
-import "@varlet/ui/es/snackbar/style/index";
-import "@varlet/ui/es/cell/style/index";
-import "@varlet/ui/es/switch/style/index";
-import { createApp } from "vue";
-import "/src/style.css";
-import App from "./App";
-import router from "./router";
-import "./theme.css";
-import { setStoreData } from "/src/store";
-
-(function () {
-	const u = navigator.userAgent;
-	setStoreData({
-		isApp: u.includes("ORCHESTRAAPPI") || u.includes("ORCHESTRAAPPA"),
-		platformApi: u.includes("ORCHESTRATEACHER") ? "/api-teacher" : u.includes("ORCHESTRASTUDENT") ? "/api-student" : "/api-backend",
-		platformType: "STUDENT", // u.includes("ORCHESTRATEACHER") ? "TEACHER" : u.includes("ORCHESTRASTUDENT") ? "STUDENT" : "WEB",
-		proxy: import.meta.env.DEV ? "/orchestra" : "",
-	});
-})();
-
-createApp(App).use(router).mount("#app");