detail.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782
  1. <template>
  2. <view class="container">
  3. <!-- H5环境自定义导航栏 -->
  4. <view class="h5-custom-navbar" v-if="isH5">
  5. <view class="h5-navbar-left" @click="goBack">
  6. <view class="h5-back-icon">
  7. <view class="h5-arrow-left"></view>
  8. </view>
  9. </view>
  10. <text class="h5-navbar-title">农业知识</text>
  11. <view class="h5-navbar-right"></view>
  12. </view>
  13. <!-- 文章内容区 -->
  14. <view class="article-container" :style="isH5 ? 'margin-top: 90rpx;' : ''">
  15. <!-- 封面图轮播 -->
  16. <swiper class="cover-swiper"
  17. indicator-dots
  18. autoplay
  19. circular
  20. interval="3000"
  21. duration="500"
  22. indicator-active-color="#4CAF50"
  23. indicator-color="rgba(255,255,255,0.5)"
  24. @change="handleSwiperChange">
  25. <swiper-item v-for="(slide, index) in carouselImages" :key="index">
  26. <view class="swiper-item-container" :style="{ backgroundColor: slide.color }">
  27. <view class="pattern-overlay"></view>
  28. <view class="agri-icon" v-html="slide.icon"></view>
  29. <view class="swiper-overlay">
  30. <text class="swiper-title">{{ slide.title }}</text>
  31. <text class="swiper-subtitle">{{ slide.subtitle }}</text>
  32. </view>
  33. </view>
  34. </swiper-item>
  35. </swiper>
  36. <view class="swiper-counter">
  37. <text>{{ currentSwiperIndex + 1 }}/{{ carouselImages.length }}</text>
  38. </view>
  39. <!-- 标题及元信息 -->
  40. <view class="article-header">
  41. <text class="article-title">水稻高产栽培技术指南</text>
  42. <view class="article-meta">
  43. <text class="source">农业技术研究院</text>
  44. <text class="dot">·</text>
  45. <text class="date">2024-05-25</text>
  46. <view class="views">
  47. <text class="view-icon">&#xe614;</text>
  48. <text class="view-count">3542</text>
  49. </view>
  50. </view>
  51. </view>
  52. <!-- 文章正文 -->
  53. <view class="article-content">
  54. <view class="content-section">
  55. <text class="paragraph">
  56. 水稻是我国最重要的粮食作物之一,提高水稻产量对保障国家粮食安全具有重要意义。本文将详细介绍水稻高产栽培的关键技术要点,帮助农户实现增产增收。
  57. </text>
  58. </view>
  59. <view class="content-section">
  60. <text class="section-title">一、选种与育苗</text>
  61. <text class="paragraph">
  62. 选用适合当地气候条件和土壤特性的优质稻种非常重要。推荐选择抗病性强、适应性广的品种,如"中优84"、"甬优12"等。在育苗过程中,需控制好温度、湿度,使用优质基质,确保秧苗健壮。
  63. </text>
  64. <view class="section-image">
  65. <view class="color-image" style="background-color: #8BC34A;">
  66. <text class="image-label">水稻优质种子</text>
  67. </view>
  68. </view>
  69. </view>
  70. <view class="content-section">
  71. <text class="section-title">二、水肥管理</text>
  72. <text class="paragraph">
  73. 水稻生长对水分需求较高,但不同生长期对水分的需求不同。插秧后需浅水促根,分蘖期间歇灌溉,抽穗期保持水层,成熟期控制排水。肥料使用应遵循"控氮、增磷、补钾"原则。
  74. </text>
  75. <view class="section-image">
  76. <view class="color-image" style="background-color: #4CAF50;">
  77. <text class="image-label">水稻秧苗培育</text>
  78. </view>
  79. </view>
  80. </view>
  81. <view class="content-section">
  82. <text class="section-title">三、病虫害防治</text>
  83. <text class="paragraph">
  84. 常见病害有稻瘟病、纹枯病、稻曲病等,虫害有稻飞虱、稻纵卷叶螟等。建议采用"预防为主,综合防治"的方法,适时喷洒药剂,加强田间管理。
  85. </text>
  86. <view class="note-box">
  87. <text class="note-title">【注意事项】</text>
  88. <text class="note-content">
  89. 农药使用需遵循安全间隔期规定,减少农药残留,确保水稻品质安全。选择晴天无风时喷药,穿戴好防护装备。
  90. </text>
  91. </view>
  92. <view class="section-image">
  93. <view class="color-image" style="background-color: #7CB342;">
  94. <text class="image-label">病虫害防治</text>
  95. </view>
  96. </view>
  97. </view>
  98. <view class="content-section">
  99. <text class="section-title">四、收获与储存</text>
  100. <text class="paragraph">
  101. 水稻成熟度达到85%以上时即可收割。收割后应及时晾晒至含水量14%以下,再进行储存。储存环境应保持干燥、通风、无虫害。
  102. </text>
  103. <view class="section-image">
  104. <view class="color-image" style="background-color: #689F38;">
  105. <text class="image-label">水稻收获与储存</text>
  106. </view>
  107. </view>
  108. </view>
  109. </view>
  110. <!-- 视频示例 -->
  111. <view class="video-container">
  112. <view class="video-poster">
  113. <view class="video-color-bg" style="background-color: #33691E;">
  114. <view class="video-pattern"></view>
  115. <text class="video-label">视频教学</text>
  116. </view>
  117. <view class="play-button">
  118. <view class="triangle-play"></view>
  119. </view>
  120. <text class="video-duration">12:30</text>
  121. </view>
  122. <text class="video-title">水稻高产技术实操演示</text>
  123. </view>
  124. </view>
  125. <!-- 底部功能区 -->
  126. <view class="footer-action">
  127. <view class="action-button like" @click="handleLike">
  128. <view class="action-icon-wrapper">
  129. <text v-if="articleInfo.liked" class="material-icon">&#xe87d;</text>
  130. <text v-else class="material-icon">&#xe87e;</text>
  131. </view>
  132. <text class="action-text">点赞</text>
  133. </view>
  134. <view class="action-button collect" @click="handleCollect">
  135. <view class="action-icon-wrapper">
  136. <text v-if="articleInfo.collected" class="material-icon">&#xe838;</text>
  137. <text v-else class="material-icon">&#xe83a;</text>
  138. </view>
  139. <text class="action-text">收藏</text>
  140. </view>
  141. <view class="action-button share" @click="handleShare">
  142. <view class="action-icon-wrapper">
  143. <text class="material-icon">&#xe80d;</text>
  144. </view>
  145. <text class="action-text">分享</text>
  146. </view>
  147. </view>
  148. <!-- 返回顶部 -->
  149. <view class="back-to-top" @click="scrollToTop">
  150. <view class="top-arrow"></view>
  151. <text class="top-text">顶部</text>
  152. </view>
  153. </view>
  154. </template>
  155. <script>
  156. export default {
  157. data() {
  158. return {
  159. title: "农业知识",
  160. articleInfo: {
  161. id: '1',
  162. title: '水稻高产栽培技术指南',
  163. source: '农业技术研究院',
  164. publishDate: '2024-05-25',
  165. views: 3542,
  166. liked: false,
  167. collected: false
  168. },
  169. carouselImages: [
  170. // 使用内联颜色块代替图片,确保正常显示
  171. {
  172. color: '#8BC34A',
  173. title: '水稻高产栽培技术 - 1',
  174. subtitle: '绿色农业科技',
  175. icon: '<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2zm0 18a8 8 0 1 1 8-8 8 8 0 0 1-8 8z"></path><path d="M12 6a1 1 0 0 0-1 1v5a1 1 0 0 0 .55.89l4 2a1 1 0 0 0 .9-1.78L13 11.28V7a1 1 0 0 0-1-1z"></path></svg>'
  176. },
  177. {
  178. color: '#4CAF50',
  179. title: '水稻高产栽培技术 - 2',
  180. subtitle: '提高水稻产量的关键',
  181. icon: '<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12h-4 M17 12l-3-3 M17 12l-3 3 M3 6h10 M13 6l-3-3 M13 6l-3 3 M3 18h10 M13 18l-3-3 M13 18l-3 3"></path></svg>'
  182. },
  183. {
  184. color: '#7CB342',
  185. title: '水稻高产栽培技术 - 3',
  186. subtitle: '科学种植方法',
  187. icon: '<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><path d="M3 3v18h18"></path><path d="M18.5 3a2.5 2.5 0 0 1 0 5H12v6.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V9"></path></svg>'
  188. },
  189. {
  190. color: '#689F38',
  191. title: '水稻高产栽培技术 - 4',
  192. subtitle: '现代农业技术',
  193. icon: '<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2v8"></path><path d="M5 10l3.5 3.5"></path><path d="M19 10l-3.5 3.5"></path><path d="M6.44 20l2.26-2.26a5 5 0 0 1 6.6 0L17.56 20"></path></svg>'
  194. },
  195. {
  196. color: '#33691E',
  197. title: '水稻高产栽培技术 - 5',
  198. subtitle: '农民增收的保障',
  199. icon: '<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22a10 10 0 1 1 10-10 10 10 0 0 1-10 10z"></path><path d="M12 8v8"></path><path d="M8 12h8"></path></svg>'
  200. }
  201. ],
  202. currentSwiperIndex: 0,
  203. isH5: false // 是否是H5环境
  204. }
  205. },
  206. onLoad() {
  207. // 检测是否在H5环境中运行
  208. // #ifdef H5
  209. this.isH5 = true;
  210. // #endif
  211. // 设置导航栏标题
  212. uni.setNavigationBarTitle({
  213. title: '农业知识'
  214. });
  215. },
  216. onNavigationBarButtonTap(e) {
  217. if (e.index === 0) {
  218. this.goBack();
  219. }
  220. },
  221. methods: {
  222. goBack() {
  223. uni.navigateBack();
  224. },
  225. scrollToTop() {
  226. uni.pageScrollTo({
  227. scrollTop: 0,
  228. duration: 300
  229. });
  230. },
  231. handleLike() {
  232. this.articleInfo.liked = !this.articleInfo.liked;
  233. // TODO: 调用接口更新点赞状态
  234. },
  235. handleCollect() {
  236. this.articleInfo.collected = !this.articleInfo.collected;
  237. // TODO: 调用接口更新收藏状态
  238. },
  239. handleShare() {
  240. uni.showShareMenu({
  241. withShareTicket: true,
  242. menus: ['shareAppMessage', 'shareTimeline']
  243. });
  244. },
  245. handleSwiperChange(e) {
  246. this.currentSwiperIndex = e.detail.current;
  247. }
  248. }
  249. }
  250. </script>
  251. <style>
  252. /* 字体图标 */
  253. @font-face {
  254. font-family: 'iconfont';
  255. src: url('https://at.alicdn.com/t/font_3442238_cosd6rj55jg.ttf') format('truetype');
  256. }
  257. @font-face {
  258. font-family: 'Material Icons';
  259. font-style: normal;
  260. font-weight: 400;
  261. src: url(https://fonts.gstatic.com/s/materialicons/v139/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2) format('woff2');
  262. }
  263. .icon, .view-icon, .play-icon, .action-icon, .top-icon {
  264. font-family: 'iconfont';
  265. }
  266. .material-icon {
  267. font-family: 'Material Icons';
  268. font-weight: normal;
  269. font-style: normal;
  270. font-size: 50rpx;
  271. line-height: 1;
  272. letter-spacing: normal;
  273. text-transform: none;
  274. display: inline-block;
  275. white-space: nowrap;
  276. word-wrap: normal;
  277. direction: ltr;
  278. -webkit-font-smoothing: antialiased;
  279. color: #4CAF50;
  280. }
  281. /* 容器样式 */
  282. .container {
  283. background-color: #f8f8f8;
  284. min-height: 100vh;
  285. position: relative;
  286. padding-bottom: 120rpx;
  287. }
  288. /* 删除自定义导航栏样式 */
  289. .custom-navbar {
  290. display: none;
  291. }
  292. .navbar-left, .back-icon, .navbar-title, .navbar-right, .arrow-left {
  293. display: none;
  294. }
  295. /* 文章容器 */
  296. .article-container {
  297. background-color: #fff;
  298. border-radius: 0;
  299. overflow: hidden;
  300. }
  301. /* 封面图轮播 */
  302. .cover-swiper {
  303. width: 100%;
  304. height: 420rpx;
  305. position: relative;
  306. }
  307. .swiper-item-container {
  308. position: relative;
  309. width: 100%;
  310. height: 100%;
  311. display: flex;
  312. align-items: center;
  313. justify-content: center;
  314. border-radius: 0;
  315. }
  316. .swiper-image {
  317. width: 100%;
  318. height: 100%;
  319. display: block;
  320. }
  321. .swiper-overlay {
  322. position: absolute;
  323. bottom: 0;
  324. left: 0;
  325. right: 0;
  326. padding: 40rpx 30rpx;
  327. background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0));
  328. display: flex;
  329. flex-direction: column;
  330. justify-content: flex-end;
  331. align-items: flex-start;
  332. color: #fff;
  333. }
  334. .swiper-title {
  335. font-size: 42rpx;
  336. font-weight: bold;
  337. margin-bottom: 10rpx;
  338. text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  339. }
  340. .swiper-subtitle {
  341. font-size: 28rpx;
  342. opacity: 0.9;
  343. text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  344. }
  345. /* 文章头部信息 */
  346. .article-header {
  347. padding: 30rpx 30rpx 0;
  348. }
  349. .article-title {
  350. font-size: 42rpx;
  351. font-weight: bold;
  352. color: #333;
  353. line-height: 1.4;
  354. margin-bottom: 20rpx;
  355. }
  356. .article-meta {
  357. display: flex;
  358. align-items: center;
  359. margin-bottom: 40rpx;
  360. }
  361. .source {
  362. font-size: 24rpx;
  363. color: #666;
  364. }
  365. .dot {
  366. margin: 0 10rpx;
  367. color: #999;
  368. }
  369. .date {
  370. font-size: 24rpx;
  371. color: #999;
  372. }
  373. .views {
  374. margin-left: auto;
  375. display: flex;
  376. align-items: center;
  377. }
  378. .view-icon {
  379. font-size: 24rpx;
  380. color: #999;
  381. margin-right: 6rpx;
  382. }
  383. .view-count {
  384. font-size: 24rpx;
  385. color: #999;
  386. }
  387. /* 文章内容 */
  388. .article-content {
  389. padding: 0 30rpx 40rpx;
  390. }
  391. .content-section {
  392. margin-bottom: 40rpx;
  393. }
  394. .section-title {
  395. font-size: 34rpx;
  396. font-weight: bold;
  397. color: #2e7d32;
  398. margin-bottom: 20rpx;
  399. display: block;
  400. }
  401. .paragraph {
  402. font-size: 30rpx;
  403. line-height: 1.8;
  404. color: #333;
  405. margin-bottom: 20rpx;
  406. display: block;
  407. }
  408. .content-image {
  409. width: 100%;
  410. margin: 20rpx 0;
  411. border-radius: 12rpx;
  412. }
  413. .image-caption {
  414. font-size: 24rpx;
  415. color: #999;
  416. text-align: center;
  417. display: block;
  418. margin-top: 10rpx;
  419. }
  420. /* 注意事项盒子 */
  421. .note-box {
  422. background-color: #f1f8e9;
  423. border-left: 8rpx solid #8bc34a;
  424. padding: 20rpx;
  425. border-radius: 8rpx;
  426. margin: 20rpx 0;
  427. }
  428. .note-title {
  429. font-size: 28rpx;
  430. font-weight: bold;
  431. color: #558b2f;
  432. margin-bottom: 10rpx;
  433. display: block;
  434. }
  435. .note-content {
  436. font-size: 26rpx;
  437. line-height: 1.6;
  438. color: #689f38;
  439. display: block;
  440. }
  441. /* 视频容器 */
  442. .video-container {
  443. margin: 0 30rpx 40rpx;
  444. border-radius: 0;
  445. overflow: hidden;
  446. background-color: #fff;
  447. }
  448. .video-poster {
  449. position: relative;
  450. width: 100%;
  451. height: 380rpx;
  452. }
  453. .video-color-bg {
  454. position: absolute;
  455. top: 0;
  456. left: 0;
  457. right: 0;
  458. bottom: 0;
  459. display: flex;
  460. align-items: center;
  461. justify-content: center;
  462. border-radius: 0;
  463. }
  464. .video-pattern {
  465. position: absolute;
  466. top: 0;
  467. left: 0;
  468. right: 0;
  469. bottom: 0;
  470. opacity: 0.1;
  471. background-image:
  472. linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%,
  473. rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);
  474. background-size: 50px 50px;
  475. }
  476. .video-label {
  477. color: white;
  478. font-size: 32rpx;
  479. font-weight: bold;
  480. text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  481. z-index: 5;
  482. }
  483. .play-button {
  484. position: absolute;
  485. top: 50%;
  486. left: 50%;
  487. transform: translate(-50%, -50%);
  488. width: 120rpx;
  489. height: 120rpx;
  490. background-color: rgba(0, 0, 0, 0.6);
  491. border-radius: 50%;
  492. display: flex;
  493. align-items: center;
  494. justify-content: center;
  495. z-index: 10;
  496. box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.3);
  497. border: 4rpx solid rgba(255, 255, 255, 0.8);
  498. }
  499. .triangle-play {
  500. width: 0;
  501. height: 0;
  502. border-top: 26rpx solid transparent;
  503. border-bottom: 26rpx solid transparent;
  504. border-left: 40rpx solid #fff;
  505. margin-left: 10rpx;
  506. }
  507. .video-duration {
  508. position: absolute;
  509. bottom: 20rpx;
  510. right: 20rpx;
  511. padding: 6rpx 12rpx;
  512. background-color: rgba(0, 0, 0, 0.6);
  513. color: #fff;
  514. font-size: 22rpx;
  515. border-radius: 4rpx;
  516. }
  517. .video-title {
  518. font-size: 28rpx;
  519. font-weight: bold;
  520. color: #333;
  521. padding: 20rpx;
  522. display: block;
  523. }
  524. /* 底部功能区 */
  525. .footer-action {
  526. position: fixed;
  527. bottom: 0;
  528. left: 0;
  529. right: 0;
  530. height: 100rpx;
  531. background-color: #fff;
  532. display: flex;
  533. align-items: center;
  534. justify-content: space-around;
  535. box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05);
  536. z-index: 99;
  537. }
  538. .action-button {
  539. display: flex;
  540. flex-direction: column;
  541. align-items: center;
  542. padding: 10rpx 0;
  543. }
  544. .action-icon-wrapper {
  545. display: flex;
  546. align-items: center;
  547. justify-content: center;
  548. margin-bottom: 6rpx;
  549. }
  550. .action-text {
  551. font-size: 24rpx;
  552. color: #4CAF50;
  553. font-weight: 500;
  554. }
  555. .action-button:active {
  556. opacity: 0.7;
  557. }
  558. /* 返回顶部按钮 */
  559. .back-to-top {
  560. position: fixed;
  561. right: 30rpx;
  562. bottom: 120rpx;
  563. width: 100rpx;
  564. height: 100rpx;
  565. background-color: rgba(46, 125, 50, 0.9);
  566. border-radius: 50%;
  567. display: flex;
  568. flex-direction: column;
  569. align-items: center;
  570. justify-content: center;
  571. z-index: 99;
  572. }
  573. .top-arrow {
  574. width: 20rpx;
  575. height: 20rpx;
  576. border-top: 4rpx solid #fff;
  577. border-left: 4rpx solid #fff;
  578. transform: rotate(45deg);
  579. margin-bottom: 6rpx;
  580. }
  581. .top-text {
  582. color: #fff;
  583. font-size: 22rpx;
  584. }
  585. .swiper-counter {
  586. position: absolute;
  587. top: 110rpx;
  588. right: 30rpx;
  589. padding: 6rpx 12rpx;
  590. background-color: rgba(0, 0, 0, 0.5);
  591. color: #fff;
  592. font-size: 22rpx;
  593. border-radius: 20rpx;
  594. z-index: 10;
  595. }
  596. .pattern-overlay {
  597. position: absolute;
  598. top: 0;
  599. left: 0;
  600. right: 0;
  601. bottom: 0;
  602. opacity: 0.1;
  603. background-image:
  604. linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%,
  605. rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);
  606. background-size: 50px 50px;
  607. }
  608. .agri-icon {
  609. position: absolute;
  610. top: 40%;
  611. left: 50%;
  612. transform: translate(-50%, -50%);
  613. opacity: 0.8;
  614. width: 120rpx;
  615. height: 120rpx;
  616. z-index: 5;
  617. }
  618. .agri-icon svg {
  619. width: 100%;
  620. height: 100%;
  621. stroke-width: 1.5;
  622. }
  623. .section-image {
  624. margin: 20rpx 0;
  625. width: 100%;
  626. }
  627. .color-image {
  628. width: 100%;
  629. height: 300rpx;
  630. border-radius: 0;
  631. display: flex;
  632. align-items: center;
  633. justify-content: center;
  634. position: relative;
  635. overflow: hidden;
  636. }
  637. .color-image::before {
  638. content: "";
  639. position: absolute;
  640. top: 0;
  641. left: 0;
  642. right: 0;
  643. bottom: 0;
  644. background-image:
  645. linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%,
  646. rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);
  647. background-size: 50px 50px;
  648. opacity: 0.2;
  649. }
  650. .image-label {
  651. color: white;
  652. font-size: 32rpx;
  653. font-weight: bold;
  654. text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  655. z-index: 5;
  656. }
  657. /* 删除浮动返回按钮样式 */
  658. .float-back-button, .float-back-icon {
  659. display: none;
  660. }
  661. /* H5导航栏样式 */
  662. .h5-custom-navbar {
  663. position: fixed;
  664. top: 0;
  665. left: 0;
  666. right: 0;
  667. height: 90rpx;
  668. background-color: #fff;
  669. display: flex;
  670. align-items: center;
  671. padding: 0 30rpx;
  672. z-index: 100;
  673. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
  674. }
  675. .h5-navbar-left {
  676. width: 80rpx;
  677. height: 80rpx;
  678. display: flex;
  679. align-items: center;
  680. justify-content: center;
  681. }
  682. .h5-back-icon {
  683. font-size: 40rpx;
  684. color: #333;
  685. display: flex;
  686. align-items: center;
  687. justify-content: center;
  688. }
  689. .h5-navbar-title {
  690. flex: 1;
  691. text-align: center;
  692. font-size: 32rpx;
  693. font-weight: bold;
  694. color: #333;
  695. }
  696. .h5-navbar-right {
  697. width: 60rpx;
  698. }
  699. .h5-arrow-left {
  700. width: 24rpx;
  701. height: 24rpx;
  702. border-top: 4rpx solid #333;
  703. border-left: 4rpx solid #333;
  704. transform: rotate(-45deg);
  705. }
  706. </style>