Showing
1 changed file
with
17 additions
and
11 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2022-09-21 11:59:20 | 2 | * @Date: 2022-09-21 11:59:20 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2022-10-13 20:26:49 | 4 | + * @LastEditTime: 2022-10-13 22:56:44 |
| 5 | * @FilePath: /swx/src/components/navbar.vue | 5 | * @FilePath: /swx/src/components/navbar.vue |
| 6 | * @Description: 底部导航栏 | 6 | * @Description: 底部导航栏 |
| 7 | --> | 7 | --> |
| ... | @@ -38,16 +38,22 @@ import icon_add from '@/images/icon/new@2x.png' | ... | @@ -38,16 +38,22 @@ import icon_add from '@/images/icon/new@2x.png' |
| 38 | import Taro from '@tarojs/taro' | 38 | import Taro from '@tarojs/taro' |
| 39 | 39 | ||
| 40 | const goTo = (page) => { | 40 | const goTo = (page) => { |
| 41 | - if (page === 'home') { | 41 | + if (props.activated === 'home') { // 首页调用 |
| 42 | - if (currentPage.value === 'home') return; | 42 | + if (page === 'home') { |
| 43 | - wx.redirectTo({ | 43 | + return; |
| 44 | - url: '../index/index' | 44 | + } else { |
| 45 | - }) | 45 | + wx.redirectTo({ |
| 46 | - } else { | 46 | + url: '../my/index' |
| 47 | - if (currentPage.value === 'my') return; | 47 | + }) |
| 48 | - wx.redirectTo({ | 48 | + } |
| 49 | - url: '../my/index' | 49 | + } else { // 我的页面调用 |
| 50 | - }) | 50 | + if (page === 'me') { |
| 51 | + return; | ||
| 52 | + } else { | ||
| 53 | + wx.redirectTo({ | ||
| 54 | + url: '../index/index' | ||
| 55 | + }) | ||
| 56 | + } | ||
| 51 | } | 57 | } |
| 52 | } | 58 | } |
| 53 | 59 | ... | ... |
-
Please register or login to post a comment