1
jhzh
2026-05-29 bbf6d337c9641c0d1bf2c57f05310e59c104990b
src/views/cryptos/PerpetualContract/orderDetail.vue
@@ -49,12 +49,14 @@
        </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>
@@ -66,6 +68,8 @@
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() {
@@ -89,6 +93,29 @@
  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') {