aboutOther.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <template>
  2. <div class="about-me">
  3. <back-bar title="用户信息"></back-bar>
  4. <div class="pub-user-top" v-if="userInfo">
  5. <div class="avatar-wrap">
  6. <img class="user-avatar" v-if="userInfo.cover_photo" :src="userInfo.cover_photo" alt="" @click.stop="$showImgPreview(userInfo.cover_photo)">
  7. <div v-else class="user-avatar"
  8. :class="'avatar_bg' + userInfo.user_id % 9"
  9. :data-name="userInfo.nick_name.slice(0,2).toUpperCase()"
  10. ></div>
  11. </div>
  12. <div class="top-info">
  13. <div class="name">{{userInfo.nick_name}}</div>
  14. <div class="code">{{$t('h5.username')}}:@{{userInfo.user_name}}</div>
  15. </div>
  16. </div>
  17. <ul class="pub-account-list" v-if="userInfo">
  18. <li class="list-item" v-for="(item, key) in userInfo.binds" :key="key">
  19. <div class="icon-wrap">
  20. <i :class="`${item.type}-icon`"></i>
  21. </div>
  22. <div class="info">
  23. <div class="title">{{item.type.toUpperCase()}}</div>
  24. <div class="code">{{item.account || $t('h5.notBind')}}</div>
  25. </div>
  26. <div class="opetate" v-if="item.account">
  27. <i :class="item.is_visible === 0 ? 'unopen' : 'open'"></i>
  28. <p>{{item.is_visible === 0 ? $t('userinfo.private') : $t('userinfo.public')}}</p>
  29. </div>
  30. </li>
  31. </ul>
  32. <div class="pub-bottom-btn ext-send" @click="sendMsg">{{$t('public.sendMessage')}}</div>
  33. </div>
  34. </template>
  35. <script>
  36. // import { mapState } from 'vuex'
  37. // import API from '@/api'
  38. import backBar from '@/components/backBar'
  39. import { otherInfoMixins } from '@/mixins/user'
  40. export default {
  41. name: 'aboutOther',
  42. mixins: [otherInfoMixins],
  43. components: {
  44. backBar
  45. },
  46. data () {
  47. return {
  48. userId: this.$route.params.id
  49. }
  50. },
  51. computed: {
  52. },
  53. methods: {
  54. }
  55. }
  56. </script>
  57. <style lang="scss" scoped>
  58. </style>