index-bak.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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 id="custcontainer">
  55. </view>
  56. </view>
  57. </view>
  58. </template>
  59. <script>
  60. import mapinfo from '@/agrcloud-utils/mapinfo';
  61. export default {
  62. data() {
  63. return {
  64. title: 'Hello',
  65. titleContentList: ['气象预警:修文县气象台2020年x月x日x时x分发布大雾'],
  66. mainNavigateToObj: {
  67. QualitySafetyComplaints: '/pages/complaints/index',
  68. MeteorologicalServices: '',
  69. PoliciesRegulations: '/pages/regulations/index',
  70. AgriculturalTechnologyExpert: '/pages/experts/index',
  71. NoticeAnnouncement: '/pages/notice/index',
  72. MonitoringInformation: '/pages/monitoring/index'
  73. },
  74. flowList: [{
  75. id: 'QualitySafetyComplaints',
  76. title: '质量安全投诉',
  77. image: 'http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23327_s.jpg',
  78. }, {
  79. id: 'MeteorologicalServices',
  80. title: '气象服务',
  81. image: 'http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23327_s.jpg',
  82. }, {
  83. id: 'AgriculturalTechnologyExpert',
  84. title: '农技专家',
  85. image: 'http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23327_s.jpg',
  86. }, {
  87. id: 'PoliciesRegulations',
  88. title: '政策法规',
  89. image: 'http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23327_s.jpg',
  90. }, {
  91. id: 'NoticeAnnouncement',
  92. title: '通知公告',
  93. image: 'http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23327_s.jpg',
  94. }, {
  95. id: 'MonitoringInformation',
  96. title: '监测信息',
  97. image: 'http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23327_s.jpg',
  98. }]
  99. };
  100. },
  101. onLoad() {
  102. // #ifdef H5
  103. mapinfo().then((res) => {
  104. debugger
  105. });
  106. // #endif
  107. },
  108. methods: {
  109. handleWarterClick(itemData) {
  110. if (!itemData.id || !this.mainNavigateToObj[itemData.id]) {
  111. this.$msgbox('模块建设中...');
  112. return;
  113. }
  114. uni.navigateTo({
  115. url: this.mainNavigateToObj[itemData.id]
  116. });
  117. }
  118. }
  119. };
  120. </script>
  121. <style lang="scss"
  122. scoped>
  123. .page-content {
  124. .title {
  125. width: 100%;
  126. .title-logo {
  127. padding-top: 9rpx;
  128. height: 52rpx;
  129. width: 30rpx;
  130. float: left;
  131. }
  132. .weather-densefog {
  133. padding-top: 6rpx;
  134. float: left;
  135. width: 36rpx;
  136. height: 36rpx;
  137. }
  138. .title-content {
  139. width: calc(100% - 36rpx);
  140. }
  141. }
  142. .main-content {
  143. padding-top: 20rpx;
  144. width: 100%;
  145. .main-warter {
  146. width: 100%;
  147. .water-title {
  148. margin: 20rpx;
  149. height: 300rpx;
  150. border-radius: 20rpx;
  151. border: 1rpx solid #c6c6c6;
  152. display: flex;
  153. flex-direction: column;
  154. align-items: center;
  155. justify-content: center;
  156. cursor: pointer;
  157. }
  158. }
  159. }
  160. }
  161. </style>