li.shaoyi 1 năm trước cách đây
mục cha
commit
a2eed823a7
25 tập tin đã thay đổi với 766 bổ sung442 xóa
  1. 3 1
      src/business/login/index.ts
  2. 44 23
      src/packages/mobile/views/order/position/components/pricing/detail2/components/delivery/Index.vue
  3. 83 60
      src/packages/mobile/views/pricing/trade/fullpayment/Index.vue
  4. 79 0
      src/packages/mobile/views/pricing/trade/fullpayment/index.less
  5. 9 9
      src/packages/mobile/views/pricing/trade/images/Index.vue
  6. 74 43
      src/packages/mobile/views/pricing/trade/prepayment/Index.vue
  7. 69 0
      src/packages/mobile/views/pricing/trade/prepayment/index.less
  8. 46 80
      src/packages/mobile/views/pricing/trade/v2/Index.vue
  9. 48 13
      src/packages/mobile/views/pricing/trade/v2/index.less
  10. 1 1
      src/packages/mobile/views/user/forget/Index.vue
  11. 1 1
      src/packages/pc/views/auth/forget/index.vue
  12. 1 1
      src/packages/tss/assets/themes/default/default.less
  13. 6 2
      src/packages/tss/assets/themes/global/global.less
  14. 8 2
      src/packages/tss/views/bank/wallet/Index.vue
  15. 45 52
      src/packages/tss/views/bank/wallet/components/deposit/Index.vue
  16. 1 21
      src/packages/tss/views/bank/wallet/components/deposit/index.less
  17. 27 30
      src/packages/tss/views/bank/wallet/components/withdraw/Index.vue
  18. 14 4
      src/packages/tss/views/bank/wallet/components/withdraw/index.less
  19. 3 9
      src/packages/tss/views/home/main/index.vue
  20. 59 51
      src/packages/tss/views/order/position/Index.vue
  21. 90 0
      src/packages/tss/views/order/position/index.less
  22. 3 32
      src/packages/tss/views/product/list/components/waterfall-list/index.vue
  23. 1 0
      src/stores/index.ts
  24. 1 7
      src/stores/modules/futures.ts
  25. 50 0
      src/stores/modules/goodscollection.ts

+ 3 - 1
src/business/login/index.ts

@@ -2,7 +2,7 @@ import { shallowRef, reactive } from 'vue'
 import { v4 } from 'uuid'
 import { timerTask } from '@/utils/timer'
 import { wsLogin, httpLogin, queryLoginId } from '@/services/api/account'
-import { useGlobalStore, useLoginStore, useEnumStore, useErrorInfoStore, useUserStore, useFuturesStore, useAccountStore, useDeliveryRelationStore } from '@/stores'
+import { useGlobalStore, useLoginStore, useEnumStore, useErrorInfoStore, useUserStore, useFuturesStore, useAccountStore, useDeliveryRelationStore,useGoodsCollectionStore } from '@/stores'
 import service from '@/services'
 import quoteSocket from '@/services/websocket/quote'
 import tradeSocket from '@/services/websocket/trade'
@@ -26,6 +26,7 @@ export function useLogin(persist = false) {
     const accountStore = useAccountStore()
     const futuresStore = useFuturesStore()
     const deliveryRelationStore = useDeliveryRelationStore()
+    const goodsCollectionStore = useGoodsCollectionStore()
 
     const { logining, token } = loginStore.$toRefs()
 
@@ -43,6 +44,7 @@ export function useLogin(persist = false) {
             enumStore.getAllEnumList(),
             userStore.getSystemParams()
         ])
+        goodsCollectionStore.fetchGoodsCollections()
     }
 
     const loadUserData = async () => {

+ 44 - 23
src/packages/mobile/views/order/position/components/pricing/detail2/components/delivery/Index.vue

@@ -3,33 +3,47 @@
     <app-modal direction="right-top" height="100%" width="100%" v-model:show="showModal" :refresh="refresh">
         <app-view class="g-form">
             <template #header>
-                <app-navbar :title="selectedRow.tHDetailEx.buyOrSell === 0 ? t('operation.pickup') : t('operation.delivery')" @back="closed" />
+                <app-navbar
+                    :title="selectedRow.tHDetailEx.buyOrSell === 0 ? t('operation.pickup') : t('operation.delivery')"
+                    @back="closed" />
             </template>
             <Form ref="formRef" class="g-form__container" @submit="onDeliverySumit">
-                <CellGroup :title="$t('position.goods.subtitle')" inset>
+                <CellGroup :title="$t('position.goods.subtitle')" :inset="insetStyle">
                     <Cell :title="$t('position.goods.orderid')" :value="`${selectedRow.tHDetailEx.tradeID}`" />
                     <Cell :title="$t('position.goods.goodsname')" :value="`${selectedRow.goodsCode}`" />
-                    <Cell :title="$t('position.goods.agreeunit')" :value="`${selectedRow.agreeUnit}${selectedRow.goodsUnit}`" />
-                    <Cell :title="$t('position.goods.buyorsell')" :value="getBuyOrSellName(selectedRow.tHDetailEx.buyOrSell)" />
-                    <Cell :title="$t('position.goods.holderprice')" :value="formatDecimal(selectedRow.tHDetailEx.holderPrice, selectedRow.decimalPlace)" />
+                    <Cell :title="$t('position.goods.agreeunit')"
+                        :value="`${selectedRow.agreeUnit}${selectedRow.goodsUnit}`" />
+                    <Cell :title="$t('position.goods.buyorsell')"
+                        :value="getBuyOrSellName(selectedRow.tHDetailEx.buyOrSell)" />
+                    <Cell :title="$t('position.goods.holderprice')"
+                        :value="formatDecimal(selectedRow.tHDetailEx.holderPrice, selectedRow.decimalPlace)" />
                     <Cell :title="$t('position.goods.curpositionqty')" :value="selectedRow.tHDetailEx.holderQty" />
-                    <Cell :title="$t('position.goods.curholderamount')" :value="formatDecimal(selectedRow.tHDetailEx.holderAmount, selectedRow.decimalPlace)" />
-                    <Cell :title="$t('position.goods.preamounts')" :value="formatDecimal(usedMargin, selectedRow.decimalPlace)" />
-                    <Cell v-if="selectedRow.tHDetailEx.buyOrSell === BuyOrSell.Buy" :title="$t('position.goods.deposit')" :value="formatDecimal(deposit)" />
-                    <Cell v-if="selectedRow.tHDetailEx.buyOrSell === BuyOrSell.Buy" :title="$t('position.goods.fees1')" :value="formatDecimal(serivcefee)" />
-                    <Cell v-if="selectedRow.tHDetailEx.buyOrSell === BuyOrSell.Sell" :title="$t('position.goods.fees2')" :value="formatDecimal(serivcefee)" />
+                    <Cell :title="$t('position.goods.curholderamount')"
+                        :value="formatDecimal(selectedRow.tHDetailEx.holderAmount, selectedRow.decimalPlace)" />
+                    <Cell :title="$t('position.goods.preamounts')"
+                        :value="formatDecimal(usedMargin, selectedRow.decimalPlace)" />
+                    <Cell v-if="selectedRow.tHDetailEx.buyOrSell === BuyOrSell.Buy"
+                        :title="$t('position.goods.deposit')" :value="formatDecimal(deposit)" />
+                    <Cell v-if="selectedRow.tHDetailEx.buyOrSell === BuyOrSell.Buy" :title="$t('position.goods.fees1')"
+                        :value="formatDecimal(serivcefee)" />
+                    <Cell v-if="selectedRow.tHDetailEx.buyOrSell === BuyOrSell.Sell" :title="$t('position.goods.fees2')"
+                        :value="formatDecimal(serivcefee)" />
                     <Cell :title="$t('position.goods.pricemove')" :value="formatDecimal(pricemove)" />
                     <Cell :title="$t('position.goods.expressfees')" :value="formatDecimal(shipping)" />
                     <Cell :title="$t('position.goods.otherfees')" :value="formatDecimal(otherfees)" />
-                    <Cell v-if="selectedRow.tHDetailEx.buyOrSell === BuyOrSell.Buy" :title="$t('position.goods.deposit1')" :value="formatDecimal(deposit+serivcefee+pricemove+shipping+otherfees)" />
-                    <Cell v-if="selectedRow.tHDetailEx.buyOrSell === BuyOrSell.Sell" :title="$t('position.goods.totalfees')" :value="formatDecimal(serivcefee+pricemove+shipping+otherfees)" />
+                    <Cell v-if="selectedRow.tHDetailEx.buyOrSell === BuyOrSell.Buy"
+                        :title="$t('position.goods.deposit1')"
+                        :value="formatDecimal(deposit + serivcefee + pricemove + shipping + otherfees)" />
+                    <Cell v-if="selectedRow.tHDetailEx.buyOrSell === BuyOrSell.Sell"
+                        :title="$t('position.goods.totalfees')"
+                        :value="formatDecimal(serivcefee + pricemove + shipping + otherfees)" />
                 </CellGroup>
-                <CellGroup :title="$t('position.goods.subtitle2')" inset>
+                <CellGroup :title="$t('position.goods.subtitle2')" :inset="insetStyle">
                     <Cell :title="$t('position.goods.deliveryqty')" :value="formData.DeliveryLot" />
-                    <Field :label="selectedRow.tHDetailEx.buyOrSell === BuyOrSell.Buy ? $t('position.goods.address') : $t('position.goods.deliveryid')"  
+                    <Field
+                        :label="selectedRow.tHDetailEx.buyOrSell === BuyOrSell.Buy ? $t('position.goods.address') : $t('position.goods.deliveryid')"
                         name="DeliveryInfo" v-model="formData.DeliveryInfo" type="textarea" autosize clearable
-                        :rules="formRules.DeliveryInfo" maxlength="50" 
-                        :placeholder="$t('common.required')">
+                        :rules="formRules.DeliveryInfo" maxlength="50" :placeholder="$t('common.required')">
                         <template #right-icon v-if="selectedRow.tHDetailEx.buyOrSell === BuyOrSell.Buy">
                             <Icon name="add-o" @click="showContact = true" />
                         </template>
@@ -39,7 +53,10 @@
             <app-contact v-model:show="showContact" @change="contactChange" />
             <template #footer>
                 <div class="g-form__footer inset">
-                    <Button :disabled="enableqty === 0" block square type="danger" @click="formRef?.submit">{{ selectedRow.tHDetailEx.buyOrSell === 0 ? t('operation.pickup') : t('operation.delivery') }}</Button>
+                    <Button type="danger" :disabled="enableqty === 0" :round="insetStyle" @click="formRef?.submit"
+                        block>
+                        {{ selectedRow.tHDetailEx.buyOrSell === 0 ? t('operation.pickup') : t('operation.delivery') }}
+                    </Button>
                 </div>
             </template>
         </app-view>
@@ -64,6 +81,10 @@ const props = defineProps({
             closeplColor: string; // 浮动盈亏颜色
         }>,
         required: true,
+    },
+    insetStyle: {
+        type: Boolean,
+        default: true
     }
 })
 
