main.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <template>
  2. <view class="container">
  3. <view class="list-cell b-b m-t" hover-class="cell-hover" :hover-stay-time="50">
  4. <u-row gutter="12" justify="start" @click="navigateTo('/pages/msgTips/sysMsg/index')">
  5. <u-col span="2" class="uCol" style="text-align:center;">
  6. <image class="img" src="/static/mine/setting.png"></image>
  7. </u-col>
  8. <u-col span="7">
  9. <p class="tit_title">系统消息</p>
  10. <p class="tit_tips">查看系统消息</p>
  11. </u-col>
  12. <u-col span="3">
  13. <view class="cell-more">
  14. <u-tag size="mini" v-if="no_read.system_num>0" shape="circle" mode="dark" type="error" :text="no_read.system_num"></u-tag>
  15. <span class="yticon icon-you"></span>
  16. </view>
  17. </u-col>
  18. </u-row>
  19. </view>
  20. <!-- <view class="list-cell b-b m-t" hover-class="cell-hover" :hover-stay-time="50">
  21. <u-row gutter="12" justify="start" @click="navigateTo('/pages/msgTips/packagemsg/index')">
  22. <u-col span="2" class="uCol" style="text-align:center;">
  23. <image class="img" src="/static/mine/logistics.png"></image>
  24. </u-col>
  25. <u-col span="7">
  26. <p class="tit_title">物流消息</p>
  27. <p class="tit_tips">查看物流消息</p>
  28. </u-col>
  29. <u-col span="3">
  30. <view class="cell-more">
  31. <u-tag v-if="no_read.logistics_num>0" shape="circle" mode="dark" type="warning" :text="no_read.logistics_num"></u-tag>
  32. <span class="yticon icon-you"></span>
  33. </view>
  34. </u-col>
  35. </u-row>
  36. </view> -->
  37. </view>
  38. </template>
  39. <script>
  40. import {
  41. mapMutations
  42. } from "vuex";
  43. import * as API_Message from "@/api/members.js";
  44. export default {
  45. data() {
  46. return {
  47. no_read: ''
  48. };
  49. },
  50. onLoad() {
  51. this.GET_NoReadMessageNum();
  52. },
  53. methods: {
  54. ...mapMutations(["logout"]),
  55. navigateTo(url) {
  56. uni.navigateTo({
  57. url
  58. });
  59. },
  60. /** 获取未读消息数量信息 */
  61. GET_NoReadMessageNum() {
  62. API_Message.getNoReadMessageNum().then(response => {
  63. this.no_read = response.data
  64. })
  65. }
  66. }
  67. };
  68. </script>
  69. <style scoped lang='scss'>
  70. .uCol {
  71. display: flex;
  72. justify-content: center !important;
  73. }
  74. .img {
  75. width: 60rpx;
  76. height: 60rpx;
  77. }
  78. .container {
  79. background: #f9f9f9;
  80. }
  81. /deep/ .u-col-2 {
  82. height: 60px;
  83. line-height: 60px;
  84. text-align: center !important;
  85. }
  86. .qicon {
  87. text-align: center;
  88. display: block;
  89. font-size: 20px;
  90. }
  91. .redBox {
  92. display: inline-block;
  93. text-align: center;
  94. line-height: 1.5em;
  95. font-size: 12px;
  96. min-width: 1.5em;
  97. min-height: 1.5em;
  98. background: #ed6533;
  99. border-radius: 50%;
  100. color: #fff;
  101. }
  102. .tit_title {
  103. color: $u-main-color;
  104. }
  105. .tit_tips {
  106. color: $u-tips-color;
  107. }
  108. .u-col-3 {
  109. text-align: right !important;
  110. padding-right: 20rpx !important;
  111. }
  112. .list-cell {
  113. background: #fff;
  114. align-items: baseline;
  115. padding: 20rpx 0;
  116. line-height: 60rpx;
  117. background: #fff;
  118. justify-content: center;
  119. &.log-out-btn {
  120. margin-top: 40rpx;
  121. .cell-tit {
  122. color: $uni-color-primary;
  123. text-align: center;
  124. margin-right: 0;
  125. }
  126. }
  127. &.cell-hover {
  128. background: #fafafa;
  129. }
  130. &.b-b:after {
  131. left: 30rpx;
  132. }
  133. &.m-t {
  134. margin-top: 16rpx;
  135. }
  136. .cell-more {
  137. /* margin-top: 10rpx; */
  138. height: 60rpx;
  139. text-align: right;
  140. /* display: flex;
  141. justify-content: center; //这个是X轴居中
  142. align-items: center; //这个是 Y轴居中 */
  143. font-size: $font-lg;
  144. color: $font-color-light;
  145. /* width: 100rpx; */
  146. }
  147. .cell-tit {
  148. flex: 1;
  149. font-size: $font-base + 2rpx;
  150. color: $font-color-dark;
  151. margin-right: 10rpx;
  152. }
  153. .cell-tip {
  154. font-size: $font-base;
  155. color: $font-color-light;
  156. }
  157. }
  158. </style>