You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
302 lines
8.8 KiB
302 lines
8.8 KiB
<!--底部Tabber组件-->
|
|
<template>
|
|
<view class="main_box">
|
|
<fui-tabbar :tabBar="tabBar" selectedColor="#5bdbbb" :current="tabBerIndex" @click="openView"></fui-tabbar>
|
|
|
|
<fui-bottom-popup :show="show" @close="closePopup">
|
|
<view class="fui-custom__wrap">
|
|
<view class="title" style="font-size: 36rpx;text-align: center;padding: 36rpx 0;">快捷新增</view>
|
|
<view class="but-style">
|
|
<view class="but-style-below" @click="addClues">
|
|
<!-- <image src="@/static/images/index/addto.png" class="drop-image-x"></image>-->
|
|
<image :src="$util.img('/uniapp_src/static/images/index/addto.png')" class="drop-image-x">
|
|
</image>
|
|
<view class="title-x">添加客户</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</fui-bottom-popup>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import fuiTabbar from "@/components/firstui/fui-tabbar/fui-tabbar.vue"
|
|
import util from '@/common/util.js';
|
|
export default {
|
|
name: "AQTabber",
|
|
components: {
|
|
fuiTabbar
|
|
},
|
|
data() {
|
|
return {
|
|
userType: '1', //用户类型|1=教练,2=销售,3=学员
|
|
tabBerIndex: '0',
|
|
tabBar: [],
|
|
show: false
|
|
};
|
|
},
|
|
|
|
created() {
|
|
// console.log(123)
|
|
this.init()
|
|
},
|
|
|
|
methods: {
|
|
async init() {
|
|
let userType = uni.getStorageSync('userType')
|
|
this.userType = userType
|
|
let tabBerIndex = uni.getStorageSync('tabBerIndex') // tabBerIndex=0|从左数第1个按钮
|
|
|
|
if (tabBerIndex) {
|
|
this.tabBerIndex = String(tabBerIndex)
|
|
} else {
|
|
this.tabBerIndex = '0'
|
|
}
|
|
switch (String(this.userType)) {
|
|
case "1": //市场
|
|
this.tabBar = [{
|
|
text: "首页",
|
|
urlPath: '/pages/market/home/index', //自定义页面跳转路径
|
|
iconPath: util.img('/uniapp_src/static/images/tabbar/index.png'),
|
|
selectedIconPath: util.img("/uniapp_src/static/images/tabbar/indexs.png")
|
|
},
|
|
{
|
|
text: "线索",
|
|
urlPath: '/pages/market/clue/index', //自定义页面跳转路径
|
|
iconPath: util.img('/uniapp_src/static/images/tabbar/clue.png'),
|
|
selectedIconPath: util.img("/uniapp_src/static/images/tabbar/clues.png")
|
|
},
|
|
{
|
|
text: "",
|
|
urlPath: '/pages/market/clue/add_clues', //自定义页面跳转路径
|
|
iconPath: util.img('/uniapp_src/static/images/tabbar/plus.png'),
|
|
selectedIconPath: util.img('/uniapp_src/static/images/tabbar/plus.png'),
|
|
midButton: true,
|
|
width: 70,
|
|
height: 70
|
|
},
|
|
{
|
|
text: "数据",
|
|
urlPath: '/pages/market/data/statistics', //自定义页面跳转路径
|
|
iconPath: util.img('/uniapp_src/static/images/tabbar/timetable.png'),
|
|
selectedIconPath: util.img('/uniapp_src/static/images/tabbar/timetables.png'),
|
|
},
|
|
{
|
|
text: "我的",
|
|
urlPath: '/pages/market/my/index', //自定义页面跳转路径
|
|
iconPath: util.img('/uniapp_src/static/images/tabbar/my.png'),
|
|
selectedIconPath: util.img('/uniapp_src/static/images/tabbar/mys.png')
|
|
}
|
|
]
|
|
break;
|
|
case "2": //教练
|
|
this.tabBar = [{
|
|
text: "首页",
|
|
urlPath: '/pages/coach/home/index', //自定义页面跳转路径
|
|
// iconPath: "/static/images/tabbar/index.png",
|
|
iconPath: util.img('/uniapp_src/static/images/tabbar/index.png'),
|
|
selectedIconPath: util.img("/uniapp_src/static/images/tabbar/indexs.png")
|
|
},
|
|
{
|
|
text: "课表",
|
|
urlPath: '/pages/coach/course/list', //自定义页面跳转路径
|
|
iconPath: util.img('/uniapp_src/static/images/tabbar/timetable.png'),
|
|
selectedIconPath: util.img("/uniapp_src/static/images/tabbar/timetables.png")
|
|
},
|
|
{
|
|
text: "我的学员",
|
|
urlPath: '/pages/coach/student/student_list', //自定义页面跳转路径
|
|
iconPath: util.img('/uniapp_src/static/images/tabbar/banji.png'),
|
|
selectedIconPath: util.img("/uniapp_src/static/images/tabbar/banjis.png")
|
|
},
|
|
{
|
|
text: "我的",
|
|
urlPath: '/pages/coach/my/index', //自定义页面跳转路径
|
|
iconPath: util.img('/uniapp_src/static/images/tabbar/my.png'),
|
|
selectedIconPath: util.img("/uniapp_src/static/images/tabbar/my.png")
|
|
}
|
|
]
|
|
break;
|
|
|
|
case "3": //销售
|
|
this.tabBar = [{
|
|
text: "首页",
|
|
urlPath: '/pages/market/index/index', //自定义页面跳转路径
|
|
iconPath: util.img('/uniapp_src/static/images/tabbar/index.png'),
|
|
selectedIconPath: util.img("/uniapp_src/static/images/tabbar/indexs.png")
|
|
},
|
|
{
|
|
text: "线索",
|
|
urlPath: '/pages/market/clue/index', //自定义页面跳转路径
|
|
iconPath: util.img('/uniapp_src/static/images/tabbar/clue.png'),
|
|
selectedIconPath: util.img("/uniapp_src/static/images/tabbar/clues.png")
|
|
},
|
|
{
|
|
text: "",
|
|
urlPath: '/pages/market/clue/add_clues', //自定义页面跳转路径
|
|
iconPath: util.img('/uniapp_src/static/images/tabbar/plus.png'),
|
|
selectedIconPath: util.img('/uniapp_src/static/images/tabbar/plus.png'),
|
|
midButton: true,
|
|
width: 70,
|
|
height: 70
|
|
},
|
|
{
|
|
text: "数据",
|
|
urlPath: '/pages/market/clue/clue_table', //自定义页面跳转路径
|
|
iconPath: util.img('/uniapp_src/static/images/tabbar/timetable.png'),
|
|
selectedIconPath: util.img('/uniapp_src/static/images/tabbar/timetables.png'),
|
|
},
|
|
{
|
|
text: "我的",
|
|
urlPath: '/pages/market/my/index', //自定义页面跳转路径
|
|
iconPath: util.img('/uniapp_src/static/images/tabbar/my.png'),
|
|
selectedIconPath: util.img('/uniapp_src/static/images/tabbar/mys.png')
|
|
}
|
|
]
|
|
break;
|
|
case "4": //学员
|
|
this.tabBar = [{
|
|
text: "首页",
|
|
urlPath: '/pages/student/index/index', //自定义页面跳转路径
|
|
iconPath: util.img('/uniapp_src/static/images/tabbar/index.png'),
|
|
selectedIconPath: util.img('/uniapp_src/static/images/tabbar/indexs.png')
|
|
},
|
|
{
|
|
text: "课表",
|
|
urlPath: '/pages/student/timetable/index', //自定义页面跳转路径
|
|
iconPath: util.img('/uniapp_src/static/images/tabbar/timetable.png'),
|
|
selectedIconPath: util.img('/uniapp_src/static/images/tabbar/timetables.png')
|
|
},
|
|
{
|
|
text: "我的",
|
|
urlPath: '/pages/student/my/my', //自定义页面跳转路径
|
|
iconPath: util.img('/uniapp_src/static/images/tabbar/my.png'),
|
|
selectedIconPath: util.img('/uniapp_src/static/images/tabbar/mys.png')
|
|
}
|
|
]
|
|
break;
|
|
}
|
|
// console.log(111,this.tabBar)
|
|
},
|
|
async openView(e) {
|
|
console.log('点击跳转', e)
|
|
if (e.text != '') {
|
|
//跳转tabBar页面
|
|
uni.setStorageSync('tabBerIndex', e.index)
|
|
console.log('qqq', e.urlPath)
|
|
|
|
//关闭当前页面跳转新页面
|
|
uni.redirectTo({
|
|
url: e.urlPath
|
|
})
|
|
|
|
//关闭全部页面
|
|
// uni.reLaunch({
|
|
// url: e.urlPath
|
|
// })
|
|
|
|
console.log('qqq2,执行完了')
|
|
} else {
|
|
this.show = true
|
|
}
|
|
},
|
|
closePopup(type) {
|
|
this.show = false
|
|
},
|
|
//添加跟进
|
|
writingFollowUp() {
|
|
uni.navigateTo({
|
|
url: '/pages/market/clue/writing_followUp'
|
|
})
|
|
},
|
|
//转交跟进任务
|
|
newTask() {
|
|
uni.navigateTo({
|
|
url: '/pages/market/clue/new_task'
|
|
})
|
|
},
|
|
//添加客户
|
|
addClues() {
|
|
uni.navigateTo({
|
|
url: '/pages/market/clue/add_clues'
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
.fui-wrap {
|
|
//为防止标签栏遮住页面内容,页面底部需留白高度不低于标签栏高度。非Nvue端和头条小程序如果fixedHeight属性没有设置为true,则页面外层还需加入以下样式(或者在页面最底部加入`fui-safe-area` 组件)兼容异形屏:
|
|
/* #ifndef APP-NVUE */
|
|
padding-bottom: constant(safe-area-inset-bottom);
|
|
padding-bottom: env(safe-area-inset-bottom);
|
|
/* #endif */
|
|
}
|
|
|
|
.fui-custom__wrap {
|
|
width: 100%;
|
|
//height: 600rpx;
|
|
height: 450rpx;
|
|
}
|
|
|
|
.title {
|
|
font-size: 36rpx;
|
|
text-align: center;
|
|
padding: 36rpx 0;
|
|
}
|
|
|
|
.but-style {
|
|
width: 92%;
|
|
height: 70%;
|
|
margin: auto;
|
|
}
|
|
|
|
.but-style-top {
|
|
width: 100%;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.left {
|
|
width: 45%;
|
|
height: 180rpx;
|
|
border-radius: 16rpx;
|
|
background: #3ee9d7;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.right {
|
|
width: 45%;
|
|
height: 180rpx;
|
|
border-radius: 16rpx;
|
|
background: #fad24e;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.but-style-below {
|
|
width: 100%;
|
|
height: 180rpx;
|
|
margin-top: 36rpx;
|
|
border-radius: 16rpx;
|
|
background: #35bdae;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.drop-image-x {
|
|
width: 50rpx;
|
|
height: 50rpx;
|
|
}
|
|
|
|
.title-x {
|
|
font-size: 32rpx;
|
|
color: #fff;
|
|
padding-left: 30rpx;
|
|
}
|
|
</style>
|