视频支付更新
This commit is contained in:
@@ -339,6 +339,7 @@
|
||||
// #ifdef H5
|
||||
window.location.href = res.h5Url
|
||||
// #endif
|
||||
popupClose()
|
||||
}
|
||||
}
|
||||
//金币支付
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="min-page">
|
||||
<my-video-list ref="refVideoList" v-if="state.list.length" @swiperChange="swiperChange" :list="state.list" @update="update"
|
||||
:info="state"></my-video-list>
|
||||
<my-video-list ref="refVideoList" v-if="state.list.length" @swiperChange="swiperChange" :list="state.list"
|
||||
@update="update" :info="state"></my-video-list>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -12,14 +12,15 @@
|
||||
} from '@dcloudio/uni-app'
|
||||
import * as Api from '@/api/video/index.js'
|
||||
import {
|
||||
reactive, ref
|
||||
reactive,
|
||||
ref
|
||||
} from 'vue'
|
||||
import {
|
||||
slice
|
||||
} from 'lodash'
|
||||
const boxStyle = {
|
||||
height: '835px'
|
||||
}
|
||||
|
||||
const sysInfo = uni.getSystemInfoSync()
|
||||
let isFirstLoad=true
|
||||
let options = {}
|
||||
const state = reactive({
|
||||
collect: 0,
|
||||
@@ -28,10 +29,11 @@
|
||||
price: 0,
|
||||
title: ''
|
||||
})
|
||||
const refVideoList=ref(null)
|
||||
const refVideoList = ref(null)
|
||||
async function init() {
|
||||
try {
|
||||
const res = await Api.getVideoDetail(options)
|
||||
isFirstLoad=false
|
||||
Object.assign(state, res)
|
||||
state.list = res.list
|
||||
} catch (error) {
|
||||
@@ -49,11 +51,10 @@
|
||||
index,
|
||||
item
|
||||
}) {
|
||||
if(item){
|
||||
if (item) {
|
||||
state.list[index] = item
|
||||
}else{
|
||||
} else {
|
||||
await init()
|
||||
refVideoList.value.videoListUpdata()
|
||||
}
|
||||
}
|
||||
onLoad((opt) => {
|
||||
@@ -67,8 +68,11 @@
|
||||
data
|
||||
}) {}
|
||||
|
||||
onShow(() => {
|
||||
init()
|
||||
onShow(async () => {
|
||||
if(!isFirstLoad){
|
||||
await init()
|
||||
refVideoList.value.videoListUpdata()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user