From 1977e948ee83dc6b2b43a93cc366ab5fe9580603 Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Mon, 27 Nov 2023 09:47:47 +0800 Subject: [PATCH] 1、文字的字体大小 2、要显示会员的编号,不要id 3、在登陆前的显示 --- components/com_top_nav/com_top_nav.js | 18 +++++++++++++++++- components/com_top_nav/com_top_nav.wxml | 3 ++- components/com_top_nav/com_top_nav.wxss | 2 +- 3 files changed, 20 insertions(+), 3 deletions(-) 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; } -- libgit2 0.21.4