Showing
1 changed file
with
4 additions
and
1 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,7 +47,9 @@ onMounted(() => { | ... | @@ -46,7 +47,9 @@ onMounted(() => { |
| 46 | // TODO: 临时处理位置不对问题 | 47 | // TODO: 临时处理位置不对问题 |
| 47 | // 因为微信第一次进入默认全屏,之后产生的导航栏会影响位置 | 48 | // 因为微信第一次进入默认全屏,之后产生的导航栏会影响位置 |
| 48 | if (hasScrollbar()) { | 49 | if (hasScrollbar()) { |
| 49 | - location.reload() | 50 | + if (wxInfo().isiOS || wxInfo().isAndroid) { |
| 51 | + location.reload() | ||
| 52 | + } | ||
| 50 | } | 53 | } |
| 51 | }) | 54 | }) |
| 52 | 55 | ... | ... |
-
Please register or login to post a comment