new_app/pages/video/detail.nvue

57 lines
903 B
Plaintext

<template>
<view class="min-page">
<my-video-list @swiperChange="swiperChange" :list="state.list" :isCollect="state.isCollect" @share="share"
></my-video-list>
</view>
</template>
<script setup>
import {
onLoad,
onShow
} from '@dcloudio/uni-app'
import * as Api from '@/api/video/index.js'
import {
reactive
} from 'vue'
import {
slice
} from 'lodash'
let options = {}
const state = reactive({
collect: 0,
current: {},
list: [],
price: 0,
title: ''
})
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>
<style lang="scss" scoped>
.min-page {
height: 100vh;
flex: 1;
background-color: #000;
overflow: hidden;
}
</style>