index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838
  1. <template>
  2. <view>
  3. <view class="weather">
  4. <image :src="
  5. 'https://webstaticimg.oss-cn-hangzhou.aliyuncs.com/bigdata_app/img/weather/' +
  6. weatherinfo.wea +
  7. '.png'
  8. " mode="" class="weaimg"></image>
  9. <view class="weatext">
  10. <view class="weatext_title">
  11. {{ hello }}
  12. </view>
  13. <view class=""> 欢迎登录云飞智控 </view>
  14. </view>
  15. </view>
  16. <view class="weatherinfo">
  17. <view class="weatherinfo_item">
  18. <image :src="$imageURL+'/bigdata_app/newindex/weizhi.png'" mode="" class="weaimg">
  19. </image>
  20. <view class="textbox">
  21. {{ weatherinfo.district || '-' }}
  22. </view>
  23. </view>
  24. <view class="weatherinfo_item">
  25. <image :src="$imageURL+'/bigdata_app/newindex/wendu.png'" mode="" class="weaimg"></image>
  26. <view class="textbox"> {{ weatherinfo.at || '-' }}℃ </view>
  27. </view>
  28. <view class="weatherinfo_item">
  29. <image :src="$imageURL+'/bigdata_app/newindex/shidu.png'" mode="" class="weaimg"></image>
  30. <view class="textbox"> {{ weatherinfo.ah || '-' }} </view>
  31. </view>
  32. <view class="weatherinfo_item">
  33. <view class="first_item"> PM2.5 </view>
  34. <view class="textbox">
  35. {{ weatherinfo.air_pm25 || '-' }}
  36. </view>
  37. </view>
  38. </view>
  39. <view class="functionbox">
  40. <view class="functionbox_title"> 功能应用 </view>
  41. <view class="functionbox_text">
  42. <view class="functionbox_text_item" v-if="jurisdiction.sqtf" @click="tabfunction(0)">
  43. <image :src="$imageURL+'/bigdata_app/newindex/base.png'" mode="" class="itemimg">
  44. </image>
  45. <view class=""> 四情基地 </view>
  46. </view>
  47. <view class="functionbox_text_item" @click="tabfunction(1)">
  48. <image :src="$imageURL+'/bigdata_app/newindex/worm.png'" mode="" class="itemimg">
  49. </image>
  50. <view class=""> 田间随识 </view>
  51. </view>
  52. <view class="functionbox_text_item" v-if="jurisdiction.zjtf" @click="tabfunction(2)">
  53. <image :src="$imageURL+'/bigdata_app/newindex/knowledge.png'" mode=""
  54. class="itemimg"></image>
  55. <view class=""> 知识百科 </view>
  56. </view>
  57. <view class="functionbox_text_item" @click="tabfunction(3)">
  58. <image :src="$imageURL+'/bigdata_app/newindex/aftersale.png'" mode=""
  59. class="itemimg"></image>
  60. <view class=""> 售后服务 </view>
  61. </view>
  62. </view>
  63. </view>
  64. <view class="facilitybox">
  65. <view class="facilitybox_title"> 系统设备 </view>
  66. <view class="facilitybox_itembox">
  67. <view class="facilitybox_item" v-if="jurisdiction.cbtf" @click="tabequipment('../cb/index/index')">
  68. <image :src="$imageURL+'/bigdata_app/newindex/cb.png'" mode="" class="itemimg">
  69. </image>
  70. <view class=""> 测报系统 </view>
  71. </view>
  72. <view class="facilitybox_item" v-if="jurisdiction.cbyj" @click="tabequipment('../cbqxyj/cbwarn')">
  73. <image :src="$imageURL+'/bigdata_app/newindex/cbyj.png'" mode="" class="itemimg">
  74. </image>
  75. <view class=""> 测报预警 </view>
  76. </view>
  77. <view class="facilitybox_item" v-if="jurisdiction.fztf" @click="tabequipment('../prevention/index')">
  78. <image :src="$imageURL+'/bigdata_app/newindex/fz.png'" mode="" class="itemimg">
  79. </image>
  80. <view class=""> 防治系统 </view>
  81. </view>
  82. <view class="facilitybox_item" v-if="jurisdiction.jktf" @click="tabequipment('../monitor/index')">
  83. <image :src="$imageURL+'/bigdata_app/newindex/jk.png'" mode="" class="itemimg">
  84. </image>
  85. <view class=""> 监控系统 </view>
  86. </view>
  87. <view class="facilitybox_item" v-if="jurisdiction.hjtf" @click="tabequipment('../environment/index')">
  88. <image :src="$imageURL+'/bigdata_app/newindex/hj.png'" mode="" class="itemimg">
  89. </image>
  90. <view class=""> 环境监测 </view>
  91. </view>
  92. <view class="facilitybox_item" v-if="jurisdiction.qxz" @click="tabequipment('../qxzyj/cbwarn', 5)">
  93. <image :src="$imageURL+'/bigdata_app/newindex/qxyj.png'" mode="" class="itemimg">
  94. </image>
  95. <view class=""> 气象预警 </view>
  96. </view>
  97. <view class="facilitybox_item" v-if="jurisdiction.sq" @click="tabequipment('../qxzyj/cbwarn', '15')">
  98. <image :src="$imageURL+'/bigdata_app/newindex/sqyj.png'" mode="" class="itemimg">
  99. </image>
  100. <view class=""> 墒情预警 </view>
  101. </view>
  102. <view class="facilitybox_item" v-if="jurisdiction.ggtf" @click="tabequipment('../irrigate/index')">
  103. <image :src="$imageURL+'/bigdata_app/newindex/guangai.png'" mode="" class="itemimg">
  104. </image>
  105. <view class=""> 智能灌溉 </view>
  106. </view>
  107. <view class="facilitybox_item" v-if="jurisdiction.sbtf"
  108. @click="tabequipment('../equipMange/index/index')">
  109. <image :src="$imageURL+'/bigdata_app/newindex/user.png'" mode="" class="itemimg">
  110. </image>
  111. <view class=""> 用户管理 </view>
  112. </view>
  113. <view class="facilitybox_item" v-if="jurisdiction.sbtf"
  114. @click="tabequipment('../warning/index')">
  115. <image :src="$imageURL+'/bigdata_app/newindex/cb.png'" mode="" class="itemimg">
  116. </image>
  117. <view class=""> 预警列表 </view>
  118. </view>
  119. </view>
  120. </view>
  121. <view class="insectattack">
  122. <view class="insectattack_title" @click="worm">
  123. <view class=""> 虫情百科 </view>
  124. <view class="iconbox">
  125. <u-icon name="arrow-right"></u-icon>
  126. </view>
  127. </view>
  128. </view>
  129. <view class="insectattack">
  130. <view class="insectattack_title" @click="virus">
  131. <view class=""> 病害百科 </view>
  132. <view class="iconbox">
  133. <u-icon name="arrow-right"></u-icon>
  134. </view>
  135. </view>
  136. </view>
  137. </view>
  138. </template>
  139. <script>
  140. export default {
  141. // // 分享给朋友
  142. // onShareAppMessage() {
  143. // return {
  144. // title: '云飞智控', // 分享标题
  145. // path: 'pages/index/index', // 分享路径,通常包含页面参数
  146. // imageUrl: 'http://www.hnyfwlw.com:8006/data/home_logo/log1.jpg', // 分享图片,可选
  147. // success: (res) => {
  148. // // 分享成功回调
  149. // uni.showToast({
  150. // title: '分享成功',
  151. // icon: 'success'
  152. // })
  153. // },
  154. // fail: (err) => {
  155. // // 分享失败回调
  156. // console.log('分享失败', err)
  157. // }
  158. // }
  159. // },
  160. // // 分享到朋友圈(基础库2.11.3+)
  161. // onShareTimeline() {
  162. // return {
  163. // title: '云飞智控', // 分享标题
  164. // query: 'id=123', // 页面参数,不同于分享给朋友的path,这里用query
  165. // imageUrl: 'http://www.hnyfwlw.com:8006/data/home_logo/log1.jpg' // 分享图片,可选
  166. // }
  167. // },
  168. data() {
  169. return {
  170. weatherinfo: {
  171. wea: '晴',
  172. },
  173. hello: '',
  174. jurisdiction: {
  175. cbtf: false,
  176. jktf: false,
  177. hjtf: false,
  178. fztf: false,
  179. sytf: false,
  180. sbtf: false,
  181. sqtf: false,
  182. zjtf: false,
  183. ggtf: false,
  184. qxz: false,
  185. sq: false,
  186. cbyj: false,
  187. },
  188. show: false,
  189. url: '',
  190. loadTF: false
  191. };
  192. },
  193. watch: {
  194. url(news) {
  195. if (news != '') {
  196. uni.pageScrollTo({
  197. scrollTop: 0,
  198. duration: 500,
  199. });
  200. }
  201. },
  202. },
  203. methods: {
  204. moveHandle() {
  205. return;
  206. },
  207. async getcity(lng, lat) {
  208. const res = await this.$myRequest({
  209. url: '/api/api_gateway?method=device.device_manage.weathers',
  210. data: {
  211. lng: lng,
  212. lat: lat,
  213. },
  214. });
  215. // uni.showToast({
  216. // title: JSON.stringify(res[0]),
  217. // duration: 20000,
  218. // icon:'none'
  219. // });
  220. // console.log(res);
  221. this.weatherinfo = res[0];
  222. },
  223. async getUserlogin() {
  224. const res = await this.$myRequest({
  225. url: '/api/api_gateway?method=user.login.user_login_info',
  226. });
  227. // this.jurisdiction = {
  228. // cbtf: false,
  229. // jktf: false,
  230. // hjtf: false,
  231. // fztf: false,
  232. // sytf: false,
  233. // sbtf: false,
  234. // sqtf: false,
  235. // zjtf: false,
  236. // }
  237. uni.setStorage({
  238. key: 'jurisdiction',
  239. data: JSON.stringify(res.children),
  240. });
  241. uni.setStorage({
  242. key: 'myuser_type',
  243. data: JSON.stringify(res.myuser_type),
  244. });
  245. uni.setStorage({
  246. key: 'myuid',
  247. data: JSON.stringify(res.myuid),
  248. });
  249. let QueryPermission = (id) => {
  250. let list = res.children;
  251. for (var i = 0; i < list.length; i++) {
  252. if (list[i].children) {
  253. var data = list[i].children;
  254. for (var j = 0; j < data.length; j++) {
  255. if (data[j].children) {
  256. var item = data[j].children;
  257. for (var k = 0; k < item.length; k++) {
  258. if (item[k].pur_id == id) {
  259. return true;
  260. }
  261. }
  262. }
  263. }
  264. }
  265. }
  266. return false;
  267. };
  268. this.jurisdiction = {
  269. cbtf: false,
  270. jktf: false,
  271. hjtf: false,
  272. fztf: false,
  273. sytf: false,
  274. sbtf: false,
  275. sqtf: false,
  276. zjtf: false,
  277. qxz: QueryPermission(242),
  278. sq: QueryPermission(284),
  279. cbyj: QueryPermission(243),
  280. };
  281. console.log(res.children);
  282. for (var i = 0; i < res.children.length; i++) {
  283. switch (res.children[i].pur_id) {
  284. case 36:
  285. this.jurisdiction.cbtf = true; //"测报系统"
  286. break;
  287. case 42:
  288. this.jurisdiction.jktf = true; //"可视农业"
  289. break;
  290. case 40:
  291. this.jurisdiction.hjtf = true; //"环境监测系统"
  292. break;
  293. case 44:
  294. this.jurisdiction.fztf = true; //"防治系统"
  295. break;
  296. case 58:
  297. this.jurisdiction.sytf = true; //"溯源系统"
  298. break;
  299. case 28:
  300. this.jurisdiction.sbtf = true; //"系统管理"
  301. break;
  302. case 25:
  303. this.jurisdiction.sqtf = true; //"四情基地"
  304. break;
  305. case 124:
  306. this.jurisdiction.zjtf = true; //"专家诊断"
  307. break;
  308. // case "灌溉控制系统":
  309. // this.jurisdiction.sftf = true
  310. // break;
  311. case 202:
  312. this.jurisdiction.ggtf = true; //"灌溉控制系统"
  313. break;
  314. }
  315. }
  316. },
  317. tabfunction(index) {
  318. if (index == 0) {
  319. uni.navigateTo({
  320. url: '../fourBase/index',
  321. });
  322. } else if (index == 1) {
  323. // var that = this
  324. // this.show = true
  325. uni.navigateTo({
  326. url: '/pages/identifyPest/identifyPest',
  327. });
  328. } else if (index == 2) {
  329. uni.navigateTo({
  330. url: '../expertDiagnosis/index',
  331. });
  332. } else if (index == 3) {
  333. uni.navigateTo({
  334. url: '../afterSale/index',
  335. });
  336. }
  337. },
  338. tabequipment(url, type) {
  339. console.log(url);
  340. uni.navigateTo({
  341. url: `${url}${type ? `?typeId=${type}` : ''}`,
  342. });
  343. },
  344. // onok(ev) {
  345. // this.path = this.url;
  346. // console.log(ev);
  347. // this.loadTF = true;
  348. // uni.showLoading({
  349. // mask: true,
  350. // success: function () {
  351. // console.log(999);
  352. // },
  353. // });
  354. // var publiukey = `-----BEGIN PUBLIC KEY-----
  355. // MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC6m92fXUrccS4SoLg4W4jPRNua
  356. // 4BcRk4ldLcqPuQpD2Mds2+hw+Gi+0MUnshF/r/DTcCJgkt7rtoY9EB6/XJ6MFw14
  357. // whhESFie/lZUWRsk8M89Rkr8m5rwmBl+uLAd5LopyshFqKTBXeT2ytHP1JCQLPBO
  358. // 34Fy4/yEz4qEzkzBuwIDAQAB
  359. // -----END PUBLIC KEY-----`;
  360. // var time = +new Date();
  361. // var str2 = 'YuNfEi' + time + 'YuNfEi';
  362. // var pubblicData = jsencrypt.setEncrypt(publiukey, str2);
  363. // if (this.flag == 2) {
  364. // console.log('111');
  365. // // pest.pests.insect_discern 虫害
  366. // uni.uploadFile({
  367. // // url: 'http://dev.hnyfwlw.com/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
  368. // url: 'https://wx.hnyfwlw.com/api/api_gateway?method=pest.pests.insect_discern', //仅为示例,非真实的接口地址
  369. // filePath: ev.path,
  370. // name: 'img_file',
  371. // formData: {
  372. // user: 'test',
  373. // sign: pubblicData,
  374. // },
  375. // success: (uploadFileRes) => {
  376. // this.loadTF = false;
  377. // console.log(JSON.parse(uploadFileRes.data));
  378. // uni.navigateTo({
  379. // url:
  380. // '../disandpests/index?datas=' +
  381. // uploadFileRes.data +
  382. // '&path=' +
  383. // ev.path,
  384. // });
  385. // },
  386. // fail(res) {
  387. // console.log(res);
  388. // },
  389. // });
  390. // } else if (this.flag == 1) {
  391. // //pest.pests.insect_discern病害识别
  392. // // uni.showLoading({
  393. // // title: '加载中'
  394. // // });
  395. // uni.uploadFile({
  396. // // url: 'http://dev.hnyfwlw.com/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
  397. // url: 'https://wx.hnyfwlw.com/api/api_gateway?method=pest.pests.plant_discern', //仅为示例,非真实的接口地址
  398. // filePath: ev.path,
  399. // name: 'img_file',
  400. // formData: {
  401. // user: 'test',
  402. // sign: pubblicData,
  403. // },
  404. // success: (uploadFileRes) => {
  405. // this.loadTF = false;
  406. // console.log(JSON.parse(uploadFileRes.data));
  407. // uni.navigateTo({
  408. // url:
  409. // '../disandpests/index?datas=' +
  410. // uploadFileRes.data +
  411. // '&path=' +
  412. // ev.path,
  413. // });
  414. // },
  415. // });
  416. // }
  417. // this.url = '';
  418. // },
  419. // oncancle() {
  420. // // url设置为空,隐藏控件
  421. // this.url = '';
  422. // },
  423. // confirm() {
  424. // this.flag = 1;
  425. // uni.chooseImage({
  426. // count: 1, //默认9
  427. // // sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
  428. // sourceType: ['camera', 'album'], //从相册选择
  429. // success: (res) => {
  430. // this.url = res.tempFilePaths[0];
  431. // },
  432. // });
  433. // console.log(1);
  434. // },
  435. // cancel() {
  436. // this.flag = 2;
  437. // uni.chooseImage({
  438. // count: 1, //默认9
  439. // // sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
  440. // sourceType: ['camera', 'album'], //从相册选择
  441. // success: (res) => {
  442. // console.log(1);
  443. // this.url = res.tempFilePaths[0];
  444. // },
  445. // });
  446. // },
  447. worm() {
  448. uni.navigateTo({
  449. url: '../expertDiagnosis/wormcase?name=虫情百科',
  450. });
  451. },
  452. virus() {
  453. uni.navigateTo({
  454. url: '../expertDiagnosis/wormcase?name=病害百科',
  455. });
  456. },
  457. introduce(id, title) {
  458. uni.navigateTo({
  459. url: '../expertDiagnosis/introduce?id=' + id + '&title=' + title,
  460. });
  461. },
  462. checkLocationPermission(isTest) {
  463. let session_key = uni.getStorageSync('session_key');
  464. let _this = this;
  465. // 当用户登录之后再弹位置权限框
  466. if (session_key) {
  467. uni.getSetting({
  468. success(res) {
  469. console.log(res);
  470. if (res.authSetting['scope.userLocation']) {
  471. uni.getLocation({
  472. type: 'wgs84 ',
  473. success: (res) => {
  474. // console.log(res, 'loacation');
  475. // uni.showToast({
  476. // title: `${res.longitude}, ${res.longitude}`,
  477. // duration: 20000,
  478. // icon:'none'
  479. // });
  480. _this.getcity(res.longitude, res.latitude);
  481. },
  482. fail(e) {
  483. // uni.showModal({
  484. // title: '提示',
  485. // content: JSON.stringify(e),
  486. // success: function (res) {
  487. // if (res.confirm) {
  488. // console.log('用户点击确定');
  489. // } else if (res.cancel) {
  490. // console.log('用户点击取消');
  491. // }
  492. // }
  493. // });
  494. uni.showToast({
  495. title: '系统未开启定位或未授权微信定位',
  496. duration: 5000,
  497. icon: 'none'
  498. });
  499. }
  500. });
  501. } else {
  502. uni.authorize({
  503. scope: 'scope.userLocation',
  504. success: () => {
  505. // 用户已授权
  506. uni.getLocation({
  507. type: 'wgs84 ',
  508. success: (res) => {
  509. console.log(res, 'loacation');
  510. _this.getcity(res.longitude, res.latitude);
  511. },
  512. });
  513. },
  514. fail: () => {
  515. // 用户拒绝授权,可引导用户至设置页手动开启
  516. if (isTest) {
  517. uni.showModal({
  518. title: '需要授权',
  519. content: '天气功能需要获取您的地理位置,请在设置中打开位置权限',
  520. success: (modalRes) => {
  521. if (modalRes.confirm) {
  522. uni.openSetting()
  523. } else {
  524. uni.showToast({
  525. title: '您拒绝了授权,将无法查看天气信息',
  526. duration: 2000,
  527. icon: 'none'
  528. });
  529. }
  530. },
  531. })
  532. }
  533. },
  534. })
  535. }
  536. }
  537. })
  538. }
  539. }
  540. },
  541. onLoad() {
  542. console.log(this.$imageURL)
  543. var time = new Date();
  544. var hours = time.getHours();
  545. if (hours < 12) {
  546. this.hello = '上午好!';
  547. } else {
  548. this.hello = '下午好!';
  549. }
  550. this.getUserlogin();
  551. this.checkLocationPermission(true); // 首次加载弹框提醒
  552. },
  553. onShow() {
  554. this.loadTF = false;
  555. this.getUserlogin();
  556. this.checkLocationPermission();
  557. },
  558. };
  559. </script>
  560. <style lang="less">
  561. page {
  562. background-image: url(https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newindex/bg.png);
  563. background-size: 100%;
  564. background-repeat: no-repeat;
  565. background-color: #f9f9f9;
  566. }
  567. .weather {
  568. display: flex;
  569. width: 85%;
  570. margin: 0 auto;
  571. padding-top: 40rpx;
  572. .weaimg {
  573. width: 296rpx;
  574. height: 296rpx;
  575. }
  576. .weatext {
  577. width: 300rpx;
  578. text-align: center;
  579. font-size: 36rpx;
  580. color: #fff;
  581. padding-top: 60rpx;
  582. margin-left: 60rpx;
  583. .weatext_title {
  584. font-size: 80rpx;
  585. margin-bottom: 30rpx;
  586. }
  587. }
  588. }
  589. .weatherinfo {
  590. display: flex;
  591. background-color: rgba(255, 255, 255, 0.2);
  592. width: 85%;
  593. margin: 60rpx auto;
  594. padding: 30rpx;
  595. justify-content: space-around;
  596. border-radius: 170rpx;
  597. .weatherinfo_item {
  598. text-align: center;
  599. .first_item {
  600. height: 50rpx;
  601. margin-bottom: 10rpx;
  602. color: #fff;
  603. line-height: 50rpx;
  604. }
  605. .weaimg {
  606. width: 50rpx;
  607. height: 50rpx;
  608. }
  609. .textbox {
  610. text-align: center;
  611. color: #fff;
  612. }
  613. }
  614. }
  615. .functionbox {
  616. width: 85%;
  617. margin: 0 auto;
  618. padding: 30rpx;
  619. // box-sizing: border-box;
  620. background-color: #fff;
  621. border-radius: 30rpx;
  622. .functionbox_title {
  623. padding-left: 20rpx;
  624. font-size: 34rpx;
  625. }
  626. .functionbox_text {
  627. display: flex;
  628. justify-content: space-around;
  629. margin-top: 30rpx;
  630. .functionbox_text_item {
  631. text-align: center;
  632. color: #616666;
  633. .itemimg {
  634. width: 60rpx;
  635. height: 60rpx;
  636. margin-bottom: 20rpx;
  637. }
  638. }
  639. }
  640. }
  641. .facilitybox {
  642. width: 90%;
  643. margin: 0 auto;
  644. padding: 30rpx;
  645. .facilitybox_title {
  646. font-size: 34rpx;
  647. // padding-left: 20rpx;
  648. }
  649. .facilitybox_itembox {
  650. display: flex;
  651. // justify-content: space-around;
  652. flex-wrap: wrap;
  653. margin-top: 30rpx;
  654. .facilitybox_item {
  655. width: 25%;
  656. text-align: center;
  657. color: #616666;
  658. margin-bottom: 20rpx;
  659. .itemimg {
  660. width: 100rpx;
  661. height: 100rpx;
  662. margin-bottom: 20rpx;
  663. }
  664. }
  665. }
  666. }
  667. .insectattack {
  668. width: 90%;
  669. margin: 0 auto;
  670. padding: 30rpx;
  671. .insectattack_title {
  672. font-size: 34rpx;
  673. // padding-left: 20rpx;
  674. display: flex;
  675. justify-content: space-between;
  676. .iconbox {
  677. width: 40rpx;
  678. height: 40rpx;
  679. background-color: #cfd6d6;
  680. color: #909696;
  681. border-radius: 40rpx;
  682. line-height: 40rpx;
  683. text-align: center;
  684. font-size: 20rpx;
  685. }
  686. }
  687. .insectattack_listbox {
  688. // padding: 0 20rpx;
  689. overflow-x: auto;
  690. .insectattack_list {
  691. width: 1104rpx;
  692. display: flex;
  693. margin-top: 30rpx;
  694. flex-wrap: wrap;
  695. .list_box {
  696. // background-color: #f00;
  697. background-size: 100% 100%;
  698. width: 246rpx;
  699. height: 324rpx;
  700. margin-right: 30rpx;
  701. border-radius: 20rpx;
  702. position: relative;
  703. .list_boxbg {
  704. width: 100%;
  705. height: 100%;
  706. position: absolute;
  707. top: 0;
  708. left: 0;
  709. z-index: -1;
  710. .list_boxbg_img {
  711. width: 100%;
  712. height: 100%;
  713. }
  714. }
  715. .list_box_xiang {
  716. width: 95%;
  717. margin-top: 0rpx auto;
  718. display: flex;
  719. justify-content: flex-end;
  720. padding-top: 20rpx;
  721. .list_box_xiang_click {
  722. padding: 8rpx 15rpx;
  723. background-color: rgba(0, 0, 0, 0.2);
  724. color: #fff;
  725. font-size: 20rpx;
  726. border-radius: 52rpx;
  727. }
  728. }
  729. .list_box_info {
  730. width: 90%;
  731. margin: 130rpx auto 0;
  732. height: 120rpx;
  733. border-radius: 10rpx;
  734. background-image: linear-gradient(to right,
  735. #ffffff,
  736. rgba(255, 255, 255, 0.44));
  737. padding: 10rpx;
  738. box-sizing: border-box;
  739. .list_box_info_name {
  740. font-weight: 700;
  741. }
  742. .list_box_info_text {
  743. font-size: 18rpx;
  744. overflow: hidden;
  745. text-overflow: ellipsis;
  746. display: -webkit-box;
  747. -webkit-box-orient: vertical;
  748. -webkit-line-clamp: 2;
  749. }
  750. }
  751. }
  752. // .list_box1 {
  753. // background-image: url(../../static/images/newindex/cao.png);
  754. // }
  755. // .list_box2 {
  756. // background-image: url(../../static/images/newindex/yee.jpg);
  757. // }
  758. // .list_box3 {
  759. // background-image: url(../../static/images/newindex/lingc.jpg);
  760. // }
  761. // .list_box4 {
  762. // background-image: url(../../static/images/newindex/ming.png);
  763. // }
  764. // .list_box5 {
  765. // background-image: url(../../static/images/newindex/mai.png);
  766. // }
  767. // .list_box6 {
  768. // background-image: url(../../static/images/newindex/dadou.jpg)
  769. // }
  770. // .list_box7 {
  771. // background-image: url(../../static/images/newindex/yumi.png);
  772. // }
  773. // .list_box8 {
  774. // background-image: url(../../static/images/newindex/dao.png);
  775. // }
  776. }
  777. }
  778. }
  779. .loading {
  780. position: absolute;
  781. top: 0;
  782. left: 0;
  783. z-index: 100;
  784. width: 100%;
  785. height: 100vh;
  786. background-color: rgba(0, 0, 0, 0.5);
  787. display: flex;
  788. justify-content: center;
  789. align-items: center;
  790. }
  791. </style>