@@ -139,16 +160,16 @@ const shipping = computed(() => {
 const enableqty = computed(() => {
     const { tHDetailEx } = props.selectedRow
     return tHDetailEx.holderQty - tHDetailEx.freezeQty
-}) 
+})
 
 // 需补足尾款
 const deposit = computed(() => {
-    return props.selectedRow.tHDetailEx.holderAmount - (props.selectedRow.tHDetailEx.payedDeposit + props.selectedRow.tHDetailEx.restockDeposit )
+    return props.selectedRow.tHDetailEx.holderAmount - (props.selectedRow.tHDetailEx.payedDeposit + props.selectedRow.tHDetailEx.restockDeposit)
 })
 
 // 预付款
 const usedMargin = computed(() => {
-    return props.selectedRow.tHDetailEx.payedDeposit+props.selectedRow.tHDetailEx.restockDeposit
+    return props.selectedRow.tHDetailEx.payedDeposit + props.selectedRow.tHDetailEx.restockDeposit
 })
 
 // 提货费 = 取交易费用配置 105
@@ -161,9 +182,9 @@ const serivcefee = computed(() => {
     // 比例
     if (FeeAlgorithm === 1) {
         return enableqty.value * agreeunit * ExchangeValue
-    } 
+    }
     // 固定
-    return  props.selectedRow.tHDetailEx.holderAmount * ExchangeValue
+    return props.selectedRow.tHDetailEx.holderAmount * ExchangeValue
 })
 
 // 选择联系信息
