index.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <template>
  2. <view>
  3. <uni-page-head class="cust-uni-page-head">
  4. <view class="cust-agrcloud-uni-page-head uni-page-head">
  5. <view class="uni-page-head-hd cust-agrcloud-uni-page-head-hd">
  6. <view class="uni-page-head-btn">
  7. <image class="uni-btn-icon cust-head-icon"
  8. src="@/static/agrcloud-images/agrcloud-head-dir-img.png"></image>
  9. </view>
  10. </view>
  11. <view class="uni-page-head-bd">
  12. <view class="uni-page-head__title"
  13. style="font-size: 16px; opacity: 1;">修文农业云公共服务系统
  14. </view>
  15. </view>
  16. </view>
  17. </uni-page-head>
  18. <view class="page-content">
  19. <view class="title">
  20. <image class="weather-densefog"
  21. src="@/static/agrcloud-images/agrcloud-weather-densefog-img.png"></image>
  22. <u-notice-bar class="title-content"
  23. mode="horizontal"
  24. type="none"
  25. :volume-icon="true"
  26. :more-icon="true"
  27. :is-circular="true"
  28. :list="titleContentList"></u-notice-bar>
  29. </view>
  30. <view class="main-content">
  31. <u-waterfall v-model="flowList">
  32. <template v-slot:left="{leftList}">
  33. <view class="main-warter"
  34. v-for="item in leftList"
  35. :key="item.id"
  36. @click="handleWarterClick(item)">
  37. <view class="water-title">
  38. {{item.title}}
  39. </view>
  40. </view>
  41. </template>
  42. <template v-slot:right="{rightList}">
  43. <view class="main-warter"
  44. v-for="item in rightList"
  45. :key="item.id"
  46. @click="handleWarterClick(item)">
  47. <view class="water-title">
  48. {{item.title}}
  49. </view>
  50. </view>
  51. </template>
  52. </u-waterfall>
  53. </view>
  54. </view>
  55. </view>
  56. </template>
  57. <script>
  58. export default {
  59. data() {
  60. return {
  61. title: 'Hello',
  62. titleContentList: ['气象预警:修文县气象台2020年x月x日x时x分发布大雾'],
  63. mainNavigateToObj: {
  64. QualitySafetyComplaints: '/pages/complaints/index',
  65. MeteorologicalServices: '/pages/results/index',
  66. AgriculturalTechnologyExpert: '',
  67. PoliciesRegulations: '',
  68. NoticeAnnouncement: '',
  69. MonitoringInformation: ''
  70. },
  71. flowList: [{
  72. id: 'QualitySafetyComplaints',
  73. title: '质量安全投诉',
  74. image: 'http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23327_s.jpg',
  75. }, {
  76. id: 'MeteorologicalServices',
  77. title: '气象服务',
  78. image: 'http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23327_s.jpg',
  79. }, {
  80. id: 'AgriculturalTechnologyExpert',
  81. title: '农技专家',
  82. image: 'http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23327_s.jpg',
  83. }, {
  84. id: 'PoliciesRegulations',
  85. title: '政策法规',
  86. image: 'http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23327_s.jpg',
  87. }, {
  88. id: 'NoticeAnnouncement',
  89. title: '通知公告',
  90. image: 'http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23327_s.jpg',
  91. }, {
  92. id: 'MonitoringInformation',
  93. title: '监测信息',
  94. image: 'http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23327_s.jpg',
  95. }]
  96. };
  97. },
  98. onLoad() {
  99. this.indexInit();
  100. },
  101. methods: {
  102. async indexInit() {},
  103. handleWarterClick(itemData) {
  104. if (!itemData.id || !this.mainNavigateToObj[itemData.id]) {
  105. this.$msgbox('模块建设中...');
  106. return;
  107. }
  108. uni.navigateTo({
  109. url: this.mainNavigateToObj[itemData.id]
  110. });
  111. }
  112. }
  113. };
  114. </script>
  115. <style lang="scss" scoped>
  116. .page-content {
  117. .title {
  118. width: 100%;
  119. .title-logo {
  120. padding-top: 9rpx;
  121. height: 52rpx;
  122. width: 30rpx;
  123. float: left;
  124. }
  125. .weather-densefog {
  126. padding-top: 6rpx;
  127. float: left;
  128. width: 36rpx;
  129. height: 36rpx;
  130. }
  131. .title-content {
  132. width: calc(100% - 36rpx);
  133. }
  134. }
  135. .main-content {
  136. padding-top: 20rpx;
  137. width: 100%;
  138. .main-warter {
  139. width: 100%;
  140. .water-title {
  141. margin: 20rpx;
  142. height: 300rpx;
  143. border-radius: 20rpx;
  144. border: 1rpx solid #c6c6c6;
  145. display: flex;
  146. flex-direction: column;
  147. align-items: center;
  148. justify-content: center;
  149. cursor: pointer;
  150. }
  151. }
  152. }
  153. }
  154. </style>