增加短剧视频详情页面
This commit is contained in:
parent
7c978d7e85
commit
b244bf94d7
|
|
@ -1,33 +1,56 @@
|
|||
<template>
|
||||
<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>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {onLoad,onShow} from '@dcloudio/uni-app'
|
||||
import {
|
||||
onLoad,
|
||||
onShow
|
||||
} from '@dcloudio/uni-app'
|
||||
import * as Api from '@/api/video/index.js'
|
||||
let options={}
|
||||
onLoad((opt)=>{
|
||||
Object.assign(options,opt)
|
||||
try {
|
||||
Api.getVideoDetail(options)
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
setTimeout(()=>{
|
||||
uni.navigateBack()
|
||||
},500)
|
||||
//TODO handle the exception
|
||||
}
|
||||
import {
|
||||
reactive
|
||||
} from 'vue'
|
||||
import {
|
||||
slice
|
||||
} from 'lodash'
|
||||
let options = {}
|
||||
const state = reactive({
|
||||
collect: 0,
|
||||
current: {},
|
||||
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>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.min-page{
|
||||
.min-page {
|
||||
height: 100vh;
|
||||
flex: 1;
|
||||
background-color: #000;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="u-p-60">
|
||||
<up-button @click="toDetail">toDetail</up-button>
|
||||
</view>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Reference in New Issue