homeComb.vue 23 KB

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