fix:打包报错
This commit is contained in:
parent
fa3514dd55
commit
7a8ebd903b
@ -127,7 +127,7 @@ export const getCourseDetailExample = async (courseId: string) => {
|
|||||||
// 报名课程示例
|
// 报名课程示例
|
||||||
export const enrollCourseExample = async (courseId: number) => {
|
export const enrollCourseExample = async (courseId: number) => {
|
||||||
try {
|
try {
|
||||||
const response = await CourseApi.enrollCourse(courseId)
|
const response = await CourseApi.enrollCourse(String(courseId))
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
console.log('报名成功:', response.data)
|
console.log('报名成功:', response.data)
|
||||||
return response.data
|
return response.data
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, onUnmounted, computed, watch } from 'vue'
|
import { ref, onMounted, computed, watch } from 'vue'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
|
|
||||||
const width = window.innerWidth;
|
const width = window.innerWidth;
|
||||||
@ -94,7 +94,7 @@ onMounted(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// 使用watch监听路由变化
|
// 使用watch监听路由变化
|
||||||
watch(route, (newRoute) => {
|
watch(route, () => {
|
||||||
updateActiveNavItem();
|
updateActiveNavItem();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user