Commit 1977e948ee83dc6b2b43a93cc366ab5fe9580603

Authored by yvan.ni
1 parent c894da1d

1、文字的字体大小

2、要显示会员的编号,不要id
3、在登陆前的显示
components/com_top_nav/com_top_nav.js
... ... @@ -21,9 +21,25 @@ Component({
21 21 ready: function() {
22 22 let height= getApp().globalData.navBarHeight;
23 23 let menuInfo = getApp().globalData.menuInfo;
  24 + let user_no='';
  25 + if(getApp().globalData.userInfo){
  26 + user_no=getApp().globalData.userInfo.erpvipno
  27 + }
24 28 //-- 胶囊的高度 --
25   - this.setData({height,h1:menuInfo.top,h2:menuInfo.height,user_id:getApp().globalData.user_id});
  29 + this.setData({height,h1:menuInfo.top,h2:menuInfo.height,user_no});
  30 + },
  31 + pageLifetimes: {
  32 + //要处理一下,游客登录后的界面的变化,主要还该是改变会员
  33 + show: function () {
  34 + let user_no='';
  35 + if(getApp().globalData.userInfo){
  36 + user_no=getApp().globalData.userInfo.erpvipno
  37 + }
  38 + //-- 胶囊的高度 --
  39 + this.setData({user_no});
  40 + }
26 41 },
  42 +
27 43 methods: {
28 44 go_back(){
29 45 let pages = getCurrentPages();
... ...
components/com_top_nav/com_top_nav.wxml
1 1 <cover-view class="t_nav" style="height:{{height}}px;background-color:{{bcolor}};color:{{color}}">
2 2 <cover-view class="tab" style="height:{{h1}}px;">
3   - <cover-view class="tb_con" >ID:{{user_id}}<cover-view style="width:20rpx"></cover-view></cover-view>
  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>
4 5 </cover-view>
5 6 <cover-view bindtap="go_back" class="contant" style="height:{{h2}}px">
6 7 <cover-view class="gback">
... ...
components/com_top_nav/com_top_nav.wxss
1 1 .t_nav{position:fixed;top:0;left:0; width:100%;z-index:9999; background-color: #fff;font-size: 30rpx }
2   -.tab{ font-size:24rpx; position: relative }
  2 +.tab{ font-size:18rpx; position: relative }
3 3 .tb_con{
4 4 position: absolute; bottom: 0; right: 10rpx; display: flex;
5 5 }
... ...