|
@@ -1,9 +1,9 @@
|
|
|
<template>
|
|
|
- <view class="content" v-if="detail">
|
|
|
+ <view class="content" v-if="content">
|
|
|
<view class="acitve-content">
|
|
|
<video autoplay :src="content" controls></video>
|
|
|
</view>
|
|
|
- <view class="titles">{{detail.title}}</view>
|
|
|
+ <view class="titles">{{title}}</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -12,26 +12,25 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- detail: null,
|
|
|
- style: {
|
|
|
- p: ''
|
|
|
- },
|
|
|
- promoActiveSn: null
|
|
|
- }
|
|
|
- },
|
|
|
- computed: {
|
|
|
- content() {
|
|
|
- return this.detail && this.detail.content
|
|
|
+ title: null,
|
|
|
+ content: '',
|
|
|
+ id: null
|
|
|
}
|
|
|
},
|
|
|
onLoad(opts) {
|
|
|
- this.promoActiveSn = opts.sn
|
|
|
- this.getDetail()
|
|
|
+ if(opts.form=='videoList'){
|
|
|
+ this.title = opts.title
|
|
|
+ this.content = opts.content
|
|
|
+ }else{
|
|
|
+ this.id = opts.sn
|
|
|
+ this.getDetail()
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
getDetail(){
|
|
|
- promoTerminalDetail({sn:this.promoActiveSn}).then(res => {
|
|
|
- this.detail = res.data
|
|
|
+ promoTerminalDetail({sn:this.id}).then(res => {
|
|
|
+ this.title = res.data.name
|
|
|
+ this.content = res.data.content
|
|
|
uni.setNavigationBarTitle({
|
|
|
title: res.data.name || '活动内容'
|
|
|
})
|