index.vue 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <template>
  2. <transition name="msgbox-fade">
  3. <div class="pub-wrapper" v-if="visible">
  4. <div class="pub-mask" @click="visible = false"></div>
  5. <div class="pub-modal avater-modal">
  6. <div class="modal-hd">
  7. <i class="el-icon-close" @click="visible = false"></i>
  8. </div>
  9. <div class="modal-bd" v-if="userInfo">
  10. <div class="user-top">
  11. <div class="user-avatar">
  12. <img v-if="userInfo.cover_photo" :src="userInfo.cover_photo" @click="$showImgPreview(userInfo.cover_photo)" alt="">
  13. <div v-else class="user-avatar"
  14. :class="'avatar_bg' + userInfo.user_id % 9"
  15. :data-name="userInfo.nick_name.slice(0,2).toUpperCase()"
  16. ></div>
  17. </div>
  18. <div class="r-info">
  19. <span class="name">{{userInfo.nick_name}}</span>
  20. <div class="introduce">@{{userInfo.user_name}}</div>
  21. </div>
  22. </div>
  23. <div class="account-wrap min-height-account">
  24. <div class="title">{{$t('userinfo.bindAccounts')}}</div>
  25. <template v-if="accountList">
  26. <div class="account-item" v-for="(item, key) in accountList" :key="key">
  27. <div class="type">
  28. <strong>{{item.type.toUpperCase()}}</strong>
  29. </div>
  30. <p v-if="item.account && item.is_visible" class="key">{{item.account}}</p>
  31. <p v-else>{{$t('userinfo.notBindOrHide')}}</p>
  32. </div>
  33. </template>
  34. </div>
  35. <a v-if="$store.state.userId != userId && meechatType === 'mini'"
  36. :href="linkToOther"
  37. @click="visible = false"
  38. class="send-msg-btn"
  39. target="meechatpc">{{$t('public.sendMessage')}}</a>
  40. <button v-else-if="$store.state.userId != userId" class="send-msg-btn" @click="sendMsg">{{$t('public.sendMessage')}}</button>
  41. </div>
  42. </div>
  43. </div>
  44. </transition>
  45. </template>
  46. <script>
  47. import { Button, Message, Switch } from 'element-ui'
  48. import Vue from 'vue'
  49. import { otherInfoMixins } from '@/mixins/user'
  50. Vue.component(Button.name, Button)
  51. Vue.component(Message.name, Message)
  52. Vue.component(Switch.name, Switch)
  53. export default {
  54. name: 'infoPopup',
  55. mixins: [otherInfoMixins]
  56. }
  57. </script>
  58. <style lang="scss">
  59. @import "./style.scss";
  60. .min-height-account{
  61. min-height: 218px;
  62. }
  63. </style>