index.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <template>
  2. <view>
  3. <u-navbar>
  4. <view slot="left"></view>
  5. <view slot="center">
  6. <u-tabs :list="list" lineWidth="60" />
  7. </view>
  8. </u-navbar>
  9. <view :style="{ marginTop: totalHeight + 'px' }">
  10. <!-- 系统通知 -->
  11. <view class="orderList" v-for="item in orderList" :key="item.id">
  12. <image :src="item.img" style="width: 40px; height: 40px" />
  13. <view class="orderItem">
  14. <view class="order1">{{ item.name }}</view>
  15. <view class="order2">{{ item.text }}</view>
  16. </view>
  17. <u-icon name="arrow-right"></u-icon>
  18. </view>
  19. <!-- 消息通知 -->
  20. <view class="message">
  21. <image
  22. src="/static/images/home-select.png"
  23. style="width: 40px; height: 40px"
  24. />
  25. <view class="business">
  26. <view class="businessItem">商家</view>
  27. <view class="messages">您好,请问有什么需要帮助的吗?</view>
  28. </view>
  29. <view class="time">
  30. <view class="timeItem">17:00</view>
  31. <u-badge numberType="overflow" :type="type" max="99" :value="value" />
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. export default {
  39. data() {
  40. return {
  41. list: [{ name: '系统通知' }, { name: '消息通知' }],
  42. orderList: [
  43. {
  44. id: '1',
  45. img: '/static/images/home-select.png',
  46. name: '订单通知',
  47. text: '您的订单成功付款,感谢您的支持。',
  48. },
  49. {
  50. id: '2',
  51. img: '/static/images/home-select.png',
  52. name: '付款通知',
  53. text: '您的订单成功付款,感谢您的支持。',
  54. },
  55. {
  56. id: '3',
  57. img: '/static/images/home-select.png',
  58. name: '评价通知',
  59. text: '您的订单成功付款,感谢您的支持。',
  60. },
  61. {
  62. id: '4',
  63. img: '/static/images/home-select.png',
  64. name: '点赞回复',
  65. text: '您的订单成功付款,感谢您的支持。',
  66. },
  67. {
  68. id: '5',
  69. img: '/static/images/home-select.png',
  70. name: '优惠福利',
  71. text: '您的订单成功付款,感谢您的支持。',
  72. },
  73. ],
  74. type: 'warning',
  75. value: 99999,
  76. flag: true,
  77. };
  78. },
  79. computed: {
  80. totalHeight() {
  81. return uni.getSystemInfoSync().statusBarHeight + 44;
  82. },
  83. },
  84. methods: {
  85. change(e) {
  86. console.log('-----------', e);
  87. },
  88. },
  89. };
  90. </script>
  91. <style lang="scss" scoped>
  92. .messages {
  93. min-height: 100vh;
  94. background-color: #fff;
  95. }
  96. .orderList {
  97. display: flex;
  98. padding: 30rpx;
  99. justify-content: space-between;
  100. image {
  101. margin-right: 10rpx;
  102. }
  103. .orderItem {
  104. flex: 1;
  105. .order1 {
  106. font-size: 16px;
  107. margin-bottom: 10rpx;
  108. color: #232323;
  109. }
  110. .order2 {
  111. font-size: 12px;
  112. color: #9ca3af;
  113. }
  114. }
  115. }
  116. .message {
  117. display: flex;
  118. padding: 30rpx;
  119. justify-content: space-between;
  120. image {
  121. margin-right: 10rpx;
  122. }
  123. .business {
  124. flex: 1;
  125. .businessItem {
  126. font-size: 16px;
  127. margin-bottom: 10rpx;
  128. color: #232323;
  129. }
  130. .messages {
  131. font-size: 12px;
  132. color: #9ca3af;
  133. }
  134. }
  135. .time {
  136. .timeItem {
  137. color: #9ca3af;
  138. font-size: 14px;
  139. margin-bottom: 8px;
  140. }
  141. }
  142. }
  143. </style>