uniapp历史模式history配置

摘要:
//我们使用hash模式时,打包线上,容易出现页面空白的情况,所以如下配置"h5":{"devServer":{"publicPath":"./""https":false,"port":3000,"disableHostCheck":true,"proxy":{"/api":{"target":"https://m.shop.com","ws":true,"changOrigin":true,"

//我们使用hash模式时,打包线上,容易出现页面空白的情况,所以如下配置

 "h5" : {
        "devServer" : {
	"publicPath":"./"
            "https" : false,
            "port" : 3000,
            "disableHostCheck" : true,
            "proxy" : {
                "/api" : {
                    "target" : "https://m.shop.com",
                    "ws" : true,
                    "changOrigin" : true,
                    "pathRewrite" : {
                        "^/api" : ""
                    }
                }
            }
        },
}

//但我们使用历史模式(history)模式的时候,不能用hash模式的配置

    "h5" : {
        "devServer" : {
			// "publicPath":"./"   //注意隐藏这行
            "https" : false,
            "port" : 3000,
            "disableHostCheck" : true,
            "proxy" : {
                "/api" : {
                    "target" : "m.shop.com",
                    // "target":"http://localhost:8080/hht_mall/",
                    "ws" : true,
                    "changOrigin" : true,
                    "pathRewrite" : {
                        "^/api" : ""
                    }
                }
            }
        },
        "router" : {
            "base" : "mall/website/",    //填写你的线上地址(如http://m.shop.com/mall/webiste/,线上根目录是http://m.shop.com,取得是根目录后的mall/website,注意本地开发时需要隐藏这行
            "mode" : "history"
        },
}

免责声明:文章转载自《uniapp历史模式history配置》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇将数据填充到已有的EXECL模板中R3下LoadLibrary初探下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

Linux bash运维操作日志审计(单服务器)

目前公司有几台机器比较重要,需要把所有用户的操作记录下来,于是就是参照资料来完成 1. vim /etc/profile.d/oplogrc.sh logdir=/opt/oplog userdir=$logdir/${LOGNAME} DT=`date +"%Y%m%d"` export HISTFILE="/$userdir/history.$DT"...

sqlserver添加主键

sqlServer中给表添加主键的sql: alter table market_media_medical_history alter column pk_id bigint not null; alter table market_media_medical_history add constraint PK_market_media_medical_...

linux设置执行的命令写入日志

vim /etc/profile ##添加以下内容到末尾export HISTTIMEFORMAT="[%Y-%m-%d %H:%M:%S] [`who am i 2>/dev/null| awk '{print $NF}'|sed -e 's/[()]//g'`] " echo "" > .bash_history export PR...

查看 Linux 操作的历史命令

1、history命令用于显示历史执行过的命令 执行 history命令能显示出当前用户在本地计算机中执行过的最近 1000 条命令记录。 如果觉得 1000 不够用,还可以自定义/etc/profile 文件中的HISTSIZE 变量值。 在使用 history 命令时,如果使用-c 参数则会清空所有的命令历史记录。 history 命令:...

linux 控制history命令历史记录

1、定制history的功能,可通过环境变量实现 1.1、HISTSIZE:history可保留的命令条数,如果把此变量设为0,则不记录history1.2、HISTFILE:  history历史命令文件的保存位置,默认.bash_history文件,清空或删除此文件,可以清除历史命令 (每个用户的用户目录下都有自己的history文件)1.3、HIST...

TortoiseGit Manual 学习

在线文档https://tortoisegit.org/docs/tortoisegit/ Preface 1. Introduction 2. TortoiseGit Daily Use Guide 3. The GitWCRev Program Glossary Index Preface Audience Reading Guide Tortoise...