index.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532
  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. @click="handleRedirectMainPageClick">
  7. <view class="uni-page-head-btn">
  8. <image class="uni-btn-icon cust-head-icon"
  9. src="@/static/agrcloud-images/agrcloud-head-dir-img.png"></image>
  10. </view>
  11. </view>
  12. <view class="uni-page-head-bd">
  13. <view class="uni-page-head__title"
  14. style="font-size: 16px; opacity: 1;">修文农业云公共服务系统
  15. </view>
  16. </view>
  17. <view class="uni-page-head-hd cust-agrcloud-uni-page-head-hd">
  18. <view class="uni-page-head-btn">
  19. <image class="uni-btn-icon cust-head-notice-icon"
  20. src="@/static/agrcloud-images/agrcloud-head-notice-icon.png"></image>
  21. </view>
  22. </view>
  23. </view>
  24. </uni-page-head>
  25. <view class="page-content">
  26. <view class="page-content-title">
  27. <view class="content-title">
  28. <image class="weather-densefog"
  29. src="@/static/agrcloud-images/agrcloud-weather-densefog-img.png"></image>
  30. <u-notice-bar class="title-text"
  31. mode="horizontal"
  32. type="none"
  33. :volume-icon="true"
  34. :is-circular="true"
  35. :list="titleContentList"></u-notice-bar>
  36. </view>
  37. </view>
  38. <view class="main-content">
  39. <!-- 质量安全投诉 -->
  40. <view class="main-content-complaints">
  41. <view class="complaints-container"
  42. @click="handleWarterClick('complaints')">
  43. <image class="complaints-container-icon"
  44. src="@/static/agrcloud-images/agrcloud-main-page-complaints-icon.png">
  45. </image>
  46. <view class="complaints-container-title">
  47. <text class="complaints-container-title-text">质量安全投诉</text>
  48. </view>
  49. <view class="complaints-container-subtitle">
  50. <text class="complaints-container-subtitle-text">Complaints</text>
  51. </view>
  52. </view>
  53. </view>
  54. <!-- 气象服务 农技专家 政策法规 通知公告 -->
  55. <view class="main-content-metexpregnotice">
  56. <view class="complaints-metexpregnotice">
  57. <view class="metexpregnotice-meteregula">
  58. <!-- 气象服务 -->
  59. <view class="meteregula-meteorological">
  60. <view class="meteorological-container"
  61. @click="handleWarterClick('meteorological')">
  62. <image class="meteorological-container-icon"
  63. src="@/static/agrcloud-images/agrcloud-main-page-meteorological-icon.png">
  64. </image>
  65. <view class="meteorological-container-title">
  66. <text class="meteorological-container-title-text">气象服务</text>
  67. </view>
  68. <view class="meteorological-container-subtitle">
  69. <text class="meteorological-container-subtitle-text">Meteorological</text>
  70. </view>
  71. </view>
  72. </view>
  73. <!-- 政策法规 -->
  74. <view class="meteregula-regulations">
  75. <view class="regulations-container"
  76. @click="handleWarterClick('regulations')">
  77. <image class="regulations-container-icon"
  78. src="@/static/agrcloud-images/agrcloud-main-page-regulations-icon.png">
  79. </image>
  80. <view class="regulations-container-title">
  81. <text class="regulations-container-title-text">政策法规</text>
  82. </view>
  83. <view class="regulations-container-subtitle">
  84. <text class="regulations-container-subtitle-text">Regulations</text>
  85. </view>
  86. </view>
  87. </view>
  88. </view>
  89. <!-- 农技专家 -->
  90. <view class="metexpregnotice-expertsnotice">
  91. <view class="expertsnotice-experts">
  92. <view class="experts-container"
  93. @click="handleWarterClick('experts')">
  94. <image class="experts-container-icon"
  95. src="@/static/agrcloud-images/agrcloud-main-page-experts-icon.png">
  96. </image>
  97. <view class="experts-container-title">
  98. <text class="experts-container-title-text">农技专家</text>
  99. </view>
  100. <view class="experts-container-subtitle">
  101. <text class="experts-container-subtitle-text">Experts</text>
  102. </view>
  103. </view>
  104. </view>
  105. <!-- 通知公告 -->
  106. <view class="expertsnotice-notice">
  107. <view class="notice-container"
  108. @click="handleWarterClick('notice')">
  109. <image class="notice-container-icon"
  110. src="@/static/agrcloud-images/agrcloud-main-page-notice-icon.png">
  111. </image>
  112. <view class="notice-container-title">
  113. <text class="notice-container-title-text">通知公告</text>
  114. </view>
  115. <view class="notice-container-subtitle">
  116. <text class="notice-container-subtitle-text">Notice</text>
  117. </view>
  118. </view>
  119. </view>
  120. </view>
  121. </view>
  122. </view>
  123. <view style="clear: both;"></view>
  124. <!-- 监测信息 -->
  125. <view class="main-content-monitoring">
  126. <view class="content-monitoring">
  127. <view class="monitoring-container"
  128. @click="handleWarterClick('monitoring')">
  129. <image class="monitoring-container-icon"
  130. src="@/static/agrcloud-images/agrcloud-main-page-monitoring-icon.png">
  131. </image>
  132. <view class="monitoring-container-title">
  133. <text class="monitoring-container-title-text">监测信息</text>
  134. </view>
  135. <view class="monitoring-container-subtitle">
  136. <text class="monitoring-container-subtitle-text">Monitoring</text>
  137. </view>
  138. </view>
  139. </view>
  140. </view>
  141. </view>
  142. </view>
  143. </view>
  144. </template>
  145. <script>
  146. import {
  147. meteorologicalRollData
  148. } from '@/agrcloud-api/meteorological';
  149. export default {
  150. name: 'homePage',
  151. data() {
  152. return {
  153. titleContentList: ['暂无数据!'],
  154. mainNavigateToObj: {
  155. complaints: '/pages/complaints/index',
  156. meteorological: '/pages/meteorological/index',
  157. regulations: '/pages/regulations/index',
  158. experts: '/pages/experts/index',
  159. notice: '/pages/notice/index',
  160. monitoring: '/pages/monitoring/index'
  161. }
  162. };
  163. },
  164. onLoad() {
  165. // #ifdef H5
  166. this.getMeteorologicalRollData();
  167. // #endif
  168. },
  169. methods: {
  170. handleWarterClick(itemData) {
  171. if (!itemData || !this.mainNavigateToObj[itemData]) {
  172. this.$msgbox('模块建设中...');
  173. return;
  174. }
  175. uni.navigateTo({
  176. url: this.mainNavigateToObj[itemData]
  177. });
  178. },
  179. getMeteorologicalRollData() {
  180. meteorologicalRollData().then(res => {
  181. const rollDataList = res.data || [];
  182. this.titleContentList = (rollDataList.length > 0) ? rollDataList : ['暂无数据!'];
  183. }).catch(err => {
  184. this.titleContentList = ['暂无数据!'];
  185. });
  186. }
  187. }
  188. };
  189. </script>
  190. <style lang="scss"
  191. scoped>
  192. .page-content {
  193. width: 100%;
  194. padding: 0;
  195. &-title {
  196. width: 100%;
  197. background-color: #ffffff;
  198. .content-title {
  199. margin: 0 47rpx 0 54rpx;
  200. .title-logo {
  201. padding-top: 9rpx;
  202. height: 52rpx;
  203. width: 30rpx;
  204. float: left;
  205. }
  206. .weather-densefog {
  207. padding-top: 16rpx;
  208. float: left;
  209. width: 36rpx;
  210. height: 36rpx;
  211. }
  212. .title-text {
  213. width: calc(100% - 36rpx);
  214. }
  215. }
  216. }
  217. .main-content {
  218. padding: 36rpx 24rpx;
  219. width: 100%;
  220. display: flex;
  221. flex-wrap: wrap;
  222. align-items: center;
  223. justify-content: center;
  224. .main-content-complaints {
  225. width: 100%;
  226. height: 240rpx;
  227. background-image: url("../../static/agrcloud-images/agrcloud-main-page-complaints-bg.png");
  228. background-size: cover;
  229. background-color: transparent;
  230. background-position: center;
  231. .complaints-container {
  232. padding: 26rpx 40rpx;
  233. &-icon {
  234. width: 84rpx;
  235. height: 84rpx;
  236. }
  237. .complaints-container-title {
  238. margin-top: 4rpx;
  239. &-text {
  240. height: 67rpx;
  241. font-size: 48rpx;
  242. font-family: PingFangSC-Medium, PingFang SC;
  243. font-weight: 500;
  244. color: #FFFFFF;
  245. line-height: 67rpx;
  246. letter-spacing: 4rpx;
  247. }
  248. }
  249. .complaints-container-subtitle {
  250. &-text {
  251. text-transform: uppercase;
  252. height: 33rpx;
  253. font-size: 24rpx;
  254. font-family: PingFangSC-Medium, PingFang SC;
  255. font-weight: 500;
  256. color: #FFFFFF;
  257. line-height: 33rpx;
  258. letter-spacing: 2rpx;
  259. }
  260. }
  261. }
  262. }
  263. .main-content-metexpregnotice {
  264. width: 100%;
  265. padding-top: 24rpx;
  266. .complaints-metexpregnotice {
  267. width: 100%;
  268. display: flex;
  269. .metexpregnotice-meteregula {
  270. flex: 1;
  271. .meteregula-meteorological {
  272. width: 100%;
  273. height: 260rpx;
  274. background-image: url("../../static/agrcloud-images/agrcloud-main-page-meteorological-bg.png");
  275. background-size: cover;
  276. background-color: transparent;
  277. background-position: center;
  278. .meteorological-container {
  279. padding: 32rpx 40rpx 26rpx;
  280. &-icon {
  281. width: 84rpx;
  282. height: 84rpx;
  283. }
  284. .meteorological-container-title {
  285. margin-top: 18rpx;
  286. &-text {
  287. height: 67rpx;
  288. font-size: 48rpx;
  289. font-family: PingFangSC-Medium, PingFang SC;
  290. font-weight: 500;
  291. color: #FFFFFF;
  292. line-height: 67rpx;
  293. letter-spacing: 4rpx;
  294. }
  295. }
  296. .meteorological-container-subtitle {
  297. &-text {
  298. text-transform: uppercase;
  299. height: 33rpx;
  300. font-size: 24rpx;
  301. font-family: PingFangSC-Medium, PingFang SC;
  302. font-weight: 500;
  303. color: #FFFFFF;
  304. line-height: 33rpx;
  305. letter-spacing: 2rpx;
  306. }
  307. }
  308. }
  309. }
  310. .meteregula-regulations {
  311. margin-top: 24rpx;
  312. width: 100%;
  313. height: 380rpx;
  314. background-image: url("../../static/agrcloud-images/agrcloud-main-page-regulations-bp.png");
  315. background-size: cover;
  316. background-color: transparent;
  317. background-position: center;
  318. .regulations-container {
  319. padding: 71rpx 40rpx 60rpx;
  320. &-icon {
  321. width: 84rpx;
  322. height: 84rpx;
  323. }
  324. .regulations-container-title {
  325. margin-top: 65rpx;
  326. &-text {
  327. height: 67rpx;
  328. font-size: 48rpx;
  329. font-family: PingFangSC-Medium, PingFang SC;
  330. font-weight: 500;
  331. color: #FFFFFF;
  332. line-height: 67rpx;
  333. letter-spacing: 4rpx;
  334. }
  335. }
  336. .regulations-container-subtitle {
  337. &-text {
  338. text-transform: uppercase;
  339. height: 33rpx;
  340. font-size: 24rpx;
  341. font-family: PingFangSC-Medium, PingFang SC;
  342. font-weight: 500;
  343. color: #FFFFFF;
  344. line-height: 33rpx;
  345. letter-spacing: 2rpx;
  346. }
  347. }
  348. }
  349. }
  350. }
  351. .metexpregnotice-expertsnotice {
  352. margin-left: 24rpx;
  353. flex: 1;
  354. .expertsnotice-experts {
  355. width: 100%;
  356. height: 380rpx;
  357. background-image: url("../../static/agrcloud-images/agrcloud-main-page-experts-bg.png");
  358. background-size: cover;
  359. background-color: transparent;
  360. background-position: center;
  361. .experts-container {
  362. padding: 78rpx 40rpx 60rpx;
  363. &-icon {
  364. width: 84rpx;
  365. height: 84rpx;
  366. }
  367. .experts-container-title {
  368. margin-top: 58rpx;
  369. &-text {
  370. height: 67rpx;
  371. font-size: 48rpx;
  372. font-family: PingFangSC-Medium, PingFang SC;
  373. font-weight: 500;
  374. color: #FFFFFF;
  375. line-height: 67rpx;
  376. letter-spacing: 4rpx;
  377. }
  378. }
  379. .experts-container-subtitle {
  380. &-text {
  381. text-transform: uppercase;
  382. height: 33rpx;
  383. font-size: 24rpx;
  384. font-family: PingFangSC-Medium, PingFang SC;
  385. font-weight: 500;
  386. color: #FFFFFF;
  387. line-height: 33rpx;
  388. letter-spacing: 2rpx;
  389. }
  390. }
  391. }
  392. }
  393. .expertsnotice-notice {
  394. margin-top: 24rpx;
  395. width: 100%;
  396. height: 260rpx;
  397. background-image: url("../../static/agrcloud-images/agrcloud-main-page-notice-bp.png");
  398. background-size: cover;
  399. background-color: transparent;
  400. background-position: center;
  401. .notice-container {
  402. padding: 32rpx 40rpx 26rpx;
  403. &-icon {
  404. width: 84rpx;
  405. height: 84rpx;
  406. }
  407. .notice-container-title {
  408. margin-top: 18rpx;
  409. &-text {
  410. height: 67rpx;
  411. font-size: 48rpx;
  412. font-family: PingFangSC-Medium, PingFang SC;
  413. font-weight: 500;
  414. color: #FFFFFF;
  415. line-height: 67rpx;
  416. letter-spacing: 4rpx;
  417. }
  418. }
  419. .notice-container-subtitle {
  420. &-text {
  421. text-transform: uppercase;
  422. height: 33rpx;
  423. font-size: 24rpx;
  424. font-family: PingFangSC-Medium, PingFang SC;
  425. font-weight: 500;
  426. color: #FFFFFF;
  427. line-height: 33rpx;
  428. letter-spacing: 2rpx;
  429. }
  430. }
  431. }
  432. }
  433. }
  434. }
  435. }
  436. .main-content-monitoring {
  437. padding-top: 24rpx;
  438. width: 100%;
  439. .content-monitoring {
  440. width: 100%;
  441. height: 240rpx;
  442. background-image: url("../../static/agrcloud-images/agrcloud-main-page-monitoring-bp.png");
  443. background-size: cover;
  444. background-color: transparent;
  445. background-position: center;
  446. .monitoring-container {
  447. padding: 26rpx 40rpx;
  448. &-icon {
  449. width: 84rpx;
  450. height: 84rpx;
  451. }
  452. .monitoring-container-title {
  453. margin-top: 4rpx;
  454. &-text {
  455. height: 67rpx;
  456. font-size: 48rpx;
  457. font-family: PingFangSC-Medium, PingFang SC;
  458. font-weight: 500;
  459. color: #FFFFFF;
  460. line-height: 67rpx;
  461. letter-spacing: 4rpx;
  462. }
  463. }
  464. .monitoring-container-subtitle {
  465. &-text {
  466. text-transform: uppercase;
  467. height: 33rpx;
  468. font-size: 24rpx;
  469. font-family: PingFangSC-Medium, PingFang SC;
  470. font-weight: 500;
  471. color: #FFFFFF;
  472. line-height: 33rpx;
  473. letter-spacing: 2rpx;
  474. }
  475. }
  476. }
  477. }
  478. }
  479. }
  480. }
  481. </style>