Commit 9247b62f069c1dc5bbf4f986acc251ce7666d1ae

Authored by yvan.ni
1 parent 9b073ad1

cover-view的原因导致顶部不稳定

components/com_top_nav/com_top_nav.js
... ... @@ -9,6 +9,9 @@ Component({
9 9 },
10 10 color:{
11 11 type: String,value: '#313131'
  12 + },
  13 + need_cover:{
  14 + type: Number,value: 0
12 15 }
13 16 },
14 17 data: {
... ...
components/com_top_nav/com_top_nav.wxml
1   -<cover-view class="t_nav" style="height:{{height}}px;background-color:{{bcolor}};color:{{color}}">
2   - <cover-view class="tab" style="height:{{h1}}px;">
3   - <cover-view wx:if="{{user_no}}" class="tb_con" >ID:{{user_no}}<cover-view style="width:20rpx"></cover-view></cover-view>
4   - <cover-view wx:else class="tb_con" ></cover-view>
5   - </cover-view>
6   - <cover-view bindtap="go_back" class="contant" style="height:{{h2}}px">
7   - <cover-view class="gback">
8   - <cover-view class="rote_view" style="border: 3rpx solid {{color}};"></cover-view>
9   - </cover-view>
10   - <cover-view class="ellip">{{title}}</cover-view>
11   - </cover-view>
  1 +<!-- 需要cover-view是大转盘才会 -->
  2 +<block wx:if="{{need_cover}}">
  3 + <cover-view class="t_nav" style="height:{{height}}px;background-color:{{bcolor}};color:{{color}}">
  4 + <cover-view class="tab" style="height:{{h1}}px;">
  5 + <cover-view wx:if="{{user_no}}" class="tb_con" >ID:{{user_no}}<cover-view style="width:20rpx"></cover-view></cover-view>
  6 + <cover-view wx:else class="tb_con" ></cover-view>
  7 + </cover-view>
  8 + <cover-view bindtap="go_back" class="contant" style="height:{{h2}}px">
  9 + <cover-view class="gback">
  10 + <cover-view class="rote_view" style="border: 3rpx solid {{color}};"></cover-view>
  11 + </cover-view>
  12 + <cover-view class="ellip">{{title}}</cover-view>
  13 + </cover-view>
  14 +
  15 + </cover-view>
  16 +</block>
  17 +<block wx:else>
  18 + <view class="t_nav" style="height:{{height}}px;background-color:{{bcolor}};color:{{color}}">
  19 + <view class="tab" style="height:{{h1}}px;">
  20 + <view wx:if="{{user_no}}" class="tb_con" >ID:{{user_no}}<view style="width:20rpx"></view></view>
  21 + <view wx:else class="tb_con" ></view>
  22 + </view>
  23 + <view bindtap="go_back" class="contant" style="height:{{h2}}px">
  24 + <view class="gback">
  25 + <view class="rote_view" style="border: 3rpx solid {{color}};"></view>
  26 + </view>
  27 + <view class="ellip">{{title}}</view>
  28 + </view>
  29 + </view>
  30 +</block>
  31 +
12 32  
13   -</cover-view>
14 33 <!-- 用于顶开层的高 -->
15   -<cover-view style="height:{{height}}px"></cover-view>
16 34 \ No newline at end of file
  35 +<view style="height:{{height}}px"></view>
17 36 \ No newline at end of file
... ...
packageB/pages/luckactivity/luckinfo/luckinfo.wxml
1 1 <wxs module="filter" src="../../../../utils/filter.wxs"></wxs>
2 2 <wxs module="tool" src="./tool.wxs"></wxs>
3 3  
4   -<com_top_nav title="{{l_title}}"></com_top_nav>
  4 +<com_top_nav title="{{l_title}}" need_cover="1"></com_top_nav>
5 5  
6 6 <view class="luck-container {{!template&&custom ? 'on':''}}" style="{{luckStyle}}">
7 7 <!-- <view class="luck-container {{!template&&custom ? 'on':''}}" style="background: {{template&&template.colorCode ? template.colorCode:(custom ? '#f0f0f0':'#da104b')}} url({{bannerUrl ? bannerUrl:''}}) no-repeat;"> -->
... ...