message.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <template>
  2. <view class="content">
  3. <view class="msg-list">
  4. <view class="item" @click="showMsgDetail('系统消息')">
  5. <view class="img-box">
  6. <image src="../../static/images/sys_msg.png" mode=""></image>
  7. </view>
  8. <view class="info-box">
  9. <view class="title-box">
  10. <text class="title">系统消息</text>
  11. <!-- <view class="msg-num">99+</view> -->
  12. </view>
  13. <!-- <view class="desc ellipsis">您的订单已发货</view> -->
  14. <view class="desc ellipsis">暂无消息</view>
  15. </view>
  16. </view>
  17. <view class="item" @click="showMsgDetail('购药提醒')">
  18. <view class="img-box">
  19. <image src="../../static/images/buy_medicine_msg.png" mode=""></image>
  20. </view>
  21. <view class="info-box">
  22. <view class="title-box">
  23. <text class="title">购药提醒</text>
  24. <!-- <view class="msg-num">1</view> -->
  25. </view>
  26. <!-- <view class="desc ellipsis">您有一个药品需要购买</view> -->
  27. <view class="desc ellipsis">暂无消息</view>
  28. </view>
  29. </view>
  30. <view class="item" @click="showMsgDetail('用药提醒')">
  31. <view class="img-box">
  32. <image src="../../static/images/medication_msg.png" mode=""></image>
  33. </view>
  34. <view class="info-box">
  35. <view class="title-box">
  36. <text class="title">用药提醒</text>
  37. <!-- <view class="msg-num">1</view> -->
  38. </view>
  39. <!-- <view class="desc ellipsis">您有一个药品需要该吃药了</view> -->
  40. <view class="desc ellipsis">暂无消息</view>
  41. </view>
  42. </view>
  43. <view class="item" @click="showMsgDetail('系统公告')">
  44. <view class="img-box">
  45. <image src="../../static/images/sys_msg2.png" mode=""></image>
  46. </view>
  47. <view class="info-box">
  48. <view class="title-box">
  49. <text class="title">系统公告</text>
  50. <!-- <view v-show="false" class="msg-num">1</view> -->
  51. </view>
  52. <!-- <view class="desc ellipsis">通知公告</view> -->
  53. <view class="desc ellipsis">暂无消息</view>
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. </template>
  59. <script>
  60. export default {
  61. data() {
  62. return {
  63. }
  64. },
  65. methods: {
  66. // 查看消息详情
  67. showMsgDetail(title){
  68. uni.navigateTo({
  69. url: './msgDetail?title=' + title
  70. })
  71. }
  72. }
  73. }
  74. </script>
  75. <style lang="scss">
  76. .content{
  77. padding-top: 20upx;
  78. .msg-list{
  79. width: 100%;
  80. background: #FFFFFF;
  81. .item{
  82. box-sizing: border-box;
  83. width: 100%;
  84. display: flex;
  85. padding: 30upx 0 0 40upx;
  86. &:last-child .info-box{
  87. border-bottom: none;
  88. }
  89. .img-box{
  90. width: 90upx;
  91. height: 90upx;
  92. margin-right: 30upx;
  93. image{
  94. width: 100%;
  95. height: 100%;
  96. }
  97. }
  98. .info-box{
  99. width: calc(100% - 120upx);
  100. padding: 8upx 0 40upx 0;
  101. border-bottom: 1px solid #EDEEEF;
  102. .title-box{
  103. display: flex;
  104. align-items: center;
  105. justify-content: space-between;
  106. padding-right: 40upx;
  107. .title{
  108. font-size: 32upx;
  109. font-family: PingFang SC;
  110. font-weight: bold;
  111. color: #333333;
  112. line-height: 1;
  113. }
  114. .msg-num{
  115. padding: 0 12upx;
  116. height: 36upx;
  117. line-height: 36upx;
  118. border-radius: 20upx;
  119. background-color: #FF3636;
  120. font-size: 24upx;
  121. font-family: PingFang SC;
  122. // font-weight: bold;
  123. color: #FFFFFF;
  124. }
  125. }
  126. .desc{
  127. font-size: 24upx;
  128. font-family: PingFang SC;
  129. font-weight: 500;
  130. color: #999999;
  131. margin-top: 20upx;
  132. line-height: 1;
  133. }
  134. }
  135. }
  136. }
  137. }
  138. </style>