Commit 4083746561d1956da774b2d4ed6845c53752442c

Authored by wangfan
1 parent 90f58ed4

manager-invitation

// components/book/tabBar/tabBar.js
import util from '../../../utils/util'
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
pi:0,
},
attached(){
let pages=getCurrentPages();
let p=pages[pages.length-1];
let pi=['/pages/manager-invitation/review','/pages/manager-invitation/crm/index','/pages/manager-invitation/setting/index'];
for(let x in pi){
console.log('tabBar',pi[x],p);
if(pi[x].indexOf(p.route)>-1){
this.setData({
pi:x
})
break;
}
}
},
/**
* 组件的方法列表
*/
methods: {
redirectTo(e){
let url=util.attr(e,'url');
let pages=getCurrentPages();
let p=pages[pages.length-1];
if(url.indexOf(p.route)<0){
wx.redirectTo({
url:url,
})
}
}
}
})
... ...
{
"component": true,
"usingComponents": {
"formids":"/components/formids/formids"
}
}
\ No newline at end of file
... ...
<!--components/book/tabBar/tabBar.wxml-->
<view class="tabBar flex-cc">
<formids class="item flex-vc" bindtap="redirectTo" data-url="/pages/manager-invitation/review">
<view class="flex-vc {{pi==0?'checked':''}}" >
<view class="icon reserve"></view>
<view class="text">通知客户</view>
</view>
</formids>
<formids class="item flex-vc" bindtap="redirectTo" data-url="/pages/manager-invitation/crm/index">
<view class="flex-vc {{pi==1?'checked':''}}">
<view class="icon book"></view>
<view class="text">通知客户</view>
</view>
</formids>
<formids class="item flex-vc" bindtap="redirectTo" data-url="/pages/manager-invitation/setting/index">
<view class="flex-vc {{pi==2?'checked':''}}">
<view class="icon setting"></view>
<view class="text">我的</view>
</view>
</formids>
</view>
<view class="tabBar-block"></view>
... ...
/* components/book/tabBar/tabBar.wxss */
@import "../../../app.wxss";
.tabBar{
height: 118rpx;
background-color: rgba(0,0,0,.7);
width:100%;
position: fixed;
bottom: 0;
font-size: 24rpx;
color:#999999;
z-index: 9;
}
.tabBar-block{
height: 118rpx;
width: 100%;
}
.tabBar .checked{
color: #199095;
}
.tabBar .item{
width: 33%;
}
.tabBar .icon{
width: 48rpx;
height: 48rpx;
margin-bottom: 10rpx;
background-size: 100%;
}
.tabBar .icon image{
width: 100%;
height: 100%;
}
.tabBar .reserve{
background-image: url("http://qn.colorcun.com/custom/lite-yd/image/seller-tabs2-reserve.png");
}
.tabBar .checked .reserve{
background-image: url("http://qn.colorcun.com/custom/lite-yd/image/seller-tabs2-reserve-checked.png");
}
.tabBar .book{
background-image: url("http://qn.colorcun.com/custom/lite-yd/image/seller-tabs2-book.png");
}
.tabBar .checked .book {
background-image: url("http://qn.colorcun.com/custom/lite-yd/image/seller-tabs2-book-checked.png");
}
.tabBar .setting{
background-image: url("http://qn.colorcun.com/custom/lite-yd/image/seller-tabs2-setting.png");
}
.tabBar .checked .setting {
background-image: url("http://qn.colorcun.com/custom/lite-yd/image/seller-tabs2-setting-checked.png");
}
.tabBar .board{
background-image: url("http://qn.colorcun.com/custom/lite-yd/image/seller-tabs2-boards.png");
}
.tabBar .checked .board {
background-image: url("http://qn.colorcun.com/custom/lite-yd/image/seller-tabs2-boards-checked.png");
}
... ...
... ... @@ -5,6 +5,7 @@
"usingComponents": {
"nav":"/components/nav/nav",
"tabBar":"/components/book/tabBar/tabBar",
"formids":"/components/formids/formids"
"formids":"/components/formids/formids",
"tabBar":"/components/manager-invitation/tabBar/tabBar"
}
}
\ No newline at end of file
... ...
... ... @@ -21,3 +21,4 @@
</view>
<view wx:if="{{!hasMore}}" class="row flex-vc">已经到底了</view>
</view>
<tabBar></tabBar>
\ No newline at end of file
... ...
... ... @@ -6,6 +6,7 @@
"userinfo": "/components/userinfo/userinfo",
"nav":"/components/nav/nav",
"formids":"/components/formids/formids",
"userinfo-share": "/components/userinfo/share"
"userinfo-share": "/components/userinfo/share",
"tabBar":"/components/manager-invitation/tabBar/tabBar"
}
}
\ No newline at end of file
... ...
... ... @@ -25,7 +25,9 @@
</view>
</view>
<nav wx:else="" backgroundColor="rgba(0,0,0,0)" style="position: fixed;"></nav>
<!--
<view class="editor flex-vc" bindtap="goEditor" wx:if="{{!options.rid}}">修改内容</view>
-->
<!--//商务-->
<template name="tpl-1">
<view class="flex-vc shangwu" bindtap="{{options.rid?'goEditor':''}}">
... ... @@ -80,3 +82,5 @@
</userinfo-share>
</view>
</template>
<tabBar></tabBar>
... ...
... ... @@ -4,6 +4,7 @@
"navigationBarTextStyle":"white",
"usingComponents": {
"nav":"/components/nav/nav",
"formids":"/components/formids/formids"
"formids":"/components/formids/formids",
"tabBar":"/components/manager-invitation/tabBar/tabBar"
}
}
\ No newline at end of file
... ...
... ... @@ -42,3 +42,4 @@
</view>
</formids>
</view>
<tabBar></tabBar>
... ...