Commit 4083746561d1956da774b2d4ed6845c53752442c

Authored by wangfan
1 parent 90f58ed4

manager-invitation

  1 +// components/book/tabBar/tabBar.js
  2 +import util from '../../../utils/util'
  3 +Component({
  4 + /**
  5 + * 组件的属性列表
  6 + */
  7 + properties: {
  8 +
  9 + },
  10 +
  11 + /**
  12 + * 组件的初始数据
  13 + */
  14 + data: {
  15 + pi:0,
  16 + },
  17 + attached(){
  18 + let pages=getCurrentPages();
  19 + let p=pages[pages.length-1];
  20 + let pi=['/pages/manager-invitation/review','/pages/manager-invitation/crm/index','/pages/manager-invitation/setting/index'];
  21 + for(let x in pi){
  22 + console.log('tabBar',pi[x],p);
  23 + if(pi[x].indexOf(p.route)>-1){
  24 + this.setData({
  25 + pi:x
  26 + })
  27 + break;
  28 + }
  29 + }
  30 + },
  31 + /**
  32 + * 组件的方法列表
  33 + */
  34 + methods: {
  35 + redirectTo(e){
  36 + let url=util.attr(e,'url');
  37 + let pages=getCurrentPages();
  38 + let p=pages[pages.length-1];
  39 + if(url.indexOf(p.route)<0){
  40 + wx.redirectTo({
  41 + url:url,
  42 + })
  43 + }
  44 + }
  45 + }
  46 +})
  1 +{
  2 + "component": true,
  3 + "usingComponents": {
  4 + "formids":"/components/formids/formids"
  5 + }
  6 +}
  1 +<!--components/book/tabBar/tabBar.wxml-->
  2 +<view class="tabBar flex-cc">
  3 + <formids class="item flex-vc" bindtap="redirectTo" data-url="/pages/manager-invitation/review">
  4 + <view class="flex-vc {{pi==0?'checked':''}}" >
  5 + <view class="icon reserve"></view>
  6 + <view class="text">通知客户</view>
  7 + </view>
  8 + </formids>
  9 + <formids class="item flex-vc" bindtap="redirectTo" data-url="/pages/manager-invitation/crm/index">
  10 + <view class="flex-vc {{pi==1?'checked':''}}">
  11 + <view class="icon book"></view>
  12 + <view class="text">通知客户</view>
  13 + </view>
  14 + </formids>
  15 + <formids class="item flex-vc" bindtap="redirectTo" data-url="/pages/manager-invitation/setting/index">
  16 + <view class="flex-vc {{pi==2?'checked':''}}">
  17 + <view class="icon setting"></view>
  18 + <view class="text">我的</view>
  19 + </view>
  20 + </formids>
  21 +</view>
  22 +<view class="tabBar-block"></view>
  1 +/* components/book/tabBar/tabBar.wxss */
  2 +@import "../../../app.wxss";
  3 +.tabBar{
  4 + height: 118rpx;
  5 + background-color: rgba(0,0,0,.7);
  6 + width:100%;
  7 + position: fixed;
  8 + bottom: 0;
  9 + font-size: 24rpx;
  10 + color:#999999;
  11 + z-index: 9;
  12 +}
  13 +.tabBar-block{
  14 + height: 118rpx;
  15 + width: 100%;
  16 +}
  17 +.tabBar .checked{
  18 + color: #199095;
  19 +}
  20 +.tabBar .item{
  21 + width: 33%;
  22 +}
  23 +.tabBar .icon{
  24 + width: 48rpx;
  25 + height: 48rpx;
  26 + margin-bottom: 10rpx;
  27 + background-size: 100%;
  28 +}
  29 +.tabBar .icon image{
  30 + width: 100%;
  31 + height: 100%;
  32 +}
  33 +.tabBar .reserve{
  34 + background-image: url("http://qn.colorcun.com/custom/lite-yd/image/seller-tabs2-reserve.png");
  35 +}
  36 +.tabBar .checked .reserve{
  37 + background-image: url("http://qn.colorcun.com/custom/lite-yd/image/seller-tabs2-reserve-checked.png");
  38 +}
  39 +.tabBar .book{
  40 + background-image: url("http://qn.colorcun.com/custom/lite-yd/image/seller-tabs2-book.png");
  41 +}
  42 +.tabBar .checked .book {
  43 + background-image: url("http://qn.colorcun.com/custom/lite-yd/image/seller-tabs2-book-checked.png");
  44 +}
  45 +.tabBar .setting{
  46 + background-image: url("http://qn.colorcun.com/custom/lite-yd/image/seller-tabs2-setting.png");
  47 +}
  48 +.tabBar .checked .setting {
  49 + background-image: url("http://qn.colorcun.com/custom/lite-yd/image/seller-tabs2-setting-checked.png");
  50 +}
  51 +.tabBar .board{
  52 + background-image: url("http://qn.colorcun.com/custom/lite-yd/image/seller-tabs2-boards.png");
  53 +}
  54 +.tabBar .checked .board {
  55 + background-image: url("http://qn.colorcun.com/custom/lite-yd/image/seller-tabs2-boards-checked.png");
  56 +}
