index.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <template>
  2. <view class="home-container">
  3. <view class="top-bg"> </view>
  4. <view class="header-nav">
  5. <text class="navbar-title">首页</text>
  6. <view
  7. class="navbar-right"
  8. @click="$u.route('pages/com/msgNotification/index')"
  9. >
  10. <u-icon color="#436FF6" size="14" name="bell-fill"></u-icon>
  11. <view class="red-spot"></view>
  12. </view>
  13. </view>
  14. <oftenModular title="常用功能" :icon="cygn" />
  15. <toDoList />
  16. </view>
  17. </template>
  18. <script>
  19. import oftenModular from '@/pages/home/oftenModular.vue';
  20. import cygn from '@/static/images/home/cygn.png';
  21. import toDoList from './toDoList.vue';
  22. export default {
  23. name: 'home',
  24. components: {
  25. oftenModular,
  26. toDoList,
  27. },
  28. data() {
  29. return {
  30. cygn,
  31. };
  32. },
  33. };
  34. </script>
  35. <style scoped lang="scss">
  36. .home-container {
  37. display: flex;
  38. flex-direction: column;
  39. position: relative;
  40. height: 100%;
  41. overflow: hidden;
  42. padding: 0 16px;
  43. background-color: #f8f8f8;
  44. .top-bg {
  45. position: absolute;
  46. top: 0;
  47. left: 0;
  48. background: url('~@/static/images/home/header-bg.png') no-repeat;
  49. background-size: 100% 100%;
  50. height: 434rpx;
  51. width: 100%;
  52. }
  53. .header-nav {
  54. display: flex;
  55. justify-content: center;
  56. align-items: center;
  57. margin: 60rpx 0;
  58. position: relative;
  59. .navbar-title {
  60. width: 356rpx;
  61. text-align: center;
  62. color: #fff;
  63. font-size: 18px;
  64. }
  65. .navbar-right {
  66. position: absolute;
  67. padding: 10rpx;
  68. border-radius: 50%;
  69. background-color: #fff;
  70. right: 0;
  71. .red-spot {
  72. position: absolute;
  73. bottom: 0;
  74. right: 0;
  75. background-color: #f96464;
  76. width: 16rpx;
  77. height: 16rpx;
  78. border-radius: 50%;
  79. }
  80. }
  81. }
  82. }
  83. </style>