<style>
</style>

<template>
    <div class="moment-share">
        <header class="moment-header" id="share_header">
            <div class="user-cover">
                <img :src="user.head" :alt="user.nick">
            </div>
            <div class="user-info">
                <h2>{{user.nick}}</h2>
                <p>{{createTime}}</p>
            </div>
        </header>

        <section class="moment-content">  
            <div v-if="type==1" class="type1">
                <div class="txt">{{extend.text}}</div>
                <ul class="list-pic">
                    <li v-for="pic in extend.pics" @click="previewImage(pic)" class="item-pic" :style="{backgroundImage : 'url('+pic+')'}">
                        
                    </li>
                </ul>
            </div>
            <div v-if="type==3" class="type1">
                <div class="txt">{{extend.title}}</div>
                <video class="moment-video" preload="meta" controls="" :poster="extend.cover">
                    <source :src="extend.video.videoUrls[0].urls[0]" type="video/mp4">
                    您的浏览器不支持 video 标签
                </video>
            </div>
        </section>

        <section class="moment-comment">  
            <h2 class="comment-header">评论</h2>
            <ul class="list-comment">
                <li v-for="comment in comments">
                    <section class="item-cover">
                        <img :src="comment.user.head" alt="">
                    </section>
                    <section class="item-cont">
                        <div class="item-info">
                            <span class="item-nick">{{comment.user.nick}}</span>
                            <span class="item-date">{{comment.createTime}}</span>
                        </div>
                        <div class="item-comment">{{comment.content}}</div>
                    </section>
                </li>
            </ul>
            <p v-if="comments.length==0">(@@)暂无评论哦</p>
        </section>

        <footer class="moment-footer">
            <a :href='url' class='footer-link'>
                <section class="f-left-content">
                    <i class="icon-logo"></i>
                    
                </section>
                <section class="f-middle-content">
                    <strong>饭盒视频</strong>
                    <p>发现更精彩的游戏世界</p>
                </section>
                <section class="f-right-content">
                    <div class="btn-dl"></div>
                </section>
            </a>
        </footer>
    </div>
</template>

<script>
import page from './js/moment';
export default page;
</script>
