|
@@ -353,9 +353,9 @@ var browser = {
|
|
|
return "";
|
|
|
},
|
|
|
|
|
|
- replaceQueryString (url, name, value) {
|
|
|
- const re = new RegExp(name + '=[^&]*', 'gi')
|
|
|
- return url.replace(re, name + '=' + value)
|
|
|
+ replaceQueryString(url, name, value) {
|
|
|
+ const re = new RegExp(name + "=[^&]*", "gi");
|
|
|
+ return url.replace(re, name + "=" + value);
|
|
|
},
|
|
|
openLink(mglink, h5link, appLink) {
|
|
|
if (this.detectWeixin()) {
|
|
@@ -370,12 +370,16 @@ var browser = {
|
|
|
}
|
|
|
} else {
|
|
|
if (h5link) {
|
|
|
- window.open(h5link,'_blank')
|
|
|
+ if (this.detectIOS()) {
|
|
|
+ window.location.href = h5link;
|
|
|
+ } else {
|
|
|
+ window.open(h5link, "_blank");
|
|
|
+ }
|
|
|
}
|
|
|
// 不在小程序里
|
|
|
}
|
|
|
});
|
|
|
- } else if(this.detectApp()){
|
|
|
+ } else if (this.detectApp()) {
|
|
|
if (appLink) {
|
|
|
wx.miniProgram.navigateTo({
|
|
|
url: appLink,
|
|
@@ -383,7 +387,11 @@ var browser = {
|
|
|
}
|
|
|
} else {
|
|
|
if (h5link) {
|
|
|
- window.open(h5link, '_blank')
|
|
|
+ if (this.detectIOS()) {
|
|
|
+ window.location.href = h5link;
|
|
|
+ } else {
|
|
|
+ window.open(h5link, "_blank");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
},
|