hotGroup.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <template>
  2. <div class="c-view">
  3. <div class="box">
  4. <div class="box-hd">
  5. <div class="title-wrap">{{$t('group.recommendGroup')}}
  6. <!-- <span>换一批</span> -->
  7. </div>
  8. </div>
  9. <div class="box-bd pub-scroll-box">
  10. <ul class="list-group">
  11. <li class="group-item" v-for="(item,index) in showHotList" :key="index">
  12. <div class="avatar-wrap" @click="joinGroup(item.group_id,item.is_join)">
  13. <img v-if="item.cover_photo" class="user-avatar" :src="item.cover_photo" alt>
  14. <div
  15. v-else
  16. class="user-avatar"
  17. :class="`avatar_bg${bgColorNum(item.group_id)}`"
  18. :data-name="item.group_title && item.group_title.slice(0,2).toUpperCase()"
  19. ></div>
  20. <i class="icon-auth" v-if="item.is_auth==1"></i>
  21. </div>
  22. <div class="info">
  23. <h3 @click="joinGroup(item.group_id,item.is_join)">{{item.group_title}}</h3>
  24. <p>
  25. <i class="icon-group"></i>
  26. {{item.member_num}}
  27. </p>
  28. <el-button type="primary" @click="joinGroup(item.group_id,item.is_join)">{{item.is_join==1? $t('group.enter') :`+ ${$t('group.join')}`}}</el-button>
  29. </div>
  30. </li>
  31. </ul>
  32. </div>
  33. </div>
  34. </div>
  35. </template>
  36. <script>
  37. import Vue from 'vue'
  38. import { Button } from 'element-ui'
  39. import { groupHotMixins } from '@/mixins/group'
  40. Vue.component(Button.name, Button)
  41. export default {
  42. name: 'hotGroup',
  43. mixins: [groupHotMixins]
  44. }
  45. </script>
  46. <style lang="scss" scoped>
  47. @import "./hotGroup.scss";
  48. </style>