dcc
2024-06-29 e5108083cff1cb9b4df2de3fb845be56ea1622d4
src/page/perpetualContract/orderDetail.vue
@@ -12,7 +12,7 @@
                <div class="text-grey">{{ $t('操作') }}</div>
                <div class="font-600"> {{ handleWord(detail.direction, detail.state, detail.price_type) }}&nbsp;{{
                    detail.name ? detail.name : '--'
                }}</div>
                    }}</div>
            </div>
            <div class="flex justify-between pb-68">
                <div class="text-grey">{{ $t('状态') }}</div>
@@ -42,25 +42,25 @@
                <div class="text-grey">{{ $t('平仓价格') }}</div>
                <div class="textColor">{{ detail.close_avg_price }}</div>
            </div>
         <div class="flex justify-between pb-68">
             <div class="text-grey">{{ $t('止盈') }}</div>
             <div class="textColor">{{ detail.stop_price_profit }}</div>
         </div>
         <div class="flex justify-between pb-68">
             <div class="text-grey">{{ $t('止损') }}</div>
             <div class="textColor">{{ detail.stop_price_loss }}</div>
         </div>
            <div class="flex justify-between pb-68">
                <div class="text-grey">{{ $t('止盈') }}</div>
                <div class="textColor">{{ detail.stop_price_profit }}</div>
            </div>
            <div class="flex justify-between pb-68">
                <div class="text-grey">{{ $t('止损') }}</div>
                <div class="textColor">{{ detail.stop_price_loss }}</div>
            </div>
            <div class="flex justify-between pb-68">
                <div class="text-grey">{{ $t('订单号') }}</div>
                <div class="textColor">{{ detail.order_no }}</div>
            </div>
            <div class="flex justify-between pb-68">
                <div class="text-grey">{{ $t('开仓时间') }}</div>
                <div class="textColor">{{ detail.create_time }}</div>
                <div class="textColor">{{ detail.create_time.split(' ')[0] + " " + this.initDate(detail.create_time.split(' ')[1]) }}</div>
            </div>
            <div class="flex justify-between pb-68">
                <div class="text-grey">{{ $t('平仓时间') }}</div>
                <div class="textColor">{{ detail.close_time }}</div>
                <div class="textColor">{{ detail.create_time.split(' ')[0] + " " + this.initDate(detail.close_time.split(' ')[1]) }}</div>
            </div>
        </div>
    </div>
@@ -69,6 +69,7 @@
<script>
import { _orderHoldDetail } from "@/API/trade.api";
import assetsHead from "@/components/assets-head";
import { init } from "klinecharts";
import { Popup } from "vant";
export default {
    name: "orderDetail",
@@ -90,6 +91,12 @@
        }, 1000);
    },
    methods: {
        initDate(originalTimeStr) {
            const now = new Date(); // 创建一个当前日期时间的实例,这里只使用日期部分不影响时间部分
            const timeParts = originalTimeStr.split(':'); // 将时间字符串拆分为时、分、秒
            now.setHours(timeParts[0], timeParts[1], timeParts[2]); // 设置日期时间的小时、分钟、秒,但不改变日期
            return now.toLocaleTimeString('en-US');
        },
        handleText(state) {
            let str = '';
            if (state == 'created') {