Update index.ts 更新了注释中的一些空格使用
有一些强迫症,把这个文件中的注释规范了一下
This commit is contained in:
parent
ff29decfba
commit
2fd8e45c31
@ -4,7 +4,7 @@ import { isMpWeixin } from './platform'
|
||||
const getLastPage = () => {
|
||||
// getCurrentPages() 至少有1个元素,所以不再额外判断
|
||||
// const lastPage = getCurrentPages().at(-1)
|
||||
// 上面那个在低版本安卓中打包回报错,所以改用下面这个【虽然我加了src/interceptions/prototype.ts,但依然报错】
|
||||
// 上面那个在低版本安卓中打包会报错,所以改用下面这个【虽然我加了 src/interceptions/prototype.ts,但依然报错】
|
||||
const pages = getCurrentPages()
|
||||
return pages[pages.length - 1]
|
||||
}
|
||||
@ -25,8 +25,8 @@ export const getIsTabbar = () => {
|
||||
|
||||
/**
|
||||
* 获取当前页面路由的 path 路径和 redirectPath 路径
|
||||
* path 如 ‘/pages/login/index’
|
||||
* redirectPath 如 ‘/pages/demo/base/route-interceptor’
|
||||
* path 如 '/pages/login/index'
|
||||
* redirectPath 如 '/pages/demo/base/route-interceptor'
|
||||
*/
|
||||
export const currRoute = () => {
|
||||
const lastPage = getLastPage()
|
||||
@ -120,7 +120,7 @@ export const getNeedLoginPages = (): string[] => getAllPages('needLogin').map((p
|
||||
export const needLoginPages: string[] = getAllPages('needLogin').map((page) => page.path)
|
||||
|
||||
/**
|
||||
* 根据微信小程序当前环境,判断应该获取的BaseUrl
|
||||
* 根据微信小程序当前环境,判断应该获取的 baseUrl
|
||||
*/
|
||||
export const getEnvBaseUrl = () => {
|
||||
// 请求基准地址
|
||||
|
Loading…
x
Reference in New Issue
Block a user