增加短剧视频详情页面

This commit is contained in:
2025-01-07 17:26:09 +08:00
parent 7c978d7e85
commit b244bf94d7
2 changed files with 41 additions and 18 deletions

View File

@@ -1,33 +1,56 @@
<template> <template>
<view class="min-page"> <view class="min-page">
<my-video-list></my-video-list> <my-video-list @swiperChange="swiperChange" :list="state.list" :isCollect="state.isCollect" @share="share"
></my-video-list>
</view> </view>
</template> </template>
<script setup> <script setup>
import {onLoad,onShow} from '@dcloudio/uni-app' import {
onLoad,
onShow
} from '@dcloudio/uni-app'
import * as Api from '@/api/video/index.js' import * as Api from '@/api/video/index.js'
let options={} import {
onLoad((opt)=>{ reactive
Object.assign(options,opt) } from 'vue'
try { import {
Api.getVideoDetail(options) slice
} catch (error) { } from 'lodash'
console.log(error) let options = {}
setTimeout(()=>{ const state = reactive({
uni.navigateBack() collect: 0,
},500) current: {},
//TODO handle the exception list: [],
} price: 0,
title: ''
}) })
onShow(()=>{ async function init() {
const res = await Api.getVideoDetail(options)
Object.assign(state, res)
state.list = res.list
}
onLoad((opt) => {
Object.assign(options, opt)
init()
})
function swiperChange({
current,
direction,
data
}) {
}
onShow(() => {
}) })
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.min-page{ .min-page {
height: 100vh; height: 100vh;
flex: 1;
background-color: #000; background-color: #000;
overflow: hidden; overflow: hidden;
} }

View File

@@ -1,5 +1,5 @@
<template> <template>
<view> <view class="u-p-60">
<up-button @click="toDetail">toDetail</up-button> <up-button @click="toDetail">toDetail</up-button>
</view> </view>
</template> </template>