Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
jgdl
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2025-07-02 17:14:01 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
78d5b7abb1a846ca7bf06018dd0a1d1b95332373
78d5b7ab
1 parent
459c5149
feat(TabBar): 添加用户认证状态和基本信息字段
添加用户信息字段和认证状态变量,为后续认证跳转逻辑做准备
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
src/components/TabBar.vue
src/components/TabBar.vue
View file @
78d5b7a
...
...
@@ -88,6 +88,22 @@ const getCurrentPage = () => {
* @param {string} url - 页面路径
*/
const navigateTo = (url) => {
// TODO: 等待正式接口
// if ((url === '/pages/profile/index' || url === '/pages/sell/index') && !is_auth.value) {
// Taro.showToast({
// title: '请先完善个人信息',
// icon: 'none',
// duration: 2000,
// success: (res) => {
// setTimeout(() => {
// Taro.navigateTo({
// url: '/pages/register/index'
// })
// }, 2000);
// }
// })
// return
// }
Taro.redirectTo({
url: url
})
...
...
@@ -113,8 +129,24 @@ const getIconColor = (tab) => {
return activeTab.value === tab ? '#f97316' : '#6b7280'
}
const userInfo = ref({
avatar: '',
nickname: '',
phone: '1',
gender: '',
school: '',
birthday: '',
});
const is_auth = ref(false);
onMounted(() => {
getCurrentPage()
// 获取当前用户的信息
// if (userInfo.value && userInfo.value.phone) {
// is_auth.value = true
// }
is_auth.value = false
})
</script>
...
...
Please
register
or
login
to post a comment