fix: 补充类型

This commit is contained in:
ningmengchongshui 2024-06-09 20:36:10 +08:00
parent cf8e08c312
commit a79e7c16bc
3 changed files with 10 additions and 12 deletions

View File

@ -99,7 +99,6 @@ export default class MysApi {
return this.isSr ? 'prod_gf_cn' : 'cn_gf01' return this.isSr ? 'prod_gf_cn' : 'cn_gf01'
} }
_device_fp = null _device_fp = null
/** /**
@ -109,7 +108,7 @@ export default class MysApi {
* @param cached * @param cached
* @returns * @returns
*/ */
async getData(type, data:any = {}, cached = false) { async getData(type, data: any = {}, cached = false) {
if ( if (
!this._device_fp && !this._device_fp &&
!data?.Getfp && !data?.Getfp &&
@ -145,8 +144,8 @@ export default class MysApi {
} }
let param = { let param = {
method:null, method: null,
body:null, body: null,
headers, headers,
agent: await this.getAgent(), agent: await this.getAgent(),
timeout: 10000 timeout: 10000
@ -158,9 +157,9 @@ export default class MysApi {
param.method = 'get' param.method = 'get'
} }
let response = { let response = {
ok:null, ok: null,
status: null, status: null,
statusText:null statusText: null
} }
let start = Date.now() let start = Date.now()
try { try {

View File

@ -240,7 +240,7 @@ export default class MysInfo {
static async get(e, api, data = {}, option = {}) { static async get(e, api, data = {}, option = {}) {
let mysInfo = await MysInfo.init(e, api) let mysInfo = await MysInfo.init(e, api)
if(!mysInfo) return false if (!mysInfo) return false
if (!mysInfo.uid || !mysInfo.ckInfo.ck) return false if (!mysInfo.uid || !mysInfo.ckInfo.ck) return false
e.uid = mysInfo.uid e.uid = mysInfo.uid

View File

@ -49,14 +49,13 @@ export function mkdirs(dirname: string) {
} }
} }
/** /**
* *
* @param cmd * @param cmd
* @returns * @returns
*/ */
export function execAsync(cmd: string): Promise<{ export function execAsync(cmd: string): Promise<{
stdout: string, stdout: string
stderr: string stderr: string
}> { }> {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {