You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.0 KiB
40 lines
1.0 KiB
const path = require("node:path"); |
|
|
|
|
|
const AreaNameEnum = Object.freeze({ |
|
YUN_NAN: Object.freeze({ |
|
AREA_CODE: '5300', |
|
AREA_NAME: 'yunnan', |
|
JS_FILE: path.resolve(__dirname, '../public/yunnan/MO5zzCMcub4d.b4c45da.js'), |
|
}), |
|
HU_BEI: Object.freeze({ |
|
AREA_CODE: '4200', |
|
AREA_NAME: 'hubei', |
|
JS_FILE: path.resolve(__dirname, '../public/hubei/5PXGXoOF7eGJ.ed63b8f.js'), |
|
}), |
|
|
|
getByAreaCode(areaCode) { |
|
if (areaCode == null) { |
|
return Object(); |
|
} |
|
for (const key in this) { |
|
if (this[key] && this[key].AREA_CODE === areaCode.toString()) { |
|
return this[key]; |
|
} |
|
} |
|
return Object(); |
|
}, |
|
getByAreaName(areaName) { |
|
if (areaName == null) { |
|
return Object(); |
|
} |
|
for (const key in this) { |
|
if (this[key] && this[key].AREA_NAME === areaName.toString()) { |
|
return this[key]; |
|
} |
|
} |
|
return Object(); |
|
}, |
|
}); |
|
|
|
module.exports = AreaNameEnum;
|
|
|