From 6d37dc93b40c6935f65ec4c68b7f6985c9d3bad5 Mon Sep 17 00:00:00 2001 From: jxmanxk <312142485@qq.com> Date: 星期二, 23 一月 2024 17:44:14 +0800 Subject: [PATCH] Merge branch 'xio_dev' --- src/utils/jun_http.js | 36 ++++++++++++++++++------------------ 1 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/utils/jun_http.js b/src/utils/jun_http.js index 71aca81..15ec604 100644 --- a/src/utils/jun_http.js +++ b/src/utils/jun_http.js @@ -1,7 +1,7 @@ /** * Http 璇锋眰 * * 灏忕▼搴忚浣跨敤澧炲己缂栬瘧 - * + * * 璋冪敤渚嬪瓙 * Req.http.post({ * url: '', @@ -12,24 +12,24 @@ import Axios from '../libs/axios' /* json杞琭ormdata锛堝簭鍒楀寲锛夛紝浠呮敮鎸佷竴绾у瓧闈㈤噺鍜屽瓧闈㈤噺鏁扮粍 */ -function jsonToFormData (json) { - var arr = [] - var e = encodeURIComponent - for (var key in json) { - var item = json[key] - var res - if (item instanceof Array) { - res = []; - item.map(function (o, i) { - res.push(e(key) + '=' + e(o)) - }); - res = res.join('&') - } else { - res = e(key) + '=' + e(item) - } - arr.push(res) +function jsonToFormData(json) { + var arr = [] + var e = encodeURIComponent + for (var key in json) { + var item = json[key] + var res + if (item instanceof Array) { + res = [] + item.map(function(o) { + res.push(e(key) + '=' + e(o)) + }) + res = res.join('&') + } else { + res = e(key) + '=' + e(item) } - return arr.join('&') + arr.push(res) + } + return arr.join('&') } /** -- Gitblit v1.8.0