homeComb.vue 23 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016
  1. <template>
  2. <view class="page_count">
  3. <common-wrapper :config="configData">
  4. <div class="bag-gradient" :style="[bgGradientStyle]"></div>
  5. <view class="bg-img" v-if="imgUrls.length">
  6. <image
  7. :class="{ active: index == swiperCur }"
  8. v-for="(i, index) in imgUrls"
  9. :key="index"
  10. :src="i.img"
  11. ></image>
  12. </view>
  13. <!--搜索-->
  14. <view class="my-main">
  15. <view class="mp-header" id="home" :style="[mpHeaderStyle]">
  16. <view
  17. class="sys-head"
  18. :style="{ height: statusBarHeight + 'px' }"
  19. v-if="!special"
  20. ></view>
  21. <view class="serch-box">
  22. <view class="serch-wrapper flex" :class="special ? 'on' : ''">
  23. <view
  24. class="title skeleton-rect"
  25. :style="[titleStyle]"
  26. v-if="searchBox == 0"
  27. >{{ titleConfig }}</view
  28. >
  29. <view class="logo skeleton-rect" v-if="searchBox == 1">
  30. <image :src="logoUpImg" mode="heightFix"></image>
  31. </view>
  32. <navigator
  33. v-if="hotWords.length"
  34. :url="'/pages/goods/goods_search/index?searchVal=' + searchVal"
  35. :class="logoConfig ? 'input' : 'uninput'"
  36. hover-class="none"
  37. class="skeleton-rect"
  38. :style="[inputStyle]"
  39. >
  40. <view class="swiperTxt">
  41. <swiper
  42. :indicator-dots="indicatorDots"
  43. :autoplay="autoplay"
  44. :interval="interval"
  45. :duration="duration"
  46. vertical="true"
  47. circular="true"
  48. @change="textChange"
  49. >
  50. <block v-for="(item, index) in hotWords" :key="index">
  51. <swiper-item catchtouchmove="catchTouchMove">
  52. <view class="acea-row row-between-wrapper">
  53. <view class="text acea-row row-between-wrapper">
  54. <view class="newsTitle line1">{{ item.val }}</view>
  55. </view>
  56. </view>
  57. </swiper-item>
  58. </block>
  59. </swiper>
  60. </view>
  61. <text class="iconfont icon-ic_search"></text>
  62. </navigator>
  63. <navigator
  64. v-else
  65. url="/pages/goods/goods_search/index"
  66. hover-class="none"
  67. class="skeleton-rect input"
  68. :style="[inputStyle]"
  69. >
  70. {{ dataConfig.inputConfig.value }}
  71. <text class="iconfont icon-ic_search"></text>
  72. </navigator>
  73. </view>
  74. </view>
  75. </view>
  76. <view
  77. :style="'height:' + (statusBarHeight + 43) + 'px'"
  78. v-if="!special && searchShow"
  79. ></view>
  80. <view v-if="!dataConfig.classConfig.tabVal" class="navTabBox tabNav">
  81. <view class="longTab" :style="{ width: `${mainWidth}px` }">
  82. <scroll-view
  83. scroll-x="true"
  84. scroll-with-animation
  85. :scroll-left="tabLeft"
  86. show-scrollbar="true"
  87. >
  88. <view
  89. class="longItem"
  90. v-for="(item, index) in tabListConfig"
  91. :key="index"
  92. :class="{ click: index == tabClick }"
  93. :id="'id' + index"
  94. :data-index="index"
  95. @click.stop="changeTab(item, index)"
  96. >
  97. {{ item.text.val }}
  98. </view>
  99. </scroll-view>
  100. </view>
  101. <view class="category" @click="showCategory">
  102. <text
  103. class="iconfont icon-a-ic_Imageandtextsorting"
  104. :style="'color:' + (isScrolled ? txtColor : '#fff')"
  105. ></text>
  106. </view>
  107. </view>
  108. <view v-if="isCategory" class="category_count">
  109. <view
  110. class="sys-head tui-skeleton"
  111. :style="{ height: statusBarHeight + 'px' }"
  112. v-if="!special"
  113. ></view>
  114. <view class="fs-28">精选类目</view>
  115. <view class="cate_count grid-column-4 grid-gap-16rpx mt-32">
  116. <view
  117. class="category_item"
  118. :style="[index === tabClick ? classColor : '']"
  119. @click="changeTab(item, index)"
  120. v-for="(item, index) in tabListConfig"
  121. :key="index"
  122. :id="'ids' + index"
  123. >
  124. {{ item.text.val }}
  125. </view>
  126. </view>
  127. </view>
  128. </view>
  129. <view
  130. class="swiperBg"
  131. :style="{ paddingBottom: isMenu ? '20rpx' : '20rpx' }"
  132. >
  133. <view class="swiper page_swiper" v-if="imgUrls.length">
  134. <swiper
  135. :autoplay="true"
  136. :circular="circular"
  137. :interval="intervals"
  138. :duration="duration"
  139. :current="swiperCur"
  140. :previous-margin="swiperMargin"
  141. :next-margin="swiperMargin"
  142. @change="swiperChange"
  143. style="height: 360rpx"
  144. >
  145. <block v-for="(item, index) in imgUrls" :key="index">
  146. <swiper-item
  147. :class="{ active: index == swiperCur, scalex: isScale }"
  148. >
  149. <view
  150. @click="goDetail(item)"
  151. class="slide-navigator acea-row row-between-wrapper"
  152. >
  153. <image
  154. :src="item.img"
  155. :style="[imageStyle]"
  156. mode="aspectFill"
  157. class="slide-image"
  158. ></image>
  159. </view>
  160. </swiper-item>
  161. </block>
  162. </swiper>
  163. <!--重置小圆点的样式 -->
  164. <view
  165. class="dots acea-row"
  166. :class="{
  167. 'row-center': dataConfig.docPosition.tabVal == 1,
  168. 'row-right': dataConfig.docPosition.tabVal == 2,
  169. }"
  170. >
  171. <view v-if="dataConfig.docConfig.tabVal == 2" class="dot3">
  172. <view class="dot" :style="[progressWidth, dotBgColor]">
  173. <view class="active" :style="[progressValue, dotColor]"></view>
  174. </view>
  175. </view>
  176. <view
  177. v-else
  178. class="acea-row"
  179. :class="{
  180. dot1: dataConfig.docConfig.tabVal == 0,
  181. dot2: dataConfig.docConfig.tabVal == 1,
  182. dot4: dataConfig.docConfig.tabVal == 3,
  183. }"
  184. >
  185. <view
  186. v-for="(item, index) in imgUrls"
  187. :key="index"
  188. class="dot"
  189. :class="{ active: index == swiperCur }"
  190. :style="[dotBgColor, index == swiperCur ? dotColor : '']"
  191. ></view>
  192. </view>
  193. </view>
  194. </view>
  195. </view>
  196. <view v-if="isCategory" class="mask" @click="isCategory = false"></view>
  197. </common-wrapper>
  198. </view>
  199. </template>
  200. <script>
  201. import commonWrapper from "./commonWrapper.vue";
  202. import { getCategoryList } from "@/api/store.js";
  203. import { getCategoryVersion } from "@/api/api.js";
  204. let statusBarHeight = uni.getWindowInfo().statusBarHeight;
  205. export default {
  206. components: { commonWrapper },
  207. name: "homeComb",
  208. props: {
  209. dataConfig: {
  210. type: Object,
  211. default: () => {},
  212. },
  213. isFixed: {
  214. type: Boolean,
  215. default: false,
  216. },
  217. isScrolled: {
  218. type: Boolean,
  219. default: false,
  220. },
  221. isScale: {
  222. type: Boolean,
  223. default: false,
  224. },
  225. isMenu: {
  226. type: Boolean,
  227. default: false,
  228. },
  229. special: {
  230. type: Number,
  231. default: 0,
  232. },
  233. belongIndex: {
  234. type: Number,
  235. default: 0,
  236. },
  237. },
  238. data() {
  239. return {
  240. statusBarHeight: statusBarHeight,
  241. autoplay: true,
  242. interval: this.dataConfig.numConfig.val * 1000 || 2500,
  243. duration: 500,
  244. logoConfig: this.dataConfig.logoConfig.url,
  245. tabClick: 0, //导航栏被点击
  246. isLeft: 0, //导航栏下划线位置
  247. isWidth: 0, //每个导航栏占位
  248. mainWidth: 0,
  249. tabLeft: 0,
  250. tabTitle: [],
  251. isTop: 0,
  252. navHeight: 38,
  253. indicatorDots: false,
  254. circular: true,
  255. intervals: 3000,
  256. imgUrls: [], //图片轮播数据
  257. swiperCur: 0,
  258. searchVal: "",
  259. bgColor: this.dataConfig.swiperConfig.list.length
  260. ? this.dataConfig.swiperConfig.list[0].img
  261. : "",
  262. isCategory: false,
  263. txtColor: "",
  264. hotWordShow: false,
  265. bgColorLeft: "",
  266. bgColorRight: "",
  267. searchShow: false,
  268. titleConfig: this.dataConfig.titleConfig.value,
  269. searchBox: this.dataConfig.searchBox.tabVal,
  270. fixConfig: this.dataConfig.searchFix.tabVal,
  271. gradientColor: "#f5f5f5",
  272. };
  273. },
  274. computed: {
  275. configData() {
  276. this.gradientColor = this.dataConfig.gradientColor.color[0].item;
  277. return {
  278. ...this.dataConfig,
  279. paddingConfig: this.dataConfig.paddingConfig || {
  280. isAll: false,
  281. valList: [
  282. {
  283. val: this.dataConfig.topConfig
  284. ? this.dataConfig.topConfig.val
  285. : 0,
  286. },
  287. {
  288. val: this.dataConfig.prConfig ? this.dataConfig.prConfig.val : 0,
  289. },
  290. {
  291. val: this.dataConfig.bottomConfig
  292. ? this.dataConfig.bottomConfig.val
  293. : 0,
  294. },
  295. {
  296. val: this.dataConfig.prConfig ? this.dataConfig.prConfig.val : 0,
  297. },
  298. ],
  299. },
  300. marginConfig: this.dataConfig.marginConfig || {
  301. isAll: false,
  302. valList: [
  303. {
  304. val: this.dataConfig.mbConfig ? this.dataConfig.mbConfig.val : 0,
  305. },
  306. {
  307. val: 0,
  308. },
  309. {
  310. val: 0,
  311. },
  312. {
  313. val: 0,
  314. },
  315. ],
  316. },
  317. backgroundConfig:
  318. this.dataConfig.backgroundConfig || this.dataConfig.bottomBgColor,
  319. };
  320. },
  321. classColor() {
  322. let color = this.dataConfig.classColor;
  323. return {
  324. background: `linear-gradient(90deg, ${color.color[0].item} 50%, ${color.color[1].item} 100%)`,
  325. color: "#fff",
  326. };
  327. },
  328. swiperMargin() {
  329. return this.dataConfig.styleConfig.tabVal ? "50rpx" : "10rpx";
  330. },
  331. mpHeaderStyle() {
  332. let style = {};
  333. if (this.isScrolled && this.dataConfig.searchConfig.tabVal) {
  334. style.background = `linear-gradient(90deg, #FFFFFF 50%, #FFFFFF 100%)`;
  335. style.position = `fixed`;
  336. this.searchShow = true;
  337. } else {
  338. this.searchShow = false;
  339. }
  340. return style;
  341. },
  342. inputStyle() {
  343. let style = {};
  344. if (this.isScrolled && this.dataConfig.searchConfig.tabVal) {
  345. style.background = `#F5F5F5`;
  346. style.color = `#BBBBBB`;
  347. }
  348. return style;
  349. },
  350. titleStyle() {
  351. let style = {};
  352. if (this.isScrolled && this.dataConfig.searchConfig.tabVal) {
  353. style.color = `#333`;
  354. }
  355. return style;
  356. },
  357. progressWidth() {
  358. return {
  359. width: `${this.dataConfig.swiperConfig.list.length * 20}rpx`,
  360. };
  361. },
  362. progressValue() {
  363. return {
  364. width: `${
  365. ((this.swiperCur + 1) / this.dataConfig.swiperConfig.list.length) *
  366. 100
  367. }%`,
  368. };
  369. },
  370. dotBgColor() {
  371. return {
  372. background: this.dataConfig.dotBgColor.color[0].item,
  373. };
  374. },
  375. dotColor() {
  376. return {
  377. background: this.dataConfig.dotColor.color[0].item,
  378. };
  379. },
  380. imageStyle() {
  381. let borderRadius = `${this.dataConfig.filletImg.val * 2}rpx`;
  382. if (this.dataConfig.filletImg.type) {
  383. borderRadius = `${this.dataConfig.filletImg.valList[0].val * 2}rpx ${
  384. this.dataConfig.filletImg.valList[1].val * 2
  385. }rpx ${this.dataConfig.filletImg.valList[3].val * 2}rpx ${
  386. this.dataConfig.filletImg.valList[2].val * 2
  387. }rpx`;
  388. }
  389. return {
  390. "border-radius": borderRadius,
  391. };
  392. },
  393. tabListConfig() {
  394. let tabList = this.dataConfig.tabListConfig.list || [];
  395. tabList.unshift({
  396. classPage: {
  397. id: 0,
  398. },
  399. dataType: {
  400. tabVal: 0,
  401. },
  402. microPage: {
  403. id: 0,
  404. },
  405. text: {
  406. val: "首页",
  407. },
  408. });
  409. return tabList;
  410. },
  411. hotWords() {
  412. return this.dataConfig.hotWords.list.filter((item) => {
  413. return item.val;
  414. });
  415. },
  416. logoUpImg() {
  417. let img = "";
  418. if (
  419. this.isScrolled &&
  420. this.dataConfig.searchConfig.tabVal &&
  421. this.dataConfig.logoUpConfig &&
  422. this.dataConfig.logoUpConfig.url
  423. ) {
  424. img = this.dataConfig.logoUpConfig.url;
  425. } else {
  426. img = this.dataConfig.logoConfig.url;
  427. }
  428. return img;
  429. },
  430. bgGradientStyle() {
  431. return {
  432. "background-image": `linear-gradient(to bottom, rgba(245,245,245,0) 0%, rgba(245,245,245,0) 50%, ${this.gradientColor} 100%)`,
  433. };
  434. },
  435. },
  436. created() {
  437. var that = this;
  438. // 获取设备宽度
  439. uni.getSystemInfo({
  440. success(e) {
  441. that.mainWidth = e.windowWidth;
  442. that.isWidth = (e.windowWidth - 65) / 8;
  443. },
  444. });
  445. that.imgUrls = that.dataConfig.swiperConfig.list;
  446. },
  447. mounted() {
  448. let that = this;
  449. that.hotWords.forEach((item) => {
  450. if (item.val) {
  451. this.hotWordShow = true;
  452. }
  453. });
  454. uni.setStorageSync("hotList", that.hotWords);
  455. },
  456. methods: {
  457. goDetail(url) {
  458. let urls = url.info[1].value;
  459. this.$util.JumpPath(urls);
  460. },
  461. //替换安全域名
  462. setDomain: function (url) {
  463. url = url ? url.toString() : "";
  464. //本地调试打开,生产请注销
  465. if (url.indexOf("https://") > -1) return url;
  466. else return url.replace("http://", "https://");
  467. },
  468. swiperChange(e) {
  469. let { current, source } = e.detail;
  470. if (source === "autoplay" || source === "touch") {
  471. this.swiperCur = e.detail.current;
  472. this.bgColor = this.imgUrls[e.detail.current]["img"];
  473. }
  474. },
  475. textChange(e) {
  476. let { current, source } = e.detail;
  477. if (source === "autoplay" || source === "touch") {
  478. this.searchVal = this.hotWords[e.detail.current]["val"];
  479. }
  480. },
  481. /**显示全部分类*/
  482. showCategory() {
  483. this.isCategory = true;
  484. },
  485. /*跳转为页面*/
  486. changeTab(item, index) {
  487. this.isCategory = false;
  488. if (item.text && item.text.val === "首页") {
  489. this.tabClick = index; //设置导航点击了哪一个
  490. uni.switchTab({
  491. url: "/pages/index/index",
  492. });
  493. return;
  494. }
  495. this.$emit("bindSortId", item, index);
  496. if (this.tabClick == index) return;
  497. this.tabClick = index; //设置导航点击了哪一个
  498. this.isLeft = index * this.isWidth + 16; //设置下划线位置
  499. let data = {
  500. type: item.dataType.tabVal, // 0 微页面 1 商品分类
  501. microPage: item.microPage.id,
  502. classPage: item.classPage.id,
  503. };
  504. },
  505. },
  506. };
  507. </script>
  508. <style lang="scss" scoped>
  509. .scrollColor {
  510. transition: background-color 0.5s ease;
  511. background-color: #fff;
  512. color: #333 !important;
  513. .longItem {
  514. // color: #333 !important;
  515. &.click {
  516. &::after {
  517. background: #333 !important;
  518. }
  519. }
  520. }
  521. }
  522. .page_count {
  523. position: relative;
  524. overflow: hidden;
  525. .bag-gradient {
  526. position: absolute;
  527. left: 0;
  528. top: 0;
  529. width: 100%;
  530. height: 100%;
  531. overflow: hidden;
  532. z-index: 1;
  533. }
  534. .bg-img {
  535. position: absolute;
  536. width: 100%;
  537. height: 100%;
  538. top: 0;
  539. z-index: 0;
  540. filter: blur(0);
  541. overflow: hidden;
  542. image.active {
  543. opacity: 1;
  544. transform: scale(1.5);
  545. }
  546. image {
  547. position: absolute;
  548. left: 0;
  549. top: 0;
  550. width: 100%;
  551. height: 100%;
  552. filter: blur(30rpx);
  553. transform: scale(1.5);
  554. opacity: 0;
  555. transition: opacity 0.5s ease;
  556. }
  557. }
  558. }
  559. .my-main {
  560. z-index: 1200;
  561. position: relative;
  562. transition: background-color 0.5s ease;
  563. }
  564. .swiperTxt {
  565. width: 300rpx;
  566. height: 100%;
  567. line-height: 58rpx;
  568. overflow: hidden;
  569. }
  570. .swiperTxt .text {
  571. width: 480rpx;
  572. }
  573. .swiperTxt .text .label {
  574. font-size: 20rpx;
  575. color: #ff4c48;
  576. width: 64rpx;
  577. height: 30rpx;
  578. border-radius: 40rpx;
  579. text-align: center;
  580. line-height: 28rpx;
  581. border: 2rpx solid #ff4947;
  582. }
  583. .swiperTxt .text .newsTitle {
  584. width: 300rpx;
  585. font-size: 24rpx;
  586. // color: #fff;
  587. }
  588. .swiperTxt swiper {
  589. height: 100%;
  590. }
  591. .mp-header {
  592. z-index: 99;
  593. // position: fixed;
  594. position: relative;
  595. left: 0;
  596. top: 0;
  597. width: 100%;
  598. &.on {
  599. position: relative;
  600. }
  601. .serch-box {
  602. height: 43px;
  603. }
  604. .logo {
  605. height: 60rpx;
  606. margin-right: 20rpx;
  607. image {
  608. width: 100%;
  609. height: 100%;
  610. }
  611. }
  612. .serch-wrapper {
  613. align-items: center;
  614. /* #ifdef MP */
  615. padding: 0 220rpx 0 30rpx;
  616. /* #endif */
  617. /* #ifndef MP */
  618. padding: 0 30rpx;
  619. /* #endif */
  620. height: 100%;
  621. &.on {
  622. padding: 0 30rpx;
  623. }
  624. .title,
  625. .map {
  626. font-size: 28rpx;
  627. color: #fff;
  628. margin-right: 24rpx;
  629. }
  630. .map {
  631. .iconfont {
  632. font-size: 26rpx;
  633. }
  634. .icon-ic_location4 {
  635. margin-right: 12rpx;
  636. }
  637. }
  638. &.on {
  639. padding: 0 30rpx;
  640. }
  641. .input,
  642. .uninput {
  643. flex: 1;
  644. min-width: 0;
  645. position: relative;
  646. display: flex;
  647. align-items: center;
  648. height: 60rpx;
  649. padding: 0 32rpx;
  650. border-radius: 30rpx;
  651. background: rgba(255, 255, 255, 0.4);
  652. font-size: 28rpx;
  653. color: #ffffff;
  654. .iconfont {
  655. position: absolute;
  656. right: 25rpx;
  657. top: 13rpx;
  658. }
  659. }
  660. }
  661. }
  662. .tabNav {
  663. padding-top: 10rpx;
  664. }
  665. .navTabBox {
  666. z-index: 2;
  667. color: #ffffff;
  668. padding: 0 57rpx 0 30rpx;
  669. // z-index: 99;
  670. position: relative;
  671. // position: fixed;
  672. left: 0;
  673. width: 100%;
  674. // padding-top: 5px;
  675. &.on {
  676. position: relative;
  677. }
  678. scroll-view {
  679. /* #ifdef MP */
  680. width: 640rpx;
  681. /* #endif */
  682. /* #ifndef MP */
  683. width: 666rpx;
  684. /* #endif */
  685. height: 82rpx;
  686. white-space: nowrap;
  687. }
  688. .click {
  689. color: white;
  690. }
  691. .longTab {
  692. // height: 34px;
  693. .longItem {
  694. display: inline-block;
  695. text-align: center;
  696. font-size: 28rpx;
  697. color: #ffffff;
  698. max-width: 160rpx;
  699. margin-right: 30rpx;
  700. position: relative;
  701. font-weight: 400;
  702. line-height: 82rpx;
  703. &:last-child {
  704. margin-right: 0;
  705. }
  706. &.click {
  707. font-weight: 600;
  708. font-size: 30rpx;
  709. color: #ffffff;
  710. &::after {
  711. // content: '';
  712. // transition: .5s;
  713. // width: 19rpx;
  714. // height: 3rpx;
  715. // background: #FFFFFF;
  716. // position: absolute;
  717. // bottom: 19rpx;
  718. // left: 50%;
  719. // transform: translateX(-50%);
  720. }
  721. }
  722. }
  723. }
  724. .category {
  725. position: absolute;
  726. right: 0;
  727. top: 50%;
  728. width: 57rpx;
  729. height: 45rpx;
  730. padding-left: 11rpx;
  731. line-height: 45rpx;
  732. z-index: 10;
  733. transform: translateY(-50%);
  734. .iconfont {
  735. font-size: 35rpx;
  736. }
  737. &::before {
  738. content: "";
  739. position: absolute;
  740. top: 50%;
  741. left: 0;
  742. width: 2rpx;
  743. height: 28rpx;
  744. background: linear-gradient(
  745. 135deg,
  746. #ffffff 0%,
  747. rgba(216, 216, 216, 0) 100%
  748. );
  749. transform: translateY(-50%);
  750. }
  751. }
  752. &.isFixed {
  753. z-index: 10;
  754. position: fixed;
  755. left: 0;
  756. width: 100%;
  757. }
  758. }
  759. .category_count {
  760. width: 100%;
  761. background: #fff;
  762. padding: 32rpx;
  763. position: fixed;
  764. top: 0;
  765. left: 0;
  766. z-index: 120;
  767. border-radius: 0 0 24rpx 24rpx;
  768. .cate_count {
  769. .category_item {
  770. padding: 0 20rpx;
  771. height: 72rpx;
  772. text-align: center;
  773. line-height: 72rpx;
  774. word-wrap: break-word;
  775. overflow: hidden;
  776. text-overflow: ellipsis;
  777. white-space: nowrap;
  778. background-color: #f5f5f5;
  779. border-radius: 8rpx;
  780. font-size: 24rpx;
  781. }
  782. }
  783. }
  784. .mask {
  785. position: fixed;
  786. top: 0;
  787. left: 0;
  788. width: 100%;
  789. height: 100%;
  790. background: rgba(0, 0, 0, 0.7);
  791. z-index: 1111;
  792. }
  793. .scrolled {
  794. z-index: 99;
  795. position: fixed;
  796. left: 0;
  797. top: 0;
  798. width: 100%;
  799. background-color: #fff;
  800. .longItem,
  801. .click,
  802. .category text {
  803. color: #000 !important;
  804. }
  805. .underline {
  806. background: #000 !important;
  807. }
  808. .input,
  809. .uninput {
  810. background: rgba(0, 0, 0, 0.22) !important;
  811. }
  812. .click {
  813. &::after {
  814. background-color: #fff !important;
  815. }
  816. }
  817. }
  818. .swiperBg {
  819. z-index: 2;
  820. .page_swiper {
  821. position: relative;
  822. width: 100%;
  823. height: auto;
  824. margin: 0 auto;
  825. border-radius: 15rpx;
  826. overflow-x: hidden;
  827. z-index: 20;
  828. padding: 5rpx 10rpx 0;
  829. uni-swiper {
  830. height: 320rpx;
  831. }
  832. swiper-item {
  833. border-radius: 15rpx;
  834. }
  835. .swiper-item,
  836. image,
  837. .acea-row.row-between-wrapper {
  838. width: 100%;
  839. height: 100%;
  840. margin: 0 auto;
  841. border-radius: 15rpx;
  842. }
  843. swiper {
  844. width: 100%;
  845. display: block;
  846. }
  847. image {
  848. transform: scale(0.93);
  849. transition: all 0.6s ease;
  850. }
  851. swiper-item.active,
  852. swiper-item.scalex {
  853. image {
  854. transform: scale(1);
  855. }
  856. }
  857. /*用来包裹所有的小圆点 */
  858. .dots {
  859. // width: 156rpx;
  860. // height: 36rpx;
  861. display: flex;
  862. flex-direction: row;
  863. position: absolute;
  864. right: 20rpx;
  865. left: 20rpx;
  866. bottom: 23rpx;
  867. }
  868. /*未选中时的小圆点样式 */
  869. .dot1 {
  870. .dot {
  871. width: 12rpx;
  872. height: 12rpx;
  873. border-radius: 6rpx;
  874. margin-right: 16rpx;
  875. background-color: rgba(0, 0, 0, 0.1);
  876. &:last-child {
  877. margin-right: 0;
  878. }
  879. /*选中以后的小圆点样式 */
  880. &.active {
  881. background: #e93323;
  882. }
  883. }
  884. }
  885. .dot2 {
  886. .dot {
  887. width: 10rpx;
  888. height: 10rpx;
  889. border-radius: 5rpx;
  890. margin-right: 8rpx;
  891. background-color: rgba(0, 0, 0, 0.1);
  892. &:last-child {
  893. margin-right: 0;
  894. }
  895. /*选中以后的小圆点样式 */
  896. &.active {
  897. width: 18rpx;
  898. background: #e93323;
  899. }
  900. }
  901. }
  902. .dot4 {
  903. .dot {
  904. width: 20rpx;
  905. height: 6rpx;
  906. border-radius: 3rpx;
  907. margin-right: 10rpx;
  908. background-color: #dddddd;
  909. &:last-child {
  910. margin-right: 0;
  911. }
  912. /*选中以后的小圆点样式 */
  913. &.active {
  914. background: #e93323;
  915. }
  916. }
  917. }
  918. .dot3 {
  919. .dot {
  920. height: 6rpx;
  921. border-radius: 3rpx;
  922. margin-right: 10rpx;
  923. background-color: rgba(0, 0, 0, 0.1);
  924. &:last-child {
  925. margin-right: 0;
  926. }
  927. /*选中以后的小圆点样式 */
  928. .active {
  929. height: 6rpx;
  930. border-radius: 3rpx;
  931. background: #e93323;
  932. }
  933. }
  934. }
  935. }
  936. }
  937. ::v-deep.dot0 .uni-swiper-dots-horizontal {
  938. left: 10%;
  939. }
  940. ::v-deep.dot1 .uni-swiper-dots-horizontal {
  941. left: 50%;
  942. }
  943. ::v-deep.dot2 .uni-swiper-dots-horizontal {
  944. left: 90%;
  945. }
  946. </style>