| | |
| | | </div> |
| | | <div class="flex justify-between cell-item"> |
| | | <div class="text-grey">{{ $t('开仓金额') }}</div> |
| | | <div class="textColor">{{ detail.amount_open }}</div> |
| | | <div class="textColor">{{ detail.deposit_open }}</div> |
| | | </div> |
| | | <div class="flex justify-between cell-item"> |
| | | <div class="text-grey">{{ $t('可平金额') }}</div> |
| | | <div class="textColor">{{ detail.amount }}</div> |
| | | <div class="textColor">{{ detail.deposit }}</div> |
| | | </div> |
| | | <!-- <div class="flex justify-between cell-item"> |
| | | <div class="text-grey">{{ $t('保证金') }}</div> |
| | |
| | | </div> |
| | | <div class="flex justify-between cell-item"> |
| | | <div class="text-grey">{{ $t('开仓时间') }}</div> |
| | | <div class="textColor">{{ detail.create_time }}(UTC+2)</div> |
| | | <div class="textColor"> |
| | | {{ detail.create_time }} |
| | | <!-- (UTC+8) --> |
| | | </div> |
| | | </div> |
| | | <div class="flex justify-between cell-item "> |
| | | <div class="text-grey">{{ $t('平仓时间') }}</div> |
| | | <div class="textColor">{{ detail.close_time ? dayjs(detail.close_time * 1000).format('YYYY-MM-DD HH:mm:ss')+'(UTC+2)' : |
| | | '--' }}</div> |
| | | <div class="textColor">{{ detail.close_time ? formatUsTime(detail.close_time * 1000) : '--' }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | import assetsHead from "@/components/Transform/assets-head/index.vue"; |
| | | import { Popup } from "vant"; |
| | | import dayjs from 'dayjs' |
| | | |
| | | const US_TIMEZONE = 'America/New_York' |
| | | export default { |
| | | name: "orderDetail", |
| | | data() { |
| | |
| | | |
| | | methods: { |
| | | dayjs, |
| | | formatUsTime(timestampMs) { |
| | | if (!timestampMs) return '--' |
| | | try { |
| | | const dtf = new Intl.DateTimeFormat('en', { |
| | | hour12: false, |
| | | timeZone: US_TIMEZONE, |
| | | year: 'numeric', |
| | | month: '2-digit', |
| | | day: '2-digit', |
| | | hour: '2-digit', |
| | | minute: '2-digit', |
| | | second: '2-digit', |
| | | }) |
| | | const parts = dtf.formatToParts(new Date(timestampMs)) |
| | | const map = parts.reduce((acc, p) => { |
| | | acc[p.type] = p.value |
| | | return acc |
| | | }, {}) |
| | | return `${map.year}-${map.month}-${map.day} ${map.hour}:${map.minute}:${map.second}` |
| | | } catch (e) { |
| | | return dayjs(timestampMs).format('YYYY-MM-DD HH:mm:ss') |
| | | } |
| | | }, |
| | | handleText(state) { |
| | | let str = ''; |
| | | if (state == 'created') { |