From 17f162bd5da2296f4b31926a463b48dc2fe2547d Mon Sep 17 00:00:00 2001
From: 李 <344137771@qq.com>
Date: Fri, 29 May 2026 15:16:57 +0800
Subject: [PATCH] 1
---
src/components/Transform/entrust-item/index.vue | 17 ++++++++++-------
src/views/cryptos/Recharge/rechargeDetail.vue | 2 +-
src/components/Transform/perpetual-position-list/index.vue | 2 +-
src/views/cryptos/AccountChange/index.vue | 2 +-
src/views/cryptos/PerpetualContract/orderDetail.vue | 31 +++++++++++++++++++++++++++----
5 files changed, 40 insertions(+), 14 deletions(-)
diff --git a/src/components/Transform/entrust-item/index.vue b/src/components/Transform/entrust-item/index.vue
index 7c10f71..4ce7c51 100644
--- a/src/components/Transform/entrust-item/index.vue
+++ b/src/components/Transform/entrust-item/index.vue
@@ -10,7 +10,7 @@
</div>
</div>
<div class="text-grey font-26 flex flex-col justify-between">
- {{ entrust.create_time_ts ? dayjs(entrust.create_time_ts * 1000).format('YYYY-MM-DD HH:mm:ss') : '--' }}
+ {{ entrust.create_time ? entrust.create_time : '--' }}
</div>
</div>
<div class="flex justify-between pb-34">
@@ -41,13 +41,16 @@
<div class="btn-wrap mt-64">
<button class="detailBtn order-btn text-blue h-54 lh-54 " @click.stop="goDetail(entrust.order_no)">
{{ $t('详情') }}</button>
- <button v-if="state == 'submitted'" class="ml-19 order-btn border-none h-54 lh-54 cancel-btn yellow-bg textColor"
+ <button v-if="state == 'submitted'"
+ class="ml-19 order-btn border-none h-54 lh-54 cancel-btn yellow-bg textColor"
@click.stop="cancelSingle(entrust.order_no)">
{{ $t('撤单') }}</button>
- <button v-if="state == 'created'" class="ml-19 order-btn border-none h-54 lh-54 cancel-btn textColor yellow-bg">{{
- $t('已完成') }}</button>
- <button v-if="state == 'canceled'" class="ml-19 order-btn border-none h-54 lh-54 cancel-btn yellow-bg textColor">{{
- $t('canceled') }}</button>
+ <button v-if="state == 'created'"
+ class="ml-19 order-btn border-none h-54 lh-54 cancel-btn textColor yellow-bg">{{
+ $t('已完成') }}</button>
+ <button v-if="state == 'canceled'"
+ class="ml-19 order-btn border-none h-54 lh-54 cancel-btn yellow-bg textColor">{{
+ $t('canceled') }}</button>
</div>
</div>
</div>
@@ -97,7 +100,7 @@
}
}
</script>
-<style lang="scss" scoped>
+<style lang="scss" scoped>
@import "@/assets/init.scss";
#cryptos {
diff --git a/src/components/Transform/perpetual-position-list/index.vue b/src/components/Transform/perpetual-position-list/index.vue
index e494a52..8568ef6 100644
--- a/src/components/Transform/perpetual-position-list/index.vue
+++ b/src/components/Transform/perpetual-position-list/index.vue
@@ -46,7 +46,7 @@
</div>
<div class="flex-1 text-right">
<div class="text-grey">{{ $t('Margin Ratio') || 'Margin Ratio' }}</div>
- <div class="mt-12 textColor">{{ item.margin_ratio != null ? item.margin_ratio + '%' : '-' }}</div>
+ <div class="mt-12 textColor">{{ item.change_ratio != null ? item.change_ratio + '%' : '-' }}</div>
</div>
</div>
<!-- Entry Price / Mark Price / Liq. Price -->
diff --git a/src/views/cryptos/AccountChange/index.vue b/src/views/cryptos/AccountChange/index.vue
index 8c9f300..ff2f225 100644
--- a/src/views/cryptos/AccountChange/index.vue
+++ b/src/views/cryptos/AccountChange/index.vue
@@ -16,7 +16,7 @@
<div class="font-32 textColor">{{ orderTypes[item.content_type] }}</div>
<div class="text-grey font-26 mt-6">
{{ item.createTime }}
- (UTC+8)
+ <!-- (UTC+8) -->
</div>
<!-- <div class="text-grey font-26 mt-6">{{ orderTypes[item.content_type] }}</div> -->
</div>
diff --git a/src/views/cryptos/PerpetualContract/orderDetail.vue b/src/views/cryptos/PerpetualContract/orderDetail.vue
index 0ed7323..00139c7 100644
--- a/src/views/cryptos/PerpetualContract/orderDetail.vue
+++ b/src/views/cryptos/PerpetualContract/orderDetail.vue
@@ -51,14 +51,12 @@
<div class="text-grey">{{ $t('开仓时间') }}</div>
<div class="textColor">
{{ detail.create_time }}
- (UTC+8)
+ <!-- (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+8)'
- : '--' }}</div>
+ <div class="textColor">{{ detail.close_time ? formatUsTime(detail.close_time * 1000) : '--' }}</div>
</div>
</div>
</div>
@@ -70,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() {
@@ -93,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') {
diff --git a/src/views/cryptos/Recharge/rechargeDetail.vue b/src/views/cryptos/Recharge/rechargeDetail.vue
index 88bd0ea..131425f 100644
--- a/src/views/cryptos/Recharge/rechargeDetail.vue
+++ b/src/views/cryptos/Recharge/rechargeDetail.vue
@@ -55,7 +55,7 @@
<div class="text-grey">{{ $t('日期') }}</div>
<div class="textColor">
{{ info.create_time }}
- (UTC+8)
+ <!-- (UTC+8) -->
</div>
</div>
<div class="flex justify-between mb74">
--
Gitblit v1.9.3