vue.config.js部分
module.exports = {
transpileDependencies: [
'vuetify'
],
publicPath: "/h5/",//这路径默认是/
indexPath:'index.html',
devServer: {
port: "8110",
proxy: {
"/soft_api": {
target: " https://apicloud.aaaaa.cn/api/",
changeOrigin: true,
secure: false,
pathRewrite: { "^/soft_api": "" },
},
},
},
router.文件夹index.js部分
const router = new VueRouter({
mode: 'history',
base: '/h5',//默认是/
routes
})
//接下来是宝塔里的配置文件
location /h5
{
try_files $uri $uri/ /h5/index.html;
}
location ^~/soft_api/
{
proxy_pass https://apicloud.aaaaa.cn/api/;
}
2669

被折叠的 条评论
为什么被折叠?



