mirror of
https://github.com/alireza0/x-ui.git
synced 2026-03-20 07:45:48 +00:00
完成xray启动
This commit is contained in:
@@ -19,4 +19,28 @@ class Msg {
|
||||
this.obj = obj;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class DBInbound {
|
||||
id = 0;
|
||||
userId = 0;
|
||||
up = 0;
|
||||
down = 0;
|
||||
remark = 0;
|
||||
enable = false;
|
||||
expiryTime = 0;
|
||||
listen = "";
|
||||
port = 0;
|
||||
protocol = "";
|
||||
settings = "";
|
||||
streamSettings = "";
|
||||
tag = "";
|
||||
sniffing = "";
|
||||
|
||||
constructor(data) {
|
||||
if (data == null) {
|
||||
return;
|
||||
}
|
||||
ObjectUtil.cloneProps(this, data);
|
||||
}
|
||||
}
|
||||
1192
web/assets/js/model/xray.js
Normal file
1192
web/assets/js/model/xray.js
Normal file
File diff suppressed because it is too large
Load Diff
@@ -135,7 +135,7 @@ class DateUtil {
|
||||
}
|
||||
|
||||
static formatMillis(millis) {
|
||||
return moment(millis).format('YYYY年M月D日 H时m分s秒')
|
||||
return moment(millis).format('YYYY-M-D H:m:s')
|
||||
}
|
||||
|
||||
static firstDayOfMonth() {
|
||||
|
||||
@@ -13,7 +13,7 @@ class HttpUtil {
|
||||
}
|
||||
}
|
||||
|
||||
static async _respToMsg(resp) {
|
||||
static _respToMsg(resp) {
|
||||
const data = resp.data;
|
||||
if (data == null) {
|
||||
return new Msg(true);
|
||||
@@ -227,6 +227,10 @@ class ObjectUtil {
|
||||
for (const key of Object.keys(src)) {
|
||||
if (!src.hasOwnProperty(key)) {
|
||||
continue;
|
||||
} else if (!dest.hasOwnProperty(key)) {
|
||||
continue;
|
||||
} else if (src[key] === undefined) {
|
||||
continue;
|
||||
}
|
||||
if (ignoreEmpty) {
|
||||
dest[key] = src[key];
|
||||
@@ -259,4 +263,11 @@ class ObjectUtil {
|
||||
}
|
||||
}
|
||||
|
||||
static orDefault(obj, defaultValue) {
|
||||
if (obj == null) {
|
||||
return defaultValue;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user