index.vue 23 KB

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