| src/page/deliveryContract/hold.vue | ●●●●● patch | view | raw | blame | history | |
| src/page/perpetualContract/orderDetail.vue | ●●●●● patch | view | raw | blame | history | |
| src/utils/filter.js | ●●●●● patch | view | raw | blame | history |
src/page/deliveryContract/hold.vue
@@ -73,10 +73,10 @@ <div class="flex-1 flex flex-col items-end"> <div class="text-grey">{{ $t("盈亏") }}</div> <div class="mt-20" :class="item.profit / 1 > 0 ? 'text-green' : 'text-red'" class="mt-20 text-green" > {{ item.profit / 1 > 0 ? "+" + item.profit : item.profit }} 0 <!-- {{ item.profit / 1 > 0 ? "+" + item.profit : item.profit }} --> </div> </div> </div> src/page/perpetualContract/orderDetail.vue
@@ -56,11 +56,11 @@ </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') { src/utils/filter.js
@@ -1,10 +1,15 @@ import store from "@/store"; export function _symbolName(str, type) { const data = store.state?.home?.coinList; let data = store.state?.home?.coinList; let symbol = ""; let result = data.find(item => item.symbol == "btc") result.symbolFullName = 'BTC/USDT' let result1 = data.find(item => item.symbol == "eth") result1.symbolFullName = 'ETH/USDT' if (data) { // console.log(data, "===="); let arr = data.filter((item) => item.symbol === str); // console.log(arr,"===="); if (arr[0] && arr[0]?.symbol === str) { let symbol1 = arr[0].symbolFullName; if (type) {