一些优化

This commit is contained in:
haomingming
2025-09-04 17:34:47 +08:00
parent b068fb00cc
commit 4659f30400
18 changed files with 508 additions and 87 deletions
+8 -7
View File
@@ -63,6 +63,8 @@
<script setup>
import { ref, onMounted } from 'vue'
import course_api from "@/api/course_api.js"
import { onLoad } from '@dcloudio/uni-app'
// 响应式数据
const statusBarHeight = ref(0)
@@ -150,18 +152,17 @@ const goBack = () => {
uni.navigateBack()
}
// 生命周期
onMounted(() => {
getSystemInfo()
// 获取页面参数
const pages = getCurrentPages()
const currentPage = pages[pages.length - 1]
const options = currentPage.options || {}
onLoad((options) => {
is_commented.value = options.is_commented
courseId.value = options.id
console.log('课程ID:', options.id)
})
// 生命周期
onMounted(() => {
getSystemInfo()
})
</script>
<style lang="scss">