index.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553
  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. data() {
  151. return {
  152. titleContentList: ['暂无数据!'],
  153. mainNavigateToObj: {
  154. complaints: '/pages/complaints/index',
  155. // meteorological: '/pages/meteorological/index',
  156. regulations: '/pages/regulations/index',
  157. experts: '/pages/experts/index',
  158. notice: '/pages/notice/index',
  159. monitoring: '/pages/monitoring/index'
  160. }
  161. };
  162. },
  163. onLoad() {
  164. // #ifdef H5
  165. this.getMeteorologicalRollData();
  166. // #endif
  167. },
  168. methods: {
  169. handleWarterClick(itemData) {
  170. if (!itemData || !this.mainNavigateToObj[itemData]) {
  171. this.$msgbox('模块建设中...');
  172. return;
  173. }
  174. uni.navigateTo({
  175. url: this.mainNavigateToObj[itemData]
  176. });
  177. },
  178. getMeteorologicalRollData() {
  179. meteorologicalRollData().then(res => {
  180. const rollDataList = res.data || [];
  181. this.titleContentList = (rollDataList.length > 0) ? rollDataList : ['暂无数据!'];
  182. }).catch(err => {
  183. this.titleContentList = ['暂无数据!'];
  184. });
  185. }
  186. }
  187. };
  188. </script>
  189. <style lang="scss"
  190. scoped>
  191. .page-content {
  192. width: 100%;
  193. padding: 0;
  194. &-title {
  195. width: 100%;
  196. background-color: #ffffff;
  197. .content-title {
  198. margin: 0 47rpx 0 54rpx;
  199. .title-logo {
  200. padding-top: 9rpx;
  201. height: 52rpx;
  202. width: 30rpx;
  203. float: left;
  204. }
  205. .weather-densefog {
  206. padding-top: 16rpx;
  207. float: left;
  208. width: 36rpx;
  209. height: 36rpx;
  210. }
  211. .title-text {
  212. width: calc(100% - 36rpx);
  213. }
  214. }
  215. }
  216. .main-content {
  217. padding: 36rpx 24rpx;
  218. width: 100%;
  219. display: flex;
  220. flex-wrap: wrap;
  221. align-items: center;
  222. justify-content: center;
  223. .main-content-complaints {
  224. // width: 702rpx;
  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-top: 26rpx;
  233. // padding-left: 40rpx;
  234. padding: 26rpx 40rpx;
  235. &-icon {
  236. width: 84rpx;
  237. height: 84rpx;
  238. }
  239. .complaints-container-title {
  240. margin-top: 4rpx;
  241. &-text {
  242. height: 67rpx;
  243. font-size: 48rpx;
  244. font-family: PingFangSC-Medium, PingFang SC;
  245. font-weight: 500;
  246. color: #FFFFFF;
  247. line-height: 67rpx;
  248. letter-spacing: 4rpx;
  249. }
  250. }
  251. .complaints-container-subtitle {
  252. &-text {
  253. text-transform: uppercase;
  254. height: 33rpx;
  255. font-size: 24rpx;
  256. font-family: PingFangSC-Medium, PingFang SC;
  257. font-weight: 500;
  258. color: #FFFFFF;
  259. line-height: 33rpx;
  260. letter-spacing: 2rpx;
  261. }
  262. }
  263. }
  264. }
  265. .main-content-metexpregnotice {
  266. width: 100%;
  267. padding-top: 24rpx;
  268. .complaints-metexpregnotice {
  269. width: 100%;
  270. display: flex;
  271. .metexpregnotice-meteregula {
  272. // width: calc(50% - 12rpx);
  273. flex: 1;
  274. /* float: left; */
  275. .meteregula-meteorological {
  276. // width: 338rpx;
  277. width: 100%;
  278. height: 260rpx;
  279. background-image: url("../../static/agrcloud-images/agrcloud-main-page-meteorological-bg.png");
  280. background-size: cover;
  281. background-color: transparent;
  282. background-position: center;
  283. .meteorological-container {
  284. // padding-top: 32rpx;
  285. // padding-left: 40rpx;
  286. padding: 32rpx 40rpx 26rpx;
  287. &-icon {
  288. width: 84rpx;
  289. height: 84rpx;
  290. }
  291. .meteorological-container-title {
  292. margin-top: 18rpx;
  293. &-text {
  294. height: 67rpx;
  295. font-size: 48rpx;
  296. font-family: PingFangSC-Medium, PingFang SC;
  297. font-weight: 500;
  298. color: #FFFFFF;
  299. line-height: 67rpx;
  300. letter-spacing: 4rpx;
  301. }
  302. }
  303. .meteorological-container-subtitle {
  304. &-text {
  305. text-transform: uppercase;
  306. height: 33rpx;
  307. font-size: 24rpx;
  308. font-family: PingFangSC-Medium, PingFang SC;
  309. font-weight: 500;
  310. color: #FFFFFF;
  311. line-height: 33rpx;
  312. letter-spacing: 2rpx;
  313. }
  314. }
  315. }
  316. }
  317. .meteregula-regulations {
  318. margin-top: 24rpx;
  319. // width: 338rpx;
  320. width: 100%;
  321. height: 380rpx;
  322. background-image: url("../../static/agrcloud-images/agrcloud-main-page-regulations-bp.png");
  323. background-size: cover;
  324. background-color: transparent;
  325. background-position: center;
  326. .regulations-container {
  327. // padding-top: 71rpx;
  328. // padding-left: 40rpx;
  329. padding: 71rpx 40rpx 60rpx;
  330. &-icon {
  331. width: 84rpx;
  332. height: 84rpx;
  333. }
  334. .regulations-container-title {
  335. margin-top: 65rpx;
  336. &-text {
  337. height: 67rpx;
  338. font-size: 48rpx;
  339. font-family: PingFangSC-Medium, PingFang SC;
  340. font-weight: 500;
  341. color: #FFFFFF;
  342. line-height: 67rpx;
  343. letter-spacing: 4rpx;
  344. }
  345. }
  346. .regulations-container-subtitle {
  347. &-text {
  348. text-transform: uppercase;
  349. height: 33rpx;
  350. font-size: 24rpx;
  351. font-family: PingFangSC-Medium, PingFang SC;
  352. font-weight: 500;
  353. color: #FFFFFF;
  354. line-height: 33rpx;
  355. letter-spacing: 2rpx;
  356. }
  357. }
  358. }
  359. }
  360. }
  361. .metexpregnotice-expertsnotice {
  362. /* float: left; */
  363. margin-left: 24rpx;
  364. // width: calc(50% - 12rpx);
  365. flex: 1;
  366. .expertsnotice-experts {
  367. // width: 338rpx;
  368. width: 100%;
  369. height: 380rpx;
  370. background-image: url("../../static/agrcloud-images/agrcloud-main-page-experts-bg.png");
  371. background-size: cover;
  372. background-color: transparent;
  373. background-position: center;
  374. .experts-container {
  375. // padding-top: 78rpx;
  376. // padding-left: 40rpx;
  377. padding: 78rpx 40rpx 60rpx;
  378. &-icon {
  379. width: 84rpx;
  380. height: 84rpx;
  381. }
  382. .experts-container-title {
  383. margin-top: 58rpx;
  384. &-text {
  385. height: 67rpx;
  386. font-size: 48rpx;
  387. font-family: PingFangSC-Medium, PingFang SC;
  388. font-weight: 500;
  389. color: #FFFFFF;
  390. line-height: 67rpx;
  391. letter-spacing: 4rpx;
  392. }
  393. }
  394. .experts-container-subtitle {
  395. &-text {
  396. text-transform: uppercase;
  397. height: 33rpx;
  398. font-size: 24rpx;
  399. font-family: PingFangSC-Medium, PingFang SC;
  400. font-weight: 500;
  401. color: #FFFFFF;
  402. line-height: 33rpx;
  403. letter-spacing: 2rpx;
  404. }
  405. }
  406. }
  407. }
  408. .expertsnotice-notice {
  409. margin-top: 24rpx;
  410. // width: 338rpx;
  411. width: 100%;
  412. height: 260rpx;
  413. background-image: url("../../static/agrcloud-images/agrcloud-main-page-notice-bp.png");
  414. background-size: cover;
  415. background-color: transparent;
  416. background-position: center;
  417. .notice-container {
  418. // padding-top: 32rpx;
  419. // padding-left: 40rpx;
  420. padding: 32rpx 40rpx 26rpx;
  421. &-icon {
  422. width: 84rpx;
  423. height: 84rpx;
  424. }
  425. .notice-container-title {
  426. margin-top: 18rpx;
  427. &-text {
  428. height: 67rpx;
  429. font-size: 48rpx;
  430. font-family: PingFangSC-Medium, PingFang SC;
  431. font-weight: 500;
  432. color: #FFFFFF;
  433. line-height: 67rpx;
  434. letter-spacing: 4rpx;
  435. }
  436. }
  437. .notice-container-subtitle {
  438. &-text {
  439. text-transform: uppercase;
  440. height: 33rpx;
  441. font-size: 24rpx;
  442. font-family: PingFangSC-Medium, PingFang SC;
  443. font-weight: 500;
  444. color: #FFFFFF;
  445. line-height: 33rpx;
  446. letter-spacing: 2rpx;
  447. }
  448. }
  449. }
  450. }
  451. }
  452. }
  453. }
  454. .main-content-monitoring {
  455. padding-top: 24rpx;
  456. width: 100%;
  457. .content-monitoring {
  458. // width: 702rpx;
  459. width: 100%;
  460. height: 240rpx;
  461. background-image: url("../../static/agrcloud-images/agrcloud-main-page-monitoring-bp.png");
  462. background-size: cover;
  463. background-color: transparent;
  464. background-position: center;
  465. .monitoring-container {
  466. // padding-top: 26rpx;
  467. // padding-left: 40rpx;
  468. padding: 26rpx 40rpx;
  469. &-icon {
  470. width: 84rpx;
  471. height: 84rpx;
  472. }
  473. .monitoring-container-title {
  474. margin-top: 4rpx;
  475. &-text {
  476. height: 67rpx;
  477. font-size: 48rpx;
  478. font-family: PingFangSC-Medium, PingFang SC;
  479. font-weight: 500;
  480. color: #FFFFFF;
  481. line-height: 67rpx;
  482. letter-spacing: 4rpx;
  483. }
  484. }
  485. .monitoring-container-subtitle {
  486. &-text {
  487. text-transform: uppercase;
  488. height: 33rpx;
  489. font-size: 24rpx;
  490. font-family: PingFangSC-Medium, PingFang SC;
  491. font-weight: 500;
  492. color: #FFFFFF;
  493. line-height: 33rpx;
  494. letter-spacing: 2rpx;
  495. }
  496. }
  497. }
  498. }
  499. }
  500. }
  501. }
  502. </style>