index.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813
  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
  13. v-if="weatherinfo.wea && weatherinfo.wea != '-'"
  14. :src="
  15. 'https://webstaticimg.oss-cn-hangzhou.aliyuncs.com/bigdata_app/img/weather/' +weatherinfo.wea +'.png'
  16. " mode="" class="weaimg"
  17. ></image>
  18. <view class="weatext_title">
  19. {{ weatherinfo.wea }}
  20. </view>
  21. </view>
  22. </view>
  23. <view class="weather">
  24. <view class="weatext">
  25. <view>湿度<span class="text-span">{{weatherinfo.ah | ahFilter}}</span></view>
  26. <view class="text-value">{{weatherinfo.ah}}</view>
  27. </view>
  28. <view class="weatext">
  29. <view>PM2.5</view>
  30. <view class="textbox">
  31. {{ weatherinfo.air_pm25 }}
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="weather-warning" v-if="weatherinfo.alarm_content">
  37. <image class="weather-alert" :src="$imageURL+'/bigdata_app/newImg/home/weather-alert.png'" mode=""></image>
  38. {{weatherinfo.alarm_content}}
  39. </view>
  40. </view>
  41. <view class="ai-box">
  42. <view class="ai-content" @click="tabfunction(4)">
  43. <image :src="$imageURL+'/bigdata_app/newImg/home/ai-bot.png'" class="float-left" mode=""></image>
  44. <view class="ai-text">
  45. <view class="ai-text-title">我是千耘农业种植大模型</view>
  46. <view class="ai-text-subtitle">耕耘千百变,智慧一点通</view>
  47. </view>
  48. <view class="float-right">
  49. 问一问
  50. </view>
  51. </view>
  52. </view>
  53. <view class="functionbox">
  54. <view class="functionbox_text">
  55. <view class="functionbox_text_item" @click="tabfunction(0,item)" v-if="index < 9" v-for="(item,index) in menuList" :key="index">
  56. <image :src="item.app_menu_icon" mode="" class="itemimg">
  57. </image>
  58. <view class="icon_text"> {{ getSlice(item.purview_name) }} </view>
  59. </view>
  60. <view class="functionbox_text_item" @click="tabfunction(9)" v-if="menuList.length >= 9">
  61. <image :src="$imageURL+'/bigdata_app/newImg/home/moreIcon.png'" mode="" class="itemimg"></image>
  62. <view class=""> 更多功能 </view>
  63. </view>
  64. </view>
  65. </view>
  66. <view class="facilitybox">
  67. <view class="facilitybox-content">
  68. <view class="facilitybox_title"> 智慧助手 </view>
  69. <view style="display: flex;flex-direction: column;">
  70. <view class="facilitybox_itembox">
  71. <view class="facilitybox_item facilitybox-zhuanjia"
  72. @click="tabfunction(2)">
  73. <image :src="$imageURL+'/bigdata_app/newImg/home/zjhk.png'" mode="" class="itemimg">
  74. </image>
  75. <view class="facilitybox_span">
  76. <text style="font-weight:700"> 专家库 </text>
  77. <view class="text">农业相关博士、教授、研究员</view>
  78. </view>
  79. </view>
  80. <view class="facilitybox_item" style="display: flex; flex-direction: column;gap: 24rpx;">
  81. <view class="facilitybox-suishi"
  82. @click="tabfunction(1)">
  83. <image style="width: 72rpx;height:72rpx;margin-right: 10rpx;"
  84. :src="$imageURL+'/bigdata_app/newImg/home/tjss.png'" mode=""
  85. class="itemimg float-right">
  86. </image>
  87. <view class="facilitybox_span"> 田间随识 </view>
  88. </view>
  89. <view class="facilitybox-bchk"
  90. @click="worm">
  91. <image :src="$imageURL+'/bigdata_app/newImg/home/cshk.png'" mode="" class="itemimg">
  92. </image>
  93. <view style="width: 69%;" class="facilitybox_span"> 病虫草鼠害库 </view>
  94. </view>
  95. </view>
  96. </view>
  97. <!-- <view class="facilitybox_itembox">
  98. <view class="facilitybox_item facilitybox-jwjy"
  99. @click="tabequipment('../prevention/index')">
  100. <image :src="$imageURL+'/bigdata_app/newImg/home/jwjy.png'" mode="" class="itemimg">
  101. </image>
  102. <view class="facilitybox_span"> 积温积雨 </view>
  103. </view>
  104. <view class="facilitybox_item facilitybox-jgqs"
  105. @click="tabequipment('../monitor/index')">
  106. <image :src="$imageURL+'/bigdata_app/newImg/home/jgqs.png'" mode="" class="itemimg">
  107. </image>
  108. <view class="facilitybox_span"> 价格趋势 </view>
  109. </view>
  110. </view> -->
  111. </view>
  112. </view>
  113. <view class="banner-ad">
  114. <view class="ad-text">
  115. <view class="title">
  116. <!-- 松墨天牛拍照性诱智能监测 -->
  117. </view>
  118. <view class="sub-title">
  119. <!-- AI慧眼识天牛 智守青山护松林 -->
  120. </view>
  121. <view class="btn" @click="tabs">
  122. 查看详情
  123. </view>
  124. </view>
  125. </view>
  126. </view>
  127. <ImagePopup :imageUrl="popupImageUrl" @close="handlePopupClose" />
  128. </view>
  129. </template>
  130. <script>
  131. import {
  132. Debounce,
  133. } from '../../util/anitthro.js';
  134. import ImagePopup from './components/ImagePopup.vue';
  135. export default {
  136. components: {
  137. ImagePopup,
  138. },
  139. // // 分享给朋友
  140. // onShareAppMessage() {
  141. // return {
  142. // title: '云飞智控', // 分享标题
  143. // path: 'pages/index/index', // 分享路径,通常包含页面参数
  144. // imageUrl: 'http://www.hnyfwlw.com:8006/data/home_logo/log1.jpg', // 分享图片,可选
  145. // success: (res) => {
  146. // // 分享成功回调
  147. // uni.showToast({
  148. // title: '分享成功',
  149. // icon: 'success'
  150. // })
  151. // },
  152. // fail: (err) => {
  153. // // 分享失败回调
  154. // console.log('分享失败', err)
  155. // }
  156. // }
  157. // },
  158. // // 分享到朋友圈(基础库2.11.3+)
  159. // onShareTimeline() {
  160. // return {
  161. // title: '云飞智控', // 分享标题
  162. // query: 'id=123', // 页面参数,不同于分享给朋友的path,这里用query
  163. // imageUrl: 'http://www.hnyfwlw.com:8006/data/home_logo/log1.jpg' // 分享图片,可选
  164. // }
  165. // },
  166. filters:{
  167. ahFilter(value){
  168. if(value>70){
  169. return"湿润"
  170. }else if(value<30){
  171. return'干燥'
  172. }else{
  173. return'正常'
  174. }
  175. }
  176. },
  177. data() {
  178. return {
  179. menuList:[],
  180. indicatorDots: true,
  181. autoplay: false,
  182. interval: 2000,
  183. duration: 500,
  184. weatherinfo: {
  185. wea: '-',
  186. air_level: '-',
  187. at: '-',
  188. air_pm25: '-',
  189. ah: '-',
  190. alarm_content: ''
  191. },
  192. hello: '',
  193. show: false,
  194. url: '',
  195. loadTF: false,
  196. popupImageUrl: 'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/version/app-version.png'
  197. };
  198. },
  199. watch: {
  200. url(news) {
  201. if (news != '') {
  202. uni.pageScrollTo({
  203. scrollTop: 0,
  204. duration: 500,
  205. });
  206. }
  207. },
  208. },
  209. methods: {
  210. tabs(){
  211. uni.navigateTo({
  212. url: '/pages/banner/index'
  213. })
  214. },
  215. getSlice(name){
  216. return name.slice(0,4)
  217. },
  218. async getcity(lng, lat) {
  219. const res = await this.$myRequest({
  220. url: '/api/api_gateway?method=device.device_manage.weathers',
  221. data: {
  222. lng: lng,
  223. lat: lat,
  224. },
  225. });
  226. this.weatherinfo = res[0];
  227. },
  228. async getUserlogin() {
  229. const res = await this.$myRequest({
  230. url: '/api/api_gateway?method=user.login.user_login_info',
  231. data: {
  232. is_app: 1,
  233. }
  234. });
  235. const menuList = [];
  236. res.forEach(item =>{
  237. if(item.children){
  238. menuList.push(...item.children);
  239. }
  240. })
  241. const children = [];
  242. menuList.forEach(item =>{
  243. if(item.children){
  244. children.push(...item.children);
  245. }
  246. })
  247. const myuser_type = res[0]?.myuser_type || ''
  248. const myuid = res[0]?.myuid || ''
  249. uni.setStorage({
  250. key: 'jurisdiction',
  251. data: JSON.stringify(children),
  252. });
  253. uni.setStorage({
  254. key: 'myuser_type',
  255. data: JSON.stringify(myuser_type),
  256. });
  257. uni.setStorage({
  258. key: 'myuid',
  259. data: JSON.stringify(myuid),
  260. });
  261. this.menuList = menuList || [];
  262. },
  263. tabfunction(index,item) {
  264. const purId = item?.pur_id || '';
  265. if (purId == 25) {
  266. uni.navigateTo({
  267. url: '/pages/fourBase/index'
  268. })
  269. } else if (purId == 125){
  270. uni.navigateTo({
  271. url: '/pages/expertDiagnosis/index'
  272. })
  273. } else if (purId == 126) {
  274. uni.navigateTo({
  275. url: '/pages/expertDiagnosis/wormcase?name=虫情百科'
  276. })
  277. } else if (purId == 29) {
  278. uni.navigateTo({
  279. url: '/pages/equipMange/index/index'
  280. })
  281. } else if (purId == 156) {
  282. uni.navigateTo({
  283. url: '/pages/afterSale/index'
  284. })
  285. } else if (purId == 422) {
  286. uni.navigateTo({
  287. url: '/pages/warning/index'
  288. })
  289. } else if (index == 0) {
  290. uni.switchTab({
  291. url: '/pages/equipList2/index',
  292. success: () => {
  293. setTimeout(() => {
  294. uni.$emit('purId',item.pur_id);
  295. }, 50);
  296. }
  297. });
  298. } else if (index == 1) {
  299. uni.navigateTo({
  300. url: '/pages/identifyPest/identifyPest',
  301. });
  302. } else if (index == 2) {
  303. uni.navigateTo({
  304. url: '../expertDiagnosis/index',
  305. });
  306. } else if (index == 3) {
  307. uni.navigateTo({
  308. url: '../afterSale/index',
  309. });
  310. } else if (index == 4){
  311. uni.navigateTo({
  312. url: '/pages/index/developing',
  313. });
  314. } else if (index == 9) {
  315. uni.navigateTo({
  316. url: '/pages/server/index',
  317. });
  318. }
  319. },
  320. tabequipment(url, type) {
  321. console.log(url);
  322. uni.navigateTo({
  323. url: `${url}${type ? `?typeId=${type}` : ''}`,
  324. });
  325. },
  326. worm() {
  327. uni.navigateTo({
  328. url: '../expertDiagnosis/wormcase?name=虫情百科',
  329. });
  330. },
  331. checkLocationPermission(isTest) {
  332. let session_key = uni.getStorageSync('session_key');
  333. console.log(session_key,'session_key');
  334. let _this = this;
  335. // 当用户登录之后再弹位置权限框
  336. if (session_key) {
  337. uni.getSetting({
  338. success(res) {
  339. console.log(res,'resres');
  340. if (res.authSetting['scope.userLocation']) {
  341. uni.getLocation({
  342. type: 'wgs84 ',
  343. success: (res) => {
  344. Debounce(() => {
  345. _this.getcity(res.longitude, res.latitude);
  346. }, 500)();
  347. },
  348. fail(e) {
  349. uni.showToast({
  350. title: '系统未开启定位或未授权微信定位',
  351. duration: 5000,
  352. icon: 'none'
  353. });
  354. }
  355. });
  356. } else {
  357. uni.authorize({
  358. scope: 'scope.userLocation',
  359. success: () => {
  360. // 用户已授权
  361. uni.getLocation({
  362. type: 'wgs84 ',
  363. success: (res) => {
  364. console.log(res, 'loacation');
  365. Debounce(() => {
  366. _this.getcity(res.longitude, res.latitude);
  367. }, 500)();
  368. },
  369. });
  370. },
  371. fail: () => {
  372. // 用户拒绝授权,可引导用户至设置页手动开启
  373. if (isTest) {
  374. uni.showModal({
  375. title: '需要授权',
  376. content: '天气功能需要获取您的地理位置,请在设置中打开位置权限',
  377. success: (modalRes) => {
  378. if (modalRes.confirm) {
  379. uni.openSetting()
  380. } else {
  381. uni.showToast({
  382. title: '您拒绝了授权,将无法查看天气信息',
  383. duration: 2000,
  384. icon: 'none'
  385. });
  386. }
  387. },
  388. })
  389. }
  390. },
  391. })
  392. }
  393. }
  394. })
  395. }
  396. }
  397. },
  398. onLoad() {
  399. var time = new Date();
  400. var hours = time.getHours();
  401. if (hours < 12) {
  402. this.hello = '上午好!';
  403. } else {
  404. this.hello = '下午好!';
  405. }
  406. Debounce(() => {
  407. this.getUserlogin();
  408. }, 500)();
  409. this.checkLocationPermission(true); // 首次加载弹框提醒
  410. },
  411. onShow() {
  412. this.loadTF = false;
  413. Debounce(() => {
  414. this.getUserlogin();
  415. }, 500)();
  416. this.checkLocationPermission();
  417. },
  418. };
  419. </script>
  420. <style lang="less">
  421. page {
  422. background: linear-gradient(180deg, #1FC676 11.72%, #1FC676 11.52%, #D5F9E7 29.83%, #F5F6FA 36.96%), #FFF;
  423. background-size: 100%;
  424. background-repeat: no-repeat;
  425. background-color: #f9f9f9;
  426. }
  427. .home {
  428. width: 100%;
  429. height: 100%;
  430. padding-top: 94rpx;
  431. box-sizing: border-box;
  432. }
  433. .welcom {
  434. height: 64rpx;
  435. line-height: 64rpx;
  436. padding-left: 16rpx;
  437. font-size: 40rpx;
  438. color: #fff;
  439. }
  440. .weather-bg {
  441. width: 100%;
  442. background-image: url(https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/banner-bg.png);
  443. background-size: 100% 100%;
  444. background-repeat: no-repeat;
  445. }
  446. .weather-box {
  447. display: flex;
  448. margin: 24rpx 0 16rpx 0;
  449. }
  450. .weather:nth-child(1) {
  451. border-right: 1px solid rgba(255, 255, 255, 0.6);
  452. }
  453. .weather {
  454. flex: 1;
  455. display: flex;
  456. .weaimg {
  457. width: 42rpx;
  458. height: 42rpx;
  459. }
  460. .weatext {
  461. gap: 8rpx;
  462. display: flex;
  463. flex-direction: column;
  464. padding-left: 44rpx;
  465. font-size: 24rpx;
  466. color: rgba(255, 255, 255, 0.8);
  467. }
  468. .weatext_title {
  469. font-size: 24rpx;
  470. color: #fff;
  471. }
  472. .text-span {
  473. color: #0BBC58;
  474. margin-left: 16rpx;
  475. padding: 0 2px;
  476. border-radius: 4px;
  477. background: rgba(255, 255, 255, 0.6);
  478. }
  479. .text-value {
  480. font-size: 48rpx;
  481. color: #fff;
  482. }
  483. }
  484. .weather-warning {
  485. margin: 20rpx 0;
  486. padding: 0 40rpx;
  487. color: #fff;
  488. .weather-alert{
  489. width:30rpx;
  490. height: 30rpx;
  491. margin-right: 10rpx;
  492. }
  493. }
  494. .ai-box {
  495. width: 100%;
  496. padding: 0 40rpx;
  497. box-sizing: border-box;
  498. height: 128rpx;
  499. margin-bottom: 12rpx;
  500. position: relative;
  501. .ai-content {
  502. box-sizing: border-box;
  503. height: 100%;
  504. border-radius: 8px;
  505. border: 1.5px solid #FFF;
  506. background: linear-gradient(180deg, #ffffffa3 0%, #FFF 100%);
  507. padding: 24rpx;
  508. image {
  509. width: 80rpx;
  510. height: 80rpx;
  511. float: left;
  512. margin-right: 16rpx;
  513. }
  514. .float-right {
  515. float: right;
  516. padding: 4px 12px;
  517. color: #fff;
  518. border-radius: 28px;
  519. background: #0BBC58;
  520. margin: 12rpx 0;
  521. }
  522. .ai-text {
  523. float: left;
  524. }
  525. .ai-text-title {
  526. color: #333834;
  527. line-height: 40rpx;
  528. font-size: 28rpx;
  529. font-weight: 700;
  530. }
  531. .ai-text-subtitle {
  532. color: #7b9783;
  533. line-height: 40rpx;
  534. font-size: 20rpx;
  535. font-weight: 400;
  536. }
  537. }
  538. }
  539. .functionbox {
  540. width: 100%;
  541. padding: 0rpx 32rpx 0 32rpx;
  542. box-sizing: border-box;
  543. margin-bottom: 16rpx;
  544. .swiper {
  545. height: 208rpx;
  546. }
  547. .functionbox_title {
  548. padding-left: 20rpx;
  549. font-size: 34rpx;
  550. }
  551. .functionbox_text {
  552. display: flex;
  553. flex-wrap: wrap;
  554. margin-top: 30rpx;
  555. .functionbox_text_item {
  556. width:20%;
  557. text-align: center;
  558. color: #616666;
  559. font-size: 24rpx;
  560. margin-bottom: 32rpx;
  561. .itemimg {
  562. width: 80rpx;
  563. height: 80rpx;
  564. margin-bottom: 16rpx;
  565. }
  566. .icon_text{
  567. // 超出隐藏
  568. width:100%;
  569. overflow: hidden;
  570. text-overflow: ellipsis;
  571. white-space: nowrap;
  572. }
  573. }
  574. }
  575. }
  576. .facilitybox {
  577. width: 100%;
  578. padding: 0 32rpx;
  579. box-sizing: border-box;
  580. background: #F5F6FA;
  581. .facilitybox-content {
  582. border-radius: 16rpx;
  583. background: #FFF;
  584. padding: 32rpx;
  585. }
  586. .facilitybox_title {
  587. font-size: 30rpx;
  588. color: #333;
  589. margin-bottom: 24rpx;
  590. font-weight: 700;
  591. }
  592. .facilitybox_itembox {
  593. display: flex;
  594. gap: 32rpx;
  595. .facilitybox_item {
  596. flex: 1;
  597. color: #616666;
  598. .facilitybox_span {
  599. padding: 16rpx 24rpx;
  600. width: 50%;
  601. color: #0B3F5D;
  602. font-weight: 700;
  603. font-size: 28rpx;
  604. .text {
  605. font-size: 20rpx;
  606. color: #4E916E;
  607. font-weight: 400;
  608. margin-top: 9rpx;
  609. }
  610. }
  611. .itemimg {
  612. width: 90rpx;
  613. height: 90rpx;
  614. float: right;
  615. margin: 7rpx 0;
  616. }
  617. }
  618. .facilitybox-zhuanjia {
  619. border-radius: 8px;
  620. background: linear-gradient(180deg, #D3FBE6 0%, #F5F7FA 100%);
  621. position: relative;
  622. .itemimg {
  623. width: 112rpx;
  624. height: 146rpx;
  625. position: absolute;
  626. bottom: 0;
  627. right: 16rpx;
  628. }
  629. text {
  630. color: #003318;
  631. font-weight: 500;
  632. font-size: 28rpx;
  633. }
  634. }
  635. .facilitybox-suishi {
  636. border-radius: 8px;
  637. background: linear-gradient(180deg, #CAECFF 0%, #F5F7FA 99.89%);
  638. padding: 9rpx 0;
  639. .facilitybox_span {
  640. color: #0B3F5D;
  641. }
  642. }
  643. .facilitybox-bchk {
  644. border-radius: 8px;
  645. background: linear-gradient(180deg, #EEE5F6 0%, #F5F7FA 95.65%);
  646. padding: 10rpx 0;
  647. .facilitybox_span {
  648. color: #3E2B50;
  649. }
  650. .itemimg {
  651. width: 78rpx;
  652. height: 72rpx;
  653. margin-right: 10rpx;
  654. }
  655. }
  656. .facilitybox-jgqs {
  657. border-radius: 8px;
  658. background: linear-gradient(180deg, #D2E5FF 0%, #F5F7FA 95.65%);
  659. .facilitybox_span {
  660. color: #0D2E5B;
  661. }
  662. }
  663. .facilitybox-jwjy {
  664. border-radius: 8px;
  665. background: linear-gradient(180deg, #FFF4D2 0%, #F5F7FA 95.65%);
  666. .facilitybox_span {
  667. color: #3D4012;
  668. }
  669. }
  670. }
  671. }
  672. .banner-ad {
  673. margin: 32rpx 0;
  674. height: 210rpx;
  675. border-radius: 8px;
  676. background-size: 100% 100%;
  677. background-image: url(https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/banner1.png);
  678. .ad-text{
  679. height: 100%;
  680. display: flex;
  681. flex-direction: column;
  682. justify-content: space-around;
  683. padding: 20rpx 40rpx;
  684. box-sizing: border-box;
  685. .title{
  686. color: #333333;
  687. font-size: 28rpx;
  688. font-style: normal;
  689. font-weight: 700;
  690. line-height: normal;
  691. }
  692. .sub-title{
  693. color: #666666;
  694. font-size: 20rpx;
  695. font-style: normal;
  696. font-weight: 500;
  697. line-height: normal;
  698. }
  699. .btn{
  700. text-align: center;
  701. width: 112rpx;
  702. color:#fff;
  703. padding: 4px 0px;
  704. font-size: 20rpx;
  705. border-radius: 4px;
  706. background: linear-gradient(106deg, #0BBC58 2.6%, #7CE6FB 86.51%);
  707. }
  708. }
  709. }
  710. .insectattack {
  711. width: 90%;
  712. margin: 0 auto;
  713. padding: 30rpx;
  714. .insectattack_title {
  715. font-size: 34rpx;
  716. display: flex;
  717. justify-content: space-between;
  718. .iconbox {
  719. width: 40rpx;
  720. height: 40rpx;
  721. background-color: #cfd6d6;
  722. color: #909696;
  723. border-radius: 40rpx;
  724. line-height: 40rpx;
  725. text-align: center;
  726. font-size: 20rpx;
  727. }
  728. }
  729. .insectattack_listbox {
  730. overflow-x: auto;
  731. .insectattack_list {
  732. width: 1104rpx;
  733. display: flex;
  734. margin-top: 30rpx;
  735. flex-wrap: wrap;
  736. .list_box {
  737. background-size: 100% 100%;
  738. width: 246rpx;
  739. height: 324rpx;
  740. margin-right: 30rpx;
  741. border-radius: 20rpx;
  742. position: relative;
  743. .list_boxbg {
  744. width: 100%;
  745. height: 100%;
  746. position: absolute;
  747. top: 0;
  748. left: 0;
  749. z-index: -1;
  750. .list_boxbg_img {
  751. width: 100%;
  752. height: 100%;
  753. }
  754. }
  755. .list_box_xiang {
  756. width: 95%;
  757. margin-top: 0rpx auto;
  758. display: flex;
  759. justify-content: flex-end;
  760. padding-top: 20rpx;
  761. .list_box_xiang_click {
  762. padding: 8rpx 15rpx;
  763. background-color: rgba(0, 0, 0, 0.2);
  764. color: #fff;
  765. font-size: 20rpx;
  766. border-radius: 52rpx;
  767. }
  768. }
  769. .list_box_info {
  770. width: 90%;
  771. margin: 130rpx auto 0;
  772. height: 120rpx;
  773. border-radius: 10rpx;
  774. background-image: linear-gradient(to right,
  775. #ffffff,
  776. rgba(255, 255, 255, 0.44));
  777. padding: 10rpx;
  778. box-sizing: border-box;
  779. .list_box_info_name {
  780. font-weight: 700;
  781. }
  782. .list_box_info_text {
  783. font-size: 18rpx;
  784. overflow: hidden;
  785. text-overflow: ellipsis;
  786. display: -webkit-box;
  787. -webkit-box-orient: vertical;
  788. -webkit-line-clamp: 2;
  789. }
  790. }
  791. }
  792. }
  793. }
  794. }
  795. .loading {
  796. position: absolute;
  797. top: 0;
  798. left: 0;
  799. z-index: 100;
  800. width: 100%;
  801. height: 100vh;
  802. background-color: rgba(0, 0, 0, 0.5);
  803. display: flex;
  804. justify-content: center;
  805. align-items: center;
  806. }
  807. </style>