diff --git a/components/com_top_nav/com_top_nav.js b/components/com_top_nav/com_top_nav.js index e9133c1..de1770c 100644 --- a/components/com_top_nav/com_top_nav.js +++ b/components/com_top_nav/com_top_nav.js @@ -21,9 +21,25 @@ Component({ ready: function() { let height= getApp().globalData.navBarHeight; let menuInfo = getApp().globalData.menuInfo; + let user_no=''; + if(getApp().globalData.userInfo){ + user_no=getApp().globalData.userInfo.erpvipno + } //-- 胶囊的高度 -- - this.setData({height,h1:menuInfo.top,h2:menuInfo.height,user_id:getApp().globalData.user_id}); + this.setData({height,h1:menuInfo.top,h2:menuInfo.height,user_no}); + }, + pageLifetimes: { + //要处理一下,游客登录后的界面的变化,主要还该是改变会员 + show: function () { + let user_no=''; + if(getApp().globalData.userInfo){ + user_no=getApp().globalData.userInfo.erpvipno + } + //-- 胶囊的高度 -- + this.setData({user_no}); + } }, + methods: { go_back(){ let pages = getCurrentPages(); diff --git a/components/com_top_nav/com_top_nav.wxml b/components/com_top_nav/com_top_nav.wxml index 82f180b..9efea58 100644 --- a/components/com_top_nav/com_top_nav.wxml +++ b/components/com_top_nav/com_top_nav.wxml @@ -1,6 +1,7 @@ - ID:{{user_id}} + ID:{{user_no}} + diff --git a/components/com_top_nav/com_top_nav.wxss b/components/com_top_nav/com_top_nav.wxss index 8df33ce..a4de000 100644 --- a/components/com_top_nav/com_top_nav.wxss +++ b/components/com_top_nav/com_top_nav.wxss @@ -1,5 +1,5 @@ .t_nav{position:fixed;top:0;left:0; width:100%;z-index:9999; background-color: #fff;font-size: 30rpx } -.tab{ font-size:24rpx; position: relative } +.tab{ font-size:18rpx; position: relative } .tb_con{ position: absolute; bottom: 0; right: 10rpx; display: flex; }