Files
crmeb-mp/pages/work/components/tabNav.vue
karlcarlo a5c5d753b6 feat: 添加静态资源文件及基础组件
- 新增大量图片资源,包括图标、背景图、海报等,用于页面展示
- 添加字体文件及样式配置,支持自定义字体
- 引入 uni-ui 组件库,包括图标、弹窗、日期选择器等常用组件
- 添加网络状态监听、加密工具等基础工具函数
- 配置 Vuex 状态管理,包括购物车数量、热门搜索词等
- 增加页面组件,如用户协议、分销信息、提现状态等
- 配置项目构建和忽略文件,优化开发体验
2026-02-26 17:59:51 +08:00

86 lines
2.0 KiB
Vue

<template>
<!-- 企业温馨导航 -->
<view class="tab_nav">
<view class="tab_list acea-row row-between">
<view class="tab_nav_item acea-row row-center row-column row-middle"
:class="active == 0 ? 'on' : ''" @click="switchTab(0)">
<text class="iconfont" :class="active == 0 ? 'icon-kehu-xuanzhong' : 'icon-kehu'" ></text>
<span>客户</span>
</view>
<view class="tab_nav_item acea-row row-center row-column row-middle"
:class="active == 1 ? 'on' : ''" @click="switchTab(1)">
<text class="iconfont " :class="active == 1 ? 'icon-dingdan-xuanzhong' : 'icon-dingdan1'"></text>
<span>订单</span>
</view>
<view class="tab_nav_item acea-row row-center row-column row-middle"
:class="active == 2 ? 'on' : ''" @click="switchTab(2)">
<text class="iconfont" :class="active == 2 ? 'icon-zuji-xuanzhong' : 'icon-zuji'"></text>
<span>足迹</span>
</view>
<slot name="bottom"></slot>
</view>
</view>
</template>
<script>
export default{
data() {
return {
active1:this.active
}
},
props:{
active:{
type:Number,
default:0
}
},
methods:{
switchTab(index){
// this.active = index;
let userid = this.$Cache.get('work_user_id')
if(index == 0){
uni.reLaunch({
url:'/pages/work/userInfo/index?userid=' + userid
})
}else if(index == 1){
uni.reLaunch({
url:'/pages/work/orderList/index'
})
}else if(index == 2){
uni.reLaunch({
url:'/pages/work/record/index'
})
}
}
}
}
</script>
<style lang="scss">
.tab_nav{
width: 100%;
position: fixed;
bottom: 0;
left: 0;
padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/
}
.tab_nav_item{
width: 33.3%;
height: 100rpx;
background: #fff;
.title{
color: #1A1A1A;
font-size: 24rpx;
}
.iconfont{
font-size: 36rpx;
}
}
.icon-kehu-xuanzhong,.icon-dingdan-xuanzhong,.icon-jilu-xuanzhong{
color: #1890FF;
}
.on{
color: #1890FF;
}
</style>