index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839
  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. method: 'POST',
  227. });
  228. // this.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. // }
  238. uni.setStorage({
  239. key: 'jurisdiction',
  240. data: JSON.stringify(res.children),
  241. });
  242. uni.setStorage({
  243. key: 'myuser_type',
  244. data: JSON.stringify(res.myuser_type),
  245. });
  246. uni.setStorage({
  247. key: 'myuid',
  248. data: JSON.stringify(res.myuid),
  249. });
  250. let QueryPermission = (id) => {
  251. let list = res.children;
  252. for (var i = 0; i < list.length; i++) {
  253. if (list[i].children) {
  254. var data = list[i].children;
  255. for (var j = 0; j < data.length; j++) {
  256. if (data[j].children) {
  257. var item = data[j].children;
  258. for (var k = 0; k < item.length; k++) {
  259. if (item[k].pur_id == id) {
  260. return true;
  261. }
  262. }
  263. }
  264. }
  265. }
  266. }
  267. return false;
  268. };
  269. this.jurisdiction = {
  270. cbtf: false,
  271. jktf: false,
  272. hjtf: false,
  273. fztf: false,
  274. sytf: false,
  275. sbtf: false,
  276. sqtf: false,
  277. zjtf: false,
  278. qxz: QueryPermission(242),
  279. sq: QueryPermission(284),
  280. cbyj: QueryPermission(243),
  281. };
  282. console.log(res.children);
  283. for (var i = 0; i < res.children.length; i++) {
  284. switch (res.children[i].pur_id) {
  285. case 36:
  286. this.jurisdiction.cbtf = true; //"测报系统"
  287. break;
  288. case 42:
  289. this.jurisdiction.jktf = true; //"可视农业"
  290. break;
  291. case 40:
  292. this.jurisdiction.hjtf = true; //"环境监测系统"
  293. break;
  294. case 44:
  295. this.jurisdiction.fztf = true; //"防治系统"
  296. break;
  297. case 58:
  298. this.jurisdiction.sytf = true; //"溯源系统"
  299. break;
  300. case 28:
  301. this.jurisdiction.sbtf = true; //"系统管理"
  302. break;
  303. case 25:
  304. this.jurisdiction.sqtf = true; //"四情基地"
  305. break;
  306. case 124:
  307. this.jurisdiction.zjtf = true; //"专家诊断"
  308. break;
  309. // case "灌溉控制系统":
  310. // this.jurisdiction.sftf = true
  311. // break;
  312. case 202:
  313. this.jurisdiction.ggtf = true; //"灌溉控制系统"
  314. break;
  315. }
  316. }
  317. },
  318. tabfunction(index) {
  319. if (index == 0) {
  320. uni.navigateTo({
  321. url: '../fourBase/index',
  322. });
  323. } else if (index == 1) {
  324. // var that = this
  325. // this.show = true
  326. uni.navigateTo({
  327. url: '/pages/identifyPest/identifyPest',
  328. });
  329. } else if (index == 2) {
  330. uni.navigateTo({
  331. url: '../expertDiagnosis/index',
  332. });
  333. } else if (index == 3) {
  334. uni.navigateTo({
  335. url: '../afterSale/index',
  336. });
  337. }
  338. },
  339. tabequipment(url, type) {
  340. console.log(url);
  341. uni.navigateTo({
  342. url: `${url}${type ? `?typeId=${type}` : ''}`,
  343. });
  344. },
  345. // onok(ev) {
  346. // this.path = this.url;
  347. // console.log(ev);
  348. // this.loadTF = true;
  349. // uni.showLoading({
  350. // mask: true,
  351. // success: function () {
  352. // console.log(999);
  353. // },
  354. // });
  355. // var publiukey = `-----BEGIN PUBLIC KEY-----
  356. // MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC6m92fXUrccS4SoLg4W4jPRNua
  357. // 4BcRk4ldLcqPuQpD2Mds2+hw+Gi+0MUnshF/r/DTcCJgkt7rtoY9EB6/XJ6MFw14
  358. // whhESFie/lZUWRsk8M89Rkr8m5rwmBl+uLAd5LopyshFqKTBXeT2ytHP1JCQLPBO
  359. // 34Fy4/yEz4qEzkzBuwIDAQAB
  360. // -----END PUBLIC KEY-----`;
  361. // var time = +new Date();
  362. // var str2 = 'YuNfEi' + time + 'YuNfEi';
  363. // var pubblicData = jsencrypt.setEncrypt(publiukey, str2);
  364. // if (this.flag == 2) {
  365. // console.log('111');
  366. // // pest.pests.insect_discern 虫害
  367. // uni.uploadFile({
  368. // // url: 'http://dev.hnyfwlw.com/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
  369. // url: 'https://wx.hnyfwlw.com/api/api_gateway?method=pest.pests.insect_discern', //仅为示例,非真实的接口地址
  370. // filePath: ev.path,
  371. // name: 'img_file',
  372. // formData: {
  373. // user: 'test',
  374. // sign: pubblicData,
  375. // },
  376. // success: (uploadFileRes) => {
  377. // this.loadTF = false;
  378. // console.log(JSON.parse(uploadFileRes.data));
  379. // uni.navigateTo({
  380. // url:
  381. // '../disandpests/index?datas=' +
  382. // uploadFileRes.data +
  383. // '&path=' +
  384. // ev.path,
  385. // });
  386. // },
  387. // fail(res) {
  388. // console.log(res);
  389. // },
  390. // });
  391. // } else if (this.flag == 1) {
  392. // //pest.pests.insect_discern病害识别
  393. // // uni.showLoading({
  394. // // title: '加载中'
  395. // // });
  396. // uni.uploadFile({
  397. // // url: 'http://dev.hnyfwlw.com/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
  398. // url: 'https://wx.hnyfwlw.com/api/api_gateway?method=pest.pests.plant_discern', //仅为示例,非真实的接口地址
  399. // filePath: ev.path,
  400. // name: 'img_file',
  401. // formData: {
  402. // user: 'test',
  403. // sign: pubblicData,
  404. // },
  405. // success: (uploadFileRes) => {
  406. // this.loadTF = false;
  407. // console.log(JSON.parse(uploadFileRes.data));
  408. // uni.navigateTo({
  409. // url:
  410. // '../disandpests/index?datas=' +
  411. // uploadFileRes.data +
  412. // '&path=' +
  413. // ev.path,
  414. // });
  415. // },
  416. // });
  417. // }
  418. // this.url = '';
  419. // },
  420. // oncancle() {
  421. // // url设置为空,隐藏控件
  422. // this.url = '';
  423. // },
  424. // confirm() {
  425. // this.flag = 1;
  426. // uni.chooseImage({
  427. // count: 1, //默认9
  428. // // sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
  429. // sourceType: ['camera', 'album'], //从相册选择
  430. // success: (res) => {
  431. // this.url = res.tempFilePaths[0];
  432. // },
  433. // });
  434. // console.log(1);
  435. // },
  436. // cancel() {
  437. // this.flag = 2;
  438. // uni.chooseImage({
  439. // count: 1, //默认9
  440. // // sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
  441. // sourceType: ['camera', 'album'], //从相册选择
  442. // success: (res) => {
  443. // console.log(1);
  444. // this.url = res.tempFilePaths[0];
  445. // },
  446. // });
  447. // },
  448. worm() {
  449. uni.navigateTo({
  450. url: '../expertDiagnosis/wormcase?name=虫情百科',
  451. });
  452. },
  453. virus() {
  454. uni.navigateTo({
  455. url: '../expertDiagnosis/wormcase?name=病害百科',
  456. });
  457. },
  458. introduce(id, title) {
  459. uni.navigateTo({
  460. url: '../expertDiagnosis/introduce?id=' + id + '&title=' + title,
  461. });
  462. },
  463. checkLocationPermission(isTest) {
  464. let session_key = uni.getStorageSync('session_key');
  465. let _this = this;
  466. // 当用户登录之后再弹位置权限框
  467. if (session_key) {
  468. uni.getSetting({
  469. success(res) {
  470. console.log(res);
  471. if (res.authSetting['scope.userLocation']) {
  472. uni.getLocation({
  473. type: 'wgs84 ',
  474. success: (res) => {
  475. // console.log(res, 'loacation');
  476. // uni.showToast({
  477. // title: `${res.longitude}, ${res.longitude}`,
  478. // duration: 20000,
  479. // icon:'none'
  480. // });
  481. _this.getcity(res.longitude, res.latitude);
  482. },
  483. fail(e) {
  484. // uni.showModal({
  485. // title: '提示',
  486. // content: JSON.stringify(e),
  487. // success: function (res) {
  488. // if (res.confirm) {
  489. // console.log('用户点击确定');
  490. // } else if (res.cancel) {
  491. // console.log('用户点击取消');
  492. // }
  493. // }
  494. // });
  495. uni.showToast({
  496. title: '系统未开启定位或未授权微信定位',
  497. duration: 5000,
  498. icon: 'none'
  499. });
  500. }
  501. });
  502. } else {
  503. uni.authorize({
  504. scope: 'scope.userLocation',
  505. success: () => {
  506. // 用户已授权
  507. uni.getLocation({
  508. type: 'wgs84 ',
  509. success: (res) => {
  510. console.log(res, 'loacation');
  511. _this.getcity(res.longitude, res.latitude);
  512. },
  513. });
  514. },
  515. fail: () => {
  516. // 用户拒绝授权,可引导用户至设置页手动开启
  517. if (isTest) {
  518. uni.showModal({
  519. title: '需要授权',
  520. content: '天气功能需要获取您的地理位置,请在设置中打开位置权限',
  521. success: (modalRes) => {
  522. if (modalRes.confirm) {
  523. uni.openSetting()
  524. } else {
  525. uni.showToast({
  526. title: '您拒绝了授权,将无法查看天气信息',
  527. duration: 2000,
  528. icon: 'none'
  529. });
  530. }
  531. },
  532. })
  533. }
  534. },
  535. })
  536. }
  537. }
  538. })
  539. }
  540. }
  541. },
  542. onLoad() {
  543. console.log(this.$imageURL)
  544. var time = new Date();
  545. var hours = time.getHours();
  546. if (hours < 12) {
  547. this.hello = '上午好!';
  548. } else {
  549. this.hello = '下午好!';
  550. }
  551. this.getUserlogin();
  552. this.checkLocationPermission(true); // 首次加载弹框提醒
  553. },
  554. onShow() {
  555. this.loadTF = false;
  556. this.getUserlogin();
  557. this.checkLocationPermission();
  558. },
  559. };
  560. </script>
  561. <style lang="less">
  562. page {
  563. background-image: url(https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newindex/bg.png);
  564. background-size: 100%;
  565. background-repeat: no-repeat;
  566. background-color: #f9f9f9;
  567. }
  568. .weather {
  569. display: flex;
  570. width: 85%;
  571. margin: 0 auto;
  572. padding-top: 40rpx;
  573. .weaimg {
  574. width: 296rpx;
  575. height: 296rpx;
  576. }
  577. .weatext {
  578. width: 300rpx;
  579. text-align: center;
  580. font-size: 36rpx;
  581. color: #fff;
  582. padding-top: 60rpx;
  583. margin-left: 60rpx;
  584. .weatext_title {
  585. font-size: 80rpx;
  586. margin-bottom: 30rpx;
  587. }
  588. }
  589. }
  590. .weatherinfo {
  591. display: flex;
  592. background-color: rgba(255, 255, 255, 0.2);
  593. width: 85%;
  594. margin: 60rpx auto;
  595. padding: 30rpx;
  596. justify-content: space-around;
  597. border-radius: 170rpx;
  598. .weatherinfo_item {
  599. text-align: center;
  600. .first_item {
  601. height: 50rpx;
  602. margin-bottom: 10rpx;
  603. color: #fff;
  604. line-height: 50rpx;
  605. }
  606. .weaimg {
  607. width: 50rpx;
  608. height: 50rpx;
  609. }
  610. .textbox {
  611. text-align: center;
  612. color: #fff;
  613. }
  614. }
  615. }
  616. .functionbox {
  617. width: 85%;
  618. margin: 0 auto;
  619. padding: 30rpx;
  620. // box-sizing: border-box;
  621. background-color: #fff;
  622. border-radius: 30rpx;
  623. .functionbox_title {
  624. padding-left: 20rpx;
  625. font-size: 34rpx;
  626. }
  627. .functionbox_text {
  628. display: flex;
  629. justify-content: space-around;
  630. margin-top: 30rpx;
  631. .functionbox_text_item {
  632. text-align: center;
  633. color: #616666;
  634. .itemimg {
  635. width: 60rpx;
  636. height: 60rpx;
  637. margin-bottom: 20rpx;
  638. }
  639. }
  640. }
  641. }
  642. .facilitybox {
  643. width: 90%;
  644. margin: 0 auto;
  645. padding: 30rpx;
  646. .facilitybox_title {
  647. font-size: 34rpx;
  648. // padding-left: 20rpx;
  649. }
  650. .facilitybox_itembox {
  651. display: flex;
  652. // justify-content: space-around;
  653. flex-wrap: wrap;
  654. margin-top: 30rpx;
  655. .facilitybox_item {
  656. width: 25%;
  657. text-align: center;
  658. color: #616666;
  659. margin-bottom: 20rpx;
  660. .itemimg {
  661. width: 100rpx;
  662. height: 100rpx;
  663. margin-bottom: 20rpx;
  664. }
  665. }
  666. }
  667. }
  668. .insectattack {
  669. width: 90%;
  670. margin: 0 auto;
  671. padding: 30rpx;
  672. .insectattack_title {
  673. font-size: 34rpx;
  674. // padding-left: 20rpx;
  675. display: flex;
  676. justify-content: space-between;
  677. .iconbox {
  678. width: 40rpx;
  679. height: 40rpx;
  680. background-color: #cfd6d6;
  681. color: #909696;
  682. border-radius: 40rpx;
  683. line-height: 40rpx;
  684. text-align: center;
  685. font-size: 20rpx;
  686. }
  687. }
  688. .insectattack_listbox {
  689. // padding: 0 20rpx;
  690. overflow-x: auto;
  691. .insectattack_list {
  692. width: 1104rpx;
  693. display: flex;
  694. margin-top: 30rpx;
  695. flex-wrap: wrap;
  696. .list_box {
  697. // background-color: #f00;
  698. background-size: 100% 100%;
  699. width: 246rpx;
  700. height: 324rpx;
  701. margin-right: 30rpx;
  702. border-radius: 20rpx;
  703. position: relative;
  704. .list_boxbg {
  705. width: 100%;
  706. height: 100%;
  707. position: absolute;
  708. top: 0;
  709. left: 0;
  710. z-index: -1;
  711. .list_boxbg_img {
  712. width: 100%;
  713. height: 100%;
  714. }
  715. }
  716. .list_box_xiang {
  717. width: 95%;
  718. margin-top: 0rpx auto;
  719. display: flex;
  720. justify-content: flex-end;
  721. padding-top: 20rpx;
  722. .list_box_xiang_click {
  723. padding: 8rpx 15rpx;
  724. background-color: rgba(0, 0, 0, 0.2);
  725. color: #fff;
  726. font-size: 20rpx;
  727. border-radius: 52rpx;
  728. }
  729. }
  730. .list_box_info {
  731. width: 90%;
  732. margin: 130rpx auto 0;
  733. height: 120rpx;
  734. border-radius: 10rpx;
  735. background-image: linear-gradient(to right,
  736. #ffffff,
  737. rgba(255, 255, 255, 0.44));
  738. padding: 10rpx;
  739. box-sizing: border-box;
  740. .list_box_info_name {
  741. font-weight: 700;
  742. }
  743. .list_box_info_text {
  744. font-size: 18rpx;
  745. overflow: hidden;
  746. text-overflow: ellipsis;
  747. display: -webkit-box;
  748. -webkit-box-orient: vertical;
  749. -webkit-line-clamp: 2;
  750. }
  751. }
  752. }
  753. // .list_box1 {
  754. // background-image: url(../../static/images/newindex/cao.png);
  755. // }
  756. // .list_box2 {
  757. // background-image: url(../../static/images/newindex/yee.jpg);
  758. // }
  759. // .list_box3 {
  760. // background-image: url(../../static/images/newindex/lingc.jpg);
  761. // }
  762. // .list_box4 {
  763. // background-image: url(../../static/images/newindex/ming.png);
  764. // }
  765. // .list_box5 {
  766. // background-image: url(../../static/images/newindex/mai.png);
  767. // }
  768. // .list_box6 {
  769. // background-image: url(../../static/images/newindex/dadou.jpg)
  770. // }
  771. // .list_box7 {
  772. // background-image: url(../../static/images/newindex/yumi.png);
  773. // }
  774. // .list_box8 {
  775. // background-image: url(../../static/images/newindex/dao.png);
  776. // }
  777. }
  778. }
  779. }
  780. .loading {
  781. position: absolute;
  782. top: 0;
  783. left: 0;
  784. z-index: 100;
  785. width: 100%;
  786. height: 100vh;
  787. background-color: rgba(0, 0, 0, 0.5);
  788. display: flex;
  789. justify-content: center;
  790. align-items: center;
  791. }
  792. </style>