index.vue 22 KB

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