修改request内部函数名称
This commit is contained in:
parent
fcdc39e724
commit
676a8116c9
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue