index.vue 23 KB

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