一些优化
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user