Initial commit

Made-with: Cursor
This commit is contained in:
Daniel
2026-02-28 18:39:00 +08:00
commit a94bd44c3a
49 changed files with 917 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
Page({
data: {
id: '',
exit_price: '',
loading: false,
submitted: false,
pnlPct: 0,
violated: false,
score: 0,
aiSummary: '',
},
onLoad(opt: { id?: string }) {
this.setData({ id: opt.id || '' });
},
onExitInput(e: WechatMiniprogram.CustomEvent) {
this.setData({ exit_price: e.detail.value as string });
},
onSubmit() {
const exit = parseFloat(this.data.exit_price);
if (!exit) {
wx.showToast({ title: '请输入退出价', icon: 'none' });
return;
}
this.setData({ loading: true });
setTimeout(() => {
this.setData({
loading: false,
submitted: true,
pnlPct: 2.1,
violated: false,
score: 85,
aiSummary: '本次交易执行符合计划,止盈目标达成。建议继续保持当前风险控制节奏。',
});
}, 800);
},
});