剧本预览代码调整

This commit is contained in:
joylink_cuiweidong 2020-05-14 15:48:25 +08:00
parent 77a8fd7c41
commit 4fec468885
2 changed files with 14 additions and 2 deletions

View File

@ -8,7 +8,7 @@
</div>
<div class="userBubble" @click="playAudio('audio'+index)">
<div class="userMessage">
<span v-if="chatContent.group||!chatContent.member.robot">@{{ covertName(chatContent.targetName) }}</span>
<span v-if="chatContent.group||!(chatContent.member && chatContent.member.robot)">@{{ covertName(chatContent.targetName) }}</span>
<span class="el-icon-video-play playicon" />
<span class="messageText">{{ chatContent.message }}</span>
<audio :id="'audio'+index" :src="baseUrl+chatContent.src" style="display:none" />

View File

@ -6,12 +6,13 @@
v-for="member in memberList"
:key="member.id"
:class="member.online?'each-chat-member':'each-chat-member each-chat-member-outline'"
@click="createConversition(member)"
>{{ member.memberName }}</div>
</div>
</div>
</template>
<script>
import {getSimulationMembersNew} from '@/api/chat';
import {getSimulationMembersNew, getSimulationConversationIdNew} from '@/api/chat';
import ConstConfig from '@/scripts/ConstConfig';
import Cookies from 'js-cookie';
export default {
@ -32,6 +33,17 @@ export default {
this.getSimulationMembers();
},
methods:{
createConversition(member) {
if (member.userId != this.$store.state.user.id && member.online) {
getSimulationConversationIdNew({ memberId: member.id }, this.group).then(resp => {
if (resp.data) {
const data = resp.data;
this.$emit('addCoversition', {data:data, headerTitle:member.memberName});
this.showMembers = false;
}
});
}
},
setMemberStatus(memberInfo) {
this.getSimulationMembers();
// memberInfo.forEach(member=>{