homeComb.vue 18 KB

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