This commit is contained in:
2025-01-10 18:25:27 +08:00
2 changed files with 145 additions and 139 deletions

View File

@@ -25,11 +25,9 @@
}) })
function seVideo(item) { function seVideo(item) {
// uni.navigateTo({ uni.navigateTo({
// url: '/me/detail/detail?id=' + item.courseId + '&courseDetailsId=' + item.courseDetailsId + url:"/pages/video/detail?courseId="+item.courseId+"&courseDetailsId="+item.courseDetailsId
// '&tt_album_id=' + item.dyCourseId + '&tt_episode_id=' + item })
// .dyEpisodeId
// })
} }
</script> </script>

View File

@@ -54,30 +54,38 @@
</template> </template>
<script setup> <script setup>
import { import {
reactive, reactive,
watch watch
} from "vue"; } from "vue";
import { import {
onShow, onReachBottom onShow,
} from '@dcloudio/uni-app' onReachBottom
const props = defineProps({ } from '@dcloudio/uni-app'
const props = defineProps({
list: { list: {
type: Array, type: Array,
default: [] default: []
}, },
}) })
let datas = reactive({ let datas = reactive({
arrListLeft: [], //左边数据 arrListLeft: [], //左边数据
arrListRight: [], //右边数据 arrListRight: [], //右边数据
}) })
onShow(() => { onShow(() => {
spliceArrayListr() spliceArrayListr()
}) })
watch(() => props.list, () => { watch(() => props.list, () => {
spliceArrayListr() spliceArrayListr()
}) })
function spliceArrayListr() {
function clickItem(item) {
uni.navigateTo({
url: "/pages/video/detail?courseId=" + item.courseId + "&courseDetailsId=" + item.courseDetailsId
})
}
function spliceArrayListr() {
datas.arrListRight = [] datas.arrListRight = []
datas.arrListLeft = [] datas.arrListLeft = []
props.list.map((item, index) => { props.list.map((item, index) => {
@@ -87,10 +95,10 @@ function spliceArrayListr() {
datas.arrListRight.push(item) datas.arrListRight.push(item)
} }
}) })
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.list { .list {
width: 100%; width: 100%;
height: auto; height: auto;
display: flex; display: flex;
@@ -215,5 +223,5 @@ function spliceArrayListr() {
margin-top: 10rpx; margin-top: 10rpx;
padding: 0 20rpx; padding: 0 20rpx;
} }
} }
</style> </style>