1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <template>
- <view class="content" v-if="detail">
- <view class="acitve-content">
- <video autoplay :src="content" style="width: 100%;height: 350px;" controls></video>
- </view>
- <view class="titles">{{detail.title}}</view>
- </view>
- </template>
- <script>
- import { promoTerminalDetail } from '@/api/video.js'
- export default {
- data() {
- return {
- detail: null,
- style: {
- p: ''
- },
- promoActiveSn: null
- }
- },
- computed: {
- content() {
- return this.detail && this.detail.content
- }
- },
- onLoad(opts) {
- this.promoActiveSn = opts.sn
- this.getDetail()
- },
- methods: {
- getDetail(){
- promoTerminalDetail({sn:this.promoActiveSn}).then(res => {
- this.detail = res.data
- uni.setNavigationBarTitle({
- title: res.data.name || '活动内容'
- })
- })
- }
- }
- }
- </script>
- <style lang="less">
- .content{
- .titles{
- text-align: center;
- padding: 20rpx;
- border-top: 1px solid #eee;
- font-weight: bold;
- }
- .acitve-content{
- padding: 0;
- }
- }
- </style>
|