You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

936 lines
22 KiB

3 months ago
  1. <template>
  2. <!-- 组合组件 -->
  3. <view class="page_count tui-skeleton" :data-theme="theme">
  4. <!--logo-->
  5. <view class="bg-img" :style="{'background-image': bgColor}">
  6. <img :src="bgColor" alt="">
  7. <view class="maskBg" :style="[maskBgStyle]"></view>
  8. </view>
  9. <!--头部-->
  10. <view :class="{scrolled:isScrolled, 'my-main': true}" :style="{ height: myMainHeight+'px' }">
  11. <!--搜索-->
  12. <!-- #ifdef H5 -->
  13. <view class="header">
  14. <view class="serch-wrapper acea-row">
  15. <view v-if="logoConfig" class="logo skeleton-rect">
  16. <image :src="logoUrl" mode="scaleToFill"></image>
  17. </view>
  18. <navigator v-if="hotWords.length > 0" :url="'/pages/goods/goods_search/index?searchVal='+searchVal"
  19. :style="[searchBoxStyle]" :class="logoConfig ? 'input' : 'uninput'" hover-class="none"
  20. class="input">
  21. <view class='swiperTxt'>
  22. <swiper :indicator-dots="indicatorDots" :autoplay="true" :interval="interval"
  23. :duration="duration" vertical="true" circular="true" @change="textChange">
  24. <block v-for="(item,index) in hotWords" :key='index'>
  25. <swiper-item catchtouchmove='catchTouchMove'>
  26. <view class=''>
  27. <view class='text'>
  28. <view class='newsTitle line1'><text
  29. class="iconfont icon-sousuo"></text><text>{{item.val}}</text>
  30. </view>
  31. </view>
  32. </view>
  33. </swiper-item>
  34. </block>
  35. </swiper>
  36. </view>
  37. </navigator>
  38. <navigator v-else :style="[searchBoxStyle]" :class="logoConfig ? 'input' : 'uninput'"
  39. url="/pages/goods/goods_search/index" class="input" hover-class="none">
  40. <text class="iconfont icon-sousuo8"></text>
  41. <text class="line1">{{placeWords}}</text>
  42. </navigator>
  43. </view>
  44. </view>
  45. <!-- #endif -->
  46. <!-- #ifdef MP || APP-PLUS-->
  47. <view class="mp-header">
  48. <view class="sys-head" :style="{ height: `${isSmallPage?0:statusBarHeight}px`}"></view>
  49. <!-- #ifdef MP -->
  50. <view class="serch-box" :style="{ 'margin-top': `${searchTop}px`,'height': `${searchHeight}px`}">
  51. <!-- #endif -->
  52. <!-- #ifdef APP-PLUS -->
  53. <view class="serch-box" style="margin-top: 9px;margin-right: 2px;">
  54. <!-- #endif -->
  55. <view class="serch-wrapper acea-row">
  56. <view v-if="logoConfig" class="logo tui-skeleton-rect">
  57. <image :src="logoUrl" mode="scaleToFill"></image>
  58. </view>
  59. <navigator v-if="hotWords.length > 0"
  60. :url="'/pages/goods/goods_search/index?searchVal='+searchVal" :style="[searchBoxStyle]"
  61. hover-class="none" class="input" :class="logoConfig&&!isSmallPage ? 'input' : 'uninput'">
  62. <view class='swiperTxt'>
  63. <swiper :indicator-dots="indicatorDots" :autoplay="true" :interval="interval"
  64. :duration="duration" vertical="true" circular="true" @change="textChange">
  65. <block v-for="(item,index) in hotWords" :key='index'>
  66. <swiper-item catchtouchmove='catchTouchMove'>
  67. <view class='acea-row row-between-wrapper text-box'>
  68. <view class='text'>
  69. <view class='newsTitle line1'><text
  70. class="iconfont icon-sousuo"></text><text>{{item.val}}</text>
  71. </view>
  72. </view>
  73. </view>
  74. </swiper-item>
  75. </block>
  76. </swiper>
  77. </view>
  78. </navigator>
  79. <navigator v-else :style="[searchBoxStyle]" :class="logoConfig ? 'input' : 'uninput'"
  80. url="/pages/goods/goods_search/index" class="input" hover-class="none">
  81. <text class="iconfont icon-sousuo8"></text>
  82. <text class="line1">{{placeWords}}</text>
  83. </navigator>
  84. </view>
  85. </view>
  86. </view>
  87. <!-- #endif -->
  88. <view v-if="tabShowConfig" class="navTabBox tabNav tui-skeletonpictrue acea-row" :style="'top:'+isTop">
  89. <view class="longTab">
  90. <scroll-view scroll-x="true" style="white-space: nowrap; display: flex;" scroll-with-animation
  91. :scroll-left="tabLeft" show-scrollbar="true">
  92. <view class="longItem" :data-index="index" v-for="(item,index) in tabList" :key="index"
  93. :id="'id'+index" @click="longClick(index,item)"
  94. :class="tabClick === index? 'navChecked':''">
  95. <view class="acea-row row-middle">
  96. <view class="name tui-skeleton-rect">{{item.title}}</view>
  97. <view class="underlineBox" v-if="index===tabClick">
  98. <!-- <view class="underline"></view> -->
  99. </view>
  100. </view>
  101. </view>
  102. </scroll-view>
  103. </view>
  104. <view class="category">
  105. <text v-if="isShow" class="iconfont icon-xiangshang" @click="isShow=false"></text>
  106. <text v-if="!isShow" class="iconfont icon-xiangxia" @click="isShow=true"></text>
  107. </view>
  108. </view>
  109. <view v-if="isShow" class="navChangeBox" catchtouchmove="true" :style="'top:'+isTop">
  110. <view class="navChange">
  111. <block v-for="(item,index) in tabList" :key="index">
  112. <view class="titleBox">
  113. <text :class="tabClick === index ? 'checkColor' : 'textColor' " class="title line1"
  114. :id="'id'+index" @click="longClick(index,item)">{{item.title}}</text>
  115. </view>
  116. </block>
  117. </view>
  118. <view class="mask" @touchmove.prevent :hidden="!isShow" @click="isShow=false"></view>
  119. </view>
  120. </view>
  121. <!-- banner -->
  122. <view class="swiperBg" :style="{ marginTop: swiperTop+'px'}">
  123. <view class="swiper page_swiper" v-if="navIndex === 0">
  124. <swiper :autoplay="true" :circular="circular" :interval="intervalBanner" :duration="duration"
  125. :previous-margin="swiperType==0?'30rpx':''" :next-margin="swiperType==0?'30rpx':''"
  126. :current="swiperCur" @change="swiperChange">
  127. <block v-for="(item,index) in banner" :key="index">
  128. <swiper-item :style="[contentStyleBanner]" :class="{ active: index == swiperCur }"
  129. class="scalex">
  130. <view @click="menusTap(item.info[1].value)"
  131. class='slide-navigator acea-row row-between-wrapper tui-skeleton-rect'
  132. :class="swiperType==0?'row-between-wrapper-1':'row-between-wrapper-2'">
  133. <image mode="aspectFill" :style="[contentStyleBanner]" :src="item.img"
  134. class="slide-image aa"></image>
  135. </view>
  136. </swiper-item>
  137. </block>
  138. </swiper>
  139. <view v-if="docType === 0" class="dots" :style="[dotStyle]">
  140. <block v-for="(item,index) in banner" :key="index">
  141. <view class="dot-item"
  142. :style="{'background-color': swiperCur === index ? (dataConfig.themeStyleConfig.tabVal?dataConfig.docColor.color[0].item:themeColor) : ''}">
  143. </view>
  144. </block>
  145. </view>
  146. <view v-if="docType === 1" class="dots" :style="[dotStyle]">
  147. <block v-for="(item,index) in banner" :key="index">
  148. <view class="dot"
  149. :style="{'background-color': swiperCur === index ? (dataConfig.themeStyleConfig.tabVal?dataConfig.docColor.color[0].item:themeColor) : ''}">
  150. </view>
  151. </block>
  152. </view>
  153. </view>
  154. </view>
  155. </view>
  156. </template>
  157. <script>
  158. // +----------------------------------------------------------------------
  159. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  160. // +----------------------------------------------------------------------
  161. // | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
  162. // +----------------------------------------------------------------------
  163. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  164. // +----------------------------------------------------------------------
  165. // | Author: CRMEB Team <admin@crmeb.com>
  166. // +----------------------------------------------------------------------
  167. let app = getApp();
  168. import {
  169. goPage
  170. } from '@/libs/iframe.js'
  171. import animationType from '@/utils/animationType.js'
  172. export default {
  173. name: 'homeComb',
  174. props: {
  175. dataConfig: {
  176. type: Object,
  177. default: () => {}
  178. },
  179. //判断首页显示内容,1显示分类页和商品,0首页
  180. navIndex: {
  181. type: Number,
  182. default: 0
  183. },
  184. //是否开始滚动
  185. isScrolled: {
  186. type: Boolean,
  187. default: false
  188. },
  189. //是否为微页面
  190. isSmallPage: {
  191. type: Boolean,
  192. default: false
  193. },
  194. //页面设置信息
  195. bgInfo: {
  196. type: Object,
  197. default: () => {}
  198. },
  199. },
  200. data() {
  201. return {
  202. myMainHeight: 0, //头部tab切换页和搜索按钮的高度和
  203. indicatorDots: false,
  204. circular: true,
  205. autoplay: false,
  206. duration: 500,
  207. searchH: 0,
  208. swiperTop: 0,
  209. statusBarHeight: app.globalData.statusBarHeight, //手机端头部显示时间位置的高度
  210. swiperCur: 0,
  211. showSkeleton: true,
  212. tabClick: 0, //导航栏被点击
  213. isLeft: 0, //导航栏下划线位置
  214. isWidth: 0, //每个导航栏占位
  215. mainWidth: app.globalData.mainWidth,
  216. theme: app.globalData.theme,
  217. tabLeft: 0,
  218. bgColor: '',
  219. isTop: 0,
  220. navHeight: 0,
  221. isShow: false,
  222. marTop: 0,
  223. searchVal: '',
  224. intervalBanner: 2500,
  225. themeColor:this.$options.filters.filterTheme(app.globalData.theme),
  226. searchTop:0,
  227. searchRight:0,
  228. searchHeight:0,
  229. statusWidth:0,
  230. };
  231. },
  232. watch: {
  233. banner: {
  234. handler(val) {
  235. this.bgColor = val[0].img;
  236. },
  237. immediate: true
  238. },
  239. },
  240. computed: {
  241. //分类是否展示,0展示,1不展示
  242. tabShowConfig() {
  243. return this.dataConfig.tabShowConfig.tabVal == 0;
  244. },
  245. //搜索提示语
  246. placeWords() {
  247. return this.dataConfig.placeWords.val;
  248. },
  249. //轮播切换时间
  250. interval() {
  251. return this.dataConfig.titleConfig.val * 1000
  252. },
  253. //指示器类型,0圆,1直,2无
  254. docType() {
  255. return this.dataConfig.docConfig.tabVal
  256. },
  257. //轮播图样式
  258. swiperType() {
  259. return this.dataConfig.swiperStyleConfig.tabVal
  260. },
  261. //搜索热词列表
  262. hotWords() {
  263. return this.dataConfig.hotWords.list
  264. },
  265. //分类选中颜色
  266. lineColor() {
  267. return {
  268. backgroundColor: this.dataConfig.checkColor.color[0].item
  269. }
  270. },
  271. maskBgStyle() {
  272. return {
  273. background: this.bgInfo.isBgColor=='1' ?
  274. `linear-gradient(180deg, rgba(245, 245, 245, 0) 0%, ${this.bgInfo.colorPicker} 100%)` :
  275. `linear-gradient(180deg, rgba(245, 245, 245, 0) 0%, #f5f5f5 100%)`,
  276. }
  277. },
  278. //判断logo图是否展示
  279. logoConfig() {
  280. return this.dataConfig.logoConfig.url && this.dataConfig.searConfig.tabVal === 1
  281. },
  282. //logo图
  283. logoUrl() {
  284. if (this.isScrolled && this.dataConfig.logoFixConfig.url) {
  285. return this.dataConfig.logoFixConfig.url
  286. } else {
  287. return this.dataConfig.logoConfig.url
  288. }
  289. },
  290. //标签文字颜色
  291. textColor() {
  292. return this.dataConfig.fontColor.color[0].item;
  293. },
  294. //分类列表
  295. tabList() {
  296. //type=0微页面,1分类,2首页
  297. let tabList = this.dataConfig.listConfig.list;
  298. tabList.unshift({
  299. title: '首页',
  300. type: 2,
  301. val: 0
  302. })
  303. return tabList
  304. },
  305. //轮播列表
  306. banner() {
  307. return this.dataConfig.swiperConfig.list
  308. },
  309. //搜索框样式
  310. searchBoxStyle() {
  311. return {
  312. borderRadius: this.dataConfig.contentStyle.val ? this.dataConfig.contentStyle.val + 'px' : '0',
  313. backgroundColor: this.dataConfig.borderColor.color[0].item,
  314. color: this.dataConfig.textColor.color[0].item,
  315. textAlign: this.dataConfig.textPosition.list[this.dataConfig.textPosition.tabVal].style,
  316. // #ifdef MP
  317. height:this.searchHeight + 'px',
  318. flex:!this.isSmallPage?1:'',
  319. marginRight:!this.isSmallPage?(this.statusWidth + this.searchRight+'px'):'',
  320. // #endif
  321. }
  322. },
  323. //指示器样式
  324. dotStyle() {
  325. return {
  326. padding: '0 40rpx',
  327. justifyContent: this.dataConfig.txtStyle.tabVal === 1 ? 'center' : this.dataConfig.txtStyle
  328. .tabVal === 2 ? 'flex-end' : 'flex-start'
  329. }
  330. },
  331. //轮播图圆角
  332. contentStyleBanner() {
  333. return {
  334. 'borderRadius': this.dataConfig.contentStyleBanner.val ? this.dataConfig.contentStyleBanner
  335. .val + 'px' : '0'
  336. }
  337. },
  338. },
  339. created() {
  340. // #ifdef MP || APP-PLUS
  341. this.isTop = (this.isSmallPage ? 0 : this.statusBarHeight) + 48 + 'px' //分类的top值
  342. // this.tabShowConfig,true有分类,false无分类
  343. if (!this.tabShowConfig) {
  344. this.myMainHeight = (this.isSmallPage ? 0 : this.statusBarHeight) + 40 + 10; //头部tab切换页和搜索按钮的高度和,10是下边距
  345. } else {
  346. this.myMainHeight = (this.isSmallPage ? 0 : this.statusBarHeight) + 40 + 42; //头部tab切换页和搜索按钮的高度和
  347. }
  348. // #endif
  349. // #ifdef MP
  350. const res = uni.getMenuButtonBoundingClientRect()
  351. const statusHeight = res.top //胶囊距离顶部
  352. const statusRight = res.right //胶囊右边界坐标
  353. const jnHeight = res.height //胶囊高度
  354. this.statusWidth= res.width
  355. this.searchTop=statusHeight-this.statusBarHeight
  356. this.searchHeight=jnHeight
  357. //搜索框宽度计算
  358. uni.getSystemInfo({
  359. success:res=>{
  360. this.searchRight=res.windowWidth-statusRight
  361. }
  362. })
  363. // #endif
  364. // #ifdef H5
  365. this.isTop = 0
  366. this.myMainHeight = 'auto';
  367. // #endif
  368. this.isWidth = (this.mainWidth - 65) / 4;
  369. setTimeout((e) => {
  370. const query = uni.createSelectorQuery().in(this);
  371. query.select('.header').boundingClientRect(res => {
  372. if (res) this.marTop = res.height //头部的高度
  373. }).exec();
  374. //展示与不展示分类的距离值判断
  375. if (!this.tabShowConfig) {
  376. // 不展示分类
  377. query.select('.swiperBg').boundingClientRect(res => {
  378. // #ifdef H5
  379. this.swiperTop = this.navHeight + this.marTop + this.statusBarHeight +
  380. 4; //轮播图的top值
  381. //#endif
  382. // #ifndef H5
  383. if (this.isSmallPage) {
  384. this.swiperTop = this.statusBarHeight; //轮播图的top值
  385. } else {
  386. this.swiperTop = this.statusBarHeight + 48; //轮播图的top值
  387. }
  388. //#endif
  389. }).exec();
  390. } else {
  391. //展示分类
  392. query.select('.navTabBox').boundingClientRect(data => {
  393. this.navHeight = data.height //元素navHeight的高度
  394. // #ifdef H5
  395. this.swiperTop = this.navHeight + this.marTop + this.statusBarHeight +
  396. 4; //轮播图的top值
  397. //#endif
  398. // #ifndef H5
  399. if (this.isSmallPage) {
  400. this.swiperTop = 85; //轮播图的top值
  401. } else {
  402. this.swiperTop = this.statusBarHeight + 85; //轮播图的top值
  403. }
  404. //#endif
  405. }).exec();
  406. }
  407. }, 200)
  408. },
  409. methods: {
  410. //轮播图跳转
  411. menusTap(url) {
  412. this.$util.navigateTo(url);
  413. },
  414. swiperChange(e) {
  415. let {
  416. current,
  417. source
  418. } = e.detail;
  419. if (source === 'autoplay' || source === 'touch') {
  420. this.swiperCur = e.detail.current;
  421. this.bgColor = this.banner[e.detail.current]['img']
  422. }
  423. },
  424. textChange(e) {
  425. let {
  426. current,
  427. source
  428. } = e.detail;
  429. if (source === 'autoplay' || source === 'touch') {
  430. this.searchVal = this.hotWords[e.detail.current]['val']
  431. }
  432. },
  433. // 导航栏点击
  434. longClick(index, item) {
  435. this.tabClick = index; //设置导航点击了哪一个
  436. this.$nextTick(() => {
  437. let id = 'id' + index;
  438. this.tabLeft = (index - 2) * this.isWidth //设置下划线位置
  439. this.$emit('changeTab', index, item);
  440. })
  441. },
  442. parentEmit(id, index) {
  443. this.$emit('changeTab', id, index);
  444. }
  445. }
  446. }
  447. </script>
  448. <style lang="scss" scoped>
  449. .uninput {
  450. /* #ifdef MP */
  451. width: 510rpx !important;
  452. /* #endif */
  453. /* #ifndef MP */
  454. width: 100% !important;
  455. /* #endif */
  456. }
  457. .icon-sousuo8 {
  458. font-size: 15px;
  459. }
  460. .bgwhite {
  461. background-color: #fff !important;
  462. }
  463. .mask {
  464. z-index: 999;
  465. top: 260rpx;
  466. }
  467. .navChangeBox {
  468. position: relative;
  469. }
  470. .navChange {
  471. background-color: #fff;
  472. position: absolute;
  473. z-index: 999999;
  474. width: 100%;
  475. border-radius: 0px 0px 16rpx 16rpx;
  476. padding: 24rpx 20rpx;
  477. display: grid;
  478. grid-template-rows: auto;
  479. grid-template-columns: repeat(5, 1fr);
  480. grid-column-gap: 10rpx;
  481. grid-row-gap: 20rpx;
  482. .nobg {
  483. background-color: #fff !important;
  484. }
  485. .titleBox {
  486. height: 58rpx;
  487. background: #F2F2F2;
  488. border-radius: 8rpx;
  489. text-align: center;
  490. }
  491. .title {
  492. margin: 0 auto;
  493. display: inline-block;
  494. width: 118rpx;
  495. height: 58rpx;
  496. line-height: 58rpx;
  497. text-align: center;
  498. opacity: 1;
  499. color: #333333;
  500. font-size: 24rpx;
  501. }
  502. .titleBox:nth-child(5n) {
  503. margin-right: 0;
  504. }
  505. .titleBox:last-child {
  506. margin-bottom: 0;
  507. }
  508. .changed {
  509. border-radius: 8rpx;
  510. @include cate-two-btn(theme);
  511. @include coupons_border_color(theme);
  512. .title {
  513. @include main_color(theme);
  514. }
  515. }
  516. }
  517. .row-middle {
  518. flex-direction: column;
  519. }
  520. .navTabBox {
  521. width: 100%;
  522. height: 66rpx;
  523. color: rgba(255, 255, 255, 1);
  524. position: relative;
  525. padding: 0 24rpx 0 24rpx;
  526. display: flex;
  527. justify-content: space-between;
  528. z-index: 9;
  529. &.isFixed {
  530. z-index: 10;
  531. position: fixed;
  532. left: 0;
  533. width: 100%;
  534. /* #ifdef H5 */
  535. top: 0;
  536. /* #endif */
  537. }
  538. .click {
  539. color: white;
  540. }
  541. .longTab {
  542. width: 94%;
  543. .longItem {
  544. //height: 72rpx;
  545. display: inline-block;
  546. // line-height: 52rpx;
  547. text-align: center;
  548. font-size: 28rpx;
  549. color: #fff;
  550. white-space: nowrap;
  551. text-overflow: ellipsis;
  552. margin-right: 42rpx;
  553. &.click {
  554. font-weight: bold;
  555. font-size: 30rpx;
  556. color: #fff;
  557. font-weight: bold;
  558. }
  559. .name {
  560. height: 48rpx;
  561. }
  562. }
  563. .underlineBox {
  564. margin-top: 8rpx;
  565. height: 3px;
  566. transition: .5s;
  567. .underline {
  568. width: 33rpx;
  569. height: 4rpx;
  570. }
  571. }
  572. }
  573. .category {
  574. height: 66rpx;
  575. line-height: 46rpx;
  576. z-index: 3;
  577. // padding: 0 15rpx 0 25rpx;
  578. .iconfont {
  579. font-size: 24rpx;
  580. }
  581. }
  582. }
  583. .swiperBg {
  584. z-index: 1;
  585. margin-top: 10rpx;
  586. .colorBg {
  587. position: absolute;
  588. left: 0;
  589. top: 0;
  590. height: 130rpx;
  591. width: 100%;
  592. }
  593. .page_swiper {
  594. position: relative;
  595. width: 100%;
  596. height: auto;
  597. margin: 0 auto;
  598. border-radius: 10rpx;
  599. overflow: hidden;
  600. z-index: 8;
  601. padding: 0rpx 20rpx 0rpx;
  602. image {
  603. width: 100%;
  604. height: 310rpx;
  605. margin: 0 auto;
  606. border-radius: 10rpx;
  607. }
  608. .acea-row.row-between-wrapper {
  609. height: 310rpx;
  610. margin: 0 auto;
  611. border-radius: 10rpx;
  612. }
  613. .acea-row.row-between-wrapper-1 {
  614. width: 100%;
  615. }
  616. .acea-row.row-between-wrapper-2 {
  617. width: 97%;
  618. }
  619. swiper {
  620. width: 100%;
  621. display: block;
  622. height: 310rpx;
  623. &.scalex {
  624. /deep/.uni-swiper-slide-frame {
  625. transform: translate(0, 0) !important;
  626. }
  627. }
  628. }
  629. image {
  630. transform: scale(0.96);
  631. transition: all 0.6s ease;
  632. }
  633. /deep/ swiper-item.active {
  634. image {
  635. transform: scale(1);
  636. }
  637. }
  638. /*用来包裹所有的小圆点 */
  639. .dots {
  640. display: flex;
  641. flex-direction: row;
  642. position: absolute;
  643. bottom: 40rpx;
  644. align-items: center;
  645. width: 100%;
  646. }
  647. .dot-item {
  648. width: 10rpx;
  649. height: 10rpx;
  650. background-color: rgba(255, 255, 255, .4);
  651. border-radius: 50%;
  652. margin: 0 6rpx;
  653. }
  654. /*未选中时的小圆点样式 */
  655. .dot {
  656. width: 16rpx;
  657. height: 6rpx;
  658. border-radius: 6rpx;
  659. margin-right: 6rpx;
  660. background-color: rgba(255, 255, 255, .4);
  661. }
  662. }
  663. }
  664. .scrolled {
  665. z-index: 5000;
  666. position: fixed;
  667. left: 0;
  668. top: 0;
  669. width: 100%;
  670. background-color: #fff !important;
  671. color: #000 !important;
  672. transition: background-color .5s ease;
  673. .longItem,
  674. .click,
  675. .category text {
  676. color: #000 !important;
  677. }
  678. .btn .iconfont {
  679. color: #333 !important;
  680. }
  681. .iconnum {
  682. background: #333 !important;
  683. }
  684. .underline {
  685. background: #000 !important;
  686. }
  687. .click {
  688. &::after {
  689. background-color: #fff !important;
  690. }
  691. }
  692. .input,
  693. .uninput {
  694. background-color: #eee !important;
  695. }
  696. }
  697. .page_count {
  698. position: relative;
  699. overflow: hidden;
  700. background-repeat: no-repeat;
  701. .bg-img {
  702. position: absolute;
  703. width: 100%;
  704. height: 100%;
  705. top: 0;
  706. /* #ifdef MP || APP-PLUS */
  707. z-index: -1;
  708. /* #endif */
  709. /* #ifdef H5 */
  710. z-index: 0;
  711. /* #endif */
  712. z-index: 0;
  713. filter: blur(0);
  714. overflow: hidden;
  715. img {
  716. width: 100%;
  717. height: 100%;
  718. filter: blur(30rpx);
  719. transform: scale(1.5);
  720. }
  721. .maskBg {
  722. position: absolute;
  723. bottom: 0;
  724. width: 100%;
  725. height: 136px;
  726. background: linear-gradient(180deg, rgba(245, 245, 245, 0) 0%, #f5f5f5 100%);
  727. }
  728. }
  729. }
  730. .my-main {
  731. left: 0;
  732. position: fixed;
  733. top: 0;
  734. width: 100%;
  735. z-index: 30;
  736. transition: background-color .5s ease;
  737. }
  738. .page_count {
  739. .header {
  740. width: 100%;
  741. padding: 24rpx;
  742. .serch-wrapper {
  743. align-items: center;
  744. .logo {
  745. width: 118rpx;
  746. margin-right: 24rpx;
  747. }
  748. image {
  749. width: 118rpx;
  750. height: 42rpx;
  751. }
  752. .input {
  753. display: flex;
  754. align-items: center;
  755. width: 546rpx;
  756. height: 55rpx;
  757. padding-left: 20rpx;
  758. font-size: 26rpx;
  759. padding-right: 4rpx;
  760. box-sizing: border-box;
  761. .iconfont {
  762. margin-right: 4rpx;
  763. font-size: 26rpx;
  764. color: #666666;
  765. }
  766. }
  767. }
  768. .tabNav {
  769. padding-top: 24rpx;
  770. }
  771. }
  772. /* #ifdef MP || APP-PLUS */
  773. .mp-header {
  774. z-index: 999;
  775. position: fixed;
  776. left: 0;
  777. top: 0;
  778. width: 100%;
  779. /* #ifdef H5 */
  780. padding-bottom: 20rpx;
  781. /* #endif */
  782. .serch-wrapper {
  783. height: 100%;
  784. align-items: center;
  785. padding: 0 24rpx 0 24rpx;
  786. image {
  787. width: 118rpx;
  788. height: 42rpx;
  789. margin-right: 30rpx;
  790. }
  791. .input {
  792. display: flex;
  793. align-items: center;
  794. /* #ifdef MP */
  795. width: 365rpx;
  796. /* #endif */
  797. /* #ifndef MP */
  798. width: 546rpx;
  799. /* #endif */
  800. /* #ifdef APP-PLUS */
  801. flex: 1;
  802. /* #endif */
  803. height: 50rpx;
  804. padding-left: 20rpx;
  805. font-size: 28rpx;
  806. box-sizing: border-box;
  807. .iconfont {
  808. margin-right: 20rpx;
  809. }
  810. }
  811. }
  812. }
  813. /* #endif */
  814. .swiperTxt {
  815. width: 100%;
  816. height: 100%;
  817. line-height: 52rpx;
  818. overflow: hidden;
  819. }
  820. .swiperTxt .text {
  821. width: 100%;
  822. }
  823. .swiperTxt .text .label {
  824. font-size: 20rpx;
  825. color: #ff4c48;
  826. width: 64rpx;
  827. height: 30rpx;
  828. border-radius: 40rpx;
  829. text-align: center;
  830. line-height: 28rpx;
  831. border: 2rpx solid #ff4947;
  832. }
  833. .swiperTxt .text .newsTitle {
  834. font-size: 24rpx;
  835. }
  836. .swiperTxt swiper {
  837. height: 100%;
  838. }
  839. }
  840. .navChecked {
  841. font-size: 32rpx !important;
  842. font-weight: 500;
  843. }
  844. .checkColor {
  845. @include main_color(theme);
  846. }
  847. .text-box{
  848. height: 100%;
  849. }
  850. </style>