li.shaoyi 10 달 전
부모
커밋
c0f4b5a311

+ 6 - 2
src/packages/mobile/views/pricing/trade/v2/Index.vue

@@ -11,11 +11,15 @@
                 <dl>
                     <template v-if="orderType === 3">
                         <dt>{{ $t('tss.buyprice') }}</dt>
-                        <dd :class="quote?.bidColor">{{ handleNumberValue(quote?.bid) }}</dd>
+                        <dd :class="quote?.bidColor">
+                            {{ quote ? formatDecimal(quote.bid, quote.decimalplace) : handleNumberValue() }}
+                        </dd>
                     </template>
                     <template v-else>
                         <dt>{{ $t('tss.sellprice') }}</dt>
-                        <dd :class="quote?.askColor">{{ handleNumberValue(quote?.ask) }}</dd>
+                        <dd :class="quote?.askColor">
+                            {{ quote ? formatDecimal(quote.ask, quote.decimalplace) : handleNumberValue() }}
+                        </dd>
                     </template>
                 </dl>
                 <dl v-if="orderType !== 1">

+ 3 - 3
src/packages/tss/views/product/list/components/waterfall-list/index.vue

@@ -20,7 +20,7 @@
 <script lang="ts" setup>
 import { PropType } from 'vue'
 import { Image } from 'vant'
-import { getFileUrl, handleNumberValue } from '@/filters'
+import { getFileUrl, handleNumberValue, formatDecimal } from '@/filters'
 import { useNavigation } from '@mobile/router/navigation'
 import { BuyOrSell, BuildType, getGoodsCurrencyName } from '@/constants/order'
 import Waterfall from '@mobile/components/base/waterfall/index.vue'
@@ -38,8 +38,8 @@ const futureStore = useFuturesStore()
 
 // 获取商品价格
 const getPrice = (item: Model.TCEGoodsCollectionRsp) => {
-    const { ask = 0, currencyid = 0 } = futureStore.getGoodsQuote(item.defaultgoodsid).value ?? {}
-    return ask ? getGoodsCurrencyName(currencyid) + ask : handleNumberValue()
+    const { ask = 0, currencyid = 0, decimalplace } = futureStore.getGoodsQuote(item.defaultgoodsid).value ?? {}
+    return ask ? getGoodsCurrencyName(currencyid) + formatDecimal(ask, decimalplace) : handleNumberValue()
 }
 
 // 获取价格颜色