index.vue 20 KB

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