index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911
  1. <template>
  2. <view>
  3. <view class="weather">
  4. <image
  5. :src="
  6. 'https://webstaticimg.oss-cn-hangzhou.aliyuncs.com/bigdata_app/img/weather/' +
  7. weatherinfo.wea +
  8. '.png'
  9. "
  10. mode=""
  11. class="weaimg"
  12. ></image>
  13. <view class="weatext">
  14. <view class="weatext_title">
  15. {{ hello }}
  16. </view>
  17. <view class="">
  18. {{ $isneutral ? '欢迎登录云飞智控' : '欢迎登录柏乡智控' }}
  19. </view>
  20. </view>
  21. </view>
  22. <view class="weatherinfo">
  23. <view class="weatherinfo_item">
  24. <image
  25. src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/weizhi.png"
  26. mode=""
  27. class="weaimg"
  28. ></image>
  29. <view class="textbox">
  30. {{ weatherinfo.district }}
  31. </view>
  32. </view>
  33. <view class="weatherinfo_item">
  34. <image
  35. src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/wendu.png"
  36. mode=""
  37. class="weaimg"
  38. ></image>
  39. <view class="textbox"> {{ weatherinfo.at }}℃ </view>
  40. </view>
  41. <view class="weatherinfo_item">
  42. <image
  43. src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/shidu.png"
  44. mode=""
  45. class="weaimg"
  46. ></image>
  47. <view class="textbox"> {{ weatherinfo.ah }}%RH </view>
  48. </view>
  49. <view class="weatherinfo_item">
  50. <view class="first_item"> PM2.5 </view>
  51. <view class="textbox">
  52. {{ weatherinfo.air_pm25 }}
  53. </view>
  54. </view>
  55. </view>
  56. <view class="functionbox">
  57. <view class="functionbox_title"> 功能应用 </view>
  58. <view class="functionbox_text">
  59. <view
  60. class="functionbox_text_item"
  61. v-if="jurisdiction.sqtf"
  62. @click="tabfunction(0)"
  63. >
  64. <image
  65. src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/base.png"
  66. mode=""
  67. class="itemimg"
  68. >
  69. </image>
  70. <view class=""> 四情基地 </view>
  71. </view>
  72. <view class="functionbox_text_item" @click="tabfunction(1)">
  73. <image
  74. src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/worm.png"
  75. mode=""
  76. class="itemimg"
  77. >
  78. </image>
  79. <view class=""> 病虫识别 </view>
  80. </view>
  81. <view
  82. class="functionbox_text_item"
  83. v-if="jurisdiction.zjtf"
  84. @click="tabfunction(2)"
  85. >
  86. <image
  87. src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/knowledge.png"
  88. mode=""
  89. class="itemimg"
  90. >
  91. </image>
  92. <view class=""> 知识百科 </view>
  93. </view>
  94. <!-- <view class="functionbox_text_item" @click="tabfunction(3)">
  95. <image src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/aftersale.png" mode="" class="itemimg">
  96. </image>
  97. <view class="">
  98. 售后服务
  99. </view>
  100. </view> -->
  101. </view>
  102. </view>
  103. <view class="facilitybox">
  104. <view class="facilitybox_title"> 系统设备 </view>
  105. <view class="facilitybox_itembox">
  106. <view
  107. class="facilitybox_item"
  108. v-if="jurisdiction.cbtf"
  109. @click="tabequipment('../cb/index/index')"
  110. >
  111. <image
  112. src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/cb.png"
  113. mode=""
  114. class="itemimg"
  115. >
  116. </image>
  117. <view class=""> 测报系统 </view>
  118. </view>
  119. <view
  120. class="facilitybox_item"
  121. v-if="$QueryPermission(243)"
  122. @click="tabequipment('../cbqxyj/cbwarn')"
  123. >
  124. <image
  125. src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/cbyj.png"
  126. mode=""
  127. class="itemimg"
  128. >
  129. </image>
  130. <view class=""> 测报预警 </view>
  131. </view>
  132. <view
  133. class="facilitybox_item"
  134. v-if="jurisdiction.fztf"
  135. @click="tabequipment('../prevention/index')"
  136. >
  137. <image
  138. src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/fz.png"
  139. mode=""
  140. class="itemimg"
  141. >
  142. </image>
  143. <view class=""> 防治系统 </view>
  144. </view>
  145. <view
  146. class="facilitybox_item"
  147. v-if="jurisdiction.jktf"
  148. @click="tabequipment('../monitor/index')"
  149. >
  150. <image
  151. src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/jk.png"
  152. mode=""
  153. class="itemimg"
  154. >
  155. </image>
  156. <view class=""> 监控系统 </view>
  157. </view>
  158. <view
  159. class="facilitybox_item"
  160. v-if="jurisdiction.hjtf"
  161. @click="tabequipment('../environment/index')"
  162. >
  163. <image
  164. src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/hj.png"
  165. mode=""
  166. class="itemimg"
  167. >
  168. </image>
  169. <view class=""> 环境监测 </view>
  170. </view>
  171. <view
  172. class="facilitybox_item"
  173. v-if="$QueryPermission(242)"
  174. @click="tabequipment('../qxzyj/cbwarn', '5')"
  175. >
  176. <image
  177. src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/qxyj.png"
  178. mode=""
  179. class="itemimg"
  180. >
  181. </image>
  182. <view class=""> 气象预警 </view>
  183. </view>
  184. <view
  185. class="facilitybox_item"
  186. v-if="$QueryPermission(284)"
  187. @click="tabequipment('../qxzyj/cbwarn', '15')"
  188. >
  189. <image
  190. src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/sqyj.png"
  191. mode=""
  192. class="itemimg"
  193. >
  194. </image>
  195. <view class=""> 墒情预警 </view>
  196. </view>
  197. <!-- <view
  198. class="facilitybox_item"
  199. v-if="jurisdiction.ggtf"
  200. @click="tabequipment('../irrigate/index')"
  201. >
  202. <image
  203. src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/guangai.png"
  204. mode=""
  205. class="itemimg"
  206. >
  207. </image>
  208. <view class=""> 智能灌溉 </view>
  209. </view> -->
  210. <!-- <view
  211. class="facilitybox_item"
  212. v-if="jurisdiction.sbtf"
  213. @click="tabequipment('../equipMange/index/index')"
  214. >
  215. <image
  216. src="http://www.hnyfwlw.com:8006/bigdata_app/newindex/user.png"
  217. mode=""
  218. class="itemimg"
  219. >
  220. </image>
  221. <view class=""> 用户管理 </view>
  222. </view> -->
  223. </view>
  224. </view>
  225. <view class="insectattack">
  226. <view class="insectattack_title" @click="worm">
  227. <view class=""> 虫情百科 </view>
  228. <view class="iconbox">
  229. <u-icon name="arrow-right"></u-icon>
  230. </view>
  231. </view>
  232. <view class="insectattack_listbox">
  233. <view class="insectattack_list">
  234. <view class="list_box list_box1" @click="introduce(79, '虫情百科')">
  235. <view class="list_box_xiang">
  236. <view class="list_box_xiang_click"> 详情 </view>
  237. </view>
  238. <view class="list_box_info">
  239. <view class="list_box_info_name"> 小地老虎 </view>
  240. <view class="list_box_info_text">
  241. 该虫能危害百余种植物,是对农、林木幼苗危害很大的地下害虫,
  242. 在东北主要危害落叶松、红松、水曲柳、核桃楸等苗木
  243. </view>
  244. </view>
  245. </view>
  246. <view class="list_box list_box2" @click="introduce(369, '虫情百科')">
  247. <view class="list_box_xiang">
  248. <view class="list_box_xiang_click"> 详情 </view>
  249. </view>
  250. <view class="list_box_info">
  251. <view class="list_box_info_name"> 草地贪夜蛾 </view>
  252. <view class="list_box_info_text">
  253. 草地贪夜蛾被认为是世界上最具破坏性的害虫之一,其巨大的破坏性主要源于其“贪”的本性——贪吃、贪育、贪婪、广适、耐药。
  254. </view>
  255. </view>
  256. </view>
  257. <view class="list_box list_box3" @click="introduce(6, '虫情百科')">
  258. <view class="list_box_xiang">
  259. <view class="list_box_xiang_click"> 详情 </view>
  260. </view>
  261. <view class="list_box_info">
  262. <view class="list_box_info_name"> 棉铃虫 </view>
  263. <view class="list_box_info_text">
  264. 棉铃虫具有高度多食性,可以为害20余科200多种植物,但比较喜食禾本科、锦葵科、茄科和豆科植物的花蕾和果实等繁殖器官。
  265. </view>
  266. </view>
  267. </view>
  268. <view class="list_box list_box4" @click="introduce(67, '虫情百科')">
  269. <view class="list_box_xiang">
  270. <view class="list_box_xiang_click"> 详情 </view>
  271. </view>
  272. <view class="list_box_info">
  273. <view class="list_box_info_name"> 稻纵卷叶螟 </view>
  274. <view class="list_box_info_text">
  275. 生命潜能强,寿命长,产卵期长,产卵量也多。各代雌、雄蛾比例几乎各占半数。蛾子有强烈的趋荫蔽栖息习性
  276. </view>
  277. </view>
  278. </view>
  279. </view>
  280. </view>
  281. </view>
  282. <view class="insectattack">
  283. <view class="insectattack_title" @click="virus">
  284. <view class=""> 病害百科 </view>
  285. <view class="iconbox">
  286. <u-icon name="arrow-right"></u-icon>
  287. </view>
  288. </view>
  289. <view class="insectattack_listbox">
  290. <view class="insectattack_list">
  291. <view class="list_box list_box5" @click="introduce(267, '病害百科')">
  292. <view class="list_box_xiang">
  293. <view class="list_box_xiang_click"> 详情 </view>
  294. </view>
  295. <view class="list_box_info">
  296. <view class="list_box_info_name"> 小麦赤霉病 </view>
  297. <view class="list_box_info_text">
  298. 小麦赤霉病从苗期到穗期均可发生,引起苗腐、茎基腐、秆腐和穗腐,以穗腐危害最大。湿度大时,病部均可见粉红色霉层。
  299. </view>
  300. </view>
  301. </view>
  302. <view class="list_box list_box6" @click="introduce(320, '病害百科')">
  303. <view class="list_box_xiang">
  304. <view class="list_box_xiang_click"> 详情 </view>
  305. </view>
  306. <view class="list_box_info">
  307. <view class="list_box_info_name"> 大豆根腐病 </view>
  308. <view class="list_box_info_text">
  309. 初期茎基部或胚根表皮出现淡红褐色不规则的小斑,后变红褐色凹陷坏死斑,绕根茎扩展致根皮枯死
  310. </view>
  311. </view>
  312. </view>
  313. <view class="list_box list_box7" @click="introduce(292, '病害百科')">
  314. <view class="list_box_xiang">
  315. <view class="list_box_xiang_click"> 详情 </view>
  316. </view>
  317. <view class="list_box_info">
  318. <view class="list_box_info_name"> 玉米大斑病 </view>
  319. <view class="list_box_info_text">
  320. 玉米大斑病主要为害叶片,严重时也为害叶鞘和苞叶。植株下部叶片先发病,然后向上扩展。
  321. </view>
  322. </view>
  323. </view>
  324. <view class="list_box list_box8" @click="introduce(278, '病害百科')">
  325. <view class="list_box_xiang">
  326. <view class="list_box_xiang_click"> 详情 </view>
  327. </view>
  328. <view class="list_box_info">
  329. <view class="list_box_info_name"> 水稻稻瘟病 </view>
  330. <view class="list_box_info_text">
  331. 发生于三叶前,由种子带菌所致。病苗基部灰黑,上部变褐,卷缩而死,湿度较大时病部产生大量灰黑色霉层。
  332. </view>
  333. </view>
  334. </view>
  335. </view>
  336. </view>
  337. </view>
  338. <u-modal
  339. v-model="show"
  340. :mask-close-able="true"
  341. title=""
  342. :show-cancel-button="true"
  343. confirm-text="拍病害"
  344. cancel-text="拍虫害"
  345. cancel-color="#4BB85F"
  346. content="拍照识别病虫害"
  347. @confirm="confirm"
  348. @cancel="cancel"
  349. ></u-modal>
  350. <kps-image-cutter
  351. @ok="onok"
  352. @cancel="oncancle"
  353. :url="url"
  354. :fixed="false"
  355. :blob="true"
  356. :maxWidth="500"
  357. :maxHeight="380"
  358. :height="380"
  359. ></kps-image-cutter>
  360. <view class="loading" v-if="loadTF" @touchmove.stop.prevent="moveHandle">
  361. <u-loading mode="flower" size="100" :show="true"></u-loading>
  362. </view>
  363. </view>
  364. </template>
  365. <script>
  366. import kpsImageCutter from '@/components/ksp-image-cutter/ksp-image-cutter.vue';
  367. import jsencrypt from '@/components/jsencrypt/jsencrypt.vue';
  368. export default {
  369. components: {
  370. kpsImageCutter,
  371. },
  372. data() {
  373. return {
  374. weatherinfo: {
  375. wea: '晴',
  376. },
  377. hello: '',
  378. jurisdiction: {
  379. cbtf: false,
  380. jktf: false,
  381. hjtf: false,
  382. fztf: false,
  383. sytf: false,
  384. sbtf: false,
  385. sqtf: false,
  386. zjtf: false,
  387. sftf: false,
  388. ggtf: false,
  389. },
  390. show: false,
  391. url: '',
  392. loadTF: false,
  393. };
  394. },
  395. watch: {
  396. url(news) {
  397. if (news != '') {
  398. uni.pageScrollTo({
  399. scrollTop: 0,
  400. duration: 500,
  401. });
  402. }
  403. },
  404. },
  405. methods: {
  406. moveHandle() {
  407. return;
  408. },
  409. async getcity(lng, lat) {
  410. const res = await this.$myRequest({
  411. url: '/api/api_gateway?method=device.device_manage.weathers',
  412. data: {
  413. lng: lng,
  414. lat: lat,
  415. },
  416. });
  417. console.log(res,'------------------- weather info');
  418. this.weatherinfo = res[0];
  419. },
  420. async getUserlogin() {
  421. const res = await this.$myRequest({
  422. url: '/api/api_gateway?method=user.login.user_login_info',
  423. });
  424. uni.setStorage({
  425. key: 'jurisdiction',
  426. data: JSON.stringify(res.children),
  427. });
  428. uni.setStorage({
  429. key: 'myuser_type',
  430. data: JSON.stringify(res.myuser_type),
  431. });
  432. uni.setStorage({
  433. key: 'myuid',
  434. data: JSON.stringify(res.myuid),
  435. });
  436. this.jurisdiction = {
  437. cbtf: false,
  438. jktf: false,
  439. hjtf: false,
  440. fztf: false,
  441. sytf: false,
  442. sbtf: false,
  443. sqtf: false,
  444. zjtf: false,
  445. sftf: false,
  446. ggtf: false,
  447. };
  448. // console.log(res.children)
  449. for (var i = 0; i < res.children.length; i++) {
  450. switch (res.children[i].pur_id) {
  451. case 36:
  452. this.jurisdiction.cbtf = true; //"测报系统"
  453. break;
  454. case 42:
  455. this.jurisdiction.jktf = true; //"可视农业"
  456. break;
  457. case 40:
  458. this.jurisdiction.hjtf = true; //"环境监测系统"
  459. break;
  460. case 44:
  461. this.jurisdiction.fztf = true; //"防治系统"
  462. break;
  463. case 58:
  464. this.jurisdiction.sytf = true; //"溯源系统"
  465. break;
  466. case 28:
  467. this.jurisdiction.sbtf = true; //"系统管理"
  468. break;
  469. case 25:
  470. this.jurisdiction.sqtf = true; //"四情基地"
  471. break;
  472. case 124:
  473. this.jurisdiction.zjtf = true; //"专家诊断"
  474. break;
  475. case 202:
  476. this.jurisdiction.ggtf = true; //"灌溉控制系统"
  477. break;
  478. }
  479. }
  480. },
  481. tabfunction(index) {
  482. if (index == 0) {
  483. uni.navigateTo({
  484. url: '../fourBase/index',
  485. });
  486. } else if (index == 1) {
  487. var that = this;
  488. this.show = true;
  489. } else if (index == 2) {
  490. uni.navigateTo({
  491. url: '../expertDiagnosis/wormcase?name=虫情百科',
  492. });
  493. } else if (index == 3) {
  494. uni.navigateTo({
  495. url: '../afterSale/index',
  496. });
  497. }
  498. },
  499. tabequipment(url, type) {
  500. console.log(url);
  501. uni.navigateTo({
  502. url: `${url}${type ? `?typeId=${type}` : ''}`,
  503. });
  504. },
  505. onok(ev) {
  506. this.path = this.url;
  507. console.log(ev);
  508. this.loadTF = true;
  509. uni.showLoading({
  510. mask: true,
  511. success: function () {
  512. console.log(999);
  513. },
  514. });
  515. // var encrypt = new jsencrypt();
  516. var publiukey = `-----BEGIN PUBLIC KEY-----
  517. MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC6m92fXUrccS4SoLg4W4jPRNua
  518. 4BcRk4ldLcqPuQpD2Mds2+hw+Gi+0MUnshF/r/DTcCJgkt7rtoY9EB6/XJ6MFw14
  519. whhESFie/lZUWRsk8M89Rkr8m5rwmBl+uLAd5LopyshFqKTBXeT2ytHP1JCQLPBO
  520. 34Fy4/yEz4qEzkzBuwIDAQAB
  521. -----END PUBLIC KEY-----`;
  522. var time = +new Date();
  523. var str2 = 'YuNfEi' + time + 'YuNfEi';
  524. var pubblicData = jsencrypt.setEncrypt(publiukey, str2);
  525. // encrypt.setPublicKey(str);
  526. // var time = +new Date();
  527. // var str2 = 'YuNfEi' + time + 'YuNfEi'
  528. // var encrypted = encrypt.encrypt(str2);
  529. console.log(pubblicData);
  530. if (this.flag == 2) {
  531. console.log('111');
  532. // pest.pests.insect_discern 虫害
  533. uni.uploadFile({
  534. // url: 'http://114.115.147.140:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
  535. url: 'http://8.136.98.49:8002/api/api_gateway?method=pest.pests.insect_discern', //仅为示例,非真实的接口地址
  536. filePath: ev.path,
  537. name: 'img_file',
  538. formData: {
  539. user: 'test',
  540. sign: pubblicData,
  541. },
  542. success: (uploadFileRes) => {
  543. console.log(JSON.parse(uploadFileRes.data));
  544. this.loadTF = false;
  545. uni.navigateTo({
  546. url:
  547. '../disandpests/index?datas=' +
  548. uploadFileRes.data +
  549. '&path=' +
  550. ev.path,
  551. });
  552. },
  553. });
  554. } else if (this.flag == 1) {
  555. //pest.pests.insect_discern病害识别
  556. uni.showLoading({
  557. title: '加载中',
  558. });
  559. uni.uploadFile({
  560. // url: 'http://114.115.147.140:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
  561. url: 'http://8.136.98.49:8002/api/api_gateway?method=pest.pests.plant_discern', //仅为示例,非真实的接口地址
  562. filePath: ev.path,
  563. name: 'img_file',
  564. formData: {
  565. user: 'test',
  566. sign: pubblicData,
  567. },
  568. success: (uploadFileRes) => {
  569. console.log(JSON.parse(uploadFileRes.data));
  570. this.loadTF = false;
  571. uni.navigateTo({
  572. url:
  573. '../disandpests/index?datas=' +
  574. uploadFileRes.data +
  575. '&path=' +
  576. ev.path,
  577. });
  578. },
  579. });
  580. }
  581. this.url = '';
  582. },
  583. oncancle() {
  584. // url设置为空,隐藏控件
  585. this.url = '';
  586. },
  587. confirm() {
  588. this.flag = 1;
  589. uni.chooseImage({
  590. count: 1, //默认9
  591. // sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
  592. sourceType: ['camera', 'album'], //从相册选择
  593. success: (res) => {
  594. this.url = res.tempFilePaths[0];
  595. },
  596. });
  597. console.log(1);
  598. },
  599. cancel() {
  600. this.flag = 2;
  601. uni.chooseImage({
  602. count: 1, //默认9
  603. // sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
  604. sourceType: ['camera', 'album'], //从相册选择
  605. success: (res) => {
  606. console.log(1);
  607. this.url = res.tempFilePaths[0];
  608. },
  609. });
  610. },
  611. worm() {
  612. uni.navigateTo({
  613. url: '../expertDiagnosis/wormcase?name=虫情百科',
  614. });
  615. },
  616. virus() {
  617. uni.navigateTo({
  618. url: '../expertDiagnosis/wormcase?name=病害百科',
  619. });
  620. },
  621. introduce(id, title) {
  622. uni.navigateTo({
  623. url: '../expertDiagnosis/introduce?id=' + id + '&title=' + title,
  624. });
  625. },
  626. },
  627. onLoad() {
  628. // console.log(this.$QueryPermission(242))
  629. var time = new Date();
  630. var hours = time.getHours();
  631. if (hours < 12) {
  632. this.hello = '上午好!';
  633. } else {
  634. this.hello = '下午好!';
  635. }
  636. uni.getLocation({
  637. type: 'wgs84 ',
  638. success: (res) => {
  639. this.getcity(res.longitude, res.latitude);
  640. },
  641. });
  642. },
  643. onShow() {
  644. this.loadTF = false;
  645. this.getUserlogin();
  646. },
  647. };
  648. </script>
  649. <style lang="less">
  650. page {
  651. background-image: url(../../static/images/newindex/bg.png);
  652. background-size: 100%;
  653. background-repeat: no-repeat;
  654. background-color: #f9f9f9;
  655. }
  656. .weather {
  657. display: flex;
  658. width: 85%;
  659. margin: 0 auto;
  660. padding-top: 40rpx;
  661. .weaimg {
  662. width: 296rpx;
  663. height: 296rpx;
  664. }
  665. .weatext {
  666. width: 300rpx;
  667. text-align: center;
  668. font-size: 36rpx;
  669. color: #fff;
  670. padding-top: 60rpx;
  671. margin-left: 60rpx;
  672. .weatext_title {
  673. font-size: 80rpx;
  674. margin-bottom: 30rpx;
  675. }
  676. }
  677. }
  678. .weatherinfo {
  679. display: flex;
  680. background-color: rgba(255, 255, 255, 0.2);
  681. width: 85%;
  682. margin: 60rpx auto;
  683. padding: 30rpx;
  684. justify-content: space-around;
  685. border-radius: 170rpx;
  686. .weatherinfo_item {
  687. text-align: center;
  688. .first_item {
  689. height: 50rpx;
  690. margin-bottom: 10rpx;
  691. color: #fff;
  692. line-height: 50rpx;
  693. }
  694. .weaimg {
  695. width: 50rpx;
  696. height: 50rpx;
  697. }
  698. .textbox {
  699. text-align: center;
  700. color: #fff;
  701. }
  702. }
  703. }
  704. .functionbox {
  705. width: 85%;
  706. margin: 0 auto;
  707. padding: 30rpx;
  708. // box-sizing: border-box;
  709. background-color: #fff;
  710. border-radius: 30rpx;
  711. .functionbox_title {
  712. padding-left: 20rpx;
  713. font-size: 34rpx;
  714. }
  715. .functionbox_text {
  716. display: flex;
  717. justify-content: space-around;
  718. margin-top: 30rpx;
  719. .functionbox_text_item {
  720. text-align: center;
  721. color: #616666;
  722. .itemimg {
  723. width: 60rpx;
  724. height: 60rpx;
  725. margin-bottom: 20rpx;
  726. }
  727. }
  728. }
  729. }
  730. .facilitybox {
  731. width: 90%;
  732. margin: 0 auto;
  733. padding: 30rpx;
  734. .facilitybox_title {
  735. font-size: 34rpx;
  736. // padding-left: 20rpx;
  737. }
  738. .facilitybox_itembox {
  739. display: flex;
  740. // justify-content: space-around;
  741. flex-wrap: wrap;
  742. margin-top: 30rpx;
  743. .facilitybox_item {
  744. width: 25%;
  745. text-align: center;
  746. color: #616666;
  747. margin-bottom: 20rpx;
  748. .itemimg {
  749. width: 100rpx;
  750. height: 100rpx;
  751. margin-bottom: 20rpx;
  752. }
  753. }
  754. }
  755. }
  756. .insectattack {
  757. width: 90%;
  758. margin: 0 auto;
  759. padding: 30rpx;
  760. .insectattack_title {
  761. font-size: 34rpx;
  762. // padding-left: 20rpx;
  763. display: flex;
  764. justify-content: space-between;
  765. .iconbox {
  766. width: 40rpx;
  767. height: 40rpx;
  768. background-color: #cfd6d6;
  769. color: #909696;
  770. border-radius: 40rpx;
  771. line-height: 40rpx;
  772. text-align: center;
  773. font-size: 20rpx;
  774. }
  775. }
  776. .insectattack_listbox {
  777. // padding: 0 20rpx;
  778. overflow-x: auto;
  779. .insectattack_list {
  780. width: 1104rpx;
  781. display: flex;
  782. margin-top: 30rpx;
  783. flex-wrap: wrap;
  784. .list_box {
  785. // background-color: #f00;
  786. background-size: 100% 100%;
  787. width: 246rpx;
  788. height: 324rpx;
  789. margin-right: 30rpx;
  790. border-radius: 20rpx;
  791. .list_box_xiang {
  792. width: 95%;
  793. margin-top: 0rpx auto;
  794. display: flex;
  795. justify-content: flex-end;
  796. padding-top: 20rpx;
  797. .list_box_xiang_click {
  798. padding: 8rpx 15rpx;
  799. background-color: rgba(0, 0, 0, 0.2);
  800. color: #fff;
  801. font-size: 20rpx;
  802. border-radius: 52rpx;
  803. }
  804. }
  805. .list_box_info {
  806. width: 90%;
  807. margin: 130rpx auto 0;
  808. height: 120rpx;
  809. border-radius: 10rpx;
  810. background-image: linear-gradient(
  811. to right,
  812. #ffffff,
  813. rgba(255, 255, 255, 0.44)
  814. );
  815. padding: 10rpx;
  816. box-sizing: border-box;
  817. .list_box_info_name {
  818. font-weight: 700;
  819. }
  820. .list_box_info_text {
  821. font-size: 18rpx;
  822. overflow: hidden;
  823. text-overflow: ellipsis;
  824. display: -webkit-box;
  825. -webkit-box-orient: vertical;
  826. -webkit-line-clamp: 2;
  827. }
  828. }
  829. }
  830. .list_box1 {
  831. background-image: url(http://www.hnyfwlw.com:8006/bigdata_app/newindex/cao.png);
  832. }
  833. .list_box2 {
  834. background-image: url(http://www.hnyfwlw.com:8006/bigdata_app/newindex/yee.jpg);
  835. }
  836. .list_box3 {
  837. background-image: url(http://www.hnyfwlw.com:8006/bigdata_app/newindex/lingc.jpg);
  838. }
  839. .list_box4 {
  840. background-image: url(http://www.hnyfwlw.com:8006/bigdata_app/newindex/ming.png);
  841. }
  842. .list_box5 {
  843. background-image: url(http://www.hnyfwlw.com:8006/bigdata_app/newindex/mai.png);
  844. }
  845. .list_box6 {
  846. background-image: url(http://www.hnyfwlw.com:8006/bigdata_app/newindex/dadou.jpg);
  847. }
  848. .list_box7 {
  849. background-image: url(http://www.hnyfwlw.com:8006/bigdata_app/newindex/yumi.png);
  850. }
  851. .list_box8 {
  852. background-image: url(http://www.hnyfwlw.com:8006/bigdata_app/newindex/dao.png);
  853. }
  854. }
  855. }
  856. }
  857. .loading {
  858. position: absolute;
  859. top: 0;
  860. left: 0;
  861. z-index: 100;
  862. width: 100%;
  863. height: 100vh;
  864. background-color: rgba(0, 0, 0, 0.5);
  865. display: flex;
  866. justify-content: center;
  867. align-items: center;
  868. }
  869. </style>