From b85aa12acad18f3b0ce9d590a87e5f4016ed9b1a Mon Sep 17 00:00:00 2001
From: Tevin <tingquanren@163.com>
Date: Mon, 08 Nov 2021 12:04:35 +0800
Subject: [PATCH] 修复增加options的问题

---
 bases/Fetcher.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bases/Fetcher.js b/bases/Fetcher.js
index dd90242..e0b9e8b 100644
--- a/bases/Fetcher.js
+++ b/bases/Fetcher.js
@@ -110,7 +110,7 @@
      * @param {object} [options]
      * @return {Promise<any>}
      */
-    get(url, data, options = null) {
+    get(url, data, options = {}) {
         const params = Qs.stringify(data);
         if (url.indexOf('?') >= 0) {
             url += '&' + params;
@@ -127,7 +127,7 @@
      * @param {object} [options]
      * @return {Promise<any>}
      */
-    post(url, data, options = null) {
+    post(url, data, options = {}) {
         if (this._data.mock === 'on') {
             return this.get(url, data, options);
         }

--
Gitblit v1.9.1