68 lines
1.0 KiB
Plaintext
68 lines
1.0 KiB
Plaintext
<template>
|
|
<view class="min-page">
|
|
<my-video-list v-if="state.list.length" @swiperChange="swiperChange" :list="state.list" @update="update"
|
|
:info="state"
|
|
></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'
|
|
const boxStyle={
|
|
height:'835px'
|
|
}
|
|
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
|
|
}
|
|
function update({index,item}){
|
|
state.list[index]=item
|
|
}
|
|
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;
|
|
}
|
|
.u-popup{
|
|
position: fixed;
|
|
}
|
|
|
|
</style> |