SyntaxError: unexpected token: identifier
const data = <?php echo json_encode($data); ?>;
申明变量时,使用 let
问题集锦 ~ javascript
原文:https://www.cnblogs.com/higreen/p/12464578.html