@@ -213,7 +234,7 @@ const closed = (isRefresh = false) => {
 onMounted(() => {
     // 可用数量
     formData.DeliveryLot = enableqty.value
- })
+})
 
 // 暴露组件属性给父组件调用
 defineExpose({

+ 83 - 60
src/packages/mobile/views/pricing/trade/fullpayment/Index.vue

@@ -1,50 +1,88 @@
 <!-- 挂牌点价 - 商品详细 - 全款 -->
 <template>
     <app-modal direction="right-top" height="100%" width="100%" v-model:show="showModal" :refresh="refresh">
-        <app-view class="pricing-detail g-form">
+        <app-view class="order-pricing-pay">
             <template #header>
-                <app-navbar :title="collection ? collectionName : $t('quote.listinghall')" @back="closed" />
+                <app-navbar :title="collection ? collection.collectionname : $t('quote.listinghall')" @back="closed" />
             </template>
-            <div class="goods-image">
-                <img :src="getFileUrl(collection?.thumurls)" v-if="collection?.thumurls" />
-                <Image width="100%" height="160px" v-else />
+            <div class="order-info" v-if="collection">
+                <div class="order-info__left">
+                    <Image width="120" height="120" radius="8" :src="getFileUrl(collection.thumurls)" />
+                </div>
+                <div class="order-info__right">
+                    <dl>
+                        <dt>
+                            <b>{{ collection.collectionname }}</b>
+                        </dt>
+                        <dd>
+                            <span>规格:</span>
+                            <span>{{ quote?.agreeunit + getGoodsUnitName(quote?.goodunitid) }}</span>
+                        </dd>
+                        <dd>
+                            <span>数量:</span>
+                            <span>{{ handleNumberValue(orderQty) }}</span>
+                        </dd>
+                        <dd>
+                            <span>单价:</span>
+                            <span>{{ handleNumberValue(formatDecimal(marketPrice, quote?.decimalplace)) }}</span>
+                        </dd>
+                    </dl>
+                </div>
             </div>
-            <div class="order-info">
-                <span>小计:{{ orderQty }}</span>
+            <div class="g-form" style="margin-top: 5px;">
+                <Form ref="formRef" class="g-form__container" @submit="onSubmit">
+                    <Field v-if="quote?.trademode != 10" name="Receive" :label="$t('performance.address')"
+                        type="textarea" autosize v-model="formData.AddrInfo" :rules="formRules.AddrInfo"
+                        :placeholder="$t('performance.pleaseentertheaddress')" left-icon="location" label-align="top"
+                        right-icon="add-o" @click-right-icon="showContact = true" />
+                </Form>
             </div>
-            <div class="goods-info">
-                <span>{{ collectionName }}</span>
-                <span>规格:{{ quote?.agreeunit+getGoodsUnitName(quote?.goodunitid) }}</span>
-                <span>数量:{{ handleNumberValue(orderQty) }}</span>
-                <span>{{ handleNumberValue(formatDecimal(marketPrice, quote?.decimalplace)) }}</span>
+            <div class="order-total">
+                <ul class="order-total__top">
+                    <li>
+                        <b>小计:</b>
+                    </li>
+                    <li>
+                        <span>商品数量:</span>
+                        <span>{{ orderQty }}</span>
+                    </li>
+                </ul>
+                <ul class="order-total__center">
+                    <li>
+                        <span>订单金额:</span>
+                        <span>{{ handleNumberValue(formatDecimal(totalAmount)) }}</span>
+                    </li>
+                    <li>
+                        <span>订单服务费:</span>
+                        <span>{{ handleNumberValue(formatDecimal(serivcefee)) }}</span>
+                    </li>
+                </ul>
+                <ul class="order-total__bottom">
+                    <li>
+                        <span>合计总额:</span>
+                        <span>{{ handleNumberValue(formatDecimal(totalAmount + serivcefee)) }}</span>
+                    </li>
+                    <li>
+                        <span>应付:</span>
+                        <span>{{ handleNumberValue(formatDecimal(totalAmount + serivcefee)) }}</span>
+                    </li>
+                </ul>
             </div>
-            <Form ref="formRef" class="g-form__container" @submit="onSubmit">
-                <div class="amount-info">
-                    <Field v-if="quote?.trademode != 10" name="Receive" :label="$t('performance.address')" type="textarea"
-                        autosize v-model="formData.AddrInfo" :rules="formRules.AddrInfo"
-                        :placeholder="$t('performance.pleaseentertheaddress')" right-icon="add-o"
-                        @click-right-icon="showContact = true" />
-                    <span>订单金额:{{ handleNumberValue(formatDecimal(totalAmount)) }}</span>
-                    <span>订单服务费:{{ handleNumberValue(formatDecimal(serivcefee)) }}</span>
-                    <span>合计总额:{{ handleNumberValue(formatDecimal(totalAmount+serivcefee)) }}</span>
-                </div>
-            </Form>
             <template #footer v-if="collection">
                 <div class="g-form__footer inset">
-                    <Button type="danger" block round :disabled="orderQty === 0" @click="onSubmit">
+                    <Button type="danger" block :disabled="orderQty === 0" @click="onSubmit">
                         {{ $t('operation.buynow') }}
                     </Button>
                 </div>
-                <app-contact v-model:show="showContact" @change="contactChange" />
-            </template> 
+            </template>
+            <app-contact v-model:show="showContact" @change="contactChange" />
         </app-view>
     </app-modal>
 </template>
 
 <script lang="ts" setup>
-import { useFuturesStore, i18n } from '@/stores'
+import { useFuturesStore, useGoodsCollectionStore, i18n } from '@/stores'
 import { shallowRef, computed, onMounted } from 'vue'
-import { onBeforeRouteLeave } from 'vue-router'
 import { Button, Image, Field, FieldRule, FormInstance, Form } from 'vant'
 import { useOrder } from '@/business/trade'
 import { fullloading, dialog } from '@/utils/vant'
@@ -75,32 +113,19 @@ const props = defineProps({
 })
 
 // // 是否刷新父组件数据
-const refresh = shallowRef(true) 
+const refresh = shallowRef(true)
 const showModal = shallowRef(true)
 const futuresStore = useFuturesStore()
+const goodsCollectionStore = useGoodsCollectionStore()
 const quote = futuresStore.getGoodsQuote(props.goodsid)
-const collection = futuresStore.collections.find(e => e.collectionid === props.collectionid)
+const collection = goodsCollectionStore.getGoodsById(props.collectionid)
 const { global: { t } } = i18n
 // 显示联系人选择列表
-const showContact = shallowRef(false) 
+const showContact = shallowRef(false)
 const formRef = shallowRef<FormInstance>()
 
 const { formData, formSubmit } = useOrder()
 
-// 商品名称
-const collectionName = computed(() => {
-    switch (i18n.global.locale) {
-        case 'zh-CN':
-            return collection?.collectionname
-        case 'en-US':
-            return collection?.collectionnameen
-        case 'zh-TW':
-            return collection?.collectionnametw
-        default:
-            return collection?.collectiondescth
-    }
-})
-
 // 计算市价
 const marketPrice = computed(() => {
     const { ask = 0, bid = 0 } = quote.value ?? {}
@@ -110,7 +135,7 @@ const marketPrice = computed(() => {
 // 订单金额
 const totalAmount = computed(() => {
     const { agreeunit = 0.0 } = quote.value ?? {}
-    return agreeunit*props.orderQty*marketPrice.value
+    return agreeunit * props.orderQty * marketPrice.value
 })
 
 // 提货费 = 取交易费用配置 105
@@ -122,9 +147,9 @@ const serivcefee = computed(() => {
     // 比例
     if (FeeAlgorithm === 1) {
         return props.orderQty * agreeunit * ExchangeValue
-    } 
+    }
     // 固定
-    return  totalAmount.value * ExchangeValue
+    return totalAmount.value * ExchangeValue
 })
 
 // 委托下单
@@ -169,7 +194,11 @@ const formRules: { [key in keyof Proto.OrderReq]?: FieldRule[] } = {
 // 关闭弹窗
 const closed = (isRefresh = false) => {
     refresh.value = isRefresh
-    showModal.value = false
+    if (showContact.value) {
+        showContact.value = false
+    } else {
+        showModal.value = false
+    }
 }
 
 // 暴露组件属性给父组件调用
@@ -186,15 +215,9 @@ onMounted(() => {
     const { last = 0, presettle = 0 } = quote.value ?? {}
     formData.OrderPrice = last || presettle
     formData.OrderQty = props.orderQty
- })
-
- // 阻止页面离开
-onBeforeRouteLeave((to, from, next) => {
-    if (showContact.value) {
-        showContact.value = false
-        next(false)
-    } else {
-        next(true)
-    }
 })
-</script>
+</script>
+
+<style lang="less" scoped>
+@import './index.less';
+</style>

+ 79 - 0
src/packages/mobile/views/pricing/trade/fullpayment/index.less

@@ -0,0 +1,79 @@
+.order-pricing-pay {
+    .order-info {
+        display: flex;
+        background-color: #fff;
+        padding: 10px;
+        margin-top: 5px;
+
+        &__left {
+            margin-right: 10px;
+        }
+
+        &__right {
+            dl {
+                dt {
+                    font-size: 13px;
+                    margin-bottom: 5px;
+                }
+
+                dd {
+                    font-size: 12px;
+                    color: #5D5D5D;
+                    line-height: 18px;
+                }
+            }
+        }
+    }
+
+    .order-total {
+        font-size: 12px;
+        color: #5D5D5D;
+        background-color: #fff;
+        padding: 10px;
+        margin-top: 5px;
+
+        ul {
+            li {
+                padding: 5px;
+            }
+        }
+
+        &__top {
+            display: flex;
+            justify-content: space-between;
+            border-bottom: 1px solid #F2F2F2;
+
+            li {
+                padding-bottom: 10px;
+            }
+        }
+
+        &__bottom {
+            display: flex;
+            justify-content: space-between;
+            align-items: baseline;
+            border-top: 1px solid #F2F2F2;
+
+            li {
+                padding-top: 10px;
+
+                &:last-child {
+                    span:last-child {
+                        font-size: 16px;
+                        color: #C19239;
+                    }
+                }
+            }
+        }
+    }
+
+    .g-form {
+        &__container {
+            padding-bottom: 0;
+        }
+
+        /deep/ .van-field__left-icon {
+            color: #FFBC40;
+        }
+    }
+}

+ 9 - 9
src/packages/mobile/views/pricing/trade/images/Index.vue

@@ -1,19 +1,19 @@
 <template>
-    <app-view class="g-detail">
-        <div class="g-detail__desc" v-if="pictureurl != ''">
-            <img :src="getFileUrl(pictureurl)" alt="" />
-        </div>
+    <app-view class="g-detail" v-if="record" style="background-color: #fff;margin-top: 5px;">
+        <p v-html="record.collectiondesc"></p>
+        <p v-if="record.pictureurl">
+            <img :src="getFileUrl(record.pictureurl)" alt="" />
+        </p>
     </app-view>
 </template>
 
 <script lang="ts" setup>
-
-import { getFileUrl } from '@/filters';
+import { PropType } from 'vue'
+import { getFileUrl } from '@/filters'
 
 defineProps({
-    pictureurl: {
-        type: String,
-        required: true
+    record: {
+        type: Object as PropType<Model.TCEGoodsCollectionRsp>
     }
 })
 </script>

+ 74 - 43
src/packages/mobile/views/pricing/trade/prepayment/Index.vue

@@ -1,42 +1,82 @@
 <!-- 挂牌点价 - 商品详细 - 预付款 -->
 <template>
     <app-modal direction="right-top" height="100%" width="100%" v-model:show="showModal" :refresh="refresh">
-        <app-view class="pricing-detail g-form">
+        <app-view class="order-pricing-pay">
             <template #header>
-                <app-navbar :title="collection ? collectionName : $t('quote.listinghall')" @back="closed" />
+                <app-navbar :title="collection ? collection.collectionname : $t('quote.listinghall')" @back="closed" />
             </template>
-            <div class="goods-image">
-                <img :src="getFileUrl(collection?.thumurls)" v-if="collection?.thumurls" />
-                <Image width="100%" height="160px" v-else />
-            </div>
-            <div class="goods-info">
-                <span>{{ collectionName }}</span>
-                <span>规格:{{ quote?.agreeunit+getGoodsUnitName(quote?.goodunitid) }}</span>
-                <span>数量:{{ handleNumberValue(orderQty) }}</span>
-                <span>{{ handleNumberValue(formatDecimal(marketPrice, quote?.decimalplace)) }}</span>
-            </div>
-            <div class="order-info">
-                <span>小计:{{ orderQty }}</span>
+            <div class="order-info" v-if="collection">
+                <div class="order-info__left">
+                    <Image width="120" height="120" radius="8" :src="getFileUrl(collection.thumurls)" />
+                </div>
+                <div class="order-info__right">
+                    <dl>
+                        <dt>
+                            <b>{{ collection.collectionname }}</b>
+                        </dt>
+                        <dd>
+                            <span>规格:</span>
+                            <span>{{ quote?.agreeunit + getGoodsUnitName(quote?.goodunitid) }}</span>
+                        </dd>
+                        <dd>
+                            <span>数量:</span>
+                            <span>{{ handleNumberValue(orderQty) }}</span>
+                        </dd>
+                        <dd>
+                            <span>单价:</span>
+                            <span>{{ handleNumberValue(formatDecimal(marketPrice, quote?.decimalplace)) }}</span>
+                        </dd>
+                    </dl>
+                </div>
             </div>
-            <div class="amount-info">
-                <span>订单金额:{{  handleNumberValue(formatDecimal(totalAmount)) }}</span>
-                <span>订单服务费:{{ handleNumberValue(formatDecimal(serivcefee)) }}</span>
-                <span>预付款:{{ handleNumberValue(formatDecimal(usedMargin.deposit)) }}</span>
-                <span>合计总额:{{ handleNumberValue(formatDecimal(serivcefee+usedMargin.deposit)) }}</span>
+            <div class="order-total">
+                <ul class="order-total__top">
+                    <li>
+                        <b>小计:</b>
+                    </li>
+                    <li>
+                        <span>商品数量:</span>
+                        <span>{{ orderQty }}</span>
+                    </li>
+                </ul>
+                <ul class="order-total__center">
+                    <li>
+                        <span>订单金额:</span>
+                        <span>{{ handleNumberValue(formatDecimal(totalAmount)) }}</span>
+                    </li>
+                    <li>
+                        <span>订单服务费:</span>
+                        <span>{{ handleNumberValue(formatDecimal(serivcefee)) }}</span>
+                    </li>
+                    <li>
+                        <span>预付款:</span>
+                        <span> {{ handleNumberValue(formatDecimal(usedMargin.deposit)) }}</span>
+                    </li>
+                </ul>
+                <ul class="order-total__bottom">
+                    <li>
+                        <span>合计总额:</span>
+                        <span>{{ handleNumberValue(formatDecimal(serivcefee + usedMargin.deposit)) }}</span>
+                    </li>
+                    <li>
+                        <span>应付:</span>
+                        <span>{{ handleNumberValue(formatDecimal(serivcefee + usedMargin.deposit)) }}</span>
+                    </li>
+                </ul>
             </div>
             <template #footer v-if="collection">
                 <div class="g-form__footer inset">
-                    <Button type="danger" block round :disabled="orderQty === 0" @click="onSubmit">
+                    <Button type="danger" block :disabled="orderQty === 0" @click="onSubmit">
                         {{ orderType === 2 ? '预付款' : '回购' }}
                     </Button>
                 </div>
-            </template> 
+            </template>
         </app-view>
     </app-modal>
 </template>
 
 <script lang="ts" setup>
-import { useFuturesStore, i18n, useAccountStore } from '@/stores'
+import { useFuturesStore, useGoodsCollectionStore, i18n, useAccountStore } from '@/stores'
 import { shallowRef, computed, onMounted } from 'vue'
 import { Button, Image } from 'vant'
 import { useOrder } from '@/business/trade'
@@ -67,30 +107,17 @@ const props = defineProps({
 })
 
 // // 是否刷新父组件数据
-const refresh = shallowRef(true) 
+const refresh = shallowRef(true)
 const showModal = shallowRef(true)
 const futuresStore = useFuturesStore()
+const goodsCollectionStore = useGoodsCollectionStore()
 const accountStore = useAccountStore()
 const quote = futuresStore.getGoodsQuote(props.goodsid)
-const collection = futuresStore.collections.find(e => e.collectionid === props.collectionid)
+const collection = goodsCollectionStore.getGoodsById(props.collectionid)
 const { global: { t } } = i18n
 
 const { formData, formSubmit } = useOrder()
 
-// 商品名称
-const collectionName = computed(() => {
-    switch (i18n.global.locale) {
-        case 'zh-CN':
-            return collection?.collectionname
-        case 'en-US':
-            return collection?.collectionnameen
-        case 'zh-TW':
-            return collection?.collectionnametw
-        default:
-            return collection?.collectiondescth
-    }
-})
-
 // 计算市价
 const marketPrice = computed(() => {
     const { ask = 0, bid = 0 } = quote.value ?? {}
@@ -100,7 +127,7 @@ const marketPrice = computed(() => {
 // 订单金额
 const totalAmount = computed(() => {
     const { agreeunit = 0.0 } = quote.value ?? {}
-    return agreeunit*props.orderQty*marketPrice.value
+    return agreeunit * props.orderQty * marketPrice.value
 })
 
 // 提货费 = 取交易费用配置 105
@@ -112,9 +139,9 @@ const serivcefee = computed(() => {
     // 比例
     if (FeeAlgorithm === 1) {
         return props.orderQty * agreeunit * ExchangeValue
-    } 
+    }
     // 固定
-    return  totalAmount.value * ExchangeValue
+    return totalAmount.value * ExchangeValue
 })
 
 // 预付款
@@ -189,5 +216,9 @@ onMounted(() => {
     const { last = 0, presettle = 0 } = quote.value ?? {}
     formData.OrderPrice = last || presettle
     formData.OrderQty = props.orderQty
- })
-</script>
+})
+</script>
+
+<style lang="less" scoped>
+@import './index.less';
+</style>

+ 69 - 0
src/packages/mobile/views/pricing/trade/prepayment/index.less

@@ -0,0 +1,69 @@
+.order-pricing-pay {
+    .order-info {
+        display: flex;
+        background-color: #fff;
+        padding: 10px;
+        margin-top: 5px;
+
+        &__left {
+            margin-right: 10px;
+        }
+
+        &__right {
+            dl {
+                dt {
+                    font-size: 13px;
+                    margin-bottom: 5px;
+                }
+
+                dd {
+                    font-size: 12px;
+                    color: #5D5D5D;
+                    line-height: 18px;
+                }
+            }
+        }
+    }
+
+    .order-total {
+        font-size: 12px;
+        color: #5D5D5D;
+        background-color: #fff;
+        padding: 10px;
+        margin-top: 5px;
+
+        ul {
+            li {
+                padding: 5px;
+            }
+        }
+
+        &__top {
+            display: flex;
+            justify-content: space-between;
+            border-bottom: 1px solid #F2F2F2;
+
+            li {
+                padding-bottom: 10px;
+            }
+        }
+
+        &__bottom {
+            display: flex;
+            justify-content: space-between;
+            align-items: baseline;
+            border-top: 1px solid #F2F2F2;
+
+            li {
+                padding-top: 10px;
+
+                &:last-child {
+                    span:last-child {
+                        font-size: 16px;
+                        color: #C19239;
+                    }
+                }
+            }
+        }
+    }
+}

+ 46 - 80
src/packages/mobile/views/pricing/trade/v2/Index.vue

@@ -2,90 +2,83 @@
 <template>
     <app-view class="pricing-trade">
         <template #header>
-            <app-navbar :title="collectionName" />
+            <app-navbar :title="collection?.collectionname" />
         </template>
         <Banner :data-list="topBanners" />
-        <div class="pricing-trade__form" v-if="collection">
-            <span>{{ collectionName }}</span>
-            <span v-if="orderType === 1">
-                销售价格
-                {{ handleNumberValue(formatDecimal(marketPrice, decimalplace)) }}
-            </span>
-            <span v-else-if="orderType === 2">
-                销售价格
-                {{ handleNumberValue(formatDecimal(marketPrice, decimalplace)) }}
-                预付款
-                {{ handleNumberValue(formatDecimal(usedMargin.deposit, decimalplace)) }}
-            </span>
-            <span v-else>
-                回购价格
-                {{ handleNumberValue(formatDecimal(marketPrice, decimalplace)) }}
-                预付款
-                {{ handleNumberValue(formatDecimal(usedMargin.deposit, decimalplace)) }}
-            </span>
+        <div class="pricing-trade__header" v-if="collection">
+            <h1 class="pricing-trade__header-title">{{ collection.collectionname }}</h1>
+            <div class="pricing-trade__header-price">
+                <dl>
+                    <dt v-if="[1, 2].includes(orderType)">销售价格</dt>
+                    <dt v-else>回购价格</dt>
+                    <dd>{{ handleNumberValue(formatDecimal(marketPrice, decimalplace)) }}</dd>
+                </dl>
+                <dl v-if="orderType !== 1">
+                    <dt>预付款</dt>
+                    <dd>{{ handleNumberValue(formatDecimal(usedMargin.deposit, decimalplace)) }}</dd>
+                </dl>
+            </div>
         </div>
-         <!-- 下单选择区域 --> 
-        <Form ref="formRef" class="g-form__container" @submit="onSubmit">
-            <Field name="OrderType" label="订单类型">
+        <!-- 下单选择区域 -->
+        <Form ref="formRef" class="pricing-trade__form" @submit="onSubmit">
+            <Field name="OrderType" label="订单类型" label-align="top">
                 <template #input>
                     <div class="g-qty-group">
                         <RadioGroup v-model="orderType" direction="horizontal" @change="onOrderTypeRadioChange">
-                            <Radio v-for="(item, index) in orderTypeStepList" :key="index" :name="item.value">{{ item.label }}</Radio>
+                            <Radio v-for="(item, index) in orderTypeStepList" :key="index" :name="item.value">{{
+                                item.label }}</Radio>
                         </RadioGroup>
                     </div>
                 </template>
             </Field>
-            <Field name="OrderGoods" label="商品规格">
+            <Field name="OrderGoods" label="商品规格" label-align="top">
                 <template #input>
                     <div class="g-qty-group">
                         <RadioGroup v-model="goodsid" direction="horizontal" @change="onGoodsRadioChange">
-                            <Radio v-for="(item, index) in goodsList" :key="index" :name="item.goodsid">{{ item.agreeunit+getGoodsUnitName(item.goodunitid) }}</Radio>
+                            <Radio v-for="(item, index) in goodsList" :key="index" :name="item.goodsid">{{
+                                item.agreeunit + getGoodsUnitName(item.goodunitid) }}</Radio>
                         </RadioGroup>
                     </div>
                 </template>
             </Field>
-            <Field name="OrderQty" label="批量购买">
+            <Field name="OrderQty" label="批量购买" label-align="top">
                 <template #input>
                     <div class="g-qty-group">
                         <RadioGroup v-model="qtyStep" direction="horizontal" @change="onQtyRadioChange">
                             <Radio v-for="(value, index) in qtyStepList" :key="index" :name="value">{{ value }}
                             </Radio>
                         </RadioGroup>
-                    </div>
-                </template>
-            </Field>
-            <Field name="OrderQty" label="自定义">
-                <template #input>
-                    <div class="g-qty-group__stepper">
-                            <Stepper v-model="orderQty" theme="round" button-size="22" :min="1" :step="qtyStep" integer />
+                        <div class="g-qty-group__stepper">
+                            <Stepper v-model="orderQty" :min="1" :step="qtyStep" integer />
                         </div>
+                    </div>
                 </template>
             </Field>
         </Form>
-        <Tabs v-model:active="active">
+        <Tabs class="van-tabs--list" v-model:active="active" style="display: block;">
             <template v-for="(item, index) in components.filter(e => e.show === true)" :key="index">
                 <Tab :title="item.title" :name="item.name">
-                    <span>{{ collectionDesc }}</span>
-                    <component :is="item.component" v-bind="{ pictureurl }" />
+                    <component :is="item.component" v-bind="{ record: collection }" />
                 </Tab>
             </template>
-        </Tabs>  
+        </Tabs>
         <template #footer v-if="collection">
             <div class="g-form__footer inset">
-                <Button type="danger" block round :disabled="orderQty === 0" @click="onSubmit">
-                    {{ orderType === 1 ? $t('operation.buynow') : orderTypeStepList.find(e => e.value === orderType)?.label }}
+                <Button type="danger" block :disabled="orderQty === 0" @click="onSubmit">
+                    {{ orderType === 1 ? $t('operation.buynow') : orderTypeStepList.find(e => e.value ===
+                        orderType)?.label }}
                 </Button>
             </div>
-            <component ref="componentRef" :is="componentMap.get(componentId)" v-bind="{ goodsid, collectionid, orderType, orderQty }"
-            @closed="closeComponent" v-if="componentId" />
-        </template>      
+            <component ref="componentRef" :is="componentMap.get(componentId)"
+                v-bind="{ goodsid, collectionid, orderType, orderQty }" @closed="closeComponent" v-if="componentId" />
+        </template>
     </app-view>
 </template>
 
 <script lang="ts" setup>
 import { shallowRef, onMounted, onUnmounted, computed, defineAsyncComponent } from 'vue'
 import { Form, Field, Button, FormInstance, Radio, RadioGroup, Tab, Tabs } from 'vant'
-import { useFuturesStore, useUserStore, i18n, useAccountStore } from '@/stores'
+import { useFuturesStore, useGoodsCollectionStore, useUserStore, i18n, useAccountStore } from '@/stores'
 import { useNavigation } from '@mobile/router/navigation'
 import { formatDecimal, handleNumberValue } from '@/filters'
 import { getGoodsUnitName } from '@/constants/unit'
@@ -96,10 +89,11 @@ import Banner from '@mobile/components/base/banner/index.vue'
 
 const { getQueryStringToNumber } = useNavigation()
 const futuresStore = useFuturesStore()
+const goodsCollectionStore = useGoodsCollectionStore()
 const accountStore = useAccountStore()
 
 const collectionid = getQueryStringToNumber('collectionid')
-const collection = futuresStore.collections.find(e => e.collectionid === collectionid)
+const collection = goodsCollectionStore.getGoodsById(collectionid)
 
 const { global: { t } } = i18n
 const subscribe = quoteSocket.createSubscribe()
@@ -123,18 +117,18 @@ const orderQty = shallowRef(qtyStepList.value[0]) // 默认数量
 // 订单模型列表
 const orderTypeStepList = computed(() => {
     return [
-        { label: '全款', value: 1}, 
-        { label: '预付款', value: 2}, 
-        { label: '回购', value: 3}
+        { label: '全款', value: 1 },
+        { label: '预付款', value: 2 },
+        { label: '回购', value: 3 }
     ]
 })
 // 订单模型
-const orderType = shallowRef(orderTypeStepList.value[0].value) 
+const orderType = shallowRef(orderTypeStepList.value[0].value)
 
 // 商品信息
 const goodsList = shallowRef<Model.GoodsQuote[]>()
 // 默认选择第一个全款下的第一个商品
-const goodsid = shallowRef(0) 
+const goodsid = shallowRef(0)
 const quote = shallowRef<Model.GoodsQuote>()
 
 // Banner图
@@ -142,34 +136,6 @@ const topBanners = computed(() => {
     return collection?.bannerurls.split(',') ?? []
 })
 
-// 商品名称
-const collectionName = computed(() => {
-    switch (i18n.global.locale) {
-        case 'zh-CN':
-            return collection?.collectionname
-        case 'en-US':
-            return collection?.collectionnameen
-        case 'zh-TW':
-            return collection?.collectionnametw
-        default:
-            return collection?.collectiondescth
-    }
-})
-
-// 商品名称
-const collectionDesc = computed(() => {
-    switch (i18n.global.locale) {
-        case 'zh-CN':
-            return collection?.collectiondesc
-        case 'en-US':
-            return collection?.collectiondescen
-        case 'zh-TW':
-            return collection?.collectiondesctw
-        default:
-            return collection?.collectiondescth
-    }
-})
-
 const pictureurl = computed(() => {
     return collection?.pictureurl ?? ''
 })
@@ -197,7 +163,7 @@ const onOrderTypeRadioChange = (value: number) => {
     }
     // 订阅商品行情
     subscribe.start(quote.value?.goodscode ?? '')
- }
+}
 
 // 商品规格切换
 const onGoodsRadioChange = (value: number) => {
@@ -219,7 +185,7 @@ const marketPrice = computed(() => {
         case 2:
             return ask
         default:
-        return bid
+            return bid
     }
 })
 
@@ -273,7 +239,7 @@ const onSubmit = () => {
         openComponent('fullpayment')
     } else {
         // 预付款以及回购
-        openComponent('prepayment') 
+        openComponent('prepayment')
     }
 }
 

+ 48 - 13
src/packages/mobile/views/pricing/trade/v2/index.less

@@ -1,29 +1,64 @@
 .pricing-trade {
-    &__form {
+    &__header {
         background-color: #fff;
-        border-radius: 8px;
-        margin: 15px 15px 0px 15px;
-        margin-bottom: 0;
+        padding: 10px;
+        margin-top: 5px;
 
-        .form-buyorsell {
-            margin: 5px 8px;
+        &-title {
+            font-size: 16px;
+            font-weight: bold;
         }
 
-        .form-price {
+        &-price {
             display: flex;
-            padding: 16px 0;
+            justify-content: space-between;
+            margin-top: 10px;
 
             dl {
-                flex: 1;
-                text-align: center;
+                display: flex;
+                align-items: baseline;
 
                 dt {
-                    margin-bottom: 5px;
+                    font-size: 12px;
+                    margin-right: 5px;
                 }
 
                 dd {
-                    font-size: 28px;
-                    font-weight: bold;
+                    font-size: 22px;
+                    font-weight: 400;
+                    color: #C19239;
+                }
+            }
+        }
+    }
+
+    &__form {
+        margin-top: 5px;
+
+        .g-qty-group {
+            align-items: initial;
+
+            &__stepper {
+                width: 50%;
+                margin-top: 10px;
+            }
+
+            .van-radio {
+                --van-radio-checked-icon-color: #31AE58;
+
+                width: auto;
+                padding: 5px 10px 5px 0;
+
+                &[aria-checked="true"] .van-radio__label {
+                    background-color: #F0FFE3;
+                }
+
+                &__label {
+                    padding: 4px 10px;
+                }
+
+                &-group {
+                    margin-top: 0;
                 }
             }
         }

+ 1 - 1
src/packages/mobile/views/user/forget/Index.vue

@@ -209,7 +209,7 @@ const formSubmit = () => {
                     vcode,
                 }
             }).then((res) => {
-                if (res.code === '0') {
+                if (res.code.toString() === '0') {
                     hideLoading()
                     dialog(t('user.forget.tips8')).then(() => {
                         router.back()

+ 1 - 1
src/packages/pc/views/auth/forget/index.vue

@@ -171,7 +171,7 @@ const formSubmit = () => {
                         vcode,
                     }
                 }).then((res) => {
-                    if (res.code === '0') {
+                    if (res.code.toString() === '0') {
                         ElMessage.success(t('user.forget.tips8'))
                         onClose()
                     } else {

+ 1 - 1
src/packages/tss/assets/themes/default/default.less

@@ -31,7 +31,7 @@
 
     /* Vant-Button */
     --van-button-border-width: 0;
-    --van-button-primary-background: #72533B;
+    --van-button-primary-background: #C19239;
     --van-button-danger-background: #305C3E;
 
     /* Vant-Checkbox */

+ 6 - 2
src/packages/tss/assets/themes/global/global.less

@@ -53,6 +53,10 @@
         flex-direction: column;
         padding-bottom: 16px;
 
+        .van-cell-group:empty {
+            display: none;
+        }
+
         /* 父元素的第一个子元素 */
         .van-cell-group:first-of-type {
             margin-top: 5px;
@@ -277,8 +281,8 @@
 
             &__desc {
                 font-size: 12px;
-                color: #999;
-                margin-bottom: 5px;
+                color: #C0BEC7;
+                margin-top: 5px;
             }
 
             &__price {

+ 8 - 2
src/packages/tss/views/bank/wallet/Index.vue

@@ -9,7 +9,7 @@
                 </template>
             </app-navbar>
         </template>
-        <Tabs v-model:active="active">
+        <Tabs class="van-tabs--list" v-model:active="active">
             <Tab :title="$t('banksign.wallet.cashin')">
                 <app-deposit />
             </Tab>
@@ -39,4 +39,10 @@ const { componentRef, componentId, openComponent, closeComponent } = useComponen
 const { getQueryStringToNumber } = useNavigation()
 
 const active = shallowRef(getQueryStringToNumber('tab'))
-</script>
+</script>
+
+<style lang="less" scoped>
+.van-tabs--list {
+    --van-tabs-bottom-bar-width: 50%;
+}
+</style>

+ 45 - 52
src/packages/tss/views/bank/wallet/components/deposit/Index.vue

@@ -1,70 +1,64 @@
 <template>
     <app-view class="g-form bank-wallet-deposit">
         <Form ref="formRef" class="g-form__container" @submit="doDepositWarning">
-            <CellGroup inset v-if="cusBank?.caninamount === 1">
-                <Field :label="$t('banksign.wallet.deposit.inamount')" :placeholder="$t('banksign.wallet.deposit.pleaseenterinamount')"
-                    :rules="formRules.Amount">
+            <CellGroup v-if="cusBank?.caninamount === 1">
+                <Field :label="$t('banksign.wallet.deposit.inamount')"
+                    :placeholder="$t('banksign.wallet.deposit.pleaseenterinamount')" :rules="formRules.Amount" label-align="top">
                     <template #input>
                         <div class="g-qty-group">
-                            <div class="g-qty-group__stepper">
-                                <Stepper v-model="formData.Amount" theme="round" button-size="22" :min="0" :step="qtyStep" integer />
-                            </div>
                             <RadioGroup v-model="qtyStep" direction="horizontal" @change="onRadioChange">
                                 <Radio v-for="(value, index) in qtyStepList" :key="index" :name="value">{{ value }}
                                 </Radio>
                             </RadioGroup>
+                            <div class="g-qty-group__stepper" style="padding: 15px 0;">
+                                <Stepper v-model="formData.Amount" theme="round" button-size="22" :min="0"
+                                    :step="qtyStep" integer />
+                            </div>
                         </div>
                     </template>
                 </Field>
-                <Field :label="$t('mine.balance')" readonly >
-                    <template #input>
-                        <span>{{ currentAccount.currentbalance?.toFixed(2) }}</span>
+                <template v-for="(item, index) in configs" :key="index">
+                    <Field v-if="item.usabletype === 1 || item.usabletype === userStore.userInfo?.userinfotype"
+                        :name="item.fieldcode"
+                        :label="item.fieldcode === 'bank_branch_name' ? $t('banksign.branchbankname') : item.fieldname"
+                        v-model="item.value" :placeholder="$t('common.pleaseenter')" label-align="top" />
+                </template>
+            </CellGroup>
+            <CellGroup>
+                <Cell :title="$t('mine.balance')" :value="currentAccount.currentbalance?.toFixed(2)" />
+                <Cell :title="$t('banksign.wallet.withdraw.bankaccountname')"
+                    :value="handleNoneValue(sign.bankaccountname)" />
+                <Cell :title="$t('banksign.wallet.withdraw.bankname')" :value="handleNoneValue(sign.bankname)" />
+                <Cell :title="$t('banksign.wallet.withdraw.bankaccountno')"
+                    :value="handleNoneValue(sign.bankaccountno)" />
+            </CellGroup>
+            <CellGroup>
+                <Cell :title="$t('banksign.wallet.deposit.platformdepositbankname')" v-if="msg_320">
+                    <template #value>
+                        <span :data-clipboard-text="msg_320" v-copy="onCopy">{{ msg_320 }}</span>
                     </template>
-                </Field>
-                <Field :label="$t('banksign.wallet.withdraw.bankaccountname')">
-                    <template #input>
-                        {{ handleNoneValue(sign.bankaccountname) }}
+                </Cell>
+                <Cell :title="$t('banksign.wallet.deposit.platformdepositaccountno')" v-if="msg_321">
+                    <template #value>
+                        <span :data-clipboard-text="msg_321" v-copy="onCopy">{{ msg_321 }}</span>
                     </template>
-                </Field>
-                <Field :label="$t('banksign.wallet.withdraw.bankname')">
-                    <template #input>
-                        {{ handleNoneValue(sign.bankname) }}
+                </Cell>
+                <Cell :title="$t('banksign.wallet.deposit.platformdepositaccount')" v-if="msg_322">
+                    <template #value>
+                        <span :data-clipboard-text="msg_322" v-copy="onCopy">{{ msg_322 }}</span>
                     </template>
-                </Field>
-                <Field :label="$t('banksign.wallet.withdraw.bankaccountno')">
-                    <template #input>
-                        {{ handleNoneValue(sign.bankaccountno) }}
+                </Cell>
+                <Cell :title="$t('banksign.wallet.deposit.platformdepositsub-branch')" v-if="msg_323">
+                    <template #value>
+                        <span :data-clipboard-text="msg_323" v-copy="onCopy">{{ msg_323 }}</span>
                     </template>
-                </Field>
-                <template v-for="(item, index) in configs" :key="index">
-                    <Field v-if="item.usabletype === 1 || item.usabletype === userStore.userInfo?.userinfotype"
-                        :name="item.fieldcode" :label="item.fieldcode === 'bank_branch_name' ? $t('banksign.branchbankname') : item.fieldname" v-model="item.value"
-                        :placeholder="$t('common.pleaseenter')" />
-                </template>
+                </Cell>
             </CellGroup>
             <div class="tips_time">
                 <span class="tips">{{ $t('banksign.wallet.deposit.time') }} {{ startTime }} - {{ endTime }}</span>
                 <span class="tips"><br>{{ $t('banksign.wallet.deposit.notice') }}</span>
             </div>
-            <div class="tips_bank">
-                <div class="tips_bank_row" v-if="msg_320">
-                    <span class="tips_bank_row__label">{{ $t('banksign.wallet.deposit.platformdepositbankname') }}</span>
-                    <span class="msg_tips" :data-clipboard-text="msg_320" v-copy="onCopy">{{ msg_320 }}</span>
-                </div>
-                <div class="tips_bank_row" v-if="msg_321">
-                    <span class="tips_bank_row__label">{{ $t('banksign.wallet.deposit.platformdepositaccountno') }}</span>
-                    <span class="msg_tips" :data-clipboard-text="msg_321" v-copy="onCopy">{{ msg_321 }}</span>
-                </div>
-                <div class="tips_bank_row" v-if="msg_322">
-                    <span class="tips_bank_row__label">{{ $t('banksign.wallet.deposit.platformdepositaccount') }}</span>
-                    <span class="msg_tips" :data-clipboard-text="msg_322" v-copy="onCopy">{{ msg_322 }}</span>
-                </div>
-                <div class="tips_bank_row" v-if="msg_323">
-                    <span class="tips_bank_row__label">{{ $t('banksign.wallet.deposit.platformdepositsub-branch') }}</span>
-                    <span class="msg_tips" :data-clipboard-text="msg_323" v-copy="onCopy">{{ msg_323 }}</span>
-                </div>
-            </div>
-            <CellGroup inset v-if="msg_324">
+            <CellGroup v-if="msg_324">
                 <Cell :title="$t('common.tips')">
                     <template #label>
                         <p v-html="msg_324" />
@@ -74,11 +68,10 @@
         </Form>
         <template #footer v-if="cusBank?.caninamount === 1">
             <div class="g-form__footer inset">
-                <Button round block type="danger" @click="formRef?.submit()">{{ $t('operation.confirm') }}</Button>
+                <Button block type="danger" @click="formRef?.submit()">{{ $t('operation.confirm') }}</Button>
             </div>
         </template>
-        <component ref="componentRef" :is="componentMap.get(componentId)" @closed="closeComponent"
-        v-if="componentId" />
+        <component ref="componentRef" :is="componentMap.get(componentId)" @closed="closeComponent" v-if="componentId" />
     </app-view>
 </template>
 
@@ -100,7 +93,7 @@ const { getSystemParamValue } = useUserStore()
 const { configs, cusBank, startTime, endTime } = useDoCusBankExtendConfigs(2)
 const certificate_photo_url = ref('')
 const userStore = useUserStore()
-const { global: { t }} = i18n
+const { global: { t } } = i18n
 
 const accountStore = useAccountStore()
 const { currentAccount } = accountStore.$toRefs()
@@ -117,9 +110,9 @@ const componentMap = new Map<string, unknown>([
 const { componentRef, componentId, openComponent, closeComponent } = useComponent()
 
 // 数量步长列表
-const qtyStepList = [100, 500, 1000, 5000, 10000, 50000] 
+const qtyStepList = [100, 500, 1000, 5000, 10000, 50000]
 // 数量步长
-const qtyStep = shallowRef(qtyStepList[0]) 
+const qtyStep = shallowRef(qtyStepList[0])
 
 const onRadioChange = (value: number) => {
     formData.Amount = value

+ 1 - 21
src/packages/tss/views/bank/wallet/components/deposit/index.less

@@ -35,31 +35,11 @@
     }
 
     .tips {
-        color: #993333; 
+        color: #A39E99; 
         font-size: 12px;
     }
 
     .tips_time {
-        background-color: white; 
-        border-radius: 5px; 
-        margin: 10px 15px; 
         padding: 10px 15px;
     }
-
-    .tips_bank {
-        display: flex;
-        flex-direction: column;
-        background-color: white; 
-        margin: 0px 15px 10px 15px; 
-        padding: 10px 15px;
-        border-radius: 5px; 
-
-        .tips_bank_row {
-            height: 30px;
-            &__label {
-                font-size: 14px; 
-                color: #333;
-            }
-        }
-    }
 }

+ 27 - 30
src/packages/tss/views/bank/wallet/components/withdraw/Index.vue

@@ -1,57 +1,54 @@
 <template>
     <app-view class="g-form bank-wallet-withdraw">
         <Form ref="formRef" class="g-form__container" @submit="doWithDrawWarning">
-            <CellGroup inset v-if="cusBank?.canoutamount === 1">
-                <Field class="form-field" type="number" :label="$t('banksign.wallet.withdraw.outamount')" v-model="formData.Amount"
-                    :rules="formRules.Amount">
+            <CellGroup v-if="cusBank?.canoutamount === 1">
+                <Field class="form-field" type="number" :label="$t('banksign.wallet.withdraw.outamount')"
+                    v-model="formData.Amount" :rules="formRules.Amount" label-align="top">
                     <template #input>
-                        <input v-model="formData.Amount" :placeholder="$t('banksign.wallet.withdraw.pleaseenteroutamount')" />
-                        <span class="form-field__tips">{{ $t('banksign.wallet.withdraw.availableoutmoney') }}{{ fund.AvailableOutMoney }}</span>
-                    </template>
-                </Field>
-                <Field :label="$t('banksign.wallet.withdraw.bankaccountname')">
-                    <template #input>
-                        {{ handleNoneValue(sign.bankaccountname) }}
-                    </template>
-                </Field>
-                <Field :label="$t('banksign.wallet.withdraw.bankname')">
-                    <template #input>
-                        {{ handleNoneValue(sign.bankname) }}
-                    </template>
-                </Field>
-                <Field :label="$t('banksign.wallet.withdraw.bankaccountno')">
-                    <template #input>
-                        {{ handleNoneValue(sign.bankaccountno) }}
+                        <input v-model="formData.Amount"
+                            :placeholder="$t('banksign.wallet.withdraw.pleaseenteroutamount')" />
+                        <div class="form-field__tips">
+                            <label>{{ $t('banksign.wallet.withdraw.availableoutmoney') }}</label>
+                            <span style="color: #FF0000;">{{ fund.AvailableOutMoney }}</span>
+                        </div>
                     </template>
                 </Field>
                 <template v-for="(item, index) in configs" :key="index">
                     <Field v-if="item.usabletype === 1 || item.usabletype === userStore.userInfo?.userinfotype"
-                        :name="item.fieldcode" :label="item.fieldcode === 'bank_branch_name' ? $t('banksign.branchbankname') : item.fieldname" v-model="item.value"
-                        :placeholder="$t('common.pleaseenter')" />
+                        :name="item.fieldcode"
+                        :label="item.fieldcode === 'bank_branch_name' ? $t('banksign.branchbankname') : item.fieldname"
+                        v-model="item.value" :placeholder="$t('common.pleaseenter')" label-align="top" />
                 </template>
             </CellGroup>
-            <div class="tips_time">
-                <span class="msg_tips">{{ $t('banksign.wallet.withdraw.time') }} {{ startTime }} - {{ endTime }}</span>
-                <span class="msg_tips"><br>{{ $t('banksign.wallet.withdraw.notice') }}</span>
-            </div>
-            <CellGroup inset v-if="msg_317">
+            <CellGroup>
+                <Cell :title="$t('banksign.wallet.withdraw.bankaccountname')"
+                    :value="handleNoneValue(sign.bankaccountname)" />
+                <Cell :title="$t('banksign.wallet.withdraw.bankname')" :value="handleNoneValue(sign.bankname)" />
+                <Cell :title="$t('banksign.wallet.withdraw.bankaccountno')"
+                    :value="handleNoneValue(sign.bankaccountno)" />
+            </CellGroup>
+            <CellGroup v-if="msg_317">
                 <Cell :title="$t('common.tips')">
                     <template #label>
                         <p v-html="msg_317" />
                     </template>
                 </Cell>
             </CellGroup>
-            <CellGroup inset v-if="cusBank?.canoutamount === 0">
+            <CellGroup v-if="cusBank?.canoutamount === 0">
                 <Cell>
                     <template #label>
                         <p v-html="msg"></p>
                     </template>
                 </Cell>
             </CellGroup>
+            <div class="tips_time">
+                <span class="msg_tips">{{ $t('banksign.wallet.withdraw.time') }} {{ startTime }} - {{ endTime }}</span>
+                <span class="msg_tips"><br>{{ $t('banksign.wallet.withdraw.notice') }}</span>
+            </div>
         </Form>
         <template #footer v-if="cusBank?.canoutamount === 1">
             <div class="g-form__footer inset">
-                <Button round block type="danger" @click="formRef?.submit()">{{ $t('operation.confirm') }}</Button>
+                <Button block type="danger" @click="formRef?.submit()">{{ $t('operation.confirm') }}</Button>
             </div>
         </template>
     </app-view>
@@ -78,7 +75,7 @@ const { getSystemParamValue } = useUserStore()
 const msg = getSystemParamValue('302')
 const msg_317 = getSystemParamValue('317')
 const userStore = useUserStore()
-const { global: { t }} = i18n
+const { global: { t } } = i18n
 
 // 表单验证规则
 const formRules: { [key: string]: FieldRule[] } = {

+ 14 - 4
src/packages/tss/views/bank/wallet/components/withdraw/index.less

@@ -7,7 +7,20 @@
         }
 
         &__tips {
+            width: 100%;
             font-size: 12px;
+            border-top: 1px solid #F2F2F2;
+            padding-top: 10px;
+            margin-top: 10px;
+
+            label {
+                color: #A39E99;
+            }
+
+            span {
+                color: #FF0000;
+                margin-left: 5px;
+            }
         }
     }
 
@@ -16,14 +29,11 @@
     }
 
     .msg_tips {
-        color: #993333; 
+        color: #A39E99;
         font-size: 12px;
     }
 
     .tips_time {
-        background-color: white; 
-        border-radius: 10px; 
-        margin: 10px 15px; 
         padding: 10px 15px;
     }
 }

+ 3 - 9
src/packages/tss/views/home/main/index.vue

@@ -47,7 +47,7 @@
           </template>
         </CellGroup>
       </app-block>
-      <ProductList :data-list="collections" />
+      <ProductList :data-list="goodsCollectionStore.collections" />
     </PullRefresh>
   </app-view>
 </template>
@@ -58,15 +58,14 @@ import { Cell, CellGroup, PullRefresh, Search, Icon } from 'vant'
 import { getFileUrl } from '@/filters'
 import { queryImageConfigs } from '@/services/api/common'
 import { queryNewTitles } from '@/services/api/news'
-import { useNoticeStore, useFuturesStore } from '@/stores'
+import { useNoticeStore, useGoodsCollectionStore } from '@/stores'
 import ProductList from '../../product/list/components/waterfall-list/index.vue'
 
 const noticeStore = useNoticeStore()
-const futuresStore = useFuturesStore()
+const goodsCollectionStore = useGoodsCollectionStore()
 
 const refreshing = shallowRef(false) // 是否处于加载中状态
 const topBanners = shallowRef(''); // 背景图片
-const collections = shallowRef<Model.TCEGoodsCollectionRsp[]>([])
 const newsList = shallowRef<Model.NewTitlesRsp[]>([]) // 资讯列表
 
 // 下拉刷新
@@ -88,11 +87,6 @@ const onRefresh = () => {
 onMounted(() => {
   onRefresh()
 
-  // 显示商品集合信息
-  futuresStore.onDataCompleted(() => {
-    collections.value = futuresStore.collections.filter(e => e.collectionstatus === 1)
-  })
-
   // 市场资讯
   queryNewTitles({
     data: {

+ 59 - 51
src/packages/tss/views/order/position/Index.vue

@@ -2,7 +2,7 @@
 <template>
     <app-view>
         <template #header>
-            <app-navbar :title="$t('mine.myposition')" :show-back-button="showBackButton" >
+            <app-navbar :title="$t('mine.myposition')" :show-back-button="showBackButton">
                 <!-- <template #footer>
                     <Tabs>
                         <Tab title="全款订单" :name="1" />
@@ -13,71 +13,75 @@
         </template>
         <app-pull-refresh ref="pullRefreshRef" v-model:loading="loading" v-model:error="error"
             @refresh="getSBYJMyOrders">
-            <div class="g-product-list">
-                <div class="g-product-list__box" v-for="(item, index) in orderComputedList" :key="index">
-                    <div class="g-product-list__titlebar">
+            <div class="order-list">
+                <div class="order-list__box" v-for="(item, index) in orderComputedList" :key="index">
+                    <div class="order-list__titlebar">
                         <div class="left">
-                            <b>{{ $t('position.goods.orderid') }}:{{ item.tHDetailEx.tradeID }}</b>
+                            <b>{{ item.goodsCode }}</b>
+                            <span>{{ formatDate(item.tHDetailEx.tradeTime) }}</span>
                         </div>
-                        <div class="right">
-                            <b :class="!item.tHDetailEx.buyOrSell ? 'g-price-up' : 'g-price-down'">
+                        <div :class="['right', !item.tHDetailEx.buyOrSell ? 'buy' : 'sell']">
+                            <b>
                                 {{ getBuyOrSellName(item.tHDetailEx.buyOrSell) }}
                             </b>
                         </div>
                     </div>
-                    <div class="g-product-list__content">
-                        <div class="left">
-                            <Image width="100" height="100" radius="8" :src="getImageUrl(item.thumurls)" />
+                    <div class="order-list__content">
+                        <div class="top">
+                            <div class="top-left">
+                                <Image width="80" height="80" radius="8" :src="getImageUrl(item.thumurls)" />
+                            </div>
+                            <div class="top-right">
+                                <ul>
+                                    <li>
+                                        <span>{{ $t('position.goods.orderid') }}:</span>
+                                        <span>{{ item.tHDetailEx.tradeID }}</span>
+                                    </li>
+                                    <li>
+                                        <span>{{ $t('position.goods.agreeunit') }}:</span>
+                                        <span>{{ item.agreeUnit }}{{ item.goodsUnit }}</span>
+                                    </li>
+                                    <li>
+                                        <span>{{ $t('position.goods.holddetail.holderqty') }}:</span>
+                                        <span>{{ enableqty(item) + getGoodsUnitName(item.goodsUnitID) }}</span>
+                                    </li>
+                                    <li>
+                                        <span>{{ $t('position.goods.preamounts') }}:</span>
+                                        <span>{{ formatDecimal(item.tHDetailEx.payedDeposit +
+                                            item.tHDetailEx.restockDeposit,
+                                            item.decimalPlace) }}</span>
+                                    </li>
+                                    <li>
+                                        <span>{{ $t('position.goods.closepl') }}:</span>
+                                        <span :class="handlePriceColor(item.tHDetailEx.floatPL)">{{
+                                            formatDecimal(item.tHDetailEx.floatPL, item.decimalPlace) }}</span>
+                                    </li>
+                                </ul>
+                            </div>
                         </div>
-                        <div class="right">
-                            <ul>
-                                <li>
-                                    <span>{{ $t('position.goodscode') }}:</span>
-                                    <span>{{ item.goodsCode }}</span>
-                                </li>
-                                <li>
-                                    <span>{{ $t('position.goods.agreeunit') }}:</span>
-                                    <span>{{ item.agreeUnit }}{{ item.goodsUnit }}</span>
-                                </li>
-                                <li>
-                                    <span>{{ $t('position.goods.holddetail.holderqty') }}:</span>
-                                    <span>{{ enableqty(item) + getGoodsUnitName(item.goodsUnitID) }}</span>
-                                </li>
-                                <li>
-                                    <span>{{ $t('position.goods.holderprice') }}:</span>
-                                    <span>{{ formatDecimal(item.tHDetailEx.holderPrice, item.decimalPlace) }}</span>
-                                </li>
-                                <li>
-                                    <span>{{ $t('position.goods.holderamount') }}:</span>
-                                    <span>{{ formatDecimal(item.tHDetailEx.holderAmount, item.decimalPlace) }}</span>
-                                </li>
-                                <li>
-                                    <span>{{ $t('position.goods.preamounts') }}:</span>
-                                    <span>{{ formatDecimal(item.tHDetailEx.payedDeposit+item.tHDetailEx.restockDeposit, item.decimalPlace) }}</span>
-                                </li>
-                                <li>
-                                    <span>{{ $t('position.goods.closepl') }}:</span>
-                                    <span :class="handlePriceColor(item.tHDetailEx.floatPL)">{{ formatDecimal(item.tHDetailEx.floatPL, item.decimalPlace) }}</span>
-                                </li>
-                                <li>
-                                    <span>{{ $t('position.goods.holddetail.tradetime') }}:</span>
-                                    <span>{{ formatDate(item.tHDetailEx.tradeTime) }}</span>
-                                </li>
-                            </ul>
+                        <div class="bottom">
+                            <div class="bottom-left">
+                                <label>{{ $t('position.goods.holderprice') }}</label>
+                                <span>{{ formatDecimal(item.tHDetailEx.holderPrice, item.decimalPlace) }}</span>
+                            </div>
+                            <div class="bottom-right">
+                                <label>{{ $t('position.goods.holderamount') }}</label>
+                                <span>{{ formatDecimal(item.tHDetailEx.holderAmount, item.decimalPlace) }}</span>
+                            </div>
                         </div>
                     </div>
-                    <div class="g-product-list__btnbar" v-if="item.tHDetailEx.holderQty">
-                        <Button size="small" v-if="enableqty(item)" @click="onCloseSumit(item)" round>
+                    <div class="order-list__btnbar" v-if="item.tHDetailEx.holderQty">
+                        <Button type="primary" v-if="enableqty(item)" @click="onCloseSumit(item)">
                             {{ $t('operation.close') }}
                         </Button>
-                        <Button size="small" @click="showComponent('delivery', item)" round>
+                        <Button type="danger" @click="showComponent('delivery', item)">
                             {{ item.tHDetailEx.buyOrSell === 0 ? $t('operation.pickup') : $t('operation.delivery') }}
                         </Button>
                     </div>
                 </div>
             </div>
         </app-pull-refresh>
-        <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)"
+        <component ref="componentRef" v-bind="{ selectedRow, insetStyle: false }" :is="componentMap.get(componentId)"
             @closed="closeComponent" v-if="componentId" />
     </app-view>
 </template>
@@ -138,7 +142,7 @@ const enableqty = (item: Model.SBYJMyOrderRsp) => {
 const getImageUrl = (url: string) => {
     // debugger
     const [firstImg] = url ? url.split(',') : ''
-    
+
     return firstImg ? getFileUrl(firstImg) : ''
 }
 
@@ -177,4 +181,8 @@ const onCloseSumit = (item: Model.SBYJMyOrderRsp) => {
     })
 }
 
-</script>
+</script>
+
+<style lang="less" scoped>
+@import './index.less';
+</style>

+ 90 - 0
src/packages/tss/views/order/position/index.less

@@ -0,0 +1,90 @@
+.order-list {
+    padding: 10px;
+    padding-bottom: 0;
+
+    &__box {
+        &:not(:first-child) {
+            margin-top: 12px;
+        }
+
+        background-color: #fff;
+        border-radius: 10px;
+        box-shadow: 0px 2px 5px 1px rgba(52, 35, 23, 0.15);
+        overflow: hidden;
+    }
+
+    &__titlebar {
+        position: relative;
+        border-bottom: 1px solid #F2F2F2;
+        padding: 15px 12px;
+
+        .left {
+            span {
+                font-size: 12px;
+                color: #A39E99;
+                margin-left: 20px;
+            }
+        }
+
+        .right {
+            position: absolute;
+            top: 0;
+            right: 0;
+            font-size: 12px;
+            color: #fff;
+            padding: 6px 18px;
+
+            &.buy {
+                background-color: #BA934A;
+            }
+
+            &.sell {
+                background-color: #305C3E;
+            }
+        }
+    }
+
+    &__content {
+        color: #5D5D5D;
+        padding: 12px;
+
+        .top {
+            display: flex;
+
+            &-left {
+                margin-right: 12px;
+            }
+
+            &-right {
+                flex: 1;
+                font-size: 12px;
+                line-height: 1.6;
+            }
+        }
+
+        .bottom {
+            display: flex;
+            justify-content: space-between;
+            margin-top: 12px;
+
+            label {
+                font-size: 12px;
+                margin-right: 5px;
+            }
+
+            span {
+                font-size: 22px;
+                color: #C19239;
+            }
+        }
+    }
+
+    &__btnbar {
+        display: flex;
+
+        .van-button {
+            flex: 1;
+            border-radius: 0;
+        }
+    }
+}

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

@@ -7,11 +7,10 @@
                     <Image width="100%" height="160px" v-else />
                 </div>
                 <div class="goods-info">
-                    <div class="goods-info__title">{{ goodsName(item) }}</div>
+                    <div class="goods-info__title">{{ item.collectionname }}</div>
                     <div class="goods-info__price">
                         <span class="integer">{{ price(item) }}</span>
                     </div>
-                    <div>{{ collectionDesc(item) }}</div>
                 </div>
             </div>
         </template>
@@ -25,7 +24,7 @@ import { formatDecimal, getFileUrl, handleNumberValue } from '@/filters'
 import { useNavigation } from '@mobile/router/navigation'
 import { BuyOrSell, BuildType, getCurrencyName } from '@/constants/order'
 import Waterfall from '@mobile/components/base/waterfall/index.vue'
-import { i18n, useFuturesStore } from '@/stores'
+import { useFuturesStore } from '@/stores'
 
 defineProps({
     dataList: {
@@ -37,41 +36,13 @@ defineProps({
 const { router } = useNavigation()
 const futureStore = useFuturesStore()
 
-// 商品名称
-const goodsName = (item: Model.TCEGoodsCollectionRsp) => {
-    switch (i18n.global.locale) {
-        case 'zh-CN':
-            return item.collectionname
-        case 'en-US':
-        return item.collectionnameen
-        case 'zh-TW':
-        return item.collectionnametw
-        default:
-        return item.collectiondescth
-    }
-}
-
 // 商品价格
 const price = (item: Model.TCEGoodsCollectionRsp) => {
     const { ask = 0, decimalplace = 2, currencyid = 1 } = futureStore.getGoodsQuote(item.defaultgoodsid).value ?? {}
     return getCurrencyName(currencyid) + handleNumberValue(formatDecimal(ask, decimalplace))
 }
 
-// 商品描述信息
-const collectionDesc = (item: Model.TCEGoodsCollectionRsp) => {
-    switch (i18n.global.locale) {
-        case 'zh-CN':
-            return item.collectiondesc
-        case 'en-US':
-        return item.collectiondescen
-        case 'zh-TW':
-        return item.collectiondesctw
-        default:
-        return item.collectiondescth
-    }
-}
-
-const rowClick = (row: Model. TCEGoodsCollectionRsp) => {
+const rowClick = (row: Model.TCEGoodsCollectionRsp) => {
     router.push({
         name: 'pricing-trade',
         query: {

+ 1 - 0
src/stores/index.ts

@@ -6,6 +6,7 @@ export { useUserStore } from './modules/user'
 export { useMenuStore } from './modules/menu'
 export { useAccountStore } from './modules/account'
 export { useFuturesStore } from './modules/futures'
+export { useGoodsCollectionStore } from './modules/goodscollection'
 export { useDeliveryRelationStore } from './modules/delivery'
 export { useErrorInfoStore } from './modules/errorInfo'
 export { useNoticeStore } from './modules/notice'

+ 1 - 7
src/stores/modules/futures.ts

@@ -4,7 +4,7 @@ import { timerTask } from '@/utils/timer'
 import { handlePriceColor } from '@/filters'
 import { queryMemberGoodsLimitConfig } from '@/services/api/common'
 import { getTodayAccountConfigInfo } from '@/services/api/account'
-import { queryErmcpGoods, queryQuoteDay, getTCEGoodsCollections } from '@/services/api/goods'
+import { queryErmcpGoods, queryQuoteDay } from '@/services/api/goods'
 import { wordArrayToUint8Array } from '@/services/websocket/package/crypto'
 import { decodeProto } from '@/services/websocket/package/package50/proto'
 import { defineStore } from '../store'
@@ -33,8 +33,6 @@ export const useFuturesStore = defineStore(() => {
         goodsList: <(Model.GoodsRsp & Partial<Model.MemberGoodsLimitConfigRsp>)[]>[], // 商品列表
         quotationList: <Model.GoodsQuote[]>[], // 行情列表
         selectedGoodsId: <number | undefined>undefined, // 当前选中的商品ID
-        buyOrSell: <number>0,
-        collections: <Model.TCEGoodsCollectionRsp[]>[], // 商品集合信息
     })
 
     // 指定市场ID的商品列表
@@ -81,7 +79,6 @@ export const useFuturesStore = defineStore(() => {
         state.loading = true
         state.goodsList = []
         state.quotationList = []
-        state.collections = []
         timerTask.clearTimeout('quoteDay')
 
         const accountStore = useAccountStore()
@@ -94,7 +91,6 @@ export const useFuturesStore = defineStore(() => {
             }
         })
         const { data: goodsList } = await queryErmcpGoods()
-        const { data: collections } = await getTCEGoodsCollections()
 
         for (let i = 0; i < goodsList.length; i++) {
             const item = goodsList[i]
@@ -146,8 +142,6 @@ export const useFuturesStore = defineStore(() => {
             })
         }
 
-        state.collections = collections
-
         // 待优化
         getQuoteDay().then(() => {
             dataCompletedCallback.forEach((callback) => callback())

+ 50 - 0
src/stores/modules/goodscollection.ts

@@ -0,0 +1,50 @@
+import { reactive, toRefs, computed } from 'vue'
+import { getTCEGoodsCollections } from '@/services/api/goods'
+import { Language } from '@/constants/language'
+import { i18n } from './language'
+import { defineStore } from '../store'
+
+export const useGoodsCollectionStore = defineStore(() => {
+    const state = reactive({
+        loading: false,
+        goodsCollections: <Model.TCEGoodsCollectionRsp[]>[], // 商品集合信息
+    })
+
+    // 本地化商品集合
+    const collections = computed<Model.TCEGoodsCollectionRsp[]>(() => state.goodsCollections.map((e) => {
+        const localizedProperties: { [K in Language]: { [P in 'collectionname' | 'collectiondesc']: string } } = {
+            'zh-CN': { collectionname: e.collectionname, collectiondesc: e.collectiondesc, },
+            'en-US': { collectionname: e.collectionnameen, collectiondesc: e.collectiondescen, },
+            'th': { collectionname: e.collectionnameth, collectiondesc: e.collectiondescth, },
+            'zh-TW': { collectionname: e.collectionnametw, collectiondesc: e.collectiondesctw, },
+        }
+
+        const localizedValues = localizedProperties[i18n.global.locale] // 本地化语言
+
+        return {
+            ...e,
+            ...localizedValues
+        }
+    }))
+
+    // 根据商品 ID 查找对应的商品信息
+    const getGoodsById = (id: number) => collections.value.find((e) => e.collectionid === id)
+
+    // 获取商品集合列表
+    const fetchGoodsCollections = async () => {
+        try {
+            state.loading = true
+            const res = await getTCEGoodsCollections()
+            state.goodsCollections = res.data.filter((e) => e.collectionstatus === 1)
+        } finally {
+            state.loading = false
+        }
+    }
+
+    return {
+        ...toRefs(state),
+        collections,
+        fetchGoodsCollections,
+        getGoodsById
+    }
+})