The vue project introduces particles.js to realize the particle effect, but there is a problem when switching pages?

In the

vue-cli project, I directly introduced the particls library into index.html, and the related files are placed in the static directory

.
<div id="particles-js"></div>
//
<script type="text/javascript" src="static/js/particles.min.js"></script>
<script type="text/javascript" src="static/js/app.js"></script>

this is fine. Now there is a requirement, when the user url input error, to jump to the 404 page, the guard navigation I wrote in the component.

beforeRouteEnter:function(to, from, next){
    // fetchData;
    next(vm => {
        vm.fetchData(function(result){
            console.log(result);
            if(result)
                next();
            else
                next({name:"Home"}); // home
        });    
    })
},
The

page can jump, but the particles are not displayed. The following error is reported

Uncaught SyntaxError: Unexpected token <

Open the relevant file and find that the content has been replaced with the content of index.html (sorry I can"t post the picture for the time being)

Why?


probably know why, history mode? Use the absolute path src= "/ static" to try

for the two outreach files.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eca482-2fc3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eca482-2fc3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?