Commit 82668858a786acea3df67b14da0667637ac6eda5
1 parent
e108f452
OA单的顶部的自定义优化
Showing
4 changed files
with
53 additions
and
0 deletions
components/com_top_nav/com_top_nav.js
0 → 100644
| 1 | +var t = getApp(),os = t.globalData.setting; | |
| 2 | +Component({ | |
| 3 | + properties: {}, | |
| 4 | + data: { | |
| 5 | + isopen: 0, | |
| 6 | + iurl: os.imghost, | |
| 7 | + nav_left: "首页", //导航左边 | |
| 8 | + nav_center: "预约", //导航中间 | |
| 9 | + nav_right: "我的", //导航右边 | |
| 10 | + nav_left_url: "/pages/index/index/index", //导航左边地址 | |
| 11 | + nav_center_url: "/pages/user/my_service/tment_order_list", //导航中间地址 | |
| 12 | + nav_right_url: "/pages/user/index/index", //导航右边地址 | |
| 13 | + }, | |
| 14 | + ready: function() {}, | |
| 15 | + methods: { | |
| 16 | + //--点击打开事件-- | |
| 17 | + open_box: function() { | |
| 18 | + this.setData({ | |
| 19 | + isopen: 1 | |
| 20 | + }); | |
| 21 | + }, | |
| 22 | + set_name: function(name,url) { | |
| 23 | + var th = this; | |
| 24 | + th.setData({ | |
| 25 | + nav_center:name, | |
| 26 | + nav_center_url:url | |
| 27 | + }) | |
| 28 | + }, | |
| 29 | + //--关闭事件-- | |
| 30 | + close_box: function() { | |
| 31 | + this.setData({ | |
| 32 | + isopen: 0 | |
| 33 | + }); | |
| 34 | + }, | |
| 35 | + //--跳转-- | |
| 36 | + goto: function(e) { | |
| 37 | + var url = e.currentTarget.dataset.url; | |
| 38 | + getApp().goto(url); | |
| 39 | + this.close_box(); | |
| 40 | + } | |
| 41 | + | |
| 42 | + } | |
| 43 | + | |
| 44 | +}) | |
| 0 | 45 | \ No newline at end of file | ... | ... |
components/com_top_nav/com_top_nav.json
0 → 100644
components/com_top_nav/com_top_nav.wxml
0 → 100644
components/com_top_nav/com_top_nav.wxss
0 → 100644