@@ -87,13 +87,14 @@ def get_market_types():
|
|||||||
cfg = load_addon_config()
|
cfg = load_addon_config()
|
||||||
data = (cfg.get('market', {}) or {}).get('types')
|
data = (cfg.get('market', {}) or {}).get('types')
|
||||||
if not isinstance(data, list) or not data:
|
if not isinstance(data, list) or not data:
|
||||||
|
# Order: USStock > Crypto > Forex > Futures > HShare > AShare
|
||||||
data = [
|
data = [
|
||||||
{'value': 'USStock', 'i18nKey': 'dashboard.analysis.market.USStock'},
|
{'value': 'USStock', 'i18nKey': 'dashboard.analysis.market.USStock'},
|
||||||
{'value': 'Crypto', 'i18nKey': 'dashboard.analysis.market.Crypto'},
|
{'value': 'Crypto', 'i18nKey': 'dashboard.analysis.market.Crypto'},
|
||||||
{'value': 'Forex', 'i18nKey': 'dashboard.analysis.market.Forex'},
|
{'value': 'Forex', 'i18nKey': 'dashboard.analysis.market.Forex'},
|
||||||
{'value': 'Futures', 'i18nKey': 'dashboard.analysis.market.Futures'},
|
{'value': 'Futures', 'i18nKey': 'dashboard.analysis.market.Futures'},
|
||||||
{'value': 'AShare', 'i18nKey': 'dashboard.analysis.market.AShare'},
|
{'value': 'HShare', 'i18nKey': 'dashboard.analysis.market.HShare'},
|
||||||
{'value': 'HShare', 'i18nKey': 'dashboard.analysis.market.HShare'}
|
{'value': 'AShare', 'i18nKey': 'dashboard.analysis.market.AShare'}
|
||||||
]
|
]
|
||||||
return jsonify({'code': 1, 'msg': 'success', 'data': data})
|
return jsonify({'code': 1, 'msg': 'success', 'data': data})
|
||||||
|
|
||||||
|
|||||||
@@ -1128,25 +1128,25 @@ export default {
|
|||||||
i18nKey: `dashboard.analysis.market.${key}`
|
i18nKey: `dashboard.analysis.market.${key}`
|
||||||
}))
|
}))
|
||||||
} else {
|
} else {
|
||||||
// 如果获取失败,使用默认值
|
// 如果获取失败,使用默认值 (Order: USStock > Crypto > Forex > Futures > HShare > AShare)
|
||||||
this.marketTypes = [
|
this.marketTypes = [
|
||||||
{ value: 'USStock', i18nKey: 'dashboard.analysis.market.USStock' },
|
{ value: 'USStock', i18nKey: 'dashboard.analysis.market.USStock' },
|
||||||
{ value: 'Crypto', i18nKey: 'dashboard.analysis.market.Crypto' },
|
{ value: 'Crypto', i18nKey: 'dashboard.analysis.market.Crypto' },
|
||||||
{ value: 'Forex', i18nKey: 'dashboard.analysis.market.Forex' },
|
{ value: 'Forex', i18nKey: 'dashboard.analysis.market.Forex' },
|
||||||
{ value: 'Futures', i18nKey: 'dashboard.analysis.market.Futures' },
|
{ value: 'Futures', i18nKey: 'dashboard.analysis.market.Futures' },
|
||||||
{ value: 'AShare', i18nKey: 'dashboard.analysis.market.AShare' },
|
{ value: 'HShare', i18nKey: 'dashboard.analysis.market.HShare' },
|
||||||
{ value: 'HShare', i18nKey: 'dashboard.analysis.market.HShare' }
|
{ value: 'AShare', i18nKey: 'dashboard.analysis.market.AShare' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// 如果获取失败,使用默认值
|
// 如果获取失败,使用默认值 (Order: USStock > Crypto > Forex > Futures > HShare > AShare)
|
||||||
this.marketTypes = [
|
this.marketTypes = [
|
||||||
{ value: 'USStock', i18nKey: 'dashboard.analysis.market.USStock' },
|
{ value: 'USStock', i18nKey: 'dashboard.analysis.market.USStock' },
|
||||||
{ value: 'Crypto', i18nKey: 'dashboard.analysis.market.Crypto' },
|
{ value: 'Crypto', i18nKey: 'dashboard.analysis.market.Crypto' },
|
||||||
{ value: 'Forex', i18nKey: 'dashboard.analysis.market.Forex' },
|
{ value: 'Forex', i18nKey: 'dashboard.analysis.market.Forex' },
|
||||||
{ value: 'Futures', i18nKey: 'dashboard.analysis.market.Futures' },
|
{ value: 'Futures', i18nKey: 'dashboard.analysis.market.Futures' },
|
||||||
{ value: 'AShare', i18nKey: 'dashboard.analysis.market.AShare' },
|
{ value: 'HShare', i18nKey: 'dashboard.analysis.market.HShare' },
|
||||||
{ value: 'HShare', i18nKey: 'dashboard.analysis.market.HShare' }
|
{ value: 'AShare', i18nKey: 'dashboard.analysis.market.AShare' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -765,13 +765,14 @@ export default {
|
|||||||
i18nKey: `dashboard.analysis.market.${key}`
|
i18nKey: `dashboard.analysis.market.${key}`
|
||||||
}))
|
}))
|
||||||
} else {
|
} else {
|
||||||
|
// Order: USStock > Crypto > Forex > Futures > HShare > AShare
|
||||||
marketTypes.value = [
|
marketTypes.value = [
|
||||||
{ value: 'USStock', i18nKey: 'dashboard.analysis.market.USStock' },
|
{ value: 'USStock', i18nKey: 'dashboard.analysis.market.USStock' },
|
||||||
{ value: 'Crypto', i18nKey: 'dashboard.analysis.market.Crypto' },
|
{ value: 'Crypto', i18nKey: 'dashboard.analysis.market.Crypto' },
|
||||||
{ value: 'Forex', i18nKey: 'dashboard.analysis.market.Forex' },
|
{ value: 'Forex', i18nKey: 'dashboard.analysis.market.Forex' },
|
||||||
{ value: 'Futures', i18nKey: 'dashboard.analysis.market.Futures' },
|
{ value: 'Futures', i18nKey: 'dashboard.analysis.market.Futures' },
|
||||||
{ value: 'AShare', i18nKey: 'dashboard.analysis.market.AShare' },
|
{ value: 'HShare', i18nKey: 'dashboard.analysis.market.HShare' },
|
||||||
{ value: 'HShare', i18nKey: 'dashboard.analysis.market.HShare' }
|
{ value: 'AShare', i18nKey: 'dashboard.analysis.market.AShare' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -780,13 +781,14 @@ export default {
|
|||||||
selectedMarketTab.value = marketTypes.value[0].value
|
selectedMarketTab.value = marketTypes.value[0].value
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
// Order: USStock > Crypto > Forex > Futures > HShare > AShare
|
||||||
marketTypes.value = [
|
marketTypes.value = [
|
||||||
{ value: 'USStock', i18nKey: 'dashboard.analysis.market.USStock' },
|
{ value: 'USStock', i18nKey: 'dashboard.analysis.market.USStock' },
|
||||||
{ value: 'Crypto', i18nKey: 'dashboard.analysis.market.Crypto' },
|
{ value: 'Crypto', i18nKey: 'dashboard.analysis.market.Crypto' },
|
||||||
{ value: 'Forex', i18nKey: 'dashboard.analysis.market.Forex' },
|
{ value: 'Forex', i18nKey: 'dashboard.analysis.market.Forex' },
|
||||||
{ value: 'Futures', i18nKey: 'dashboard.analysis.market.Futures' },
|
{ value: 'Futures', i18nKey: 'dashboard.analysis.market.Futures' },
|
||||||
{ value: 'AShare', i18nKey: 'dashboard.analysis.market.AShare' },
|
{ value: 'HShare', i18nKey: 'dashboard.analysis.market.HShare' },
|
||||||
{ value: 'HShare', i18nKey: 'dashboard.analysis.market.HShare' }
|
{ value: 'AShare', i18nKey: 'dashboard.analysis.market.AShare' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user