mirror of https://github.com/certd/certd
chore:
parent
add8efaba8
commit
434b259525
|
@ -22,6 +22,7 @@ export class RainyunAccess extends BaseAccess {
|
||||||
vModel: "value"
|
vModel: "value"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
helper:"https://app.rainyun.com/account/settings/api-key",
|
||||||
encrypt: true,
|
encrypt: true,
|
||||||
required: true
|
required: true
|
||||||
})
|
})
|
||||||
|
@ -48,7 +49,10 @@ export class RainyunAccess extends BaseAccess {
|
||||||
async getDomainList(req:{offset?:number,size?:number,query?:string}){
|
async getDomainList(req:{offset?:number,size?:number,query?:string}){
|
||||||
const size = req.size ?? 20;
|
const size = req.size ?? 20;
|
||||||
const offset = req.offset ?? 0;
|
const offset = req.offset ?? 0;
|
||||||
const page = offset % size === 0 ? offset / size : Math.floor(offset / size) + 1;
|
let page = Math.floor(offset / size);
|
||||||
|
if(offset % size === 0 ){
|
||||||
|
page++
|
||||||
|
}
|
||||||
const options ={
|
const options ={
|
||||||
page: page,
|
page: page,
|
||||||
perPage: size,
|
perPage: size,
|
||||||
|
@ -57,11 +61,8 @@ export class RainyunAccess extends BaseAccess {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
return await this.doRequest({
|
return await this.doRequest({
|
||||||
url: "/product/domain/",
|
url: `/product/domain/?options=${encodeURIComponent(JSON.stringify(options))}`,
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: {
|
|
||||||
options: JSON.stringify(options)
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +74,7 @@ export class RainyunAccess extends BaseAccess {
|
||||||
data: req.data,
|
data: req.data,
|
||||||
params: req.params,
|
params: req.params,
|
||||||
headers:{
|
headers:{
|
||||||
"x-api-key": this.apiKey
|
"X-Api-Key": this.apiKey
|
||||||
},
|
},
|
||||||
// httpProxy: this.httpProxy||undefined,
|
// httpProxy: this.httpProxy||undefined,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue