merged private server and console to private-cloud
This commit is contained in:
49
console/constants/enums.js
Normal file
49
console/constants/enums.js
Normal file
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* Created by Strawmanbobi
|
||||
* 2014-08-30
|
||||
*/
|
||||
|
||||
function Enums() {
|
||||
this.APP_PRODUCTION_MODE = "production";
|
||||
this.APP_DEVELOPMENT_MODE = "development";
|
||||
this.APP_USERDEBUG_MODE = "userdebug";
|
||||
|
||||
this.SERVER_MAIN = 0;
|
||||
|
||||
// TODO: BAAS, share enums between backend and front end
|
||||
this.ITEM_INVALID = 0;
|
||||
this.ITEM_VALID = 1;
|
||||
this.ITEM_VERIFY = 2;
|
||||
this.ITEM_PASS = 3;
|
||||
this.ITEM_FAILED = 4;
|
||||
this.ITEM_UNDETERMINED = 5;
|
||||
|
||||
this.CITY_NORMAL = 0;
|
||||
this.CITY_COVERED = 1;
|
||||
|
||||
this.RADIO_TYPE_IRDA = 0;
|
||||
|
||||
this.CATEGORY_AC = 1;
|
||||
this.CATEGORY_TV = 2;
|
||||
this.CATEGORY_STB = 3;
|
||||
this.CATEGORY_NW = 4;
|
||||
this.CATEGORY_IPTV = 5;
|
||||
this.CATEGORY_DVD = 6;
|
||||
this.CATEGORY_FAN = 7;
|
||||
this.CATEGORY_PROJECTOR = 8;
|
||||
this.CATEGORY_STEREO = 9;
|
||||
this.CATEGORY_LIGHT_BULB = 10;
|
||||
this.CATEGORY_BSTB = 11;
|
||||
this.CATEGORY_CLEANING_ROBOT = 12;
|
||||
this.CATEGORY_AIR_CLEANER = 13;
|
||||
this.CATEGORY_DYSON = 14;
|
||||
|
||||
this.PROTOCOL_TYPE_G1 = 0;
|
||||
this.PROTOCOL_TYPE_G2_QUATERNARY = 1;
|
||||
this.PROTOCOL_TYPE_G2_HEXDECIMAL = 2;
|
||||
|
||||
this.ADMIN_TYPE_IREXT = 1;
|
||||
this.ADMIN_TYPE_EXTERNAL = 2;
|
||||
}
|
||||
|
||||
module.exports = Enums;
|
||||
44
console/constants/error_code.js
Normal file
44
console/constants/error_code.js
Normal file
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* Created by Strawmanbobi
|
||||
* 2014-08-30
|
||||
*/
|
||||
|
||||
function ErrorCode() {
|
||||
this.SUCCESS = {
|
||||
code: 0,
|
||||
cause: "成功"
|
||||
};
|
||||
this.FAILED = {
|
||||
code: -1,
|
||||
cause: "网络故障,请稍后再试"
|
||||
};
|
||||
this.WRONG_ENV = {
|
||||
code: -2,
|
||||
cause: "错误的运行环境配置"
|
||||
}
|
||||
|
||||
// Common error
|
||||
this.AUTHENTICATION_FAILURE = {
|
||||
code: 1,
|
||||
cause: "用户验证失败,请重新登录"
|
||||
};
|
||||
this.INVALID_CATEGORY = {
|
||||
code: 2,
|
||||
cause: "不存在的电器品类"
|
||||
};
|
||||
this.INVALID_BRAND = {
|
||||
code: 3,
|
||||
cause: "不存在的品牌"
|
||||
};
|
||||
this.INVALID_PARAMETER = {
|
||||
code: 4,
|
||||
cause: "参数错误"
|
||||
};
|
||||
|
||||
this.DUPLICATED_REMOTE_CODE = {
|
||||
code: 10,
|
||||
cause: "遥控码重复"
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ErrorCode;
|
||||
81
console/constants/remote_categories.js
Normal file
81
console/constants/remote_categories.js
Normal file
@@ -0,0 +1,81 @@
|
||||
/**
|
||||
* Created by Strawmanbobi
|
||||
* 2018-11-04
|
||||
*/
|
||||
|
||||
function RemoteCategories() {
|
||||
this.categoryMaps = [
|
||||
{
|
||||
id: 1,
|
||||
col_name: "空调",
|
||||
name: "空调",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
col_name: "电视机",
|
||||
name: "电视机",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
col_name: "机顶盒",
|
||||
name: "机顶盒",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
col_name: "盒子",
|
||||
name: "网络盒子",
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
col_name: "IPTV",
|
||||
name: "IPTV",
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
col_name: "DVD",
|
||||
name: "DVD",
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
col_name: "电风扇",
|
||||
name: "风扇",
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
col_name: "投影仪",
|
||||
name: "投影仪",
|
||||
},
|
||||
{
|
||||
id: 9,
|
||||
col_name: "功放",
|
||||
name: "音响",
|
||||
},
|
||||
{
|
||||
id: 10,
|
||||
col_name: "灯",
|
||||
name: "灯",
|
||||
},
|
||||
{
|
||||
id: 11,
|
||||
col_name: "机顶盒",
|
||||
name: "机上盒",
|
||||
},
|
||||
{
|
||||
id: 12,
|
||||
col_name: "扫地机器人",
|
||||
name: "扫地机器人",
|
||||
},
|
||||
{
|
||||
id: 13,
|
||||
col_name: "空气净化器",
|
||||
name: "空气净化器",
|
||||
},
|
||||
{
|
||||
id: 14,
|
||||
col_name: "Dyson",
|
||||
name: "Dyson",
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
module.exports = RemoteCategories;
|
||||
Reference in New Issue
Block a user