Commit e6302c43a15cecd72b88dbc96c9c29a9109d5676

Authored by wangfan
1 parent a9efd3b2

most_pnum

@@ -144,6 +144,7 @@ Page({ @@ -144,6 +144,7 @@ Page({
144 let regions=[]; 144 let regions=[];
145 this.regions.forEach(region=>{ 145 this.regions.forEach(region=>{
146 if(region.list.length>0){ 146 if(region.list.length>0){
  147 + let list_num=0;
147 region.list.forEach(tb=>{ 148 region.list.forEach(tb=>{
148 tb.status_str=''; 149 tb.status_str='';
149 tb.status_classname='enabled' 150 tb.status_classname='enabled'
@@ -167,8 +168,11 @@ Page({ @@ -167,8 +168,11 @@ Page({
167 tb.status_str='已停用'; 168 tb.status_str='已停用';
168 tb.status_classname='disabled'; 169 tb.status_classname='disabled';
169 } 170 }
170 -  
171 } 171 }
  172 + if(!tb.status_str){
  173 + list_num++;
  174 + }
  175 + region.list_num=list_num;
172 }) 176 })
173 regions.push(region); 177 regions.push(region);
174 } 178 }
@@ -26,11 +26,12 @@ @@ -26,11 +26,12 @@
26 </view> 26 </view>
27 <view class="flex-lr disks"> 27 <view class="flex-lr disks">
28 <view class="menus Medium" style="height: {{height}}px;"> 28 <view class="menus Medium" style="height: {{height}}px;">
29 - <formids class="menu flex-cc {{regions_active==item.name?'active':''}}" 29 + <view class="menu flex-cc {{regions_active==item.name?'active':''}}"
30 wx:for="{{regions}}" wx:key="regions.key" 30 wx:for="{{regions}}" wx:key="regions.key"
31 bindtap="chooseRegion" data-name="{{item.name}}"> 31 bindtap="chooseRegion" data-name="{{item.name}}">
32 <view class="menu-text">{{item.name}}</view> 32 <view class="menu-text">{{item.name}}</view>
33 - </formids> 33 + <view class="last-num {{item.list_num>0?'':'full'}}">{{item.list_num>0?'余'+item.list_num:'满座'}}</view>
  34 + </view>
34 </view> 35 </view>
35 <view class="items" style="height: {{height}}px;"> 36 <view class="items" style="height: {{height}}px;">
36 <block wx:for="{{regions}}" wx:key="regions.key"> 37 <block wx:for="{{regions}}" wx:key="regions.key">
@@ -82,6 +82,8 @@ @@ -82,6 +82,8 @@
82 height: 160rpx; 82 height: 160rpx;
83 overflow: hidden; 83 overflow: hidden;
84 border-left: 4rpx solid #fefefe; 84 border-left: 4rpx solid #fefefe;
  85 + border-bottom: 1rpx solid #F5F5F5;
  86 + position: relative;
85 } 87 }
86 .disks .menu.active{ 88 .disks .menu.active{
87 background-color: #F5F5F5; 89 background-color: #F5F5F5;
@@ -104,3 +106,18 @@ @@ -104,3 +106,18 @@
104 margin: 0 auto 40rpx; 106 margin: 0 auto 40rpx;
105 width: 570rpx; 107 width: 570rpx;
106 } 108 }
  109 +.disks .menu .last-num{
  110 + position: absolute;
  111 + right: 0rpx;
  112 + top:0rpx;
  113 + width: 78rpx;
  114 + height: 30rpx;
  115 + line-height: 30rpx;
  116 + font-size: 24rpx;
  117 + color: #FEFEFE;
  118 + background-color: #61A5D1;
  119 + text-align: center;
  120 +}
  121 +.disks .menu .last-num.full{
  122 + background-color: #999999;
  123 +}