Compare commits

...
5 Commits
Author SHA1 Message Date
clz 59999031eb fix(ai-pick): 不足3条时表格高度自适应,去掉固定height约束 2026-07-28 12:19:26 +08:00
clz d25d18d029 fix(ai-pick): 合约名称去掉layoutWeight,对齐Vue自然宽度策略,让主标签紧跟名称 2026-07-28 11:26:53 +08:00
clz 6fbdf3150d revert: ai-pick主合约标签间距恢复space:5(Vue ml-10rpx@750设计宽度等价于5vp) 2026-07-28 11:24:06 +08:00
clz 32d066db69 fix(ai-pick): 主合约标签间距对齐Vue——space:5改为margin({left:10}) 2026-07-28 11:19:53 +08:00
clz e2b98bc5c9 fix(market-ranking): 最新价涨跌色对齐商品期权
- priceColor 方法重写:undefined/0 统一走 text_primary,不再委托 riseFallColor(避免 0 走 text_grey)
- 与 biz_firstpage 对应修改保持一致
2026-07-28 11:16:44 +08:00
3 changed files with 13 additions and 18 deletions
+6 -13
View File
@@ -40,32 +40,29 @@ export const MOCK_RAW_TABS: RawPickTabItem[] = [
}, },
}, },
// ── Tab 2:系统周期策略(type = 'system_period')────────────────── // ── Tab 2:只有1条数据的系统策略 ──────────────────
{ {
type: 'system_period', type: 'system_period',
system_strategy: { system_strategy: {
system_strategy: { system_strategy: {
id: 'strat_002', id: 'strat_002',
strategy_name: '黑色系超跌反弹', strategy_name: '黑色系超跌反弹',
content: '铁矿石、螺纹钢跌幅已达技术支撑位,RSI 超卖信号显现', content: '铁矿石跌幅已达技术支撑位,RSI 超卖信号显现',
strategy_type: 'system_period', strategy_type: 'system_period',
tag_list: ['反弹', '黑色系', '超卖'], tag_list: ['反弹', '黑色系', '超卖'],
white_img: 'https://s.thsi.cn/js/m/upload/yyzt/1721828556_3492.png', 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', black_img: 'https://s.thsi.cn/js/m/upload/yyzt/1721828547_6904.png',
}, },
detail_count: 3, detail_count: 1,
detail_list: [ detail_list: [
{ contract: 'RB2510', market: '70', contract_name: '螺纹钢2510', main_contract_type: '1' }, { 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: [], field_list: [],
origin_result_list: [], origin_result_list: [],
}, },
}, },
// ── Tab 3:自定义策略(type = 'custom_strategy')────────────────── // ── Tab 3:只有2条数据的自定义策略 ──────────────────
{ {
type: 'custom_strategy', type: 'custom_strategy',
custom_strategy: { custom_strategy: {
@@ -76,12 +73,10 @@ export const MOCK_RAW_TABS: RawPickTabItem[] = [
strategy_type: 'custom_strategy', strategy_type: 'custom_strategy',
tag_list: ['季节性', '农产品'], tag_list: ['季节性', '农产品'],
}, },
detail_count: 4, detail_count: 2,
detail_list: [ detail_list: [
{ contract: 'M2509', market: '70', contract_name: '豆粕2509', main_contract_type: '1' }, { contract: 'M2509', market: '70', contract_name: '豆粕2509', main_contract_type: '1' },
{ contract: 'RM2509', market: '70', contract_name: '菜粕2509', main_contract_type: '1' }, { contract: 'RM2509', market: '70', contract_name: '菜粕2509', main_contract_type: '0' },
{ contract: 'Y2509', market: '70', contract_name: '豆油2509', main_contract_type: '1' },
{ contract: 'OI2509', market: '70', contract_name: '菜油2509', main_contract_type: '1' },
], ],
field_list: [ field_list: [
{ key: '成交量', type: 'DOUBLE', unit: '手' }, { key: '成交量', type: 'DOUBLE', unit: '手' },
@@ -90,8 +85,6 @@ export const MOCK_RAW_TABS: RawPickTabItem[] = [
origin_result_list: [ origin_result_list: [
{ '成交量': 986000, '持仓量': 3102000 }, { '成交量': 986000, '持仓量': 3102000 },
{ '成交量': 324000, '持仓量': 1258000 }, { '成交量': 324000, '持仓量': 1258000 },
{ '成交量': 189000, '持仓量': 683000 },
{ '成交量': 142000, '持仓量': 521000 },
], ],
}, },
}, },
@@ -536,7 +536,6 @@ export struct AiPickNodeComponent {
.maxFontSize(16) .maxFontSize(16)
.minFontSize(9) .minFontSize(9)
.fontColor($r('app.color.text_primary')) .fontColor($r('app.color.text_primary'))
.layoutWeight(1)
.maxLines(1) .maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis }) .textOverflow({ overflow: TextOverflow.Ellipsis })
if (item.isMain) { if (item.isMain) {
@@ -599,7 +598,6 @@ export struct AiPickNodeComponent {
) )
} }
.width('100%') .width('100%')
.height(175)
} }
// ── 一句话定制策略 ────────────────────────────────────── // ── 一句话定制策略 ──────────────────────────────────────
@@ -622,7 +620,6 @@ export struct AiPickNodeComponent {
}) })
} }
.width('100%') .width('100%')
.height(369)
} }
@Builder @Builder
@@ -612,9 +612,14 @@ export struct MarketRankingNodeComponent {
} }
private priceColor(item: RankItem): Resource { private priceColor(item: RankItem): Resource {
if (item.price === undefined || item.price_chg === undefined) { if (item.price_chg === undefined) {
return $r('app.color.text_primary'); return $r('app.color.text_primary');
} }
return riseFallColor(item.price_chg); if (item.price_chg > 0) {
return $r('app.color.color_rise');
} else if (item.price_chg < 0) {
return $r('app.color.color_fall');
}
return $r('app.color.text_primary');
} }
} }