pushList.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <template>
  2. <view class="fireBashWrapper pushListWrapper ">
  3. <view style="height:90rpx"></view>
  4. <view class="ding">
  5. <scroll-view scroll-x class="bg-white nav text-center">
  6. <view class="cu-item" :class="index==TabCur?'text-blue cur':''" v-for="(item,index) in tabNav"
  7. :key="index" @tap="tabSelect" :data-id="index">
  8. <view class="cu-tag badge">
  9. <block class="cu-tag badge" v-if="item.badge!=1">99</block>
  10. </view>
  11. {{tabNav[index]}}
  12. </view>
  13. </scroll-view>
  14. </view>
  15. <block v-if="TabCur==0">
  16. <view class="" style="margin-top:0">
  17. <view class="cu-list menu-avatar ">
  18. <view class="cu-item" v-for="(item,index) in unporcessList" :key="index" @tap="goFireBaseDetail">
  19. <view class="cu-avatar" style="background-image:url(../../../static/push-list.png);"></view>
  20. <view class="content">
  21. <view class="pro-title">
  22. <view class="cut">{{item.title}}</view>
  23. </view>
  24. <view class="pro-des ">
  25. <view class="text-cut">
  26. {{item.subtit}}
  27. </view>
  28. </view>
  29. <view class="pro-date">{{item.time}}</view>
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. </block>
  35. <block v-if="TabCur==1">
  36. <view class="" style="margin-top:0">
  37. <view class="cu-list menu-avatar ">
  38. <view class="cu-item" v-for="(item,index) in unporcessList" :key="index" @tap="goFireBaseDetail">
  39. <view class="cu-avatar" style="background-image:url(../../../static/push-list.png);"></view>
  40. <view class="content">
  41. <view class="pro-title">
  42. <view class="cut">{{item.title}}</view>
  43. </view>
  44. <view class="pro-des ">
  45. <view class="text-cut">
  46. {{item.subtit}}
  47. </view>
  48. </view>
  49. <view class="pro-date">{{item.time}}</view>
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. </block>
  55. </view>
  56. </template>
  57. <script>
  58. import json from '../../../data/json.js';
  59. export default {
  60. data() {
  61. return {
  62. unporcessList: [{
  63. title: '火灾逃生九大要诀',
  64. time: '2020-02-12',
  65. subtit: 'admin'
  66. }, {
  67. title: '火灾逃生九大要诀',
  68. time: '2020-02-12',
  69. subtit: 'admin'
  70. }, {
  71. title: '火灾逃生九大要诀',
  72. time: '2020-02-12',
  73. subtit: 'admin'
  74. }, {
  75. title: '火灾逃生九大要诀',
  76. time: '2020-02-12',
  77. subtit: 'admin'
  78. }, {
  79. title: '火灾逃生九大要诀',
  80. time: '2020-02-12',
  81. subtit: 'admin'
  82. }, {
  83. title: '火灾逃生九大要诀',
  84. time: '2020-02-12',
  85. subtit: 'admin'
  86. },
  87. {
  88. title: '火灾逃生九大要诀',
  89. time: '2020-02-12',
  90. subtit: 'admin'
  91. },
  92. {
  93. title: '火灾逃生九大要诀',
  94. time: '2020-02-12',
  95. subtit: 'admin'
  96. },
  97. {
  98. title: '火灾逃生九大要诀',
  99. time: '2020-02-12',
  100. subtit: 'admin'
  101. },
  102. {
  103. title: '火灾逃生九大要诀',
  104. time: '2020-02-12',
  105. subtit: 'admin'
  106. }
  107. ],
  108. processedList: json.processedList,
  109. type: '0',
  110. modalName: null,
  111. listTouchStart: 0,
  112. listTouchDirection: null,
  113. CustomBar: this.CustomBar,
  114. TabCur: 0,
  115. tabNav: ['未读', '已读']
  116. };
  117. },
  118. methods: {
  119. tabSelect(e) {
  120. this.TabCur = e.currentTarget.dataset.id;
  121. this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60
  122. },
  123. // 页面跳转
  124. goUnprocessDetail() {
  125. uni.navigateTo({
  126. url: '/pages/unprocessDetail/unprocessDetail?type=1',
  127. success: res => {},
  128. fail: () => {},
  129. complete: () => {}
  130. });
  131. },
  132. goProcessedDetail() {
  133. uni.navigateTo({
  134. url: '/pages/processedDetail/processedDetail?type=1',
  135. success: res => {},
  136. fail: () => {},
  137. complete: () => {}
  138. });
  139. },
  140. goVideoUnprocessDetail() {
  141. uni.navigateTo({
  142. url: '/pages/unprocessDetail/unprocessDetail?type=2',
  143. success: res => {},
  144. fail: () => {},
  145. complete: () => {}
  146. });
  147. },
  148. goVideoProcessedDetail() {
  149. uni.navigateTo({
  150. url: '/pages/processedDetail/processedDetail?type=2',
  151. success: res => {},
  152. fail: () => {},
  153. complete: () => {}
  154. });
  155. }
  156. }
  157. }
  158. </script>
  159. <style lang="scss">
  160. //已处理未处理消息个数样式
  161. .nav .cu-item.cur {
  162. position: relative;
  163. border-bottom: 8rpx solid;
  164. }
  165. .cu-tag.badge {
  166. top: 14rpx;
  167. right: 96rpx;
  168. }
  169. .nav .cu-item {
  170. width: 50%;
  171. margin: 0;
  172. .text-blue,
  173. .line-blue,
  174. .lines-blue {
  175. color: #4274E7
  176. }
  177. }
  178. </style>