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