hookehuyr

fix 首页刷新需要兼容平台

......@@ -36,6 +36,7 @@ import { Toast } from 'vant';
import { nextTick, onMounted, reactive, ref, watch } from 'vue'
import axios from '@/utils/axios';
import { wxInfo } from '@/utils/tools';
// 滚动条判断
function hasScrollbar() {
......@@ -46,7 +47,9 @@ onMounted(() => {
// TODO: 临时处理位置不对问题
// 因为微信第一次进入默认全屏,之后产生的导航栏会影响位置
if (hasScrollbar()) {
location.reload()
if (wxInfo().isiOS || wxInfo().isAndroid) {
location.reload()
}
}
})
......