Skip to content

Commit

Permalink
修复了内部链接参数中包含 :// 时被认为是外部链接的问题 #356
Browse files Browse the repository at this point in the history
  • Loading branch information
jin-yufeng committed Oct 2, 2021
1 parent c48bf20 commit 4bc7715
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/miniprogram/node/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Component({
if (href[0] === '#') {
// 跳转锚点
this.root.navigateTo(href.substring(1)).catch(() => { })
} else if (href.includes('://')) {
} else if (href.split('?')[0].includes('://')) {
// 复制外部链接
if (this.root.properties.copyLink) {
wx.setClipboardData({
Expand Down
2 changes: 1 addition & 1 deletion src/uni-app/components/mp-html/node/node.vue
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ export default {
if (href[0] === '#') {
// 跳转锚点
this.root.navigateTo(href.substring(1)).catch(() => { })
} else if (href.includes('://')) {
} else if (href.split('?')[0].includes('://')) {
// 复制外部链接
if (this.root.copyLink) {
// #ifdef H5
Expand Down

0 comments on commit 4bc7715

Please sign in to comment.