| | |
| | | <template> |
| | | <div id="cryptos" class="trade_new"> |
| | | <!-- 顶部导航与选择条已去掉 --> |
| | | |
| | | <!-- <div class="flex justify-start items-center"> |
| | | <img src="@/assets/image/icon_back.png" alt="" class="back mr-20" @click="$router.go(-1)"> |
| | |
| | | </ContractHeader> |
| | | <!-- <Head :symbolObj="symbolObj"></Head> --> |
| | | |
| | | <div :key="symbol" class="pb-108 no_touch"> |
| | | <div :key="symbol" class="pb-108 no_touch "> |
| | | <p class="status-info" v-if="chartData.market && chartData.market.status"> |
| | | <span>{{ chartData.market.status && $t(chartData.market.status) }},</span> |
| | | <span class="time">{{ chartData.market.time_str }}</span> |
| | | <span>{{ chartData.market.time_zone && $t(chartData.market.time_zone) }}</span> |
| | | </p> |
| | | <div :class="{ slide2: animated1 }" v-if="selectIndex === 1"> |
| | | <section class="value-container" v-if="showMore"> |
| | | <section class="value-container trade-hide-stats" v-if="showMore"> |
| | | <div class="flex-l"> |
| | | <p class="first-line red">{{ formatMoney(chartData?.close) }}</p> |
| | | <p class="second-line"> |
| | |
| | | </div> |
| | | </section> |
| | | <div class=" rounded-view" key="x"> |
| | | <PerpetualOpen class="pl-30 pr-30" :key="keyIndex + 'a'" :selectIndex="selectIndex" :symbol="symbol" |
| | | <PerpetualOpen class="pl-30 pr-30" style="background-color: #fff;border-radius: 20px;" :key="keyIndex + 'a'" :selectIndex="selectIndex" :symbol="symbol" |
| | | :green-data="bids" :red-data="asks" :price="price" :init-open="initOpen" :init-close="initClose" |
| | | :init-futrue="initFutrue" :currentType="currentType" @changeValueBack="changeValueBack" |
| | | @changeCurrentType="changeCurrentType" @ordered="onOrdered"> |
| | | </PerpetualOpen> |
| | | <!-- <div class="line"></div> --> |
| | | <!-- 委托/持仓--> |
| | | <PerpetualOrder class="pl-30 pr-30" :key="keyIndex + 'b'" :symbol="symbol" :order-cur="orderCur" |
| | | <PerpetualOrder class="pl-30 pr-30" style="background-color: #fff;" :key="keyIndex + 'b'" :symbol="symbol" :order-cur="orderCur" |
| | | :order-hold="orderHold" :topIndex="selectIndex" :futrue-hold="futrueHold" :futrue-histroy="futrueHistroy" |
| | | @tab="onTab" @recall="onRecall"> |
| | | </PerpetualOrder> |
| | | </div> |
| | | </div> |
| | | <div :class="{ slide1: animated2 }" v-else> |
| | | <section class="value-container" v-if="showMore"> |
| | | <section class="value-container trade-hide-stats" v-if="showMore"> |
| | | <div class="flex-l"> |
| | | <p class="first-line red">{{ formatMoney(chartData?.close) }}</p> |
| | | <p class="second-line"> |
| | |
| | | }) |
| | | } |
| | | return { |
| | | leverRate: 100, |
| | | quote: {}, |
| | | initTimer: null, |
| | | keyIndex: 0, |
| | |
| | | this[this.curTab](this.symbol) |
| | | _initOpen({ symbol: this.symbol }).then(data => { |
| | | this.initOpen = data |
| | | }) |
| | | // 平仓/撤单后刷新永续余额 |
| | | _futrueOrderInit(this.symbol).then(data => { |
| | | this.initFutrue = data |
| | | }) |
| | | }, |
| | | handleClickShowMore() { |
| | |
| | | initFun() |
| | | }, 600); |
| | | } |
| | | if (type === 'futrue' || !type) { |
| | | // 购买/开仓/平仓后都刷新永续余额 initFutrue.amount |
| | | if (type === 'futrue' || type === 'close' || type === 'open' || type === 'long' || type === 'short' || !type) { |
| | | _futrueOrderInit(symbol).then(data => { |
| | | console.log(data, '数据9999') |
| | | this.initFutrue = data |
| | |
| | | <style lang="scss" scoped> |
| | | @import "@/assets/init.scss"; |
| | | |
| | | .trade-hide-stats.value-container { |
| | | display: none; |
| | | } |
| | | |
| | | .trade_new { |
| | | color: $log-c; |
| | | background: $mainbgWhiteColor; |
| | | min-height: 100vh; |
| | | padding: 1.4rem 1.4rem 7rem 1.4rem; |
| | | // padding: 1.4rem 1.4rem 7rem 1.4rem; |
| | | |
| | | .back { |
| | | width: 2rem; |
| | |
| | | #cryptos { |
| | | background: $mainbgWhiteColor; |
| | | $inp-b: #f7f7f7; |
| | | |
| | | .trade-content-bg { |
| | | background: #fff; |
| | | } |
| | | |
| | | :deep(.textColor) { |
| | | color: $log-c; |
| | |
| | | border-top-left-radius: 20px; |
| | | border-top-right-radius: 20px; |
| | | box-sizing: border-box; |
| | | background-color: #fff; |
| | | } |
| | | |
| | | |
| | |
| | | .my-swipe { |
| | | width: 100%; |
| | | } |
| | | |
| | | .my-swipe .van-swipe-item {} |
| | | |
| | | .line { |
| | | height: 13px; |