index.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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 :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. onShow() {
  66. this.getInfo();
  67. },
  68. onShareAppMessage(res) {
  69. var self = this;
  70. return {
  71. title: '中正',
  72. path: `/pages/index/index?inviteCode=` + userInfo == null ? '' : userInfo.userAccount
  73. };
  74. },
  75. methods: {
  76. getInfo() {
  77. this.$api.getappinformUserlist().then(res => {
  78. if (res.data.code === 200) {
  79. this.listData = res.data.rows;
  80. }
  81. });
  82. }
  83. },
  84. onReachBottom() {},
  85. computed: { ...mapGetters(['userInfo']) }
  86. };
  87. </script>
  88. <style>
  89. page {
  90. background: #eaeef1;
  91. }
  92. </style>
  93. <style scoped>
  94. .btn2 {
  95. width: 144rpx;
  96. height: 48rpx;
  97. background: #ffffff;
  98. border: 2rpx solid #007aff;
  99. border-radius: 16rpx;
  100. text-align: center;
  101. line-height: 48rpx;
  102. color: #007aff;
  103. margin: 0 8rpx;
  104. }
  105. .btn1 {
  106. width: 144rpx;
  107. height: 48rpx;
  108. background: #ffffff;
  109. border: 2rpx solid #999999;
  110. border-radius: 16rpx;
  111. text-align: center;
  112. line-height: 48rpx;
  113. color: #999999;
  114. margin: 0 8rpx;
  115. }
  116. .item {
  117. background: #ffffff;
  118. border-radius: 16rpx;
  119. padding: 15rpx;
  120. }
  121. .priceTag {
  122. font-size: 30rpx;
  123. font-family: PingFang SC;
  124. font-weight: bold;
  125. color: #ff2d55;
  126. display: flex;
  127. flex-direction: row-reverse;
  128. }
  129. .bottomBox {
  130. position: fixed;
  131. bottom: 0;
  132. width: 100%;
  133. left: 0;
  134. height: 98rpx;
  135. background-color: #ffffff;
  136. display: flex;
  137. justify-content: space-between;
  138. align-items: center;
  139. padding: 0 30rpx;
  140. }
  141. </style>