merHomeComb.vue 20 KB

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