@@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
5 "usingComponents": { 5 "usingComponents": {
6 "nav":"/components/nav/nav", 6 "nav":"/components/nav/nav",
7 "tabBar":"/components/book/tabBar/tabBar", 7 "tabBar":"/components/book/tabBar/tabBar",
8 - "formids":"/components/formids/formids" 8 + "formids":"/components/formids/formids",
  9 + "tabBar":"/components/manager-invitation/tabBar/tabBar"
9 } 10 }
10 } 11 }
@@ -21,3 +21,4 @@ @@ -21,3 +21,4 @@
21 </view> 21 </view>
22 <view wx:if="{{!hasMore}}" class="row flex-vc">已经到底了</view> 22 <view wx:if="{{!hasMore}}" class="row flex-vc">已经到底了</view>
23 </view> 23 </view>
  24 +<tabBar></tabBar>
@@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
6 "userinfo": "/components/userinfo/userinfo", 6 "userinfo": "/components/userinfo/userinfo",
7 "nav":"/components/nav/nav", 7 "nav":"/components/nav/nav",
8 "formids":"/components/formids/formids", 8 "formids":"/components/formids/formids",
9 - "userinfo-share": "/components/userinfo/share" 9 + "userinfo-share": "/components/userinfo/share",
  10 + "tabBar":"/components/manager-invitation/tabBar/tabBar"
10 } 11 }
11 } 12 }
@@ -25,7 +25,9 @@ @@ -25,7 +25,9 @@
25 </view> 25 </view>
26 </view> 26 </view>
27 <nav wx:else="" backgroundColor="rgba(0,0,0,0)" style="position: fixed;"></nav> 27 <nav wx:else="" backgroundColor="rgba(0,0,0,0)" style="position: fixed;"></nav>
  28 +<!--
28 <view class="editor flex-vc" bindtap="goEditor" wx:if="{{!options.rid}}">修改内容</view> 29 <view class="editor flex-vc" bindtap="goEditor" wx:if="{{!options.rid}}">修改内容</view>
  30 +-->
29 <!--//商务--> 31 <!--//商务-->
30 <template name="tpl-1"> 32 <template name="tpl-1">
31 <view class="flex-vc shangwu" bindtap="{{options.rid?'goEditor':''}}"> 33 <view class="flex-vc shangwu" bindtap="{{options.rid?'goEditor':''}}">
@@ -80,3 +82,5 @@ @@ -80,3 +82,5 @@
80 </userinfo-share> 82 </userinfo-share>
81 </view> 83 </view>
82 </template> 84 </template>
  85 +
  86 +<tabBar></tabBar>
@@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
4 "navigationBarTextStyle":"white", 4 "navigationBarTextStyle":"white",
5 "usingComponents": { 5 "usingComponents": {
6 "nav":"/components/nav/nav", 6 "nav":"/components/nav/nav",
7 - "formids":"/components/formids/formids" 7 + "formids":"/components/formids/formids",
  8 + "tabBar":"/components/manager-invitation/tabBar/tabBar"
8 } 9 }
9 } 10 }
@@ -42,3 +42,4 @@ @@ -42,3 +42,4 @@
42 </view> 42 </view>
43 </formids> 43 </formids>
44 </view> 44 </view>
  45 +<tabBar></tabBar>