Files
gecko/srde/miniprogram/pages/create/create.wxml
Daniel a94bd44c3a Initial commit
Made-with: Cursor
2026-02-28 18:43:09 +08:00

34 lines
1.9 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.
<view class="page">
<view class="step-indicator">步骤 {{step}} / 3</view>
<view wx:if="{{step === 1}}" class="section card">
<view class="label">交易逻辑≥30字</view>
<textarea class="textarea" value="{{logic}}" placeholder="请输入你的交易逻辑..." maxlength="500" bindinput="onLogicInput" />
<view class="count {{logic.length >= 30 ? 'ok' : ''}}">{{logic.length}}/30</view>
</view>
<view wx:if="{{step === 2}}" class="section card">
<view class="label">标的</view>
<input class="input" value="{{symbol}}" placeholder="如 BTCUSDT" bindinput="onSymbolInput" />
<view class="label">方向</view>
<view class="row">
<view class="option {{direction === 'long' ? 'active' : ''}}" bindtap="setDir" data-dir="long">做多</view>
<view class="option {{direction === 'short' ? 'active' : ''}}" bindtap="setDir" data-dir="short">做空</view>
</view>
<view class="label">入场价、止损价、止盈价</view>
<input class="input" type="digit" value="{{entry_price}}" placeholder="入场价" bindinput="onEntryInput" />
<input class="input" type="digit" value="{{stop_loss}}" placeholder="止损价" bindinput="onStopInput" />
<input class="input" type="digit" value="{{take_profit}}" placeholder="止盈价" bindinput="onTpInput" />
<view class="row calc">上涨% {{upPct}}% 下跌% {{downPct}}%</view>
</view>
<view wx:if="{{step === 3}}" class="section card">
<view class="label">建议仓位(来自后端)</view>
<view class="value">{{position_size || '-'}}</view>
<view class="label">赔率</view>
<view class="value">{{odds || '-'}}</view>
<cooldown-button text="确认提交" duration="3" bind:confirm="onConfirm" />
</view>
<view class="nav">
<button wx:if="{{step > 1}}" bindtap="prevStep">上一步</button>
<button wx:if="{{step < 3}}" bindtap="nextStep" disabled="{{step === 1 && logic.length < 30}}">下一步</button>
</view>
</view>