lushuncheng před 6 roky
rodič
revize
45ec1cfd24
2 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 1 1
      plugins/http.js
  2. 1 1
      plugins/nuxtAxios.js

+ 1 - 1
plugins/http.js

@@ -28,7 +28,7 @@ const post = async (path, data = {}, payload = {}) => {
   for(const key in data) {
     console.log(key)
     if(data.hasOwnProperty(key)) {
-      const element = encodeURI(data[key])
+      const element = encodeURIComponent(data[key])
       console.log(element)
       urlParams.push(`${key}=${element}`)
     }

+ 1 - 1
plugins/nuxtAxios.js

@@ -29,7 +29,7 @@ export default function ({ $axios, redirect, req, ...args }) {
               let urlParams = [];
               for(const key in data) {
                 if(data.hasOwnProperty(key)) {
-                  const element = encodeURI(data[key])
+                  const element = encodeURIComponent(data[key])
                   console.log(key)
                   console.log(element)
                   urlParams.push(`${key}=${element}`)