<div class="message-container" id="message-container">
    <div class="title">
        <div class="back-button" @click="goBack()"><img :src="backButton" alt=""></div>
        <div class="ad-name">
            <img :src="busyButton" alt="">{{adviserName}}
        </div>
    </div>
    <el-scrollbar id="message-fixBox" class="message-fixBox">
        <div class="line-box">
            <div class="line"></div>
            <div class="line-text">资深顾问{{adviserName}}为您服务</div>
            <div class="line"></div>
        </div>
    <div  class="message-box"  v-for="(item,index) in localMessages" :key="index" :class="item.local?'right':'left'">
            <div class="text-content">
                <!--文字-->
                <span v-if="!item.content.type">{{item.content}}</span>
                <span v-if="item.content.type&&(item.content.type==515||item.content.type==516)">{{item.content.param.text}}</span>
                <!--图片-->
                <div @click="showDialog(true,item.content.param.linkedUrl,1)" v-if="item.content.type&&item.content.type==509">
                <img style="width:100%"  :src="item.content.param.linkedUrl" alt=""></div>
                <!--视频-->
                <div style="width:100%;"  @click="showDialog(true,item.content.param.linkedUrl,2)" v-if="item.content.type&&item.content.type==506">
                    <img style="width:100%"  :src="item.content.param.url" alt="">
                   </div>
                <!--H5-->
                <a  :href="item.content.param.url" target="_blank" v-if="item.content.type&&item.content.type==507" style="width:100%;display:flex">
                    <div style="width:160px;">
                        <div>{{item.content.param.h5Title}}</div>
                        <div style='white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size: 14px'>{{item.content.param.h5Desc}}</div>
                    </div>
                    <div  style="width:50px;height:50px;">
                        <img width="100%" height="100%"  :src="item.content.param.h5Icon" alt="">
                    </div>
                   </a>
                <!--此时此刻-->
                <a :href="item.content.param.linkedUrl" v-if="item.content.type&&item.content.type==508">
                    <img style="width:100%"  :src="item.content.param.url" alt=""></a>
                <!--pdf-->
                <a target="_blank" :href="item.content.param.linkedUrl" v-if="item.content.type&&item.content.type==204" style="width:100%;display:flex">
                 <div style="width:160px;word-break:break-all;  ">
                   <span>{{item.content.param.pdfTitle}}</span>
                 </div>
                    <div  style="width:50px;height:50px;flex:1">
                        <img width="100%" height="100%"  :src="serverUrl+'im/pdf.png'" alt="">
                    </div>
                </a>
                <span v-if="item.content.type&&item.content.type==511">您好，非常抱歉，我正在为其他用户服务，稍后回复您！</span>
                <div class="time-now">{{item.time||''}}</div>
            </div>
    </div>
    </el-scrollbar>
    <div class="hei"></div>
    <div class="bottom-box">
        <el-input  id="input-box" :disabled="loading" class="input-box" @keydown.13="bindConfirm()" placeholder="点击输入..." v-model="currentMessage">
        </el-input>
        <el-button type="primary"  size="small"  class="enter" @click="bindConfirm()">发送</el-button>
    </div>
    <div class="dialog" v-if="dialog" @click="showDialog(false)">
        <div class="pic-div">
            <video style="width:100%" controls v-if="showVideo" :src="imgUrl"></video>
            <img v-else :src="imgUrl" alt="">
        </div>
    </div>
    <loading v-if="loading"></loading>
</div>
