Browse Source

选择课程调整

wangxy 5 months ago
parent
commit
60dcac3a9d
1 changed files with 7 additions and 5 deletions
  1. 7 5
      components/catalogue/catalogue.vue

+ 7 - 5
components/catalogue/catalogue.vue

@@ -55,11 +55,13 @@
 	const scrollTop = ref(0)
 	const cardId = ref(null)
 	onShow(() => AuthCode.value = getUserIdentity()); // 用户身份
-  onLoad(() => {
-    if (cacheManager.get('auth')) {
-      cardId.value = cacheManager.get('auth').cardId;
-    }
-  })
+	onLoad((options) => {
+		if (cacheManager.get('auth')) {
+		  cardId.value = cacheManager.get('auth').cardId;
+		} else {
+		  cardId.value = options.cardId;
+		}
+	})
 
 	const $emit = defineEmits(['change-zhang'])