美文网首页
html统一端口

html统一端口

作者: 叶子槐 | 来源:发表于2021-03-23 08:41 被阅读0次

一,vue动态ip,端口号

1.第一步 设置js文件
js文件部分

window.dasConfig={
    ip:"127.0.0.1",
    port:9101,
    localhostIp:"http://127.0.0.1:9101/",
}

2.第二部 加入js后

<!--自己的ip.js-->
<script src="../../ly/config-ip.js"></script>

//页面调用

            //例子
            /**
             * 查询基本信息名称
             */
            findInfo: function () {
                axios.post(`${dasConfig.localhostIp}/pm/product-process/findinfo`, this.productInfoForm).then((res) => {
                    this.productInfoList = res.data.data;
                    // //console.log(this.productInfoList)
                })
            },

相关文章

网友评论

      本文标题:html统一端口

      本文链接:https://www.haomeiwen.com/subject/nrnwaktx.html