Initial commit
Made-with: Cursor
This commit is contained in:
36
srde/miniprogram/pages/review/review.ts
Normal file
36
srde/miniprogram/pages/review/review.ts
Normal 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);
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user