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