fix:打包报错

This commit is contained in:
小张 2025-08-20 22:30:37 +08:00
parent fa3514dd55
commit 7a8ebd903b
2 changed files with 3 additions and 3 deletions

View File

@ -127,7 +127,7 @@ export const getCourseDetailExample = async (courseId: string) => {
// 报名课程示例
export const enrollCourseExample = async (courseId: number) => {
try {
const response = await CourseApi.enrollCourse(courseId)
const response = await CourseApi.enrollCourse(String(courseId))
if (response.code === 200) {
console.log('报名成功:', response.data)
return response.data

View File

@ -58,7 +58,7 @@
</template>
<script setup lang="ts">
import { ref, onMounted, onUnmounted, computed, watch } from 'vue'
import { ref, onMounted, computed, watch } from 'vue'
import { useRoute } from 'vue-router'
const width = window.innerWidth;
@ -94,7 +94,7 @@ onMounted(() => {
});
// 使watch
watch(route, (newRoute) => {
watch(route, () => {
updateActiveNavItem();
});