Mixed Content: The site at 'https:xxxx' was loaded over a secure connection, but the file at 'http://xxxx' was loaded over an insecure connection. This file should be served over HTTPS. This download has been blocked. See https://blog.chromium.org/2020/02/protecting-users-from-insecure.html for more details.
遇到这个兼容性问题,意思就是https是安全链接,http被拦截了
解决方法,就是再打开链接的时候将http用https替换掉文章来源:https://www.toymoban.com/news/detail-643484.html
可能会因为需求不一样,代码会有所变化文章来源地址https://www.toymoban.com/news/detail-643484.html
/**
* @desc https和http兼容
* @param {string} url 链接
*/
export const openLink = (url: string) => {
const newUrl = url.replace('http','https')
window.open(newUrl,'_blank');
}
到了这里,关于HTTPS里面打开HTTP,不兼容问题的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!