home.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739
  1. <template>
  2. <view class="app-page">
  3. <tm-menubars iconColor="white" color="white" :flat="true" :showback="false">
  4. <view slot="left">
  5. <image @click="fnOnLogoToPage" class="logo ml-24 round-24" :src="appInfo.logo" mode="scaleToFill" />
  6. </view>
  7. <view class="search-input round-12 pt-12 pb-12 flex pl-24" @click="fnToSearch">
  8. <text class="search-input_icon iconfont text-size-m icon-search text-grey"></text>
  9. <view class="search-input_text pl-12 text-size-m text-grey">搜索内容...</view>
  10. </view>
  11. <!-- #ifdef APP-PLUS || H5 -->
  12. <view slot="right" class="mr-24 text-size-m text-grey text-overflow">{{ appInfo.name }}</view>
  13. <!-- #endif -->
  14. </tm-menubars>
  15. <view v-if="loading !== 'success' && articleList.length===0" class="loading-wrap">
  16. <tm-skeleton model="card"></tm-skeleton>
  17. <tm-skeleton model="cardActions"></tm-skeleton>
  18. <tm-skeleton model="list"></tm-skeleton>
  19. <tm-skeleton model="listAvatr"></tm-skeleton>
  20. <tm-skeleton model="listAvatr"></tm-skeleton>
  21. <tm-skeleton model="listAvatr"></tm-skeleton>
  22. </view>
  23. <block v-else>
  24. <view v-if="bannerConfig.enabled" class="bg-white pb-24">
  25. <view class="banner bg-white ml-24 mr-24 mt-12 round-3" v-if="bannerList.length !== 0">
  26. <e-swiper :height="bannerConfig.height" :dotPosition="bannerConfig.dotPosition" :autoplay="true"
  27. :useDot="bannerConfig.showIndicator" :showTitle="bannerConfig.showTitle"
  28. :type="bannerConfig.type" :list="bannerList" @on-click="fnOnBannerClick" />
  29. </view>
  30. </view>
  31. <!-- 金刚区 :v-if="navList.filter(x=>x.show).length>=4" -->
  32. <view :v-if="navList.filter(x=>x.show).length>=4" class="nav-box">
  33. <view class="nav-list flex">
  34. <template v-for="(item,index) in navList" >
  35. <view v-if="item.show" class="nav-item" :key="index" @click="fnClickNav(item)">
  36. <!-- :class="[item.bgClass]" -->
  37. <view class="nav-item-icon" :class="[item.bgClass]" :style="{
  38. '--bgColor':item.bgColor,
  39. // boxShadow: '0rpx 0rpx 6rpx ' + item.shadow,
  40. // backgroundColor: item.bgColor
  41. }">
  42. <tm-icons :size="48" color="white" prefx="halocoloricon" :name="item.icon"></tm-icons>
  43. </view>
  44. <view class="nav-item-text">
  45. {{item.title}}
  46. </view>
  47. </view>
  48. </template>
  49. </view>
  50. </view>
  51. <!-- 精品分类 -->
  52. <block v-if="calcIsShowCategory">
  53. <view class="flex flex-between mt-16 mb-24 pl-24 pr-24">
  54. <view class="page-item_title text-weight-b ">精选分类</view>
  55. <view class="show-more flex flex-center bg-white round-3" @click="fnToCategoryPage">
  56. <text class="iconfont icon-angle-right text-size-s text-grey-darken-1"></text>
  57. </view>
  58. <view v-if="false" class="flex flex-center text-size-s text-grey-darken-1"
  59. @click="fnToCategoryPage">
  60. <text class=" text-size-m">查看更多</text>
  61. <text class="iconfont icon-angle-right text-size-s "></text>
  62. </view>
  63. </view>
  64. <scroll-view class="category" scroll-x="true">
  65. <view v-if="categoryList.length === 0" class="cate-empty round-3 mr-5 flex flex-center text-grey">
  66. 还没有任何分类~
  67. </view>
  68. <block v-else>
  69. <view class="content" v-for="(category, index) in categoryList" :key="category.metadata.name"
  70. @click="fnToCategoryBy(category)">
  71. <category-mini-card :category="category"></category-mini-card>
  72. </view>
  73. </block>
  74. </scroll-view>
  75. </block>
  76. <!-- 最新文章 -->
  77. <view class="flex flex-between mt-24 mb-24 pl-24 pr-24">
  78. <view class="page-item_title text-weight-b">最新列表</view>
  79. <view class="show-more flex flex-center bg-white round-3" @click="fnToArticlesPage">
  80. <text class="iconfont icon-angle-right text-size-s text-grey-darken-1"></text>
  81. </view>
  82. <view v-if="false" class="flex flex-center text-size-s text-grey-darken-1" @click="fnToArticlesPage">
  83. <text class=" text-size-m ">查看更多</text>
  84. <text class="iconfont icon-angle-right text-size-s "></text>
  85. </view>
  86. </view>
  87. <view v-if="articleList.length === 0" class="article-empty">
  88. <tm-empty icon="icon-shiliangzhinengduixiang-" label="博主还没有发表任何内容~"></tm-empty>
  89. </view>
  90. <block v-else>
  91. <view :class="globalAppSettings.layout.home">
  92. <tm-translate v-for="(article, index) in articleList" :key="index" class="ani-item"
  93. animation-name="fadeUp" :wait="calcAniWait(index)">
  94. <article-card from="home" :article="article" :post="article"
  95. @on-click="fnToArticleDetail"></article-card>
  96. </tm-translate>
  97. </view>
  98. <view class="load-text mt-12">{{ loadMoreText }}</view>
  99. <tm-flotbutton v-if="articleList.length > 10" :width="90" color="light-blue" @click="fnToTopPage"
  100. size="s" icon="icon-angle-up"></tm-flotbutton>
  101. </block>
  102. </block>
  103. <!-- 弹窗 -->
  104. <NotifyDialog v-if="notify.show" :show="notify.show" :title="notify.data.title" :content="notify.data.content"
  105. :url="notify.data.url" @on-change="fnOnNotifyChange"></NotifyDialog>
  106. </view>
  107. </template>
  108. <script>
  109. import tmMenubars from '@/tm-vuetify/components/tm-menubars/tm-menubars.vue';
  110. import tmSkeleton from '@/tm-vuetify/components/tm-skeleton/tm-skeleton.vue';
  111. import tmTranslate from '@/tm-vuetify/components/tm-translate/tm-translate.vue';
  112. import tmFlotbutton from '@/tm-vuetify/components/tm-flotbutton/tm-flotbutton.vue';
  113. import tmIcons from '@/tm-vuetify/components/tm-icons/tm-icons.vue';
  114. import tmEmpty from '@/tm-vuetify/components/tm-empty/tm-empty.vue';
  115. import tmGrid from '@/tm-vuetify/components/tm-grid/tm-grid.vue';
  116. import eSwiper from '@/components/e-swiper/e-swiper.vue';
  117. import NotifyDialog from "@/components/notify-dialog/notify-dialog.vue";
  118. import qs from 'qs'
  119. export default {
  120. components: {
  121. tmMenubars,
  122. tmSkeleton,
  123. tmTranslate,
  124. tmFlotbutton,
  125. tmIcons,
  126. tmEmpty,
  127. tmGrid,
  128. eSwiper,
  129. NotifyDialog
  130. },
  131. data() {
  132. return {
  133. loading: 'loading',
  134. queryParams: {
  135. size: 5,
  136. page: 1,
  137. sort: ['spec.pinned,desc', 'spec.publishTime,desc']
  138. },
  139. result: {},
  140. isLoadMore: false,
  141. loadMoreText: '加载中...',
  142. bannerCurrent: 0,
  143. bannerList: [],
  144. noticeList: [],
  145. articleList: [],
  146. categoryList: [],
  147. notify: {
  148. show: false,
  149. data: {}
  150. },
  151. navList: []
  152. };
  153. },
  154. computed: {
  155. haloConfigs() {
  156. return this.$tm.vx.getters().getConfigs;
  157. },
  158. bloggerInfo() {
  159. const blogger = this.$tm.vx.getters().getConfigs.authorConfig.blogger;
  160. blogger.avatar = this.$utils.checkAvatarUrl(blogger.avatar, true);
  161. return blogger;
  162. },
  163. appInfo() {
  164. const appInfo = this.haloConfigs.appConfig.appInfo;
  165. appInfo.logo = this.$utils.checkImageUrl(appInfo.logo)
  166. return appInfo;
  167. },
  168. mockJson() {
  169. return this.$tm.vx.getters().getMockJson;
  170. },
  171. calcAuditModeEnabled() {
  172. return this.haloConfigs.auditConfig.auditModeEnabled
  173. },
  174. calcIsShowCategory() {
  175. if (this.calcAuditModeEnabled && this.categoryList.length !== 0) {
  176. return false
  177. }
  178. if (this.calcAuditModeEnabled) {
  179. return false
  180. }
  181. return this.haloConfigs.pageConfig.homeConfig.useCategory
  182. },
  183. bannerConfig() {
  184. return this.haloConfigs.pageConfig.homeConfig.bannerConfig
  185. }
  186. },
  187. watch: {
  188. haloConfigs: {
  189. handler(val) {
  190. if (!val) return;
  191. this.fnGetNavList();
  192. },
  193. deep: true,
  194. immediate: true,
  195. }
  196. },
  197. onLoad() {
  198. this.fnSetPageTitle();
  199. },
  200. created() {
  201. this.fnQuery();
  202. },
  203. onPullDownRefresh() {
  204. this.isLoadMore = false;
  205. this.queryParams.page = 1;
  206. this.fnQuery();
  207. },
  208. onReachBottom(e) {
  209. if (this.calcAuditModeEnabled) {
  210. uni.showToast({
  211. icon: 'none',
  212. title: '没有更多数据了'
  213. });
  214. return
  215. }
  216. if (this.result.hasNext) {
  217. this.queryParams.page += 1;
  218. this.isLoadMore = true;
  219. this.fnGetArticleList();
  220. } else {
  221. uni.showToast({
  222. icon: 'none',
  223. title: '没有更多数据了'
  224. });
  225. }
  226. },
  227. methods: {
  228. fnQuery() {
  229. this.fnGetBanner();
  230. this.fnGetArticleList();
  231. this.fnGetCategoryList();
  232. },
  233. fnGetCategoryList() {
  234. if (this.calcAuditModeEnabled) {
  235. this.categoryList = this.mockJson.home.categoryList.map((item) => {
  236. return {
  237. metadata: {
  238. name: Date.now() * Math.random(),
  239. },
  240. spec: {
  241. displayName: item.title,
  242. cover: item.cover
  243. },
  244. postCount: 0
  245. }
  246. });
  247. return;
  248. }
  249. if (!this.calcIsShowCategory) {
  250. return;
  251. }
  252. this.$httpApi.v2
  253. .getCategoryList({
  254. fieldSelector: ['spec.hideFromList=false']
  255. })
  256. .then(res => {
  257. this.categoryList = res.items.sort((a, b) => {
  258. return b.postCount - a.postCount;
  259. });
  260. setTimeout(() => {
  261. this.loading = 'success';
  262. }, 500);
  263. })
  264. .catch(err => {
  265. console.error(err);
  266. this.loading = 'error';
  267. })
  268. .finally(() => {
  269. setTimeout(() => {
  270. uni.hideLoading();
  271. uni.stopPullDownRefresh();
  272. }, 500);
  273. });
  274. },
  275. // 获取轮播图
  276. fnGetBanner() {
  277. if (this.calcAuditModeEnabled) {
  278. this.bannerList = this.mockJson.home.bannerList.map((item) => {
  279. return {
  280. mp4: '',
  281. id: Date.now() * Math.random(),
  282. nickname: this.haloConfigs.authorConfig.blogger.nickname,
  283. avatar: this.$utils.checkAvatarUrl(this.haloConfigs.authorConfig.blogger.avatar),
  284. address: '',
  285. createTime: item.time,
  286. title: item.title,
  287. src: this.$utils.checkThumbnailUrl(item.cover),
  288. image: this.$utils.checkThumbnailUrl(item.cover),
  289. type: "custom",
  290. content: "",
  291. url: ""
  292. }
  293. });
  294. return;
  295. }
  296. if (!this.bannerConfig.enabled) return;
  297. if (this.bannerConfig.type === 'custom') {
  298. this.bannerList = this.bannerConfig.list.map((item) => {
  299. return {
  300. mp4: '',
  301. id: Date.now() * Math.random(),
  302. nickname: this.haloConfigs.authorConfig.blogger.nickname,
  303. avatar: this.$utils.checkAvatarUrl(this.haloConfigs.authorConfig.blogger.avatar),
  304. address: '',
  305. createTime: "",
  306. title: item.title,
  307. src: this.$utils.checkThumbnailUrl(item.cover),
  308. image: this.$utils.checkThumbnailUrl(item.cover),
  309. type: "custom",
  310. content: item.content,
  311. url: item.url
  312. }
  313. })
  314. return;
  315. }
  316. const paramsStr = qs.stringify(this.queryParams, {
  317. allowDots: true,
  318. encodeValuesOnly: true,
  319. skipNulls: true,
  320. encode: true,
  321. arrayFormat: 'repeat'
  322. })
  323. uni.request({
  324. url: this.$baseApiUrl + '/apis/api.content.halo.run/v1alpha1/posts?' + paramsStr,
  325. method: 'GET',
  326. success: (res) => {
  327. this.bannerList = res.data.items.map((item, index) => {
  328. return {
  329. mp4: '',
  330. id: item.metadata.name,
  331. nickname: item.owner.displayName,
  332. avatar: this.$utils.checkAvatarUrl(item.owner.avatar),
  333. address: '',
  334. createTime: uni.$tm.dayjs(item.spec.publishTime).fromNow(),
  335. title: item.spec.title,
  336. src: this.$utils.checkThumbnailUrl(item.spec.cover),
  337. image: this.$utils.checkThumbnailUrl(item.spec.cover),
  338. type: "post",
  339. content: item.status.excerpt,
  340. url: ""
  341. };
  342. });
  343. },
  344. fail: (err) => {}
  345. })
  346. },
  347. fnOnNotifyChange(e) {
  348. this.notify.show = e;
  349. },
  350. fnOnBannerClick(item) {
  351. if (this.calcAuditModeEnabled) {
  352. return;
  353. }
  354. if (item.type === 'custom') {
  355. if (item.content) {
  356. this.notify.data = item
  357. this.notify.show = true
  358. return;
  359. }
  360. if (uni.$utils.checkIsUrl(item.url)) {
  361. uni.navigateTo({
  362. url: '/pagesC/website/website?data=' +
  363. JSON.stringify({
  364. title: item.title || "加载中...",
  365. url: encodeURIComponent(item.url)
  366. })
  367. });
  368. }
  369. return;
  370. }
  371. if (item.id === '') return;
  372. this.fnToArticleDetail({
  373. metadata: {
  374. name: item.id
  375. }
  376. });
  377. },
  378. // 文章列表
  379. fnGetArticleList() {
  380. if (this.calcAuditModeEnabled) {
  381. this.articleList = this.mockJson.home.postList.map((item) => {
  382. return {
  383. metadata: {
  384. name: Date.now() * Math.random(),
  385. },
  386. spec: {
  387. pinned: false,
  388. cover: item.cover,
  389. title: item.title,
  390. publishTime: item.time
  391. },
  392. status: {
  393. excerpt: item.desc
  394. },
  395. stats: {
  396. visit: 0
  397. }
  398. }
  399. });
  400. this.loading = 'success';
  401. this.loadMoreText = '呜呜,没有更多数据啦~';
  402. uni.hideLoading();
  403. uni.stopPullDownRefresh();
  404. return;
  405. }
  406. // 设置状态为加载中
  407. if (!this.isLoadMore) {
  408. this.loading = 'loading';
  409. }
  410. this.loadMoreText = '加载中...';
  411. const paramsStr = qs.stringify(this.queryParams, {
  412. allowDots: true,
  413. encodeValuesOnly: true,
  414. skipNulls: true,
  415. encode: true,
  416. arrayFormat: 'repeat'
  417. })
  418. uni.request({
  419. url: this.$baseApiUrl + '/apis/api.content.halo.run/v1alpha1/posts?' + paramsStr,
  420. method: 'GET',
  421. success: (res) => {
  422. const data = res.data;
  423. this.result.hasNext = data.hasNext;
  424. if (this.isLoadMore) {
  425. this.articleList = this.articleList.concat(data.items);
  426. } else {
  427. this.articleList = data.items;
  428. }
  429. this.loading = 'success';
  430. this.loadMoreText = data.hasNext ? '上拉加载更多' : '呜呜,没有更多数据啦~';
  431. uni.hideLoading();
  432. uni.stopPullDownRefresh();
  433. },
  434. fail: (err) => {
  435. this.loading = 'error';
  436. this.loadMoreText = '加载失败,请下拉刷新!';
  437. uni.$tm.toast(err.message || '数据加载失败!');
  438. uni.stopPullDownRefresh();
  439. }
  440. })
  441. },
  442. //跳转文章详情
  443. fnToArticleDetail(article) {
  444. if (this.calcAuditModeEnabled) {
  445. return;
  446. }
  447. uni.navigateTo({
  448. url: '/pagesA/article-detail/article-detail?name=' + article.metadata.name,
  449. animationType: 'slide-in-right'
  450. });
  451. },
  452. // 快捷导航页面跳转
  453. fnToNavPage(item) {
  454. switch (item.type) {
  455. case 'tabbar':
  456. uni.switchTab({
  457. url: item.path
  458. });
  459. break;
  460. case 'page':
  461. uni.navigateTo({
  462. url: item.path
  463. });
  464. break;
  465. }
  466. },
  467. // 分类页面
  468. fnToCategoryPage() {
  469. uni.switchTab({
  470. url: '/pages/tabbar/category/category'
  471. });
  472. },
  473. // 所有的文章列表页面
  474. fnToArticlesPage() {
  475. uni.navigateTo({
  476. url: '/pagesA/articles/articles'
  477. });
  478. },
  479. // 根据slug查询分类下的文章
  480. fnToCategoryBy(category) {
  481. if (this.calcAuditModeEnabled) {
  482. return;
  483. }
  484. uni.navigateTo({
  485. url: `/pagesA/category-detail/category-detail?name=${category.metadata.name}&title=${category.spec.displayName}`
  486. });
  487. },
  488. fnChangeMode() {
  489. const isBlackTheme = this.$tm.vx.state().tmVuetify.black;
  490. this.$tm.theme.setBlack(!isBlackTheme);
  491. uni.setNavigationBarColor({
  492. backgroundColor: !isBlackTheme ? '#0a0a0a' : '#ffffff',
  493. frontColor: !isBlackTheme ? '#ffffff' : '#0a0a0a'
  494. });
  495. },
  496. fnToSearch() {
  497. uni.navigateTo({
  498. url: '/pagesA/articles/articles'
  499. });
  500. },
  501. fnOnLogoToPage() {
  502. uni.switchTab({
  503. url: '/pages/tabbar/about/about'
  504. })
  505. },
  506. fnClickNav(data) {
  507. uni.navigateTo({
  508. url: data.path
  509. });
  510. },
  511. fnGetNavList() {
  512. this.navList = [{
  513. key: 'archives',
  514. title: this.calcAuditModeEnabled ? '内容归档' : '文章归档',
  515. bgColor: "rgba(3, 169, 244, 0.95)",
  516. shadow: "rgba(3, 169, 244, 0.4)",
  517. bgClass: 'bg-gradient-blue-accent',
  518. icon: 'icon-news',
  519. iconColor: '',
  520. path: '/pagesA/archives/archives',
  521. type: 'page',
  522. show: true
  523. }, {
  524. key: 'vote',
  525. title: '投票中心',
  526. bgColor: "rgba(0, 188, 212,0.95)",
  527. shadow: "rgba(0, 188, 212, 0.4)",
  528. bgClass: 'bg-gradient-blue-accent',
  529. icon: 'icon-box',
  530. iconColor: '',
  531. path: '/pagesA/votes/votes',
  532. type: 'page',
  533. show: this.haloConfigs.loveConfig.loveEnabled
  534. }, {
  535. key: 'disclaimers',
  536. title: '友情链接',
  537. bgColor: "rgba(0, 150, 136, 0.95)",
  538. shadow: "rgba(0, 150, 136, 0.4)",
  539. bgClass: 'bg-gradient-blue-accent',
  540. icon: 'icon-lianjie',
  541. iconColor: '',
  542. path: '/pagesA/friend-links/friend-links',
  543. type: 'page',
  544. show: true
  545. }, {
  546. key: 'love',
  547. title: '恋爱日记',
  548. bgColor: "rgba(255,76,103, 0.95)",
  549. shadow: "rgba(255,76,103, 0.4)",
  550. bgClass: 'bg-gradient-blue-accent',
  551. icon: 'icon-like',
  552. iconColor: '',
  553. path: '/pagesA/love/love',
  554. type: 'page',
  555. show: this.haloConfigs.loveConfig.loveEnabled
  556. }, {
  557. key: 'contact-blogger',
  558. title: '联系博主',
  559. bgColor: "rgba(255, 152, 0, 0.95)",
  560. shadow: "rgba(255, 152, 0, 0.4)",
  561. bgClass: 'bg-gradient-blue-accent',
  562. icon: 'icon-paper-plane',
  563. iconColor: '',
  564. rightText: '博主主常用常用联系方式',
  565. path: '/pagesA/contact/contact',
  566. type: 'page',
  567. show: this.haloConfigs.authorConfig.social.enabled
  568. }]
  569. }
  570. }
  571. };
  572. </script>
  573. <style lang="scss" scoped>
  574. .app-page {
  575. width: 100vw;
  576. min-height: 100vh;
  577. display: flex;
  578. flex-direction: column;
  579. // background-color: #ffffff;
  580. .logo {
  581. width: 60rpx;
  582. height: 60rpx;
  583. box-sizing: border-box;
  584. }
  585. ::v-deep {
  586. .tm-menubars .body .body_wk .left {
  587. min-width: initial;
  588. }
  589. }
  590. }
  591. .loading-wrap {
  592. padding: 24rpx;
  593. }
  594. .search-input {
  595. background-color: #f5f5f5;
  596. align-items: center;
  597. /* #ifdef MP-WEIXIN */
  598. margin-right: 24rpx;
  599. /* #endif */
  600. &_icon {}
  601. &_text {}
  602. }
  603. .show-more {
  604. width: 42rpx;
  605. height: 42rpx;
  606. box-sizing: border-box;
  607. box-shadow: 0rpx 0rpx 24rpx rgba(0, 0, 0, 0.03);
  608. }
  609. .banner {
  610. overflow: hidden;
  611. }
  612. .quick-nav {
  613. background-color: #fff;
  614. box-sizing: border-box;
  615. // box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.03);
  616. .name {
  617. color: var(--main-text-color);
  618. }
  619. }
  620. .category {
  621. width: 94vw;
  622. display: flex;
  623. height: 200rpx;
  624. white-space: nowrap;
  625. margin: 0 24rpx;
  626. .content {
  627. display: inline-block;
  628. padding-left: 24rpx;
  629. &:first-child {
  630. padding-left: 0;
  631. }
  632. }
  633. .cate-empty {
  634. height: inherit;
  635. }
  636. }
  637. .page-item {
  638. &_title {
  639. position: relative;
  640. padding-left: 24rpx;
  641. font-size: 32rpx;
  642. z-index: 1;
  643. color: var(--main-text-color);
  644. &:before {
  645. content: '';
  646. position: absolute;
  647. left: 0rpx;
  648. top: 8rpx;
  649. width: 8rpx;
  650. height: 30rpx;
  651. background-color: rgba(33, 150, 243, 1);
  652. border-radius: 6rpx;
  653. z-index: 0;
  654. }
  655. }
  656. }
  657. .h_row_col2 {
  658. display: flex;
  659. flex-wrap: wrap;
  660. box-sizing: border-box;
  661. padding: 0 12rpx;
  662. .ani-item {
  663. width: 50%;
  664. }
  665. }
  666. .nav-box {
  667. padding: 24rpx 8rpx;
  668. background-color: #ffff;
  669. overflow: hidden;
  670. margin-bottom: 24rpx;
  671. }
  672. .nav-list {
  673. align-items: center;
  674. // justify-content: space-between;
  675. justify-content: space-around;
  676. }
  677. .nav-item {
  678. font-size: 26rpx;
  679. display: flex;
  680. flex-direction: column;
  681. align-items: center;
  682. justify-content: center;
  683. gap: 12rpx;
  684. }
  685. .nav-item-icon {
  686. padding: 24rpx;
  687. // border-radius: 24rpx 32rpx 24rpx 32rpx;
  688. border-radius: 24rpx;
  689. // border: 2rpx solid #fff;
  690. }
  691. .nav-item-text {
  692. font-size: 24rpx;
  693. }
  694. </style>