feat: AI选期商业卡片

This commit is contained in:
clz
2026-07-21 21:19:20 +08:00
parent 9f6a0c642b
commit ac024eab05
12 changed files with 971 additions and 2 deletions
+98
View File
@@ -0,0 +1,98 @@
import { RawPickTabItem } from './AiPickTypes';
// 完全模拟 user_data 接口响应(新版,isCustomVersion=true
// 数组每项对应一个策略 Tab,最多 5 项,这里给 3 项
// 注意:detail_count 与 detail_list/field_list/origin_result_list 同级
// (对应 Vue 端 strategyItem['detail_count'],不在嵌套的策略详情对象里)
export const MOCK_RAW_TABS: RawPickTabItem[] = [
// ── Tab 1:自定义策略(type = 'custom_strategy')──────────────────
{
type: 'custom_strategy',
custom_strategy: {
custom_strategy: {
id: 'strat_001',
strategy_name: '铜类多头趋势',
user_question: '近期有色金属板块持续走强,铜主力合约突破前高,量价齐升',
strategy_type: 'custom_strategy',
tag_list: ['多头', '有色金属'],
},
detail_count: 5,
detail_list: [
{ contract: 'CU2506', market: '70', contract_name: '沪铜2506', main_contract_type: '1' },
{ contract: 'CU2507', market: '70', contract_name: '沪铜2507', main_contract_type: '0' },
{ contract: 'NI2506', market: '70', contract_name: '沪镍2506', main_contract_type: '1' },
{ contract: 'AL2506', market: '70', contract_name: '沪铝2506', main_contract_type: '1' },
{ contract: 'ZN2506', market: '70', contract_name: '沪锌2506', main_contract_type: '1' },
],
field_list: [
{ key: '成交量', type: 'DOUBLE', unit: '手' },
{ key: '持仓量', type: 'DOUBLE', unit: '手' },
{ key: '合约代码', type: 'STRING', unit: '' }, // 黑名单,不展示
{ key: '最新涨跌幅', type: 'DOUBLE', unit: '%' }, // 黑名单,不展示
],
origin_result_list: [
{ '成交量': 123000, '持仓量': 456000, '合约代码': 'CU2506', '最新涨跌幅': 1.85 },
{ '成交量': 31000, '持仓量': 182000, '合约代码': 'CU2507', '最新涨跌幅': 1.62 },
{ '成交量': 57000, '持仓量': 224000, '合约代码': 'NI2506', '最新涨跌幅': 0.94 },
{ '成交量': 44000, '持仓量': 198000, '合约代码': 'AL2506', '最新涨跌幅': 0.76 },
{ '成交量': 28000, '持仓量': 143000, '合约代码': 'ZN2506', '最新涨跌幅': 0.61 },
],
},
},
// ── Tab 2:系统周期策略(type = 'system_period')──────────────────
{
type: 'system_period',
system_strategy: {
system_strategy: {
id: 'strat_002',
strategy_name: '黑色系超跌反弹',
content: '铁矿石、螺纹钢跌幅已达技术支撑位,RSI 超卖信号显现',
strategy_type: 'system_period',
tag_list: ['反弹', '黑色系', '超卖'],
white_img: 'https://s.thsi.cn/js/m/upload/yyzt/1721828556_3492.png',
black_img: 'https://s.thsi.cn/js/m/upload/yyzt/1721828547_6904.png',
},
detail_count: 3,
detail_list: [
{ contract: 'RB2510', market: '70', contract_name: '螺纹钢2510', main_contract_type: '1' },
{ contract: 'I2509', market: '70', contract_name: '铁矿石2509', main_contract_type: '1' },
{ contract: 'HC2510', market: '70', contract_name: '热卷2510', main_contract_type: '0' },
],
// 系统策略无自定义 DOUBLE 字段
field_list: [],
origin_result_list: [],
},
},
// ── Tab 3:自定义策略(type = 'custom_strategy')──────────────────
{
type: 'custom_strategy',
custom_strategy: {
custom_strategy: {
id: 'strat_003',
strategy_name: '农产品季节性',
user_question: '豆粕、菜粕受季节性需求驱动,历史同期胜率超70%',
strategy_type: 'custom_strategy',
tag_list: ['季节性', '农产品'],
},
detail_count: 4,
detail_list: [
{ contract: 'M2509', market: '70', contract_name: '豆粕2509', main_contract_type: '1' },
{ contract: 'RM2509', market: '70', contract_name: '菜粕2509', main_contract_type: '1' },
{ contract: 'Y2509', market: '70', contract_name: '豆油2509', main_contract_type: '1' },
{ contract: 'OI2509', market: '70', contract_name: '菜油2509', main_contract_type: '1' },
],
field_list: [
{ key: '成交量', type: 'DOUBLE', unit: '手' },
{ key: '持仓量', type: 'DOUBLE', unit: '手' },
],
origin_result_list: [
{ '成交量': 986000, '持仓量': 3102000 },
{ '成交量': 324000, '持仓量': 1258000 },
{ '成交量': 189000, '持仓量': 683000 },
{ '成交量': 142000, '持仓量': 521000 },
],
},
},
];