pushList.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <template>
  2. <view class="fireBashWrapper pushListWrapper ">
  3. <!-- <cu-custom bgColor="bg-gradual-blue" :isBack="true"><block slot="backText">返回</block><block slot="content">布局</block></cu-custom>
  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" :key="index" @tap="tabSelect"
  7. :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. processedList: json.processedList,
  108. type: '0',
  109. modalName: null,
  110. listTouchStart: 0,
  111. listTouchDirection: null,
  112. CustomBar: this.CustomBar,
  113. TabCur: 0,
  114. tabNav: ['未读', '已读']
  115. };
  116. },
  117. methods: {
  118. tabSelect(e) {
  119. this.TabCur = e.currentTarget.dataset.id;
  120. this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60
  121. },
  122. // 页面跳转
  123. goUnprocessDetail() {
  124. uni.navigateTo({
  125. url: '/pages/unprocessDetail/unprocessDetail?type=1',
  126. success: res => {},
  127. fail: () => {},
  128. complete: () => {}
  129. });
  130. },
  131. goProcessedDetail() {
  132. uni.navigateTo({
  133. url: '/pages/processedDetail/processedDetail?type=1',
  134. success: res => {},
  135. fail: () => {},
  136. complete: () => {}
  137. });
  138. },
  139. goVideoUnprocessDetail() {
  140. uni.navigateTo({
  141. url: '/pages/unprocessDetail/unprocessDetail?type=2',
  142. success: res => {},
  143. fail: () => {},
  144. complete: () => {}
  145. });
  146. },
  147. goVideoProcessedDetail() {
  148. uni.navigateTo({
  149. url: '/pages/processedDetail/processedDetail?type=2',
  150. success: res => {},
  151. fail: () => {},
  152. complete: () => {}
  153. });
  154. }
  155. }
  156. }
  157. </script>
  158. <style lang="scss">
  159. //已处理未处理消息个数样式
  160. .nav .cu-item.cur {
  161. position: relative;
  162. border-bottom: 8rpx solid;
  163. }
  164. .cu-tag.badge {
  165. top: 14rpx;
  166. right: 96rpx;
  167. }
  168. .nav .cu-item {
  169. width: 50%;
  170. margin: 0;
  171. .text-blue,
  172. .line-blue,
  173. .lines-blue {
  174. color: #4274E7
  175. }
  176. }
  177. </style>