index.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131
  1. <template>
  2. <view class="home">
  3. <view class="welcom">{{ hello }} 欢迎登录</view>
  4. <view class="weather-bg">
  5. <view class="weather-box">
  6. <view class="weather">
  7. <view class="weatext">
  8. <view>今天<span class="text-span">{{weatherinfo.air_level}}</span></view>
  9. <view class="text-value">{{weatherinfo.at}}℃</view>
  10. </view>
  11. <view class="weatext">
  12. <image :src="
  13. 'https://webstaticimg.oss-cn-hangzhou.aliyuncs.com/bigdata_app/img/weather/' +
  14. weatherinfo.wea +
  15. '.png'
  16. " mode="" class="weaimg"></image>
  17. <view class="weatext_title">
  18. {{ weatherinfo.wea }}
  19. </view>
  20. </view>
  21. </view>
  22. <view class="weather">
  23. <view class="weatext">
  24. <view>湿度<span class="text-span">{{weatherinfo.ah | ahFilter}}</span></view>
  25. <view class="text-value">{{weatherinfo.ah}}%</view>
  26. </view>
  27. <view class="weatext">
  28. <view>PM2.5</view>
  29. <view class="textbox">
  30. {{ weatherinfo.air_pm25 }}
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. <view class="weather-warning">
  36. <image class="weather-alert" :src="$imageURL+'/bigdata_app/newImg/home/weather-alert.png'" mode=""></image>
  37. {{weatherinfo.alarm_content}}
  38. </view>
  39. </view>
  40. <view class="ai-box">
  41. <view class="ai-content">
  42. <image :src="$imageURL+'/bigdata_app/newImg/home/ai-bot.png'" class="float-left" mode=""></image>
  43. <view class="ai-text">
  44. <view class="ai-text-title">我是千耘农业种植大模型</view>
  45. <view class="ai-text-subtitle">耕耘千百变,智慧一点通</view>
  46. </view>
  47. <view class="float-right">
  48. 问一问
  49. </view>
  50. </view>
  51. </view>
  52. <view class="functionbox">
  53. <view class="functionbox_text">
  54. <view class="functionbox_text_item" v-if="jurisdiction.sqtf" @click="tabfunction(0)">
  55. <image :src="$imageURL+'/bigdata_app/newImg/home/sqjd.png'" mode="" class="itemimg">
  56. </image>
  57. <view class=""> 四情基地 </view>
  58. </view>
  59. <view class="functionbox_text_item" @click="tabfunction(1)">
  60. <image :src="$imageURL+'/bigdata_app/newImg/home/zngg.png'" mode="" class="itemimg">
  61. </image>
  62. <view class=""> 智能灌溉 </view>
  63. </view>
  64. <view class="functionbox_text_item" v-if="jurisdiction.zjtf" @click="tabfunction(2)">
  65. <image :src="$imageURL+'/bigdata_app/newImg/home/yhgl.png'" mode="" class="itemimg"></image>
  66. <view class=""> 用户管理 </view>
  67. </view>
  68. <view class="functionbox_text_item" @click="tabfunction(3)">
  69. <image :src="$imageURL+'/bigdata_app/newImg/home/shfw.png'" mode="" class="itemimg"></image>
  70. <view class=""> 售后服务 </view>
  71. </view>
  72. <view class="functionbox_text_item" @click="tabfunction(3)">
  73. <image :src="$imageURL+'/bigdata_app/newImg/home/shfw.png'" mode="" class="itemimg"></image>
  74. <view class=""> 售后服务 </view>
  75. </view>
  76. <view class="functionbox_text_item" @click="tabfunction(3)">
  77. <image :src="$imageURL+'/bigdata_app/newImg/home/shfw.png'" mode="" class="itemimg"></image>
  78. <view class=""> 售后服务 </view>
  79. </view>
  80. <view class="functionbox_text_item" @click="tabfunction(3)">
  81. <image :src="$imageURL+'/bigdata_app/newImg/home/shfw.png'" mode="" class="itemimg"></image>
  82. <view class=""> 售后服务 </view>
  83. </view>
  84. </view>
  85. <!-- <swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
  86. :duration="duration">
  87. <swiper-item>
  88. </swiper-item>
  89. <swiper-item>
  90. <view class="swiper-item uni-bg-green">B</view>
  91. </swiper-item>
  92. </swiper> -->
  93. </view>
  94. <view class="facilitybox">
  95. <view class="facilitybox-content">
  96. <view class="facilitybox_title"> 智慧助手 </view>
  97. <view style="display: flex;gap:24rpx;flex-direction: column;">
  98. <view class="facilitybox_itembox">
  99. <view class="facilitybox_item facilitybox-zhuanjia" v-if="jurisdiction.zjtf"
  100. @click="tabfunction(2)">
  101. <image :src="$imageURL+'/bigdata_app/newImg/home/zjhk.png'" mode="" class="itemimg">
  102. </image>
  103. <view class="facilitybox_span">
  104. <text> 专家库 </text>
  105. <view class="text">农业相关博士、教授、研究员</view>
  106. </view>
  107. </view>
  108. <view class="facilitybox_item" style="display: flex; flex-direction: column;gap: 24rpx;">
  109. <view class="facilitybox-suishi"
  110. @click="tabfunction(1)">
  111. <image style="width: 72rpx;height:72rpx;margin-right: 10rpx;"
  112. :src="$imageURL+'/bigdata_app/newImg/home/tjss.png'" mode=""
  113. class="itemimg float-right">
  114. </image>
  115. <view class="facilitybox_span"> 田间随识 </view>
  116. </view>
  117. <view class="facilitybox-bchk"
  118. @click="worm">
  119. <image :src="$imageURL+'/bigdata_app/newImg/home/cshk.png'" mode="" class="itemimg">
  120. </image>
  121. <view style="width: 69%;" class="facilitybox_span"> 病虫草鼠害库 </view>
  122. </view>
  123. </view>
  124. </view>
  125. <view class="facilitybox_itembox">
  126. <view class="facilitybox_item facilitybox-jwjy" v-if="jurisdiction.fztf"
  127. @click="tabequipment('../prevention/index')">
  128. <image :src="$imageURL+'/bigdata_app/newImg/home/jwjy.png'" mode="" class="itemimg">
  129. </image>
  130. <view class="facilitybox_span"> 积温积雨 </view>
  131. </view>
  132. <view class="facilitybox_item facilitybox-jgqs" v-if="jurisdiction.jktf"
  133. @click="tabequipment('../monitor/index')">
  134. <image :src="$imageURL+'/bigdata_app/newImg/home/jgqs.png'" mode="" class="itemimg">
  135. </image>
  136. <view class="facilitybox_span"> 价格趋势 </view>
  137. </view>
  138. </view>
  139. </view>
  140. </view>
  141. <view class="banner-ad">
  142. <view class="ad-text">
  143. <view class="title">
  144. 松墨天牛拍照性诱智能监测
  145. </view>
  146. <view class="sub-title">
  147. AI慧眼识天牛 智守青山护松林
  148. </view>
  149. <view class="btn">
  150. 查看详情
  151. </view>
  152. </view>
  153. </view>
  154. </view>
  155. <!-- <view class="insectattack">
  156. <view class="insectattack_title" @click="worm">
  157. <view class=""> 虫情百科 </view>
  158. <view class="iconbox">
  159. <u-icon name="arrow-right"></u-icon>
  160. </view>
  161. </view>
  162. </view>
  163. <view class="insectattack">
  164. <view class="insectattack_title" @click="virus">
  165. <view class=""> 病害百科 </view>
  166. <view class="iconbox">
  167. <u-icon name="arrow-right"></u-icon>
  168. </view>
  169. </view>
  170. </view> -->
  171. </view>
  172. </template>
  173. <script>
  174. export default {
  175. // // 分享给朋友
  176. // onShareAppMessage() {
  177. // return {
  178. // title: '云飞智控', // 分享标题
  179. // path: 'pages/index/index', // 分享路径,通常包含页面参数
  180. // imageUrl: 'http://www.hnyfwlw.com:8006/data/home_logo/log1.jpg', // 分享图片,可选
  181. // success: (res) => {
  182. // // 分享成功回调
  183. // uni.showToast({
  184. // title: '分享成功',
  185. // icon: 'success'
  186. // })
  187. // },
  188. // fail: (err) => {
  189. // // 分享失败回调
  190. // console.log('分享失败', err)
  191. // }
  192. // }
  193. // },
  194. // // 分享到朋友圈(基础库2.11.3+)
  195. // onShareTimeline() {
  196. // return {
  197. // title: '云飞智控', // 分享标题
  198. // query: 'id=123', // 页面参数,不同于分享给朋友的path,这里用query
  199. // imageUrl: 'http://www.hnyfwlw.com:8006/data/home_logo/log1.jpg' // 分享图片,可选
  200. // }
  201. // },
  202. filters:{
  203. ahFilter(value){
  204. if(value>70){
  205. return"湿润"
  206. }else if(value<30){
  207. return'干燥'
  208. }else{
  209. return'正常'
  210. }
  211. }
  212. },
  213. data() {
  214. return {
  215. indicatorDots: true,
  216. autoplay: false,
  217. interval: 2000,
  218. duration: 500,
  219. weatherinfo: {
  220. wea: '晴',
  221. air_level: '优',
  222. at: '23',
  223. air_pm25: '3',
  224. ah: '56',
  225. alarm_content: '天气警告'
  226. },
  227. hello: '',
  228. jurisdiction: {
  229. cbtf: false,
  230. jktf: false,
  231. hjtf: false,
  232. fztf: false,
  233. sytf: false,
  234. sbtf: false,
  235. sqtf: false,
  236. zjtf: false,
  237. ggtf: false,
  238. qxz: false,
  239. sq: false,
  240. cbyj: false,
  241. },
  242. show: false,
  243. url: '',
  244. loadTF: false
  245. };
  246. },
  247. watch: {
  248. url(news) {
  249. if (news != '') {
  250. uni.pageScrollTo({
  251. scrollTop: 0,
  252. duration: 500,
  253. });
  254. }
  255. },
  256. },
  257. methods: {
  258. moveHandle() {
  259. return;
  260. },
  261. async getcity(lng, lat) {
  262. const res = await this.$myRequest({
  263. url: '/api/api_gateway?method=device.device_manage.weathers',
  264. data: {
  265. lng: lng,
  266. lat: lat,
  267. },
  268. });
  269. this.weatherinfo = res[0];
  270. },
  271. async getUserlogin() {
  272. const res = await this.$myRequest({
  273. url: '/api/api_gateway?method=user.login.user_login_info',
  274. });
  275. // this.jurisdiction = {
  276. // cbtf: false,
  277. // jktf: false,
  278. // hjtf: false,
  279. // fztf: false,
  280. // sytf: false,
  281. // sbtf: false,
  282. // sqtf: false,
  283. // zjtf: false,
  284. // }
  285. uni.setStorage({
  286. key: 'jurisdiction',
  287. data: JSON.stringify(res.children),
  288. });
  289. uni.setStorage({
  290. key: 'myuser_type',
  291. data: JSON.stringify(res.myuser_type),
  292. });
  293. uni.setStorage({
  294. key: 'myuid',
  295. data: JSON.stringify(res.myuid),
  296. });
  297. let QueryPermission = (id) => {
  298. let list = res.children;
  299. for (var i = 0; i < list.length; i++) {
  300. if (list[i].children) {
  301. var data = list[i].children;
  302. for (var j = 0; j < data.length; j++) {
  303. if (data[j].children) {
  304. var item = data[j].children;
  305. for (var k = 0; k < item.length; k++) {
  306. if (item[k].pur_id == id) {
  307. return true;
  308. }
  309. }
  310. }
  311. }
  312. }
  313. }
  314. return false;
  315. };
  316. this.jurisdiction = {
  317. cbtf: false,
  318. jktf: false,
  319. hjtf: false,
  320. fztf: false,
  321. sytf: false,
  322. sbtf: false,
  323. sqtf: false,
  324. zjtf: false,
  325. qxz: QueryPermission(242),
  326. sq: QueryPermission(284),
  327. cbyj: QueryPermission(243),
  328. };
  329. console.log(res.children);
  330. for (var i = 0; i < res.children.length; i++) {
  331. switch (res.children[i].pur_id) {
  332. case 36:
  333. this.jurisdiction.cbtf = true; //"测报系统"
  334. break;
  335. case 42:
  336. this.jurisdiction.jktf = true; //"可视农业"
  337. break;
  338. case 40:
  339. this.jurisdiction.hjtf = true; //"环境监测系统"
  340. break;
  341. case 44:
  342. this.jurisdiction.fztf = true; //"防治系统"
  343. break;
  344. case 58:
  345. this.jurisdiction.sytf = true; //"溯源系统"
  346. break;
  347. case 28:
  348. this.jurisdiction.sbtf = true; //"系统管理"
  349. break;
  350. case 25:
  351. this.jurisdiction.sqtf = true; //"四情基地"
  352. break;
  353. case 124:
  354. this.jurisdiction.zjtf = true; //"专家诊断"
  355. break;
  356. // case "灌溉控制系统":
  357. // this.jurisdiction.sftf = true
  358. // break;
  359. case 202:
  360. this.jurisdiction.ggtf = true; //"灌溉控制系统"
  361. break;
  362. }
  363. }
  364. },
  365. tabfunction(index) {
  366. if (index == 0) {
  367. uni.navigateTo({
  368. url: '../fourBase/index',
  369. });
  370. } else if (index == 1) {
  371. // var that = this
  372. // this.show = true
  373. uni.navigateTo({
  374. url: '/pages/identifyPest/identifyPest',
  375. });
  376. } else if (index == 2) {
  377. uni.navigateTo({
  378. url: '../expertDiagnosis/index',
  379. });
  380. } else if (index == 3) {
  381. uni.navigateTo({
  382. url: '../afterSale/index',
  383. });
  384. }
  385. },
  386. tabequipment(url, type) {
  387. console.log(url);
  388. uni.navigateTo({
  389. url: `${url}${type ? `?typeId=${type}` : ''}`,
  390. });
  391. },
  392. // onok(ev) {
  393. // this.path = this.url;
  394. // console.log(ev);
  395. // this.loadTF = true;
  396. // uni.showLoading({
  397. // mask: true,
  398. // success: function () {
  399. // console.log(999);
  400. // },
  401. // });
  402. // var publiukey = `-----BEGIN PUBLIC KEY-----
  403. // MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC6m92fXUrccS4SoLg4W4jPRNua
  404. // 4BcRk4ldLcqPuQpD2Mds2+hw+Gi+0MUnshF/r/DTcCJgkt7rtoY9EB6/XJ6MFw14
  405. // whhESFie/lZUWRsk8M89Rkr8m5rwmBl+uLAd5LopyshFqKTBXeT2ytHP1JCQLPBO
  406. // 34Fy4/yEz4qEzkzBuwIDAQAB
  407. // -----END PUBLIC KEY-----`;
  408. // var time = +new Date();
  409. // var str2 = 'YuNfEi' + time + 'YuNfEi';
  410. // var pubblicData = jsencrypt.setEncrypt(publiukey, str2);
  411. // if (this.flag == 2) {
  412. // console.log('111');
  413. // // pest.pests.insect_discern 虫害
  414. // uni.uploadFile({
  415. // // url: 'http://dev.hnyfwlw.com/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
  416. // url: 'https://wx.hnyfwlw.com/api/api_gateway?method=pest.pests.insect_discern', //仅为示例,非真实的接口地址
  417. // filePath: ev.path,
  418. // name: 'img_file',
  419. // formData: {
  420. // user: 'test',
  421. // sign: pubblicData,
  422. // },
  423. // success: (uploadFileRes) => {
  424. // this.loadTF = false;
  425. // console.log(JSON.parse(uploadFileRes.data));
  426. // uni.navigateTo({
  427. // url:
  428. // '../disandpests/index?datas=' +
  429. // uploadFileRes.data +
  430. // '&path=' +
  431. // ev.path,
  432. // });
  433. // },
  434. // fail(res) {
  435. // console.log(res);
  436. // },
  437. // });
  438. // } else if (this.flag == 1) {
  439. // //pest.pests.insect_discern病害识别
  440. // // uni.showLoading({
  441. // // title: '加载中'
  442. // // });
  443. // uni.uploadFile({
  444. // // url: 'http://dev.hnyfwlw.com/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
  445. // url: 'https://wx.hnyfwlw.com/api/api_gateway?method=pest.pests.plant_discern', //仅为示例,非真实的接口地址
  446. // filePath: ev.path,
  447. // name: 'img_file',
  448. // formData: {
  449. // user: 'test',
  450. // sign: pubblicData,
  451. // },
  452. // success: (uploadFileRes) => {
  453. // this.loadTF = false;
  454. // console.log(JSON.parse(uploadFileRes.data));
  455. // uni.navigateTo({
  456. // url:
  457. // '../disandpests/index?datas=' +
  458. // uploadFileRes.data +
  459. // '&path=' +
  460. // ev.path,
  461. // });
  462. // },
  463. // });
  464. // }
  465. // this.url = '';
  466. // },
  467. // oncancle() {
  468. // // url设置为空,隐藏控件
  469. // this.url = '';
  470. // },
  471. // confirm() {
  472. // this.flag = 1;
  473. // uni.chooseImage({
  474. // count: 1, //默认9
  475. // // sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
  476. // sourceType: ['camera', 'album'], //从相册选择
  477. // success: (res) => {
  478. // this.url = res.tempFilePaths[0];
  479. // },
  480. // });
  481. // console.log(1);
  482. // },
  483. // cancel() {
  484. // this.flag = 2;
  485. // uni.chooseImage({
  486. // count: 1, //默认9
  487. // // sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
  488. // sourceType: ['camera', 'album'], //从相册选择
  489. // success: (res) => {
  490. // console.log(1);
  491. // this.url = res.tempFilePaths[0];
  492. // },
  493. // });
  494. // },
  495. worm() {
  496. uni.navigateTo({
  497. url: '../expertDiagnosis/wormcase?name=虫情百科',
  498. });
  499. },
  500. virus() {
  501. uni.navigateTo({
  502. url: '../expertDiagnosis/wormcase?name=病害百科',
  503. });
  504. },
  505. introduce(id, title) {
  506. uni.navigateTo({
  507. url: '../expertDiagnosis/introduce?id=' + id + '&title=' + title,
  508. });
  509. },
  510. checkLocationPermission(isTest) {
  511. let session_key = uni.getStorageSync('session_key');
  512. let _this = this;
  513. // 当用户登录之后再弹位置权限框
  514. if (session_key) {
  515. uni.getSetting({
  516. success(res) {
  517. console.log(res);
  518. if (res.authSetting['scope.userLocation']) {
  519. uni.getLocation({
  520. type: 'wgs84 ',
  521. success: (res) => {
  522. // console.log(res, 'loacation');
  523. // uni.showToast({
  524. // title: `${res.longitude}, ${res.longitude}`,
  525. // duration: 20000,
  526. // icon:'none'
  527. // });
  528. _this.getcity(res.longitude, res.latitude);
  529. },
  530. fail(e) {
  531. // uni.showModal({
  532. // title: '提示',
  533. // content: JSON.stringify(e),
  534. // success: function (res) {
  535. // if (res.confirm) {
  536. // console.log('用户点击确定');
  537. // } else if (res.cancel) {
  538. // console.log('用户点击取消');
  539. // }
  540. // }
  541. // });
  542. uni.showToast({
  543. title: '系统未开启定位或未授权微信定位',
  544. duration: 5000,
  545. icon: 'none'
  546. });
  547. }
  548. });
  549. } else {
  550. uni.authorize({
  551. scope: 'scope.userLocation',
  552. success: () => {
  553. // 用户已授权
  554. uni.getLocation({
  555. type: 'wgs84 ',
  556. success: (res) => {
  557. console.log(res, 'loacation');
  558. _this.getcity(res.longitude, res.latitude);
  559. },
  560. });
  561. },
  562. fail: () => {
  563. // 用户拒绝授权,可引导用户至设置页手动开启
  564. if (isTest) {
  565. uni.showModal({
  566. title: '需要授权',
  567. content: '天气功能需要获取您的地理位置,请在设置中打开位置权限',
  568. success: (modalRes) => {
  569. if (modalRes.confirm) {
  570. uni.openSetting()
  571. } else {
  572. uni.showToast({
  573. title: '您拒绝了授权,将无法查看天气信息',
  574. duration: 2000,
  575. icon: 'none'
  576. });
  577. }
  578. },
  579. })
  580. }
  581. },
  582. })
  583. }
  584. }
  585. })
  586. }
  587. }
  588. },
  589. onLoad() {
  590. console.log(this.$imageURL)
  591. var time = new Date();
  592. var hours = time.getHours();
  593. if (hours < 12) {
  594. this.hello = '上午好!';
  595. } else {
  596. this.hello = '下午好!';
  597. }
  598. this.getUserlogin();
  599. this.checkLocationPermission(true); // 首次加载弹框提醒
  600. },
  601. onShow() {
  602. this.loadTF = false;
  603. this.getUserlogin();
  604. this.checkLocationPermission();
  605. },
  606. };
  607. </script>
  608. <style lang="less">
  609. page {
  610. background: linear-gradient(180deg, #1FC676 11.72%, #1FC676 11.52%, #D5F9E7 29.83%, #F5F6FA 36.96%), #FFF;
  611. // background-image: url(https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newindex/bg.png);
  612. // background: linear-gradient(180deg, #1FC676 8.72%, #1FC676 18.52%, #D5F9E7 21.83%, #F5F6FA 25.96%), #FFF;
  613. background-size: 100%;
  614. background-repeat: no-repeat;
  615. background-color: #f9f9f9;
  616. }
  617. .home {
  618. // background: linear-gradient(180deg, #1FC676 8.72%, #1FC676 18.52%, #D5F9E7 21.83%, #F5F6FA 25.96%), #FFF;
  619. width: 100%;
  620. height: 100%;
  621. padding-top: 94rpx;
  622. box-sizing: border-box;
  623. }
  624. .welcom {
  625. height: 64rpx;
  626. line-height: 64rpx;
  627. padding-left: 16rpx;
  628. font-size: 40rpx;
  629. color: #fff;
  630. }
  631. .weather-bg {
  632. width: 100%;
  633. height: 212rpx;
  634. background-image: url(https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/banner-bg.png);
  635. background-size: 100% 100%;
  636. background-repeat: no-repeat;
  637. }
  638. .weather-box {
  639. display: flex;
  640. margin: 24rpx 0 16rpx 0;
  641. }
  642. .weather:nth-child(1) {
  643. border-right: 1px solid rgba(255, 255, 255, 0.6);
  644. }
  645. .weather {
  646. flex: 1;
  647. display: flex;
  648. .weaimg {
  649. width: 42rpx;
  650. height: 42rpx;
  651. }
  652. .weatext {
  653. gap: 8rpx;
  654. flex: 1;
  655. display: flex;
  656. flex-direction: column;
  657. align-items: center;
  658. font-size: 24rpx;
  659. color: rgba(255, 255, 255, 0.8);
  660. }
  661. .weatext_title {
  662. font-size: 24rpx;
  663. color: #fff;
  664. }
  665. .text-span {
  666. color: #0BBC58;
  667. margin-left: 16rpx;
  668. padding: 0 2px;
  669. border-radius: 4px;
  670. background: rgba(255, 255, 255, 0.6);
  671. }
  672. .text-value {
  673. font-size: 48rpx;
  674. color: #fff;
  675. }
  676. }
  677. .weather-warning {
  678. margin: 20rpx 0;
  679. padding: 0 40rpx;
  680. color: #fff;
  681. .weather-alert{
  682. width:30rpx;
  683. height: 30rpx;
  684. margin-right: 10rpx;
  685. }
  686. }
  687. .ai-box {
  688. width: 100%;
  689. padding: 0 40rpx;
  690. box-sizing: border-box;
  691. height: 128rpx;
  692. margin-bottom: 12rpx;
  693. position: relative;
  694. top: -20rpx;
  695. .ai-content {
  696. box-sizing: border-box;
  697. height: 100%;
  698. border-radius: 8px;
  699. border: 1.5px solid #FFF;
  700. background: linear-gradient(180deg, #ffffffa3 0%, #FFF 100%);
  701. padding: 24rpx;
  702. image {
  703. width: 80rpx;
  704. height: 80rpx;
  705. float: left;
  706. margin-right: 16rpx;
  707. }
  708. .float-right {
  709. float: right;
  710. padding: 4px 12px;
  711. color: #fff;
  712. border-radius: 28px;
  713. background: #0BBC58;
  714. margin: 12rpx 0;
  715. }
  716. .ai-text {
  717. float: left;
  718. }
  719. .ai-text-title {
  720. color: #333834;
  721. line-height: 40rpx;
  722. font-size: 28rpx;
  723. font-weight: 700;
  724. }
  725. .ai-text-subtitle {
  726. color: #7b9783;
  727. line-height: 40rpx;
  728. font-size: 20rpx;
  729. font-weight: 400;
  730. }
  731. }
  732. }
  733. .functionbox {
  734. width: 100%;
  735. // height: 240rpx;
  736. padding: 0rpx 32rpx 0 32rpx;
  737. box-sizing: border-box;
  738. margin-bottom: 16rpx;
  739. .swiper {
  740. height: 208rpx;
  741. }
  742. .functionbox_title {
  743. padding-left: 20rpx;
  744. font-size: 34rpx;
  745. }
  746. .functionbox_text {
  747. display: flex;
  748. flex-wrap: wrap;
  749. // justify-content: space-around;
  750. margin-top: 30rpx;
  751. .functionbox_text_item {
  752. width:20%;
  753. text-align: center;
  754. color: #616666;
  755. font-size: 24rpx;
  756. margin-bottom: 32rpx;
  757. .itemimg {
  758. width: 80rpx;
  759. height: 80rpx;
  760. margin-bottom: 16rpx;
  761. }
  762. }
  763. }
  764. }
  765. .facilitybox {
  766. width: 100%;
  767. padding: 0 32rpx;
  768. box-sizing: border-box;
  769. background: #F5F6FA;
  770. .facilitybox-content {
  771. border-radius: 16rpx;
  772. background: #FFF;
  773. padding: 32rpx;
  774. }
  775. .facilitybox_title {
  776. font-size: 30rpx;
  777. color: #333;
  778. margin-bottom: 24rpx;
  779. // padding-left: 20rpx;
  780. }
  781. .facilitybox_itembox {
  782. display: flex;
  783. gap: 32rpx;
  784. .facilitybox_item {
  785. flex: 1;
  786. color: #616666;
  787. .facilitybox_span {
  788. padding: 16rpx 24rpx;
  789. width: 50%;
  790. color: #0B3F5D;
  791. font-weight: 500;
  792. font-size: 28rpx;
  793. .text {
  794. font-size: 20rpx;
  795. color: #4E916E;
  796. font-weight: 400;
  797. margin-top: 9rpx;
  798. }
  799. }
  800. .itemimg {
  801. width: 90rpx;
  802. height: 90rpx;
  803. float: right;
  804. margin: 7rpx 0;
  805. }
  806. }
  807. .facilitybox-zhuanjia {
  808. border-radius: 8px;
  809. background: linear-gradient(180deg, #D3FBE6 0%, #F5F7FA 100%);
  810. position: relative;
  811. .itemimg {
  812. width: 112rpx;
  813. height: 146rpx;
  814. position: absolute;
  815. bottom: 0;
  816. right: 16rpx;
  817. }
  818. text {
  819. color: #003318;
  820. font-weight: 500;
  821. font-size: 28rpx;
  822. }
  823. }
  824. .facilitybox-suishi {
  825. border-radius: 8px;
  826. background: linear-gradient(180deg, #CAECFF 0%, #F5F7FA 99.89%);
  827. padding: 9rpx 0;
  828. .facilitybox_span {
  829. color: #0B3F5D;
  830. }
  831. }
  832. .facilitybox-bchk {
  833. border-radius: 8px;
  834. background: linear-gradient(180deg, #EEE5F6 0%, #F5F7FA 95.65%);
  835. // height: 102rpx;
  836. padding: 10rpx 0;
  837. .facilitybox_span {
  838. color: #3E2B50;
  839. }
  840. .itemimg {
  841. width: 78rpx;
  842. height: 72rpx;
  843. margin-right: 10rpx;
  844. }
  845. }
  846. .facilitybox-jgqs {
  847. border-radius: 8px;
  848. background: linear-gradient(180deg, #D2E5FF 0%, #F5F7FA 95.65%);
  849. .facilitybox_span {
  850. color: #0D2E5B;
  851. }
  852. }
  853. .facilitybox-jwjy {
  854. border-radius: 8px;
  855. background: linear-gradient(180deg, #FFF4D2 0%, #F5F7FA 95.65%);
  856. .facilitybox_span {
  857. color: #3D4012;
  858. }
  859. }
  860. }
  861. }
  862. .banner-ad {
  863. margin: 32rpx 0;
  864. height: 224rpx;
  865. border-radius: 8px;
  866. background-size: 100% 100%;
  867. background-image: url(https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/ad-banner.png);
  868. .ad-text{
  869. height: 100%;
  870. display: flex;
  871. flex-direction: column;
  872. justify-content: space-around;
  873. padding: 40rpx;
  874. box-sizing: border-box;
  875. .title{
  876. color: #333333;
  877. font-size: 28rpx;
  878. font-style: normal;
  879. font-weight: 700;
  880. line-height: normal;
  881. }
  882. .sub-title{
  883. color: #666666;
  884. font-size: 20rpx;
  885. font-style: normal;
  886. font-weight: 500;
  887. line-height: normal;
  888. }
  889. .btn{
  890. text-align: center;
  891. width: 112rpx;
  892. color:#fff;
  893. padding: 4px 0px;
  894. font-size: 20rpx;
  895. border-radius: 4px;
  896. background: linear-gradient(106deg, #0BBC58 2.6%, #7CE6FB 86.51%);
  897. }
  898. }
  899. }
  900. .insectattack {
  901. width: 90%;
  902. margin: 0 auto;
  903. padding: 30rpx;
  904. .insectattack_title {
  905. font-size: 34rpx;
  906. // padding-left: 20rpx;
  907. display: flex;
  908. justify-content: space-between;
  909. .iconbox {
  910. width: 40rpx;
  911. height: 40rpx;
  912. background-color: #cfd6d6;
  913. color: #909696;
  914. border-radius: 40rpx;
  915. line-height: 40rpx;
  916. text-align: center;
  917. font-size: 20rpx;
  918. }
  919. }
  920. .insectattack_listbox {
  921. // padding: 0 20rpx;
  922. overflow-x: auto;
  923. .insectattack_list {
  924. width: 1104rpx;
  925. display: flex;
  926. margin-top: 30rpx;
  927. flex-wrap: wrap;
  928. .list_box {
  929. // background-color: #f00;
  930. background-size: 100% 100%;
  931. width: 246rpx;
  932. height: 324rpx;
  933. margin-right: 30rpx;
  934. border-radius: 20rpx;
  935. position: relative;
  936. .list_boxbg {
  937. width: 100%;
  938. height: 100%;
  939. position: absolute;
  940. top: 0;
  941. left: 0;
  942. z-index: -1;
  943. .list_boxbg_img {
  944. width: 100%;
  945. height: 100%;
  946. }
  947. }
  948. .list_box_xiang {
  949. width: 95%;
  950. margin-top: 0rpx auto;
  951. display: flex;
  952. justify-content: flex-end;
  953. padding-top: 20rpx;
  954. .list_box_xiang_click {
  955. padding: 8rpx 15rpx;
  956. background-color: rgba(0, 0, 0, 0.2);
  957. color: #fff;
  958. font-size: 20rpx;
  959. border-radius: 52rpx;
  960. }
  961. }
  962. .list_box_info {
  963. width: 90%;
  964. margin: 130rpx auto 0;
  965. height: 120rpx;
  966. border-radius: 10rpx;
  967. background-image: linear-gradient(to right,
  968. #ffffff,
  969. rgba(255, 255, 255, 0.44));
  970. padding: 10rpx;
  971. box-sizing: border-box;
  972. .list_box_info_name {
  973. font-weight: 700;
  974. }
  975. .list_box_info_text {
  976. font-size: 18rpx;
  977. overflow: hidden;
  978. text-overflow: ellipsis;
  979. display: -webkit-box;
  980. -webkit-box-orient: vertical;
  981. -webkit-line-clamp: 2;
  982. }
  983. }
  984. }
  985. // .list_box1 {
  986. // background-image: url(../../static/images/newindex/cao.png);
  987. // }
  988. // .list_box2 {
  989. // background-image: url(../../static/images/newindex/yee.jpg);
  990. // }
  991. // .list_box3 {
  992. // background-image: url(../../static/images/newindex/lingc.jpg);
  993. // }
  994. // .list_box4 {
  995. // background-image: url(../../static/images/newindex/ming.png);
  996. // }
  997. // .list_box5 {
  998. // background-image: url(../../static/images/newindex/mai.png);
  999. // }
  1000. // .list_box6 {
  1001. // background-image: url(../../static/images/newindex/dadou.jpg)
  1002. // }
  1003. // .list_box7 {
  1004. // background-image: url(../../static/images/newindex/yumi.png);
  1005. // }
  1006. // .list_box8 {
  1007. // background-image: url(../../static/images/newindex/dao.png);
  1008. // }
  1009. }
  1010. }
  1011. }
  1012. .loading {
  1013. position: absolute;
  1014. top: 0;
  1015. left: 0;
  1016. z-index: 100;
  1017. width: 100%;
  1018. height: 100vh;
  1019. background-color: rgba(0, 0, 0, 0.5);
  1020. display: flex;
  1021. justify-content: center;
  1022. align-items: center;
  1023. }
  1024. </style>