fix: 补齐 MaDao 直连动态选项
恢复 MaDao 直连模式的服务商、国家、线路下拉,并通过 daemon providers/countries/operators 接口级联加载。保存 madaoOperator 并在 direct acquire 中通过 metadata.operator 下发,routing 模式保留已保存的直连配置。
This commit is contained in:
@@ -1453,6 +1453,7 @@ const PERSISTED_SETTING_DEFAULTS = {
|
||||
madaoRoutingPlanId: '',
|
||||
madaoProviderId: '',
|
||||
madaoCountry: '',
|
||||
madaoOperator: '',
|
||||
madaoAutoPickCountry: true,
|
||||
madaoReusePhone: true,
|
||||
madaoMinPrice: '',
|
||||
@@ -2245,6 +2246,13 @@ function normalizeMaDaoPrice(value = '') {
|
||||
return normalizeHeroSmsMaxPrice(value);
|
||||
}
|
||||
|
||||
function normalizeMaDaoOperator(value = '') {
|
||||
return String(value || '')
|
||||
.trim()
|
||||
.toLowerCase()
|
||||
.replace(/[^a-z0-9_-]+/g, '');
|
||||
}
|
||||
|
||||
function normalizePhonePreferredActivation(value) {
|
||||
if (!value || typeof value !== 'object' || Array.isArray(value)) {
|
||||
return null;
|
||||
@@ -3595,6 +3603,8 @@ function normalizePersistentSettingValue(key, value) {
|
||||
return normalizeMaDaoProviderId(value);
|
||||
case 'madaoCountry':
|
||||
return normalizeMaDaoCountry(value);
|
||||
case 'madaoOperator':
|
||||
return normalizeMaDaoOperator(value);
|
||||
case 'madaoAutoPickCountry':
|
||||
case 'madaoReusePhone':
|
||||
return Boolean(value);
|
||||
|
||||
Reference in New Issue
Block a user