()
| 562 | } |
| 563 | |
| 564 | reload() { |
| 565 | const window = cache.getWindow(this.$_pageId) |
| 566 | let param = ['type=jump', `targeturl=${encodeURIComponent(this.href)}`] |
| 567 | if (this.$_search) param.push(`search=${encodeURIComponent(this.$_search)}`) |
| 568 | if (this.$_hash) param.push(`hash=${encodeURIComponent(this.$_hash)}`) |
| 569 | |
| 570 | param = '?' + param.join('&') |
| 571 | |
| 572 | const callMethod = window.$$miniprogram.isTabBarPage(this.$_pageRoute) ? 'switchTab' : 'redirectTo' |
| 573 | wx[callMethod]({ |
| 574 | url: `${this.$_pageRoute}${param}`, |
| 575 | }) |
| 576 | } |
| 577 | |
| 578 | replace(value) { |
| 579 | // 和直接赋值 location.href 不同,不需要进入 history |
no test coverage detected