The API cannot be requested after the project built by vue-cli refreshes the page.

before refresh

main.js

Apr.24,2022

Don't you find an extra undefined? take a look at the problem written in the api you requested


The

interface address has changed to http://localhost:8080/undefined. There is something wrong with the spelling of this interface. In fact, you can do this. Create a new public js directory, and then create a new api.config.js. The content of this js file is:

//
const host = 'http://192.168.163.177:8080';
//
const host = 'http://192.168.163.177:8080';

export default host;

just use which comment, and then in main.js , introduce the js file.
such as import api from'. / api.config.js' and then Vue.prototype.api = api . Finally, this.api can be used in each component without making any judgment.

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-1eb33dc-243b.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-1eb33dc-243b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?