index.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819
  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. uni.getLocation({
  404. type: 'wgs84 ',
  405. success: (res) => {
  406. this.getcity(res.longitude, res.latitude);
  407. },
  408. });
  409. // this.checkLocationPermission(true); // 首次加载弹框提醒
  410. },
  411. onShow() {
  412. this.loadTF = false;
  413. Debounce(() => {
  414. this.getUserlogin();
  415. }, 500)();
  416. uni.getLocation({
  417. type: 'wgs84 ',
  418. success: (res) => {
  419. this.getcity(res.longitude, res.latitude);
  420. },
  421. });
  422. // this.checkLocationPermission();
  423. },
  424. };
  425. </script>
  426. <style lang="less">
  427. page {
  428. background: linear-gradient(180deg, #1FC676 11.72%, #1FC676 11.52%, #D5F9E7 29.83%, #F5F6FA 36.96%), #FFF;
  429. background-size: 100%;
  430. background-repeat: no-repeat;
  431. background-color: #f9f9f9;
  432. }
  433. .home {
  434. width: 100%;
  435. height: 100%;
  436. padding-top: 94rpx;
  437. box-sizing: border-box;
  438. }
  439. .welcom {
  440. height: 64rpx;
  441. line-height: 64rpx;
  442. padding-left: 16rpx;
  443. font-size: 40rpx;
  444. color: #fff;
  445. }
  446. .weather-bg {
  447. width: 100%;
  448. background-image: url(https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/banner-bg.png);
  449. background-size: 100% 100%;
  450. background-repeat: no-repeat;
  451. }
  452. .weather-box {
  453. display: flex;
  454. margin: 24rpx 0 16rpx 0;
  455. }
  456. .weather:nth-child(1) {
  457. border-right: 1px solid rgba(255, 255, 255, 0.6);
  458. }
  459. .weather {
  460. flex: 1;
  461. display: flex;
  462. .weaimg {
  463. width: 42rpx;
  464. height: 42rpx;
  465. }
  466. .weatext {
  467. gap: 8rpx;
  468. display: flex;
  469. flex-direction: column;
  470. padding-left: 44rpx;
  471. font-size: 24rpx;
  472. color: rgba(255, 255, 255, 0.8);
  473. }
  474. .weatext_title {
  475. font-size: 24rpx;
  476. color: #fff;
  477. }
  478. .text-span {
  479. color: #0BBC58;
  480. margin-left: 16rpx;
  481. padding: 0 2px;
  482. border-radius: 4px;
  483. background: rgba(255, 255, 255, 0.6);
  484. }
  485. .text-value {
  486. font-size: 48rpx;
  487. color: #fff;
  488. }
  489. }
  490. .weather-warning {
  491. margin: 20rpx 0;
  492. padding: 0 40rpx;
  493. color: #fff;
  494. .weather-alert{
  495. width:30rpx;
  496. height: 30rpx;
  497. margin-right: 10rpx;
  498. }
  499. }
  500. .ai-box {
  501. width: 100%;
  502. padding: 0 40rpx;
  503. box-sizing: border-box;
  504. height: 128rpx;
  505. margin-bottom: 12rpx;
  506. position: relative;
  507. .ai-content {
  508. box-sizing: border-box;
  509. height: 100%;
  510. border-radius: 8px;
  511. border: 1.5px solid #FFF;
  512. background: linear-gradient(180deg, #ffffffa3 0%, #FFF 100%);
  513. padding: 24rpx;
  514. image {
  515. width: 80rpx;
  516. height: 80rpx;
  517. float: left;
  518. margin-right: 16rpx;
  519. }
  520. .float-right {
  521. float: right;
  522. padding: 4px 12px;
  523. color: #fff;
  524. border-radius: 28px;
  525. background: #0BBC58;
  526. margin: 12rpx 0;
  527. }
  528. .ai-text {
  529. float: left;
  530. }
  531. .ai-text-title {
  532. color: #333834;
  533. line-height: 40rpx;
  534. font-size: 28rpx;
  535. font-weight: 700;
  536. }
  537. .ai-text-subtitle {
  538. color: #7b9783;
  539. line-height: 40rpx;
  540. font-size: 20rpx;
  541. font-weight: 400;
  542. }
  543. }
  544. }
  545. .functionbox {
  546. width: 100%;
  547. padding: 0rpx 32rpx 0 32rpx;
  548. box-sizing: border-box;
  549. margin-bottom: 16rpx;
  550. .swiper {
  551. height: 208rpx;
  552. }
  553. .functionbox_title {
  554. padding-left: 20rpx;
  555. font-size: 34rpx;
  556. }
  557. .functionbox_text {
  558. display: flex;
  559. flex-wrap: wrap;
  560. margin-top: 30rpx;
  561. .functionbox_text_item {
  562. width:20%;
  563. text-align: center;
  564. color: #616666;
  565. font-size: 24rpx;
  566. margin-bottom: 32rpx;
  567. .itemimg {
  568. width: 80rpx;
  569. height: 80rpx;
  570. margin-bottom: 16rpx;
  571. }
  572. .icon_text{
  573. // 超出隐藏
  574. width:100%;
  575. overflow: hidden;
  576. text-overflow: ellipsis;
  577. white-space: nowrap;
  578. }
  579. }
  580. }
  581. }
  582. .facilitybox {
  583. width: 100%;
  584. padding: 0 32rpx;
  585. box-sizing: border-box;
  586. background: #F5F6FA;
  587. .facilitybox-content {
  588. border-radius: 16rpx;
  589. background: #FFF;
  590. padding: 32rpx;
  591. }
  592. .facilitybox_title {
  593. font-size: 30rpx;
  594. color: #333;
  595. margin-bottom: 24rpx;
  596. font-weight: 700;
  597. }
  598. .facilitybox_itembox {
  599. display: flex;
  600. gap: 32rpx;
  601. .facilitybox_item {
  602. flex: 1;
  603. color: #616666;
  604. .facilitybox_span {
  605. padding: 16rpx 24rpx;
  606. width: 50%;
  607. color: #0B3F5D;
  608. font-weight: 700;
  609. font-size: 28rpx;
  610. .text {
  611. font-size: 20rpx;
  612. color: #4E916E;
  613. font-weight: 400;
  614. margin-top: 9rpx;
  615. }
  616. }
  617. .itemimg {
  618. width: 90rpx;
  619. height: 90rpx;
  620. float: right;
  621. margin: 7rpx 0;
  622. }
  623. }
  624. .facilitybox-zhuanjia {
  625. border-radius: 8px;
  626. background: linear-gradient(180deg, #D3FBE6 0%, #F5F7FA 100%);
  627. position: relative;
  628. .itemimg {
  629. width: 112rpx;
  630. height: 146rpx;
  631. position: absolute;
  632. bottom: 0;
  633. right: 16rpx;
  634. }
  635. text {
  636. color: #003318;
  637. font-weight: 500;
  638. font-size: 28rpx;
  639. }
  640. }
  641. .facilitybox-suishi {
  642. border-radius: 8px;
  643. background: linear-gradient(180deg, #CAECFF 0%, #F5F7FA 99.89%);
  644. padding: 9rpx 0;
  645. .facilitybox_span {
  646. color: #0B3F5D;
  647. }
  648. }
  649. .facilitybox-bchk {
  650. border-radius: 8px;
  651. background: linear-gradient(180deg, #EEE5F6 0%, #F5F7FA 95.65%);
  652. padding: 10rpx 0;
  653. .facilitybox_span {
  654. color: #3E2B50;
  655. }
  656. .itemimg {
  657. width: 78rpx;
  658. height: 72rpx;
  659. margin-right: 10rpx;
  660. }
  661. }
  662. .facilitybox-jgqs {
  663. border-radius: 8px;
  664. background: linear-gradient(180deg, #D2E5FF 0%, #F5F7FA 95.65%);
  665. .facilitybox_span {
  666. color: #0D2E5B;
  667. }
  668. }
  669. .facilitybox-jwjy {
  670. border-radius: 8px;
  671. background: linear-gradient(180deg, #FFF4D2 0%, #F5F7FA 95.65%);
  672. .facilitybox_span {
  673. color: #3D4012;
  674. }
  675. }
  676. }
  677. }
  678. .banner-ad {
  679. margin: 32rpx 0;
  680. height: 210rpx;
  681. border-radius: 8px;
  682. background-size: 100% 100%;
  683. background-image: url(https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/banner1.png);
  684. .ad-text{
  685. height: 100%;
  686. display: flex;
  687. flex-direction: column;
  688. justify-content: space-around;
  689. padding: 20rpx 40rpx;
  690. box-sizing: border-box;
  691. .title{
  692. color: #333333;
  693. font-size: 28rpx;
  694. font-style: normal;
  695. font-weight: 700;
  696. line-height: normal;
  697. }
  698. .sub-title{
  699. color: #666666;
  700. font-size: 20rpx;
  701. font-style: normal;
  702. font-weight: 500;
  703. line-height: normal;
  704. }
  705. .btn{
  706. text-align: center;
  707. width: 112rpx;
  708. color:#fff;
  709. padding: 4px 0px;
  710. font-size: 20rpx;
  711. border-radius: 4px;
  712. background: linear-gradient(106deg, #0BBC58 2.6%, #7CE6FB 86.51%);
  713. }
  714. }
  715. }
  716. .insectattack {
  717. width: 90%;
  718. margin: 0 auto;
  719. padding: 30rpx;
  720. .insectattack_title {
  721. font-size: 34rpx;
  722. display: flex;
  723. justify-content: space-between;
  724. .iconbox {
  725. width: 40rpx;
  726. height: 40rpx;
  727. background-color: #cfd6d6;
  728. color: #909696;
  729. border-radius: 40rpx;
  730. line-height: 40rpx;
  731. text-align: center;
  732. font-size: 20rpx;
  733. }
  734. }
  735. .insectattack_listbox {
  736. overflow-x: auto;
  737. .insectattack_list {
  738. width: 1104rpx;
  739. display: flex;
  740. margin-top: 30rpx;
  741. flex-wrap: wrap;
  742. .list_box {
  743. background-size: 100% 100%;
  744. width: 246rpx;
  745. height: 324rpx;
  746. margin-right: 30rpx;
  747. border-radius: 20rpx;
  748. position: relative;
  749. .list_boxbg {
  750. width: 100%;
  751. height: 100%;
  752. position: absolute;
  753. top: 0;
  754. left: 0;
  755. z-index: -1;
  756. .list_boxbg_img {
  757. width: 100%;
  758. height: 100%;
  759. }
  760. }
  761. .list_box_xiang {
  762. width: 95%;
  763. margin-top: 0rpx auto;
  764. display: flex;
  765. justify-content: flex-end;
  766. padding-top: 20rpx;
  767. .list_box_xiang_click {
  768. padding: 8rpx 15rpx;
  769. background-color: rgba(0, 0, 0, 0.2);
  770. color: #fff;
  771. font-size: 20rpx;
  772. border-radius: 52rpx;
  773. }
  774. }
  775. .list_box_info {
  776. width: 90%;
  777. margin: 130rpx auto 0;
  778. height: 120rpx;
  779. border-radius: 10rpx;
  780. background-image: linear-gradient(to right,
  781. #ffffff,
  782. rgba(255, 255, 255, 0.44));
  783. padding: 10rpx;
  784. box-sizing: border-box;
  785. .list_box_info_name {
  786. font-weight: 700;
  787. }
  788. .list_box_info_text {
  789. font-size: 18rpx;
  790. overflow: hidden;
  791. text-overflow: ellipsis;
  792. display: -webkit-box;
  793. -webkit-box-orient: vertical;
  794. -webkit-line-clamp: 2;
  795. }
  796. }
  797. }
  798. }
  799. }
  800. }
  801. .loading {
  802. position: absolute;
  803. top: 0;
  804. left: 0;
  805. z-index: 100;
  806. width: 100%;
  807. height: 100vh;
  808. background-color: rgba(0, 0, 0, 0.5);
  809. display: flex;
  810. justify-content: center;
  811. align-items: center;
  812. }
  813. </style>