feat(about): 添加环境判断工具导入和使用说明
添加@uni-helper/uni-env环境判断工具的导入,并在控制台打印环境变量用于调试 添加注释说明isH5和isWeb的区别,建议优先使用isH5
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import { isApp, isAppAndroid, isAppHarmony, isAppIOS, isAppPlus, isH5, isMpWeixin, isWeb } from '@uni-helper/uni-env'
|
||||
import { LOGIN_PAGE } from '@/router/config'
|
||||
import { tabbarStore } from '@/tabbar/store'
|
||||
import RequestComp from './components/request.vue'
|
||||
@@ -10,6 +11,9 @@ definePage({
|
||||
},
|
||||
})
|
||||
|
||||
// 浏览器打印 isH5为true, isWeb为false,大家尽量用 isH5
|
||||
console.log({ isApp, isAppAndroid, isAppHarmony, isAppIOS, isAppPlus, isH5, isMpWeixin, isWeb })
|
||||
|
||||
function toLogin() {
|
||||
uni.navigateTo({
|
||||
url: `${LOGIN_PAGE}?redirect=${encodeURIComponent('/pages/about/about')}`,
|
||||
|
||||
Reference in New Issue
Block a user