Showing
1 changed file
with
11 additions
and
5 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,17 +38,23 @@ import icon_add from '@/images/icon/new@2x.png' | ... | @@ -38,17 +38,23 @@ 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 (props.activated === 'home') { // 首页调用 | ||
| 41 | if (page === 'home') { | 42 | if (page === 'home') { |
| 42 | - if (currentPage.value === 'home') return; | 43 | + return; |
| 44 | + } else { | ||
| 43 | wx.redirectTo({ | 45 | wx.redirectTo({ |
| 44 | - url: '../index/index' | 46 | + url: '../my/index' |
| 45 | }) | 47 | }) |
| 48 | + } | ||
| 49 | + } else { // 我的页面调用 | ||
| 50 | + if (page === 'me') { | ||
| 51 | + return; | ||
| 46 | } else { | 52 | } else { |
| 47 | - if (currentPage.value === 'my') return; | ||
| 48 | wx.redirectTo({ | 53 | wx.redirectTo({ |
| 49 | - url: '../my/index' | 54 | + url: '../index/index' |
| 50 | }) | 55 | }) |
| 51 | } | 56 | } |
| 57 | + } | ||
| 52 | } | 58 | } |
| 53 | 59 | ||
| 54 | const createActivity = () => { | 60 | const createActivity = () => { | ... | ... |
-
Please register or login to post a comment