The scan code of the project built by vue-cli can be accessed in Wechat browser and open a blank in other browsers.

other browsers are blank
not even with this

clipboard.png
solve

Mar.06,2021
Is

accessible on pc? Open debug mode to see if there are any problems


Brother should learn to use F12 to view console feedback. Your "blank" description really can't give you advice


this question has nothing to do with vue-cli, or code scanning:
is why it can be accessed by Wechat but not by other browsers?

take a look at F12 first to see if there is any feedback. If not, see if there is any judgment code in the project that forbids browsers other than Wechat to access, similar to:

// UserAgent
var useragent = navigator.userAgent;
if (useragent.match(/MicroMessenger/i) != 'MicroMessenger') {
    // javascript
    var opened = window.open('about:blank', '_self');
    opened.opener = null;
    opened.close();
} 
Menu