diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index e36edcc..440917f 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -15,7 +15,7 @@
- unibest
+ unibest
最好用的 uniapp 开发模板
{{ description }}
@@ -39,9 +39,11 @@ defineOptions({
// 获取屏幕边界到安全区域距离
let safeAreaInsets
+let systemInfo
+
// #ifdef MP-WEIXIN
// 微信小程序使用新的API
-const systemInfo = wx.getWindowInfo()
+systemInfo = uni.getWindowInfo()
safeAreaInsets = systemInfo.safeArea
? {
top: systemInfo.safeArea.top,
@@ -54,7 +56,7 @@ safeAreaInsets = systemInfo.safeArea
// #ifndef MP-WEIXIN
// 其他平台继续使用uni API
-const systemInfo = uni.getSystemInfoSync()
+systemInfo = uni.getSystemInfoSync()
safeAreaInsets = systemInfo.safeAreaInsets
// #endif
const author = ref('菲鸽')
@@ -66,9 +68,3 @@ onLoad(() => {
console.log('项目作者:', author.value)
})
-
-