| | |
| | | <div class="w-368 h-80 mr-32 font-28 flex justify-center items-center rounded box-border tabBtn" |
| | | :class="tab === '1' ? 'activeBtn' : ''" @click="onTab('1')">{{ $t('永续合约') }}</div> |
| | | <div class="w-368 h-80 font-28 flex justify-center items-center rounded box-border tabBtn" |
| | | :class="tab === '2' ? 'activeBtn' : ''" @click="onTab('2')">{{ queryType == 'cryptos' ? $t('交割合约') : $t('期货交易') |
| | | :class="tab === '2' ? 'activeBtn' : ''" @click="onTab('2')">{{ queryType == 'cryptos' ? $t('交割合约') : $t('货币交易') |
| | | }}</div> |
| | | </div> --> |
| | | <!-- 数据区 --> |
| | |
| | | <p>{{ quote.low || '--' }}</p> |
| | | </div> |
| | | <div class="flex w-1/2 flex-col justify-between w-220 mt-20"> |
| | | <p class="text-grey">{{ queryType == 'cryptos' ? $t('24h成交额') + '(USDT)' : $t('24h成交额') + '(USD)' }}</p> |
| | | <p class="text-grey">{{ queryType == 'cryptos' ? $t('24h成交额') + '(USDT)' : $t('24h成交额') + '(USD)' }} |
| | | </p> |
| | | <p>{{ (quote.volume * 1).toFixed(2) || '--' }}</p> |
| | | </div> |
| | | </div> |
| | |
| | | <p>{{ $t('买入') }}</p> |
| | | <p class="flex justify-between font-22"> |
| | | <span style="margin-right: -10px;">{{ $t('价格') }}{{ queryType == 'cryptos' ? '(USDT)' : '(USD)' |
| | | }}</span> |
| | | }}</span> |
| | | <span class="buy-title">{{ $t('数量') }}({{ symbolData.toUpperCase() }})</span> |
| | | </p> |
| | | </li> |
| | |
| | | <span class="flex-1">{{ $t('时间') }}</span> |
| | | <span class="flex-1">{{ $t('方向') }}</span> |
| | | <span class="flex-1">{{ $t('价格') }}{{ queryType == 'cryptos' ? '(USDT)' : '(USD)' }}</span> |
| | | <span class="flex-1 flex justify-center buy-title">{{ $t('数量') }}({{ symbolData.toUpperCase() }})</span> |
| | | <span class="flex-1 flex justify-center buy-title">{{ $t('数量') }}({{ symbolData.toUpperCase() |
| | | }})</span> |
| | | </li> |
| | | <li v-for="(item, index) in deals" :key="item.ts + item.price + item.amount || index" |
| | | class="flex justify-between mt-30"> |
| | |
| | | </div> |
| | | </div> |
| | | <van-popup v-model:show="show" class="rounded-2xl" :key="initFutrue.session_token"> |
| | | <popup-confirm-order :paras="initFutrue.para" :symbol="symbol" :direction="direction" :balance="initFutrue.amount" |
| | | :price="quote.close" @close="onClose" @confirm="onOrderConfirm" v-if="popType === 'confirm'" /> |
| | | <popup-confirm-order :paras="initFutrue.para" :symbol="symbol" :direction="direction" |
| | | :balance="initFutrue.amount" :price="quote.close" @close="onClose" @confirm="onOrderConfirm" |
| | | v-if="popType === 'confirm'" /> |
| | | <popup-delivery showBtns :detailData="detailData" :key="detailData.order_no" @close="onClose" |
| | | @continueToBuy="order()" @timeEnd="handleTimeEnd" :price="quote.close" v-else /> |
| | | @continueToBuy="order" @timeEnd="handleTimeEnd" :price="quote.close" v-else /> |
| | | </van-popup> |
| | | </div> |
| | | </div> |
| | |
| | | } |
| | | }, |
| | | order() { |
| | | console.log('order', this.direction) |
| | | this.onSubmit(this.direction); |
| | | }, |
| | | onTab(e) { |
| | |
| | | this.sockets.quote = null |
| | | this.sockets.deals = null |
| | | this.sockets.askBid = null |
| | | clearTimeout(this.timeout) |
| | | }, |
| | | beforeRouteEnter(to, from, next) { |
| | | const { params: { symbol } } = to |