home.vue 20 KB

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