Directorio de artículos
-
Antecedentes: el sistema tiene un iframe integrado. El src del iframe se ha modificado, pero la página interna del iframe no se ha actualizado.
-
Motivo: si el src en el iframe es una ruta hash con #, no se actualizará cuando cambie el src.
-
Solución: en este momento, agregue un número aleatorio o una marca de tiempo antes del signo #
// # 前面无其他参数
const url = `https://xxx域名xxx/?${
new Date().getTime()}#/test/?id=666`;
// # 前面有其他参数
const url = `https://xxx域名xxx/?embed=true&${
new Date().getTime()}#/test/?id=666`;