index.vue 19 KB

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