登录配置相关,调整登录逻辑,底部导航配置相关

This commit is contained in:
Jason
2022-09-13 19:07:36 +08:00
parent b47fc4219e
commit 3fe17fae5a
12 changed files with 173 additions and 100 deletions

View File

@@ -28,7 +28,6 @@ export const getRect = (selector: string, all = false, context?: any) => {
}
/**
<<<<<<< HEAD
* @description 获取当前页面实例
*/
export function currentPage() {
@@ -52,19 +51,16 @@ export enum LinkTypeEnum {
'SHOP_PAGES' = 'shop',
'CUSTOM_LINK' = 'custom'
}
export function navigateTo(link: Link) {
export function navigateTo(link: Link, navigateType: 'navigateTo' | 'reLaunch' = 'navigateTo') {
let url: string
switch (link.type) {
case LinkTypeEnum.SHOP_PAGES:
url = link.query ? `${link.path}?${objectToQuery(link.query)}` : link.path
if (link.isTab) {
uni.switchTab({ url })
} else {
uni.navigateTo({ url })
}
uni[navigateType]({ url })
break
case LinkTypeEnum.CUSTOM_LINK:
uni.navigateTo({ url: `/pages/webview/webview?url=${link.path}` })
uni[navigateType]({ url: `/pages/webview/webview?url=${link.path}` })
}
}