Showing
1 changed file
with
3 additions
and
0 deletions
| ... | @@ -36,6 +36,7 @@ import { Toast } from 'vant'; | ... | @@ -36,6 +36,7 @@ import { Toast } from 'vant'; |
| 36 | import { nextTick, onMounted, reactive, ref, watch } from 'vue' | 36 | import { nextTick, onMounted, reactive, ref, watch } from 'vue' |
| 37 | import axios from '@/utils/axios'; | 37 | import axios from '@/utils/axios'; |
| 38 | 38 | ||
| 39 | +import { wxInfo } from '@/utils/tools'; | ||
| 39 | 40 | ||
| 40 | // 滚动条判断 | 41 | // 滚动条判断 |
| 41 | function hasScrollbar() { | 42 | function hasScrollbar() { |
| ... | @@ -46,8 +47,10 @@ onMounted(() => { | ... | @@ -46,8 +47,10 @@ onMounted(() => { |
| 46 | // TODO: 临时处理位置不对问题 | 47 | // TODO: 临时处理位置不对问题 |
| 47 | // 因为微信第一次进入默认全屏,之后产生的导航栏会影响位置 | 48 | // 因为微信第一次进入默认全屏,之后产生的导航栏会影响位置 |
| 48 | if (hasScrollbar()) { | 49 | if (hasScrollbar()) { |
| 50 | + if (wxInfo().isiOS || wxInfo().isAndroid) { | ||
| 49 | location.reload() | 51 | location.reload() |
| 50 | } | 52 | } |
| 53 | + } | ||
| 51 | }) | 54 | }) |
| 52 | 55 | ||
| 53 | const $route = useRoute(); | 56 | const $route = useRoute(); | ... | ... |
-
Please register or login to post a comment