index.vue 21 KB

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