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.
遇到這個(gè)兼容性問題,意思就是https是安全鏈接,http被攔截了
解決方法,就是再打開鏈接的時(shí)候?qū)ttp用https替換掉文章來源:http://www.zghlxwxcb.cn/news/detail-643484.html
可能會(huì)因?yàn)樾枨蟛灰粯?,代碼會(huì)有所變化文章來源地址http://www.zghlxwxcb.cn/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');
}
到了這里,關(guān)于HTTPS里面打開HTTP,不兼容問題的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!