mirror of
https://github.com/certd/certd.git
synced 2025-11-25 09:10:11 +08:00
16 lines
242 B
JavaScript
16 lines
242 B
JavaScript
export class Ret {
|
|
constructor (code = 0, msg, data) {
|
|
this.code = code
|
|
this.msg = msg
|
|
this.data = data
|
|
}
|
|
|
|
static success (data) {
|
|
return new Ret(0, '', data)
|
|
}
|
|
|
|
static error (msg) {
|
|
return new Ret(1, msg)
|
|
}
|
|
}
|