perf:调整分页
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tiesheng/npm-tool",
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.10",
|
||||
"description": "npm tool package",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -77,8 +77,12 @@ const dealParamsBody = (options) => {
|
||||
* @returns {Promise<<any>>}
|
||||
*/
|
||||
async function req(url, options) {
|
||||
if (GlobalConfig.getConfig().prefix) {
|
||||
url = GlobalConfig.getConfig().prefix + url;
|
||||
let {prefix} = GlobalConfig.getConfig();
|
||||
if (typeof prefix === "function") {
|
||||
prefix = prefix(url);
|
||||
}
|
||||
if (prefix) {
|
||||
url = prefix + url;
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
request(url, {
|
||||
|
||||
Reference in New Issue
Block a user