After Vue uses HBuilder to package APP, it cannot access the data.

use vue to complete an app, and the backend does not use a proxy server like nginx, so after the HBuiderX is packaged into app, the request cannot be sent. The configuration of cofig/index.js under vue is as follows:

login.vue

, you can access the interface, but you have to add an address in front of it every time. In this way, the project volume will be large if the interface address is modified. Baidu app does not have the concept of cross-domain request. So do the bosses have any way to solve it?

May.11,2022

online environment proxyTable is invalid. Cross-domain or nginx configuration is recommended for the backend. If you don't want to write the host paragraph, you can package it in axios.

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