diff --git a/components/com_top_nav/com_top_nav.js b/components/com_top_nav/com_top_nav.js index c8e29d9..54271aa 100644 --- a/components/com_top_nav/com_top_nav.js +++ b/components/com_top_nav/com_top_nav.js @@ -2,42 +2,18 @@ var t = getApp(),os = t.globalData.setting; Component({ properties: {}, data: { - isopen: 0, iurl: os.imghost, - nav_left: "首页", //导航左边 - nav_center: "预约", //导航中间 - nav_right: "我的", //导航右边 - nav_left_url: "/pages/index/index/index", //导航左边地址 - nav_center_url: "/pages/user/my_service/tment_order_list", //导航中间地址 - nav_right_url: "/pages/user/index/index", //导航右边地址 + height:0, + h1:0, + h2:0 + }, + ready: function() { + let height= getApp().globalData.navBarHeight; + let menuInfo = getApp().globalData.menuInfo; + //-- 胶囊的高度 -- + this.setData({height,h1:menuInfo.top,h2:menuInfo.height}); }, - ready: function() {}, methods: { - //--点击打开事件-- - open_box: function() { - this.setData({ - isopen: 1 - }); - }, - set_name: function(name,url) { - var th = this; - th.setData({ - nav_center:name, - nav_center_url:url - }) - }, - //--关闭事件-- - close_box: function() { - this.setData({ - isopen: 0 - }); - }, - //--跳转-- - goto: function(e) { - var url = e.currentTarget.dataset.url; - getApp().goto(url); - this.close_box(); - } } diff --git a/components/com_top_nav/com_top_nav.wxml b/components/com_top_nav/com_top_nav.wxml index 6fca6c2..b10fd78 100644 --- a/components/com_top_nav/com_top_nav.wxml +++ b/components/com_top_nav/com_top_nav.wxml @@ -1,5 +1,9 @@ - - - ID:454545 + + + + 你好 + ID:454545 + - \ No newline at end of file + + \ No newline at end of file diff --git a/components/com_top_nav/com_top_nav.wxss b/components/com_top_nav/com_top_nav.wxss index e69de29..f0b6eef 100644 --- a/components/com_top_nav/com_top_nav.wxss +++ b/components/com_top_nav/com_top_nav.wxss @@ -0,0 +1,3 @@ +.t_nav{ color: #313131; position:fixed;top:0;left:0; width:100%;z-index:9999; background-color: #fff } +.tab{ font-size:24rpx; position: absolute; right: 24rpx; top:-28rpx } +.contant{ display: flex; justify-content: center; align-items: center; width: 100%; position: relative } \ No newline at end of file