<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                很多時候我們需呀在本地進行調試也有很多時候我們需要請求遠端生產環境的接口,所以我們可以通過Vue Cli設置不同的環境變量,讓web模塊自動識別到是開發環境還是生產環境從而加載不同的配置信息請求不同環境下的后端服務 ### ![](https://img.kancloud.cn/0d/60/0d6020f1cba7237fd8fe6338de085e0e_953x733.png) ### ![](https://img.kancloud.cn/a3/43/a343bc9904b10c888e7eb17879d244cb_1595x819.png) ### 但是你會好奇是從哪里設置的當前是開發環境還是生產環境呢? ![](https://img.kancloud.cn/dd/9c/dd9c7b6c8a33e6ef106b200411a72f55_1144x823.png) ### **啟動的時候會根據pacakge.json當中的serve-dev以及serve-prod 看你選擇啟動哪一個,如果啟動的是serve-dev那么因為我們設置了它的--mode dev 所以就會去找web根目錄下的.env.dev配置文件里面的配置信息 ...** ### 然后將login.vue當中請求的地址的域名都去掉既可以了 ![](https://img.kancloud.cn/6c/03/6c034035dc956b5ccd803325622efe69_1305x730.png) ### ![](https://img.kancloud.cn/32/9b/329b82cae0786d60f943ec9b5f9b8173_1236x893.png) ### ![](https://img.kancloud.cn/82/9b/829b8f264e1aa73ea56284f7b2475ed0_2410x1178.png) ![](https://img.kancloud.cn/12/b3/12b36b312632d856174c374b2493199f_2256x1286.png) ### 這樣就可以實現開發環境 生產環境后端接口的自由切換了
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看