一些优化
This commit is contained in:
@@ -295,17 +295,14 @@
|
||||
<script setup>
|
||||
import { ref, onMounted, onUnmounted } from 'vue'
|
||||
import course_api from "@/api/course_api.js"
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
|
||||
const courseId = ref(0)
|
||||
onMounted(() => {
|
||||
// 获取页面参数
|
||||
const pages = getCurrentPages()
|
||||
const currentPage = pages[pages.length - 1]
|
||||
const options = currentPage.options || {}
|
||||
|
||||
courseId.value = options.id
|
||||
console.log('课程ID:', options.id)
|
||||
onLoad((options) => {
|
||||
courseId.value = options.id // 已支持 App-Plus
|
||||
console.log('课程ID:', options.id)
|
||||
})
|
||||
const courseId = ref(0)
|
||||
|
||||
|
||||
|
||||
// 响应式数据
|
||||
@@ -762,7 +759,6 @@ const updatePageData = (data) => {
|
||||
}
|
||||
}
|
||||
|
||||
// 生命周期
|
||||
onMounted(() => {
|
||||
getSystemInfo()
|
||||
startCountdown()
|
||||
|
||||
Reference in New Issue
Block a user