|
@@ -138,8 +138,8 @@
|
|
|
</view>
|
|
|
<!-- 下单数量 -->
|
|
|
<view class="right-input">
|
|
|
- <input ref="shareRef" :focus="isShareFocus" v-show="!percent" class="input-item" @focus="percent = 0" v-model="share"
|
|
|
- type="number">
|
|
|
+ <input ref="shareRef" :focus="isShareFocus" v-show="!percent" class="input-item"
|
|
|
+ @focus="percent = 0" v-model="share" type="number">
|
|
|
<text @click.stop="switchShare" v-show="percent"
|
|
|
class="input-item input-item-text">{{ percent }}%</text>
|
|
|
<view class="right-input-icon">
|
|
@@ -168,11 +168,12 @@
|
|
|
<input placeholder-class="placeholder-class"
|
|
|
:placeholder="`按${ restrictProfitStatus == 1 ? '价格' : '比例' }止盈`" class="input-item"
|
|
|
v-model="restrictProfitVal" type="number">
|
|
|
- <text v-show="restrictProfitStatus === 2" class="input-item input-item-text">%</text>
|
|
|
<view class="right-input-icon">
|
|
|
- <text>USDT</text>
|
|
|
+ <text v-show="restrictProfitStatus === 2" class="input-item input-item-text">%</text>
|
|
|
+ <text v-show="restrictProfitStatus === 1">USDT</text>
|
|
|
<text class="icon-link">|</text>
|
|
|
- <text class="switch-icon iconfont"></text>
|
|
|
+ <text class="switch-icon iconfont"
|
|
|
+ @click.stop="restrictProfitStatus === 1 ? restrictProfitStatus = 2 : restrictProfitStatus = 1 "></text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="right-input" v-show="setNodePrice && restrictType === 2 && restrictProfitVal >= 0">
|
|
@@ -188,11 +189,12 @@
|
|
|
<view class="right-input" v-show="setNodePrice && restrictType === 1">
|
|
|
<input :placeholder="`按${ restrictLossStatus == 1 ? '价格' : '比例' }止损`" class="input-item"
|
|
|
v-model="restrictLossVal" type="number">
|
|
|
- <text v-show="restrictLossStatus === 2" class="input-item input-item-text">%</text>
|
|
|
<view class="right-input-icon">
|
|
|
- <text>USDT</text>
|
|
|
+ <text v-show="restrictLossStatus === 2" class="input-item input-item-text">%</text>
|
|
|
+ <text v-show="restrictLossStatus === 1">USDT</text>
|
|
|
<text class="icon-link">|</text>
|
|
|
- <text class="switch-icon iconfont"></text>
|
|
|
+ <text class="switch-icon iconfont"
|
|
|
+ @click.stop="restrictLossStatus === 1 ? restrictLossStatus = 2 : restrictLossStatus = 1 "></text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="right-input" v-show="setNodePrice && restrictType === 2 && restrictLossVal >= 0">
|
|
@@ -352,7 +354,7 @@
|
|
|
percent: 0,
|
|
|
// 下单参数
|
|
|
multiple: 100, // 逐仓倍数
|
|
|
- isShareFocus:false, //是否自动获取焦点
|
|
|
+ isShareFocus: false, //是否自动获取焦点
|
|
|
share: '', // 张数
|
|
|
status: 1, // 状态,填1. 1市价交易,为0则是挂单交易
|
|
|
target_price: '',
|
|
@@ -500,8 +502,14 @@
|
|
|
type: type
|
|
|
}
|
|
|
if (this.setNodePrice) {
|
|
|
- setData.target_profit_price = this.restrictProfitVal // 【5-18】止盈,选填
|
|
|
- setData.stop_loss_price = this.restrictLossVal // 5-18】止损,选填
|
|
|
+ // restrictProfitVal: '',
|
|
|
+ // restrictProfitStatus: 1, // 按价格止盈 , 2 : 比例止盈
|
|
|
+ // restrictType: 1, // 1 普通输入 , 2 市价(禁止输入,只能通过高级设置)
|
|
|
+ // // 止损
|
|
|
+ // restrictLossVal: '',
|
|
|
+ // restrictLossStatus: 1, // 按价格止损 , 2 : 比例止损
|
|
|
+ setData.target_profit_price = this.restrictProfitStatus === 1 ? this.restrictProfitVal : `${this.restrictProfitVal}%` // 【5-18】止盈,选填
|
|
|
+ setData.stop_loss_price = this.restrictLossStatus === 1 ? this.restrictLossVal : `${this.restrictLossVal}%` // 5-18】止损,选填
|
|
|
};
|
|
|
if (this.status === 0) {
|
|
|
setData.target_price = this.target_price
|
|
@@ -560,8 +568,6 @@
|
|
|
},
|
|
|
|
|
|
// 切换张数
|
|
|
- // <input ref="shareRef" v-show="!percent" class="input-item" @focus="percent = 0" v-model="share" type="number">
|
|
|
- // <text @click.stop="switchShare" v-show="percent" class="input-item input-item-text">{{ percent }}%</text>
|
|
|
switchShare() {
|
|
|
this.percent = 0
|
|
|
this.isShareFocus = false;
|
|
@@ -953,7 +959,7 @@
|
|
|
|
|
|
.right-input-icon {
|
|
|
flex-shrink: 0;
|
|
|
- font-size: 26rpx;
|
|
|
+ font-size: 24rpx;
|
|
|
font-family: PingFang SC, PingFang SC-Bold;
|
|
|
// font-weight: 700;
|
|
|
color: #808080;
|
|
@@ -961,6 +967,12 @@
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
|
|
|
+ text {
|
|
|
+ &:first-child {
|
|
|
+ font-size: 24rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.icon-link {
|
|
|
font-size: 20rpx;
|
|
|
margin: 0 15rpx;
|