From 676a8116c93e1eeff5fe52be9542a2d0039a187c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?TOP=E7=B3=AF=E7=B1=B3?= <1130395124@qq.com> Date: Sat, 11 Mar 2023 22:46:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9request=E5=86=85=E9=83=A8?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/request.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/request.js b/src/core/request.js index 5bd86e7..d691c1c 100644 --- a/src/core/request.js +++ b/src/core/request.js @@ -2,7 +2,7 @@ import $store from "@/store/index"; import Vue from "vue" let prototype = Vue.prototype; -function findRule(name) { +function findApi(name) { let pos = name.indexOf('.'); if (pos > 0) { let temp, arr = name.split('.'); @@ -20,7 +20,7 @@ function findRule(name) { } const request = async (args) => { - const rule = findRule(args.api || ''); + const rule = findApi(args.api || ''); if (JSON.stringify(rule) === "{}") { throw "找不到API:" + args.api; }