index.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <template>
  2. <view style="padding: 20rpx;">
  3. <view v-if="!listData.length">
  4. <u-empty text="消息列表为空" mode="message"></u-empty>
  5. </view>
  6. <view v-else v-for="(item, index) in listData" :key="index" style="padding-bottom: 20rpx;">
  7. <navigator hover-class="none" :url="`/pages2/msg/detail?id=${item.id}`" class="item" :style="item.receiptStatus === 1 ? 'opacity: 0.7' : ''">
  8. <view style="display: flex;justify-content: space-between;align-items: center;height: 60rpx;">
  9. <view style="color: #333333;font-size: 30rpx;font-weight: bold;display: flex;align-items: center;">
  10. <image :src="item.systemStatus === 1 ? img1 : img2" style="width: 40rpx;height: 40rpx;margin-right: 10rpx;"></image>
  11. 系统通知
  12. </view>
  13. <view style="color: #999999;font-size: 24rpx;">{{ $method.timestampToTime(item.sendTime, false) }}</view>
  14. </view>
  15. <u-line color="#D6D6DB" />
  16. <view style="display: flex;justify-content: space-between;padding: 25rpx;color: #666666;">
  17. {{ item.systemStatus === 2 ? item.informVo.informName : item.systemStatus === 1 ? item.text : '接口异常' }}
  18. </view>
  19. <u-line color="#D6D6DB" />
  20. <view style="display: flex;justify-content: space-between;align-items: center;height: 50rpx;margin-top: 10rpx;padding: 0 25rpx;">
  21. <view class="color: #333333;font-size: 28rpx;">查看详情</view>
  22. <view><u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
  23. </view>
  24. </navigator>
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. import { mapGetters } from 'vuex';
  30. export default {
  31. components: {},
  32. data() {
  33. return {
  34. list: [
  35. {
  36. name: '待支付'
  37. },
  38. {
  39. name: '已支付'
  40. },
  41. {
  42. name: '已取消'
  43. }
  44. ],
  45. list1: [1, 2, 3, 4, 5, 6, 7],
  46. current: 0,
  47. img1: '/static/icon/msg_icon1.png',
  48. img2: '/static/icon/msg_icon2.png',
  49. listData: []
  50. };
  51. },
  52. onPullDownRefresh() {
  53. this.$api
  54. .getappinformUserlist()
  55. .then(res => {
  56. if (res.data.code === 200) {
  57. this.listData = res.data.rows;
  58. }
  59. })
  60. .finally(() => {
  61. uni.stopPullDownRefresh();
  62. });
  63. },
  64. onLoad(option) {
  65. this.$store.getters.dictObj
  66. },
  67. onShow() {
  68. this.getInfo();
  69. },
  70. onShareAppMessage(res) {
  71. var self = this;
  72. return {
  73. title: '中正',
  74. path: `/pages/index/index?inviteCode=` + userInfo == null ? '' : userInfo.userAccount
  75. };
  76. },
  77. methods: {
  78. getInfo() {
  79. this.$api.getappinformUserlist().then(res => {
  80. if (res.data.code === 200) {
  81. this.listData = res.data.rows;
  82. }
  83. })
  84. }
  85. },
  86. onReachBottom() {},
  87. computed: { ...mapGetters(['userInfo']) }
  88. };
  89. </script>
  90. <style>
  91. page {
  92. background: #eaeef1;
  93. }
  94. </style>
  95. <style scoped>
  96. .btn2 {
  97. width: 144rpx;
  98. height: 48rpx;
  99. background: #ffffff;
  100. border: 2rpx solid #007aff;
  101. border-radius: 16rpx;
  102. text-align: center;
  103. line-height: 48rpx;
  104. color: #007aff;
  105. margin: 0 8rpx;
  106. }
  107. .btn1 {
  108. width: 144rpx;
  109. height: 48rpx;
  110. background: #ffffff;
  111. border: 2rpx solid #999999;
  112. border-radius: 16rpx;
  113. text-align: center;
  114. line-height: 48rpx;
  115. color: #999999;
  116. margin: 0 8rpx;
  117. }
  118. .item {
  119. background: #ffffff;
  120. border-radius: 16rpx;
  121. padding: 15rpx;
  122. }
  123. .priceTag {
  124. font-size: 30rpx;
  125. font-family: PingFang SC;
  126. font-weight: bold;
  127. color: #ff2d55;
  128. display: flex;
  129. flex-direction: row-reverse;
  130. }
  131. .bottomBox {
  132. position: fixed;
  133. bottom: 0;
  134. width: 100%;
  135. left: 0;
  136. height: 98rpx;
  137. background-color: #ffffff;
  138. display: flex;
  139. justify-content: space-between;
  140. align-items: center;
  141. padding: 0 30rpx;
  142. }
  143. </style>