1. 会员等级背景图去掉校验 2. 当查询不到会员等级是,按无会员等级展示 3. 删除商城首页冗余配置在index中的引用 4. 换绑推广人时,计算上一个推广人的推广人数 5. pc后台清除推广人时,更新推广人数量 6. 保证砍价金额最小为0.01 7. 修复商品删除时购物车关联删除 8. 删除商品问题修复 9. 运费模板——指定包邮,包邮数量类型修改 10. 签到错误修复 11. 修复我的优惠券只查询20条的问题 12. 文章列表修复 13. 拼团商品详情页数据统计显示问题修复 14. PC后台,账户详情,持有优惠券列表修复 15. 支付查询参数修复 16. 修复过期优惠券可以重复领取 17. 订单邮费切换地址重复计算修复 18. 判断是否在指定包邮区域内 必须满足件数 + 金额 才能包邮 19. 支付页面,切换tab,金额计算问题修复 20. 物流模板新增、编辑——修复 21. 去除线下邮费的影响 22. 订单运费计算重写 23. 下单页面到店自提合计金额不应该计算商品邮费 24. 新人券领取后,部分使用时间为空——修复
198 lines
5.1 KiB
Vue
198 lines
5.1 KiB
Vue
<template>
|
|
<view class="navTabBox">
|
|
<view class="longTab">
|
|
<scroll-view scroll-x="true" style="white-space: nowrap; display: flex;" scroll-with-animation :scroll-left="tabLeft" show-scrollbar="true">
|
|
<view class="longItem line1" :style='"width:"+isWidth+"px"' :data-index="index" :class="index===tabClick?'click':''" v-for="(item,index) in tabTitle" :key="index" :id="'id'+index" @click="longClick(index)">{{item.name}}</view>
|
|
<view class="underlineBox" :style='"transform:translateX("+isLeft+"px);width:"+isWidth+"px"'>
|
|
<view class="underline"></view>
|
|
</view>
|
|
</scroll-view>
|
|
</view>
|
|
<view class="child-box" v-if="tabClick>0 && tabTitle[tabClick].child?tabTitle[tabClick].child.length>0:0">
|
|
<scroll-view scroll-x="true">
|
|
<view class="wrapper">
|
|
<view v-for="(item,index) in tabTitle[tabClick].child?tabTitle[tabClick].child:[]" :key="index" class="child-item" :class="{on:index == childIndex}" @click="childTab(tabClick,index)">
|
|
<image :src="item.extra" mode="" :style="{'background-color':item.extra?'none':'#f7f7f7'}"></image>
|
|
<view class="txt line1">{{item.name}}</view>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</view>
|
|
<!-- <image :src="item.extra" mode="" :style="{'background-color':(item.extra&&item.extra.indexOf('https://') > -1) || (item.extra&&item.extra.indexOf('http://') > -1)?'none':'#f7f7f7'}"></image> -->
|
|
<!-- <view class="child-box" v-if="tabClick>0 && tabTitle[tabClick].child?tabTitle[tabClick].child.length>0:0">
|
|
<scroll-view scroll-x="true" style="white-space: nowrap; display: flex;align-items: center; height: 100%;" scroll-with-animation :scroll-left="tabLeft" show-scrollbar="false">
|
|
<view class="wrapper">
|
|
<view v-for="(item,index) in tabTitle[tabClick].child?tabTitle[tabClick].child:[]" :key="index" class="child-item" :class="{on:index == childIndex}" @click="childTab(tabClick,index)">
|
|
<image :src="item.extra" mode="" :style="{'background-color':item.extra?'none':'#f7f7f7'}"></image>
|
|
<view class="txt line1">{{item.name}}</view>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</view> -->
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
getProductslist,
|
|
getProductHot
|
|
} from '@/api/store.js';
|
|
export default {
|
|
name: 'navTab',
|
|
props: {
|
|
tabTitle: {
|
|
type: Array,
|
|
default: []
|
|
}
|
|
|
|
},
|
|
data() {
|
|
return {
|
|
tabClick: 0, //导航栏被点击
|
|
isLeft: 0, //导航栏下划线位置
|
|
isWidth: 0, //每个导航栏占位
|
|
tabLeft:0,
|
|
swiperIndex:0,
|
|
childIndex:0,
|
|
childID:0
|
|
};
|
|
},
|
|
created() {
|
|
|
|
var that = this
|
|
// 获取设备宽度
|
|
uni.getSystemInfo({
|
|
success(e) {
|
|
that.isWidth = e.windowWidth / 5
|
|
}
|
|
})
|
|
},
|
|
methods: {
|
|
// 导航栏点击
|
|
longClick(index){
|
|
this.childIndex = 0;
|
|
if(this.tabTitle.length>5){
|
|
var tempIndex = index - 2;
|
|
tempIndex = tempIndex<=0 ? 0 : tempIndex;
|
|
this.tabLeft = (index-2) * this.isWidth //设置下划线位置
|
|
}
|
|
this.tabClick = index //设置导航点击了哪一个
|
|
this.isLeft = index * this.isWidth //设置下划线位置
|
|
let obj = {
|
|
type:'big', //大标题
|
|
index:index
|
|
}
|
|
this.parentEmit(obj)
|
|
this.$parent.currentTab = index //设置swiper的第几页
|
|
},
|
|
// 导航子类点击
|
|
childTab(tabClick,index){
|
|
this.childIndex = index
|
|
let obj = {
|
|
parentIndex:tabClick,
|
|
childIndex:index,
|
|
type:'small' //小标题
|
|
}
|
|
this.parentEmit(obj)
|
|
},
|
|
parentEmit(data){
|
|
this.$emit('changeTab', data);
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.navTabBox {
|
|
width: 100%;
|
|
color: rgba(255, 255, 255, 1);
|
|
.click {
|
|
color: white;
|
|
}
|
|
.longTab {
|
|
width: 100%;
|
|
/* #ifdef H5 */
|
|
padding-bottom: 20rpx;
|
|
/* #endif */
|
|
/* #ifdef MP */
|
|
padding-top: 12rpx;
|
|
padding-bottom: 12rpx;
|
|
/* #endif */
|
|
.longItem{
|
|
height: 50upx;
|
|
display: inline-block;
|
|
line-height: 50upx;
|
|
text-align: center;
|
|
font-size: 30rpx;
|
|
&.click{
|
|
font-weight: bold;
|
|
}
|
|
}
|
|
.underlineBox {
|
|
height: 3px;
|
|
width: 20%;
|
|
display: flex;
|
|
align-content: center;
|
|
justify-content: center;
|
|
transition: .5s;
|
|
.underline {
|
|
width: 33rpx;
|
|
height: 4rpx;
|
|
background-color: white;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.child-box{
|
|
width: 100%;
|
|
position: relative;
|
|
// height: 152rpx;
|
|
background-color: #fff;
|
|
/* #ifdef H5 */
|
|
box-shadow: 0 2px 5px 1px rgba(0, 0, 0, 0.02);
|
|
/* #endif */
|
|
/* #ifdef MP */
|
|
box-shadow: 0 2rpx 3rpx 1rpx #f9f9f9;
|
|
/* #endif */
|
|
|
|
.wrapper{
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 20rpx 0;
|
|
background: #fff;
|
|
/* #ifdef H5 */
|
|
//box-shadow: 0 2px 5px 1px rgba(0, 0, 0, 0.06);
|
|
/* #endif */
|
|
}
|
|
.child-item{
|
|
flex-shrink: 0;
|
|
width:140rpx;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin-left: 10rpx;
|
|
image{
|
|
width: 90rpx;
|
|
height: 90rpx;
|
|
border-radius: 50%;
|
|
}
|
|
.txt{
|
|
font-size: 24rpx;
|
|
color: #282828;
|
|
text-align: center;
|
|
margin-top: 10rpx;
|
|
width: 100%;
|
|
}
|
|
&.on{
|
|
image{
|
|
border: 1px solid $theme-color-opacity;
|
|
}
|
|
.txt{
|
|
color: $theme-color;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|