feat(about): 添加环境判断工具导入和使用说明

添加@uni-helper/uni-env环境判断工具的导入,并在控制台打印环境变量用于调试
添加注释说明isH5和isWeb的区别,建议优先使用isH5
This commit is contained in:
feige996
2025-08-28 20:33:05 +08:00
parent edb97b587c
commit c343c7c5f9

View File

@@ -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')}`,