Procházet zdrojové kódy

查询成绩的bug修复

zhangyujun před 3 roky
rodič
revize
6be6acb89c

+ 1 - 0
src/api/modules/testScores.ts

@@ -33,6 +33,7 @@ export const getScoreInfoByUserId = async (params: {
 }) => {
   let res = await request({
     url: "/student/score/info/getScoreInfoByUserId",
+    params
   });
 
   return res.data;

+ 2 - 2
src/views/studentScore/index.vue

@@ -94,7 +94,7 @@ const useTestScoresList = () => {
   let maxScore =ref(0)
 	onBeforeMount(async () => {
 		let res = await getScoreInfoByUserId({
-			userId: Number(GetQueryString("id")),
+			userId: Number(GetQueryString("id")||""),
    
       
 		});
@@ -143,7 +143,7 @@ const useTestScoresInfo = () => {
 const { testScoresList,maxScore } = useTestScoresList();
 const { testScoresInfo } = useTestScoresInfo();
 const { goMockTest } = new RouterBus();
-const nickName = ref(window.decodeURIComponent(GetQueryString("nickName")))
+const nickName = ref(window.decodeURIComponent(GetQueryString("nickName")||""))
 const headImage = ref(GetQueryString("headImage"))
 </script>