mirror of
https://github.com/MrXujiang/h5-Dooring.git
synced 2025-12-11 01:06:32 +00:00
update: encode url
This commit is contained in:
parent
e4dd3d162e
commit
ee28679ead
@ -22,6 +22,7 @@ import req from '@/utils/req';
|
||||
import { uuid } from '@/utils/tool';
|
||||
import styles from './index.less';
|
||||
import MyPopover from 'yh-react-popover';
|
||||
import { encode } from 'querystring';
|
||||
|
||||
const { confirm } = Modal;
|
||||
|
||||
@ -54,7 +55,7 @@ const HeaderComponent = memo((props: HeaderComponentProps) => {
|
||||
// );
|
||||
// }, 600);
|
||||
setTimeout(() => {
|
||||
window.open(`http://localhost:8008/preview?tid=${props.location.query.tid}&pointData=${JSON.stringify(pointData)}`);
|
||||
window.open(`http://localhost:8008/preview?tid=${props.location.query.tid}&pointData=${encodeURI(JSON.stringify(pointData))}`);
|
||||
}, 600);
|
||||
};
|
||||
|
||||
|
||||
@ -19,7 +19,8 @@ interface PointDataItem {
|
||||
|
||||
const PreviewPage = memo((props: PreviewPageProps) => {
|
||||
const [pointData, setPointData] = useState(() => {
|
||||
const pointDataStr = getQueryString('pointData') || localStorage.getItem('pointData');
|
||||
const pointDataStr =
|
||||
decodeURI(getQueryString('pointData') ?? '') ?? localStorage.getItem('pointData');
|
||||
let points;
|
||||
|
||||
try {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user