Handy_Cao 1 год назад
Родитель
Сommit
904093a3cc

+ 1 - 1
public/config/appconfig.json

@@ -4,7 +4,7 @@
   "appTitle": "多元世纪交易中心",
   "version": "1.0.8",
   "versionCode": "10008",
-  "apiUrl": "http://192.168.31.204:8080/cfg?key=test_204",
+  "apiUrl": "http://192.168.31.158:16240/cfg?key=dev_104",
   "tradeChannel": "ws",
   "modules": [
     "register",

+ 1 - 0
public/locales/en-US.json

@@ -174,6 +174,7 @@
         "formula": "Formula"
     },
     "quote": {
+        "title": "Reference",
         "goodsname": "Name/Code",
         "goodsname1": "GoodsName",
         "goodscode": "GoodsCode",

+ 1 - 0
public/locales/th-TH.json

@@ -175,6 +175,7 @@
         "formula": "สูตร"
     },
     "quote": {
+        "title": "อ้างอิงถึง",
         "goodsname": "สินค้า/รหัส",
         "goodsname1": "ชื่อ",
         "goodscode": "รหัส",

+ 1 - 0
public/locales/zh-CN.json

@@ -175,6 +175,7 @@
         "formula": "公式"
     },
     "quote": {
+        "title": "参考行情",
         "goodsname": "商品/代码",
         "goodsname1": "名称",
         "goodscode": "代码",

+ 1 - 0
public/locales/zh-TW.json

@@ -175,6 +175,7 @@
         "formula": "公式"
     },
     "quote": {
+        "title": "参考行情",
         "goodsname": "商品/代碼",
         "goodsname1": "名稱",
         "goodscode": "代碼",

+ 20 - 1
src/filters/index.ts

@@ -2,7 +2,7 @@ import CryptoJS from 'crypto-js'
 import service from '@/services'
 import Long from 'long'
 import moment from 'moment'
-import { useGlobalStore, useUserStore } from '@/stores'
+import { useGlobalStore, useUserStore, i18n } from '@/stores'
 
 /**
  * 获取url对象方法
@@ -240,6 +240,25 @@ export function formatDate(value?: string, format = 'YYYY-MM-DD HH:mm:ss') {
 }
 
 /**
+ * 获取市场名称
+ * @param value 
+ * @param format 
+ * @returns 
+ */
+export function displayname(item?: Model.Marketsectionconfignew ) {
+    switch (i18n.global.locale) {
+        case 'zh-CN':
+            return item?.displayname ?? ''
+        case 'en-US':
+            return item?.displaynameen ?? ''
+        case 'zh-TW':
+            return item?.displaynamezh_tw ?? ''
+        default:
+            return item?.displaynameth ?? ''
+    }
+}
+
+/**
  * 计算两者之间的天数
  * @param value 
  * @returns 

+ 3 - 2
src/packages/mobile/views/home/Index.vue

@@ -19,10 +19,11 @@ import { Tabbar } from '@mobile/components/base/tabbar/types'
 import { useNavigation } from '@mobile/router/navigation'
 import { useMarketSection } from '@/business/market'
 import { useLoginStore, useFuturesStore } from '@/stores'
+import { i18n } from '@/stores'
+import { displayname } from "@/filters"
 import AppTabbar from '@mobile/components/base/tabbar/index.vue'
 import AppUpdater from '@mobile/components/base/updater/index.vue'
 import RouterTransition from '@mobile/components/base/router-transition/index.vue'
-import { i18n } from '@/stores'
 
 const { global: { t } } = i18n
 
@@ -59,7 +60,7 @@ const { allMarket } = useMarketSection(() => {
 const addTab = (item: Model.Marketsectionconfignew) => {
   const tab: Tabbar = {
     name: 'home-404',
-    label: item.displayname,
+    label: displayname(item),
     icon: 'g-icon-listing--line',
     activeIcon: 'g-icon-listing--fill',
     params: item

+ 2 - 2
src/packages/mobile/views/home/main/Index.vue

@@ -41,7 +41,7 @@
 <script lang="ts" setup>
 import { shallowRef, computed } from 'vue'
 import { Cell, CellGroup, PullRefresh, Badge } from 'vant'
-import { formatDate } from "@/filters"
+import { displayname, formatDate } from "@/filters"
 import { queryImageConfigs } from "@/services/api/common"
 import { queryNewTitles } from "@/services/api/news"
 import { useMarketSection } from '@/business/market'
@@ -76,7 +76,7 @@ const iconbar = computed(() => allMarket.value.reduce<{
   if (index > 2) {
     const item = {
       name: '',
-      label: cur.displayname,
+      label: displayname(cur),
       icon: '',
       markets: cur.marketids
     }

+ 2 - 2
src/packages/mobile/views/market/list/Index.vue

@@ -47,7 +47,7 @@
 
 <script lang="ts" setup>
 import { onActivated, onUnmounted, computed, PropType } from 'vue'
-import { parsePercent, handleNumberValue, formatDecimal } from '@/filters'
+import { parsePercent, handleNumberValue, formatDecimal, displayname } from '@/filters'
 import { useNavigation } from '@mobile/router/navigation'
 import { useFuturesStore } from '@/stores'
 import quoteSocket from '@/services/websocket/quote'
@@ -70,7 +70,7 @@ const { router, getQueryString } = useNavigation()
 const futuresStore = useFuturesStore()
 
 const title = getQueryString('title')
-const titleName = computed(() => title ? decodeURIComponent(title) : props.marketSection?.displayname ?? '参考行情')
+const titleName = computed(() => title ? decodeURIComponent(title) : displayname(props.marketSection) ?? t('quote.title'))
 
 const dataList = computed(() => {
     const list = futuresStore.quotationList.filter((e) => e.marketid === 99201)

+ 2 - 1
src/packages/mobile/views/news/list/Index.vue

@@ -25,13 +25,14 @@ import { shallowRef } from 'vue'
 import { Cell, Tab, Tabs, Empty } from 'vant'
 import { formatDate } from '@/filters'
 import { useRequest } from '@/hooks/request'
+import { i18n } from "@/stores";
 import { querySiteColumnDetail, querySiteColumnConfig } from '@/services/api/news'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
 
 defineProps({
   title: {
     type: String,
-    default: '市场资讯'
+    default: i18n.global.t('routes.news')
   }
 })
 

+ 1 - 1
src/packages/sbyj/views/order/list/components/supplement-deposit/index.vue

@@ -17,12 +17,12 @@
                     <Cell title="已付定金" :value="selectedRow.tHDetailEx.payedDeposit" />
                     <Cell title="已补定金" :value="selectedRow.tHDetailEx.restockDeposit" />
                     <Cell title="滞纳金" :value="selectedRow.tHDetailEx.callAteFee" />
-                    <Cell title="可退订金" :value="formatDecimal(refundDespoit)" />
                     <Cell title="浮动权益" >
                         <template #value>
                             <span :class="handlePriceColor(selectedRow.tHDetailEx.floatPL)">{{ selectedRow.tHDetailEx.floatPL }}</span>
                         </template>
                     </Cell>
+                    <Cell title="可退订金" :value="formatDecimal(refundDespoit)" />
                     <Field label="类型">
                         <template #input>
                             <RadioGroup direction="horizontal" v-model="orderType" @click="onTypeChanged">

+ 1 - 1
src/packages/thj/views/market/list/index.vue

@@ -51,7 +51,7 @@ const { router, getQueryString } = useNavigation()
 const futuresStore = useFuturesStore()
 
 const title = getQueryString('title')
-const titleName = computed(() => title ? decodeURIComponent(title) : props.marketSection?.displayname ?? '参考行情')
+const titleName = computed(() => title ? decodeURIComponent(title) : props.marketSection?.displayname ?? t('quote.title')))
 
 const dataList = computed(() => futuresStore.quotationList.filter((e) => e.marketid === 99201))