index.vue 19 KB

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