index.vue 3.7 KB

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