index.vue 20 KB

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