index.vue 26 KB

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