Home.vue 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <template>
  2. <div>
  3. <div class="card" style="padding: 15px">
  4. 您好,{{ user?.name }}!欢迎使用本系统
  5. </div>
  6. <el-row>
  7. <el-col :span="8">
  8. <!-- <div style="display: flex; margin: 10px 0">-->
  9. <!-- <div style="width: 50%;" class="card">-->
  10. <!-- -->
  11. <!-- </div>-->
  12. <!-- </div>-->
  13. <el-card>
  14. <div style="margin-bottom: 30px; font-size: 20px; font-weight: bold">功能列表</div>
  15. <div >
  16. <el-timeline reverse slot="reference">
  17. <el-timeline-item v-for="item in notices" :key="item.id" :timestamp="item.time" color="red" icon='el-icon-s-tools
  18. '>
  19. <el-popover
  20. placement="right"
  21. width="200"
  22. trigger="hover"
  23. :content="item.content">
  24. <span slot="reference">{{ item.title }}</span>
  25. </el-popover>
  26. </el-timeline-item>
  27. </el-timeline>
  28. </div>
  29. </el-card>
  30. </el-col>
  31. <el-col :span="8">
  32. <div id="lunbo" style="margin: 5px">
  33. <el-image :src='imgUrls'></el-image>
  34. </div>
  35. </el-col>
  36. <!-- <el-col :span="18"></el-col>-->
  37. <el-col :span="8">
  38. <el-card>
  39. 店铺认证
  40. <i class="el-icon-s-check">
  41. <el-tag type="success">认证成功</el-tag>
  42. </i>
  43. <el-divider></el-divider>
  44. <el-row >
  45. <span>店铺功能</span>
  46. </el-row>
  47. </el-card>
  48. </el-col>
  49. </el-row>
  50. </div>
  51. </template>
  52. <script>
  53. export default {
  54. name: 'Home',
  55. data() {
  56. return {
  57. user: JSON.parse(localStorage.getItem('xm-user') || '{}'),
  58. notices: [],
  59. activities: [
  60. {
  61. size: 'large',
  62. type: 'primary',
  63. icon: 'el-icon-more'
  64. }, {
  65. color: '#0bbd87'
  66. }, {
  67. size: 'large'
  68. }],
  69. imgUrls: require('@/assets/imgs/bg.jpg')
  70. }
  71. },
  72. created() {
  73. this.$request.get('/notice/selectAll').then(res => {
  74. this.notices = res.data || []
  75. })
  76. }
  77. }
  78. </script>
  79. <style>
  80. #lunbo{
  81. }
  82. </style>