index.vue 19 KB

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