Files
tonghuashun_CardDemo/entry/src/main/ets/ai-pick/AiPickMock.ets
T

93 lines
4.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { RawPickTabItem } from './AiPickModels';
// 完全模拟 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: 'DOUBLE', unit: '手' },
{ key: '合约代码', type: 'STRING', unit: '' }, // 黑名单,不展示
{ key: '最新涨跌幅', type: 'DOUBLE', unit: '%' }, // 黑名单,不展示
],
origin_result_list: [
{ '仓单单日增减量': 1250, '成交量': 123000, '持仓量': 456000, '合约代码': 'CU2506', '最新涨跌幅': 1.85 },
{ '仓单单日增减量': -860, '成交量': 31000, '持仓量': 182000, '合约代码': 'CU2507', '最新涨跌幅': 1.62 },
{ '仓单单日增减量': 420, '成交量': 57000, '持仓量': 224000, '合约代码': 'NI2506', '最新涨跌幅': 0.94 },
{ '仓单单日增减量': -315, '成交量': 44000, '持仓量': 198000, '合约代码': 'AL2506', '最新涨跌幅': 0.76 },
{ '仓单单日增减量': 980, '成交量': 28000, '持仓量': 143000, '合约代码': 'ZN2506', '最新涨跌幅': 0.61 },
],
},
},
// ── Tab 2:只有1条数据的系统策略 ──────────────────
{
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: 1,
detail_list: [
{ contract: 'RB2510', market: '70', contract_name: '螺纹钢2510', main_contract_type: '1' },
],
field_list: [],
origin_result_list: [],
},
},
// ── Tab 3:只有2条数据的自定义策略 ──────────────────
{
type: 'custom_strategy',
custom_strategy: {
custom_strategy: {
id: 'strat_003',
strategy_name: '农产品季节性',
user_question: '豆粕、菜粕受季节性需求驱动,历史同期胜率超70%',
strategy_type: 'custom_strategy',
tag_list: ['季节性', '农产品'],
},
detail_count: 2,
detail_list: [
{ contract: 'M2509', market: '70', contract_name: '豆粕2509', main_contract_type: '1' },
{ contract: 'RM2509', market: '70', contract_name: '菜粕2509', main_contract_type: '0' },
],
field_list: [
{ key: '成交量', type: 'DOUBLE', unit: '手' },
{ key: '持仓量', type: 'DOUBLE', unit: '手' },
],
origin_result_list: [
{ '成交量': 986000, '持仓量': 3102000 },
{ '成交量': 324000, '持仓量': 1258000 },
],
},
},
];