fix: 补齐 MaDao 直连动态选项
恢复 MaDao 直连模式的服务商、国家、线路下拉,并通过 daemon providers/countries/operators 接口级联加载。保存 madaoOperator 并在 direct acquire 中通过 metadata.operator 下发,routing 模式保留已保存的直连配置。
This commit is contained in:
@@ -255,6 +255,7 @@
|
||||
service: normalizeText(options?.service || state?.madaoServiceName, DEFAULT_SERVICE),
|
||||
};
|
||||
const country = normalizeCountry(options?.country || state?.madaoCountry);
|
||||
const operator = normalizeProviderId(options?.operator || state?.madaoOperator);
|
||||
const minPrice = normalizePrice(options?.minPrice ?? state?.madaoMinPrice);
|
||||
const maxPrice = normalizePrice(options?.maxPrice ?? state?.madaoMaxPrice);
|
||||
|
||||
@@ -268,6 +269,9 @@
|
||||
if (country) {
|
||||
request.country = country;
|
||||
}
|
||||
if (operator) {
|
||||
request.metadata = { operator };
|
||||
}
|
||||
if (minPrice !== null) {
|
||||
request.min_price = minPrice;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user