123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- <template>
- <view class="flex-col" :style="{height: winHeight + 'px'}">
- <!-- #ifdef MP -->
- <view class="cart_nav">
- <nav-bar iconColor='#fff' ref="navBarRef" navTitle="代取快递" backgroundColor="#FF6702" :isBackgroundColor="false">
- </nav-bar>
- </view>
- <!-- #endif -->
- <view class='newsList tui-skeleton' style="background-color: #fff;flex: 1;">
- <view class='nav'>
- <scroll-view class="scroll-view_x" scroll-x scroll-with-animation :scroll-left="scrollLeft" style="width:auto;overflow:hidden;">
- <block v-for="(item,index) in navList" :key="index">
- <view class='item borRadius14 tui-skeleton-rect' :class='active==item.id?"on":""' @click='tabSelect(item.id, index)'>
- <view class="line1">{{item.name}}</view>
- <view class='line bg_color' v-if="active==item.id"></view>
- </view>
- </block>
- </scroll-view>
- </view>
- <view class='list'>
- <template v-if="active == 1">
- <take-fast-mail></take-fast-mail>
- </template>
- <template v-if="active == 2">
- <send-fast-mail></send-fast-mail>
- </template>
- </view>
- </view>
- </view>
- </template>
- <script>
- // +----------------------------------------------------------------------
- // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
- // +----------------------------------------------------------------------
- // | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
- // +----------------------------------------------------------------------
- // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
- // +----------------------------------------------------------------------
- // | Author: CRMEB Team <admin@crmeb.com>
- // +----------------------------------------------------------------------
- import navBar from '@/components/navBar';
- import animationType from '@/utils/animationType.js'
- import tuiSkeleton from '@/components/base/tui-skeleton.vue';
- import sendFastMail from '../send_fast_mail/index.vue'
- import takeFastMail from '../take_fast_mail/index.vue'
- let app = getApp();
- export default {
- components: {
- tuiSkeleton,
- navBar,
- sendFastMail,
- takeFastMail
- },
- data() {
- return {
- winHeight: 0,
- isNodes: 0, //控制什么时候开始抓取元素节点,只要数值改变就重新抓取
- autoplay: true,
- navList: [{
- id: 1,
- name: '取快递'
- }, {
- id: 2,
- name: '寄快递'
- }],
- active: 1,
- scrollLeft: 0,
- };
- },
- onLoad() {
- let that = this;
- uni.getSystemInfo({
- success: function(res) {
- that.winHeight = res.windowHeight
- },
- });
- },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function() {},
- methods: {
- tabSelect(active, e) {
- this.active = active;
- this.scrollLeft = e * 60;
- }
- }
- }
- </script>
- <style lang="scss">
- .newsList .swiper {
- width: 100%;
- position: relative;
- box-sizing: border-box;
- padding: 0 30rpx;
- }
- .newsList .swiper swiper {
- width: 100%;
- height: 365rpx;
- position: relative;
- }
- .newsList .swiper .slide-image {
- width: 100%;
- height: 335rpx;
- border-radius: 14rpx;
- }
- // #ifdef MP-WEIXIN
- .newsList .swiper .wx-swiper-dot {
- width: 12rpx !important;
- height: 12rpx !important;
- border-radius: 0;
- transform: rotate(-45deg);
- transform-origin: 0 100%;
- }
- .newsList .swiper .wx-swiper-dot~.wx-swiper-dot {
- margin-left: 5rpx;
- }
- .newsList .swiper .wx-swiper-dots.wx-swiper-dots-horizontal {
- margin-bottom: -15rpx;
- }
- // #endif
- // #ifdef APP-PLUS || H5
- .newsList .swiper .uni-swiper-dot {
- width: 12rpx !important;
- height: 12rpx !important;
- border-radius: 0;
- transform: rotate(-45deg);
- transform-origin: 0 100%;
- }
- .newsList .swiper .uni-swiper-dot~.uni-swiper-dot {
- margin-left: 5rpx;
- }
- .newsList .swiper .uni-swiper-dots.uni-swiper-dots-horizontal {
- margin-bottom: -15rpx;
- }
- // #endif
- .newsList .nav {
- padding: 0 24rpx;
- width: 100%;
- white-space: nowrap;
- box-sizing: border-box;
- padding-top: 43rpx;
- border-top-right-radius: 23rpx;
- }
- .newsList .nav .item {
- // max-width: 156rpx;
- display: inline-block;
- font-size: 32rpx;
- color: #999;
- }
- .newsList .nav .item.on {
- color: #282828;
- }
- .newsList .nav .item~.item {
- margin-left: 46rpx;
- }
- .newsList .nav .item .line {
- // width: 24rpx;
- height: 10rpx;
- border-radius: 6rpx;
- margin: 10rpx auto 0 auto;
- background-color: $bg-color-primary;
- }
- .newsList .nav .item .line1 {
- color: $bg-color-primary;
- }
- </style>
|