li.shaoyi 2 lat temu
rodzic
commit
4c157a66c6

+ 29 - 0
src/filters/index.ts

@@ -291,4 +291,33 @@ export function versionToNumber(value: number | string) {
  */
 export function tmMatchAccountID(val: string | number) {
     return val.toString().replace(/^(.{3}).*(.{2})$/, "$1****$2");
+}
+
+/**
+ * 数组按照特定顺序排序
+ * @param arr 
+ * @param prop 
+ * @param sortValue 
+ * @returns 
+ */
+export function sortBy<T extends object, K extends keyof T>(arr: Array<T>, sortValue: T[K][], prop: K) {
+    return arr.sort((a, b) => {
+        const aIndex = sortValue.indexOf(a[prop])
+        const bIndex = sortValue.indexOf(b[prop])
+
+        // 如果a和b都在sortBy中,按在sortBy中的索引排序
+        if (aIndex > -1 && bIndex > -1) {
+            return aIndex - bIndex
+        }
+        // 如果a在sortBy中但b不在,a应该在b之前
+        if (aIndex > -1) {
+            return -1
+        }
+        // 如果b在sortBy中但a不在,a应该在b之后
+        if (bIndex > -1) {
+            return 1
+        }
+        // 如果a和b都不在sortBy中,它们的位置不应该改变
+        return 0
+    })
 }

+ 6 - 3
src/packages/pc/views/footer/inout/out/add/index.vue

@@ -89,14 +89,17 @@ const formRules: FormRules = {
     }],
     FreezeDays: [{
         message: '请输入冻结天数',
-        validator: () => !!formData.FreezeDays
+        type: 'number',
+        required: true
     }]
 }
 
-const { loading: searchLoading, dataList: userList, run: searchUser } = useRequest(getUserInfo, {
+const { loading: searchLoading, dataList, run: searchUser } = useRequest(getUserInfo, {
     manual: true
 })
 
+const userList = computed(() => dataList.value.filter((e) => e.userid !== loginStore.userId))
+
 // 远程搜索转入客户
 const remoteMethod = (query: string) => {
     if (query) {
@@ -125,7 +128,7 @@ const onCancelSumit = () => {
                     HolderTransferDetails: [formData]
                 }
             }).then(() => {
-                ElMessage.success('提交成功')
+                ElMessage.success('提交成功,请稍后查询结果')
                 onCancel(true)
             }).catch((err) => {
                 ElMessage.error('提交失败:' + err)

+ 3 - 3
src/packages/sbyj/views/boot/Index.vue

@@ -60,14 +60,14 @@ const skip = (promise: Promise<void>) => {
   promise.then(() => {
     localStorage.setItem('muchinfo_app_showguide', 'false')
     const redirect = route.query.redirect
-    if (redirect) {
+    if (redirect && redirect !== '/') {
       router.replace(redirect.toString())
     } else {
-      router.replace({ name: 'home-index' })
+      router.replace({ name: 'home-market' })
     }
   }).catch((err) => {
     if (service.isReady) {
-      router.replace({ name: 'home-index' })
+      router.replace({ name: 'home-market' })
     } else {
       tryInit(err)
     }

+ 3 - 3
src/packages/sbyj/views/delivery/components/completed/list/index.vue

@@ -15,15 +15,15 @@
                 <div class="g-order-list__content">
                     <ul>
                         <li>
-                            <span>交重量</span>
+                            <span>交重量</span>
                             <span>{{ item.deliveryqty }}{{ getGoodsUnitName(item.goodunitid) }}</span>
                         </li>
                         <li>
-                            <span>升贴水</span>
+                            <span>补差价</span>
                             <span>{{ item.deliverypremium }}</span>
                         </li>
                         <li>
-                            <span>交价格</span>
+                            <span>交价格</span>
                             <span>{{ item.deliveryprice }}</span>
                         </li>
                         <li>

+ 3 - 3
src/packages/sbyj/views/delivery/components/pending/list/index.vue

@@ -15,15 +15,15 @@
                 <div class="g-order-list__content">
                     <ul>
                         <li>
-                            <span>交重量</span>
+                            <span>交重量</span>
                             <span>{{ item.deliveryqty }}{{ getGoodsUnitName(item.goodunitid) }}</span>
                         </li>
                         <li>
-                            <span>升贴水</span>
+                            <span>补差价</span>
                             <span>{{ item.deliverypremium }}</span>
                         </li>
                         <li>
-                            <span>交价格</span>
+                            <span>交价格</span>
                             <span>{{ item.deliveryprice }}</span>
                         </li>
                         <li>

+ 3 - 3
src/packages/sbyj/views/delivery/components/processing/components/pay/index.vue

@@ -3,13 +3,13 @@
     <app-modal direction="right" height="100%" v-model:show="showModal" :refresh="refresh">
         <app-view>
             <template #header>
-                <app-navbar title="交付款" @back="closed" />
+                <app-navbar title="交付款" @back="closed" />
             </template>
             <Form ref="formRef" class="g-form__container" @submit="onSubmit">
                 <CellGroup inset>
-                    <Cell title="交单号" :value="selectedRow.deliveryorderid" />
+                    <Cell title="交单号" :value="selectedRow.deliveryorderid" />
                     <Cell title="商品代码/名称" :value="selectedRow.goodscode + '/' + selectedRow.goodsname" />
-                    <Cell title="交重量" :value="selectedRow.deliveryqty + getGoodsUnitName(selectedRow.goodunitid)" />
+                    <Cell title="交重量" :value="selectedRow.deliveryqty + getGoodsUnitName(selectedRow.goodunitid)" />
                     <Cell title="总货款" :value="formatDecimal(selectedRow.deliverytotalamount)" />
                     <Cell title="已付货款" :value="formatDecimal(selectedRow.payedamount)" />
                     <Cell title="剩余货款" :value="formatDecimal(amount)" />

+ 4 - 4
src/packages/sbyj/views/delivery/components/processing/list/index.vue

@@ -19,15 +19,15 @@
                 <div class="g-order-list__content">
                     <ul>
                         <li>
-                            <span>交重量</span>
+                            <span>交重量</span>
                             <span>{{ item.deliveryqty }}{{ getGoodsUnitName(item.goodunitid) }}</span>
                         </li>
                         <li>
-                            <span>升贴水</span>
+                            <span>补差价</span>
                             <span>{{ item.deliverypremium }}</span>
                         </li>
                         <li>
-                            <span>交价格</span>
+                            <span>交价格</span>
                             <span>{{ item.deliveryprice }}</span>
                         </li>
                         <li>
@@ -115,7 +115,7 @@ const showComponent = (componentName: string, row: Model.MyTradeGoodsDeliveryOff
 // 交收确认
 const deliveryCommit = (item: Model.MyTradeGoodsDeliveryOfflineRsp) => {
     dialog({
-        message: '是否确认交?',
+        message: '是否确认交?',
         showCancelButton: true,
     }).then(() => {
         formData.DeliveryOrderID = handleRequestBigNumber(item.deliveryorderid)

+ 5 - 5
src/packages/sbyj/views/delivery/detail/index.vue

@@ -3,15 +3,15 @@
     <app-modal direction="right" height="100%" v-model:show="showModal" :refresh="refresh">
         <app-view class="g-form">
             <template #header>
-                <app-navbar title="交详情" @back="closed" />
+                <app-navbar title="交详情" @back="closed" />
             </template>
             <div class="g-form__container">
                 <CellGroup inset>
-                    <Cell title="交单号" :value="selectedRow.deliveryorderid" />
+                    <Cell title="交单号" :value="selectedRow.deliveryorderid" />
                     <Cell title="商品代码/名称" :value="selectedRow.goodscode + '/' + selectedRow.goodsname" />
-                    <Cell title="交重量" :value="selectedRow.deliveryqty + getGoodsUnitName(selectedRow.goodunitid)" />
-                    <Cell title="交价格" :value="selectedRow.deliveryprice" />
-                    <Cell title="升贴水" :value="selectedRow.deliverypremium" />
+                    <Cell title="交重量" :value="selectedRow.deliveryqty + getGoodsUnitName(selectedRow.goodunitid)" />
+                    <Cell title="交价格" :value="selectedRow.deliveryprice" />
+                    <Cell title="补差价" :value="selectedRow.deliverypremium" />
                     <Cell title="总货款" :value="selectedRow.deliverytotalamount" />
                     <Cell title="已付货款" :value="selectedRow.payedamount" />
                     <Cell title="冻结货款" :value="selectedRow.freezeamount" />

+ 3 - 3
src/packages/sbyj/views/delivery/detail/order-list/index.vue

@@ -26,17 +26,17 @@
                                     </span>
                                 </li>
                                 <li>
-                                    <span>交重量:</span>
+                                    <span>交重量:</span>
                                     <span>
                                         {{ item.deliveryqty + getGoodsUnitName(selectedRow.goodunitid) }}
                                     </span>
                                 </li>
                                 <li>
-                                    <span>交价格:</span>
+                                    <span>交价格:</span>
                                     <span>{{ formatDecimal(item.deliveryprice) }}</span>
                                 </li>
                                 <li>
-                                    <span>交货款:</span>
+                                    <span>交货款:</span>
                                     <span>{{ item.deliveryamount }}</span>
                                 </li>
                             </ul>

+ 1 - 1
src/packages/sbyj/views/delivery/list/index.vue

@@ -1,7 +1,7 @@
 <template>
     <app-view>
         <template #header>
-            <app-navbar title="我的交" />
+            <app-navbar title="我的交" />
         </template>
         <Tabs class="van-tabs--list" v-model:active="active" :swipe-threshold="4">
             <Tab title="待审核">

+ 1 - 1
src/packages/sbyj/views/home/main/index.vue

@@ -19,7 +19,7 @@
             <Iconfont label-direction="bottom" icon="g-icon-order--line">订单</Iconfont>
           </li>
           <li @click="routerTo('delivery-list')">
-            <Iconfont label-direction="bottom" icon="g-icon-delivery--line">交</Iconfont>
+            <Iconfont label-direction="bottom" icon="g-icon-delivery--line">交</Iconfont>
           </li>
         </ul>
       </app-block>

+ 6 - 6
src/packages/sbyj/views/market/detail/index.vue

@@ -97,8 +97,8 @@
                         <Button size="small" @click="showComponent('supplement', item)" round
                             v-if="item.tHDetailEx.holderQty">补充</Button>
                         <template v-if="enableqty(item)">
-                            <Button size="small" @click="showComponent('delivery', item)" round>交</Button>
-                            <Button size="small" @click="showComponent('closeholder', item)" round>转让</Button>
+                            <Button size="small" @click="showComponent('delivery', item)" round>交</Button>
+                            <Button size="small" @click="showComponent('closeholder', item)" round>终止</Button>
                         </template>
                         <Button size="small" @click="showComponent('detail', item)" round>详情</Button>
                     </div>
@@ -160,10 +160,10 @@ const enableqty = (item: Model.SBYJMyOrderRsp) => {
 // 数量步长列表
 const qtyStepList = computed(() => {
     return [
-        agreeunit.value * 1,
-        agreeunit.value * 5,
-        agreeunit.value * 10,
-        agreeunit.value * 50,
+        agreeunit.value * 100,
+        agreeunit.value * 500,
+        agreeunit.value * 1000,
+        agreeunit.value * 5000,
     ]
 })
 

+ 44 - 0
src/packages/sbyj/views/market/list/index.less

@@ -12,4 +12,48 @@
         font-size: .26rem;
         padding: .24rem;
     }
+
+    &-table {
+        width: 100%;
+        background-color: #fff;
+
+        th {
+            color: #999;
+            font-weight: normal;
+            text-align: left;
+            padding: .16rem .1rem;
+
+            &:first-child {
+                padding-left: .24rem;
+            }
+
+            &:last-child {
+                padding-right: .24rem;
+            }
+
+            &.title {
+                color: #999;
+                background-color: #f6f6f6;
+                padding: .24rem;
+            }
+        }
+
+        td {
+            font-size: .32rem;
+            border-top: 1px solid #eee;
+            padding: .12rem;
+
+            &:first-child {
+                padding-left: .24rem;
+            }
+
+            &:last-child {
+                padding-right: .24rem;
+            }
+
+            span {
+                display: block;
+            }
+        }
+    }
 }

+ 57 - 42
src/packages/sbyj/views/market/list/index.vue

@@ -1,39 +1,53 @@
 <template>
     <app-view class="market">
         <template #header>
-            <app-navbar class="market-header" title="行情" :show-back-button="false" />
+            <app-navbar class="market-header" :show-back-button="false" />
         </template>
-        <app-list :columns="columns" :data-list="touristTradeGoodsList" @row-click="rowClick">
-            <!-- 回购 -->
-            <template #ask="{ row }">
-                <span :class="row.bidColor">{{ handleNumberValue(formatDecimal(row.bid, row.decimalplace)) }}</span>
-            </template>
-            <!-- 销售 -->
-            <template #bid="{ row }">
-                <span :class="row.askColor">{{ handleNumberValue(formatDecimal(row.ask, row.decimalplace)) }}</span>
-            </template>
-            <!-- 高/低 -->
-            <template #hl="{ row }">
-                <span :class="row.highestColor">{{ handleNumberValue(formatDecimal(row.highest, row.decimalplace)) }}</span>
-                <span :class="row.lowestColor">{{ handleNumberValue(formatDecimal(row.lowest, row.decimalplace)) }}</span>
-            </template>
-        </app-list>
-        <div class="market-title" v-if="touristRefGoodsList.length">参考商品</div>
-        <app-list :show-header="false" :columns="columns" :data-list="touristRefGoodsList">
-            <!-- 回购 -->
-            <template #ask="{ row }">
-                <span :class="row.bidColor">{{ handleNumberValue(formatDecimal(row.bid, row.decimalplace)) }}</span>
-            </template>
-            <!-- 销售 -->
-            <template #bid="{ row }">
-                <span :class="row.askColor">{{ handleNumberValue(formatDecimal(row.ask, row.decimalplace)) }}</span>
-            </template>
-            <!-- 高/低 -->
-            <template #hl="{ row }">
-                <span :class="row.highestColor">{{ handleNumberValue(formatDecimal(row.highest, row.decimalplace)) }}</span>
-                <span :class="row.lowestColor">{{ handleNumberValue(formatDecimal(row.lowest, row.decimalplace)) }}</span>
-            </template>
-        </app-list>
+        <table class="market-table" cellspacing="0" cellpadding="0">
+            <thead>
+                <tr>
+                    <th>商品</th>
+                    <th>回购</th>
+                    <th>销售</th>
+                    <th>高/低</th>
+                </tr>
+            </thead>
+            <tbody>
+                <tr v-for="(item, index) in touristTradeGoodsList" :key="index" @click="rowClick(item)">
+                    <td>{{ item.goodsname }}</td>
+                    <td :class="item.bidColor">{{ handleNumberValue(formatDecimal(item.bid, item.decimalplace)) }}</td>
+                    <td :class="item.askColor">{{ handleNumberValue(formatDecimal(item.ask, item.decimalplace)) }}</td>
+                    <td>
+                        <span :class="item.highestColor">
+                            {{ handleNumberValue(formatDecimal(item.highest, item.decimalplace)) }}
+                        </span>
+                        <span :class="item.lowestColor">
+                            {{ handleNumberValue(formatDecimal(item.lowest, item.decimalplace)) }}
+                        </span>
+                    </td>
+                </tr>
+            </tbody>
+            <thead>
+                <tr>
+                    <th class="title" colspan="4">参考商品</th>
+                </tr>
+            </thead>
+            <tbody>
+                <tr v-for="(item, index) in touristRefGoodsList" :key="index">
+                    <td>{{ item.goodsname }}</td>
+                    <td :class="item.bidColor">{{ handleNumberValue(formatDecimal(item.bid, item.decimalplace)) }}</td>
+                    <td :class="item.askColor">{{ handleNumberValue(formatDecimal(item.ask, item.decimalplace)) }}</td>
+                    <td>
+                        <span :class="item.highestColor">
+                            {{ handleNumberValue(formatDecimal(item.highest, item.decimalplace)) }}
+                        </span>
+                        <span :class="item.lowestColor">
+                            {{ handleNumberValue(formatDecimal(item.lowest, item.decimalplace)) }}
+                        </span>
+                    </td>
+                </tr>
+            </tbody>
+        </table>
     </app-view>
 </template>
 
@@ -42,7 +56,6 @@ import { computed, onActivated, onDeactivated } from 'vue'
 import { handleNumberValue, formatDecimal } from '@/filters'
 import { useNavigation } from '@mobile/router/navigation'
 import quoteSocket from '@/services/websocket/quote'
-import AppList from '@mobile/components/base/list/index.vue'
 import { useRequest } from '@/hooks/request'
 import { queryTouristGoods, queryTouristQuoteDay } from '@/services/api/goods'
 import { useFuturesStore } from '@/stores'
@@ -74,16 +87,18 @@ const { run: getTouristQuoteDay } = useRequest(queryTouristQuoteDay, {
 })
 
 // 构建游客交易商品
-const touristTradeGoodsList = computed(() => futuresStore.getGoodsListByTradeMode(52))
-// 构建游客参考行情商品
-const touristRefGoodsList = computed(() => futuresStore.getGoodsListByTradeMode(99))
+const touristTradeGoodsList = computed(() => {
+    const list = futuresStore.getGoodsListByTradeMode(52)
+    // qtydecimalplace 字段暂用作排序
+    return list.sort((a, b) => a.qtydecimalplace - b.qtydecimalplace)
+})
 
-const columns: Model.TableColumn[] = [
-    { prop: 'goodsname', label: '商品' },
-    { prop: 'ask', label: '回购' },
-    { prop: 'bid', label: '销售' },
-    { prop: 'hl', label: '高/低' },
-]
+// 构建游客参考行情商品
+const touristRefGoodsList = computed(() => {
+    const list = futuresStore.getGoodsListByTradeMode(99)
+    // qtydecimalplace 字段暂用作排序
+    return list.sort((a, b) => a.qtydecimalplace - b.qtydecimalplace)
+})
 
 const rowClick = (row: Model.GoodsQuote) => {
     router.push({

+ 1 - 1
src/packages/sbyj/views/mine/index.vue

@@ -51,7 +51,7 @@
                     <Iconfont label-direction="bottom" icon="g-icon-order--line">订单</Iconfont>
                 </li>
                 <li @click="routerTo('delivery-list')">
-                    <Iconfont label-direction="bottom" icon="g-icon-delivery--line">交</Iconfont>
+                    <Iconfont label-direction="bottom" icon="g-icon-delivery--line">交</Iconfont>
                 </li>
             </ul>
         </app-block>

+ 25 - 2
src/packages/sbyj/views/news/list/index.vue

@@ -3,12 +3,35 @@
     <template #header>
       <app-navbar title="市场资讯" :show-back-button="false" />
     </template>
-    <iframe class="news-iframe" src="https://www.jin10.com/example/jin10.com.html" security="restricted"
-      sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts" />
+    <Empty v-if="!isReady">
+      <template #description>
+        <Loading />
+      </template>
+    </Empty>
+    <iframe ref="iframeRef" class="news-iframe" src="https://www.jin10.com/example/jin10.com.html" security="restricted"
+      sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts" v-show="isReady" />
   </app-view>
 </template>
   
 <script lang="ts" setup>
+import { shallowRef, onActivated, onDeactivated } from 'vue'
+import { Empty, Loading } from 'vant'
+
+const iframeRef = shallowRef<HTMLIFrameElement>()
+const isReady = shallowRef(false)
+
+onActivated(() => {
+  const el = iframeRef.value
+  if (el) {
+    el.onload = () => {
+      isReady.value = true
+    }
+  }
+})
+
+onDeactivated(() => {
+  isReady.value = false
+})
 </script>
   
 <style lang="less">

+ 1 - 1
src/packages/sbyj/views/order/detail/index.vue

@@ -28,7 +28,7 @@
                     </Cell>
                     <Cell title="冻结重量"
                         :value="(detail.tHDetailEx.freezeQty * detail.agreeUnit) + getGoodsUnitName(detail.goodsUnitID)" />
-                    <Cell title="交重量"
+                    <Cell title="交重量"
                         :value="(detail.tHDetailEx.deliveryQty * detail.agreeUnit) + getGoodsUnitName(detail.goodsUnitID)" />
                     <Cell title="订单时间" :value="detail.tHDetailEx.tradeTime" />
                 </CellGroup>

+ 7 - 7
src/packages/sbyj/views/order/list/components/close-holder/index.vue

@@ -3,7 +3,7 @@
     <app-modal direction="right" height="100%" v-model:show="showModal" :refresh="refresh">
         <app-view class="g-form">
             <template #header>
-                <app-navbar title="订单转让" @back="closed" />
+                <app-navbar title="订单终止" @back="closed" />
             </template>
             <div class="form-price" v-if="quote">
                 <dl>
@@ -18,7 +18,7 @@
             <Form ref="formRef" class="g-form__container" @submit="onSubmit">
                 <CellGroup inset>
                     <Cell title="可用重量" :value="enableqty + getGoodsUnitName(selectedRow.goodsUnitID)" />
-                    <Field name="OrderQty" label="转让重量" :rules="formRules.OrderQty">
+                    <Field name="OrderQty" label="终止重量" :rules="formRules.OrderQty">
                         <template #input>
                             <div class="g-qty-group">
                                 <div class="g-qty-group__stepper">
@@ -78,10 +78,10 @@ const agreeunit = computed(() => props.selectedRow.agreeUnit ?? 0)
 // 数量步长列表
 const qtyStepList = computed(() => {
     return [
-        agreeunit.value * 1,
-        agreeunit.value * 5,
-        agreeunit.value * 10,
-        agreeunit.value * 50,
+        agreeunit.value * 100,
+        agreeunit.value * 500,
+        agreeunit.value * 1000,
+        agreeunit.value * 5000,
     ]
 })
 
@@ -101,7 +101,7 @@ const formRules: { [key in keyof Proto.OrderReq]?: FieldRule[] } = {
                 }
                 return orderQty.value % agreeunit.value === 0 ? true : '重量只能是' + agreeunit.value + '的整数倍'
             }
-            return '请输入转让重量'
+            return '请输入终止重量'
         }
     }],
 }

+ 7 - 7
src/packages/sbyj/views/order/list/components/market-order-delivery/index.vue

@@ -3,12 +3,12 @@
     <app-modal direction="right" height="100%" v-model:show="showModal" :refresh="refresh">
         <app-view class="g-form">
             <template #header>
-                <app-navbar title="交申请" @back="closed" />
+                <app-navbar title="交申请" @back="closed" />
             </template>
             <Form ref="formRef" class="g-form__container" @submit="onSubmit">
                 <CellGroup inset>
                     <Cell title="可用重量" :value="enableqty + getGoodsUnitName(selectedRow.goodsUnitID)" />
-                    <Field name="OrderQty" label="交重量" :rules="formRules.OrderQty">
+                    <Field name="OrderQty" label="交重量" :rules="formRules.OrderQty">
                         <template #input>
                             <div class="g-qty-group">
                                 <div class="g-qty-group__stepper">
@@ -61,10 +61,10 @@ const agreeunit = computed(() => props.selectedRow.agreeUnit ?? 0)
 // 数量步长列表
 const qtyStepList = computed(() => {
     return [
-        agreeunit.value * 1,
-        agreeunit.value * 5,
-        agreeunit.value * 10,
-        agreeunit.value * 50,
+        agreeunit.value * 100,
+        agreeunit.value * 500,
+        agreeunit.value * 1000,
+        agreeunit.value * 5000,
     ]
 })
 
@@ -84,7 +84,7 @@ const formRules: { OrderQty?: FieldRule[] } = {
                 }
                 return orderQty.value % agreeunit.value === 0 ? true : '重量只能是' + agreeunit.value + '的整数倍'
             }
-            return '请输入交重量'
+            return '请输入交重量'
         }
     }],
 }

+ 2 - 2
src/packages/sbyj/views/order/list/index.vue

@@ -71,8 +71,8 @@
                         <Button size="small" @click="showComponent('supplement', item)" round
                             v-if="item.tHDetailEx.holderQty">补充</Button>
                         <template v-if="enableqty(item)">
-                            <Button size="small" @click="showComponent('delivery', item)" round>交</Button>
-                            <Button size="small" @click="showComponent('closeholder', item)" round>转让</Button>
+                            <Button size="small" @click="showComponent('delivery', item)" round>交</Button>
+                            <Button size="small" @click="showComponent('closeholder', item)" round>终止</Button>
                         </template>
                         <Button size="small" @click="showComponent('detail', item)" round>详情</Button>
                     </div>

+ 3 - 25
src/packages/tjmd/views/home/main/Index.vue

@@ -32,27 +32,17 @@
         </Swipe>
         <component :is="LineChart" :goodscode="selectedGoods.refgoodscode" v-if="showChart && selectedGoods" />
       </app-block>
-      <app-block class="home-main__news">
-        <CellGroup class="article">
-          <Cell class="home-main__titlebar" title="市场资讯" value="更多" icon="fire" :to="{ name: 'news-list' }" is-link />
-          <template v-for="(item, index) in newsList" :key="index">
-            <Cell class="article-item" :title="item.title" :value="formatDate(item.publishdate, 'MM/DD')"
-              :to="{ name: 'news-detail', query: { id: item.id } }" />
-          </template>
-        </CellGroup>
-      </app-block>
     </PullRefresh>
   </app-view>
 </template>
 
 <script lang="ts" setup>
 import { shallowRef, defineAsyncComponent, computed, nextTick, watch } from 'vue'
-import { Cell, CellGroup, PullRefresh, Swipe, SwipeItem } from 'vant'
-import { formatDate, parsePercent, handleNumberValue, formatDecimal } from '@/filters'
+import { Cell, PullRefresh, Swipe, SwipeItem } from 'vant'
+import { parsePercent, handleNumberValue, formatDecimal } from '@/filters'
 import { queryQuoteGoodsList } from '@/services/api/swap'
 import { queryImageConfigs } from '@/services/api/common'
-import { queryNewTitles } from "@/services/api/news"
-import { useGlobalStore,  useUserStore, useFuturesStore } from '@/stores'
+import { useGlobalStore, useUserStore, useFuturesStore } from '@/stores'
 import quoteSocket from '@/services/websocket/quote'
 import Banner from '@mobile/components/base/banner/index.vue'
 
@@ -64,7 +54,6 @@ const userStore = useUserStore()
 const futuresStore = useFuturesStore()
 const refreshing = shallowRef(false) // 是否处于加载中状态
 const topBanners = shallowRef<string[]>([]) // 轮播图列表
-const newsList = shallowRef<Model.NewTitlesRsp[]>([]) // 资讯列表
 const goodsList = shallowRef<Model.QuoteGoodsListRsp[]>([]) // 掉期商品列表
 const selectedGoods = shallowRef<Model.QuoteGoodsListRsp>() // 选中的掉期商品
 const showChart = shallowRef(false)
@@ -113,17 +102,6 @@ const onRefresh = () => {
       topBanners.value = res.data.map((e) => e.imagepath)
     })
   }
-  // 市场资讯
-  queryNewTitles({
-    data: {
-      page: 1,
-      pagesize: 10,
-    }
-  }).then((res) => {
-    newsList.value = res.data
-  }).finally(() => {
-    refreshing.value = false
-  })
 }
 
 onRefresh()

+ 0 - 1
src/services/http/index.ts

@@ -135,7 +135,6 @@ export default new (class {
         const baseUrl = service.getConfig('goCommonSearchUrl')
         config.url = baseUrl + config.url
         const res = await this.request<CommonResult<T>>(config, errMsg)
-        console.log(useLoginStore().token)
         switch (res.code) {
             case ResultCode.InvalidToken: {
                 return Promise.reject('令牌无效')

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

@@ -150,7 +150,7 @@ export const useFuturesStore = defineStore(() => {
                 return last
             } else if (presettle != 0.0) {
                 return presettle
-            } else if ( preclose != 0.0) {
+            } else if (preclose != 0.0) {
                 return preclose
             } else {
                 return 0.0
@@ -255,6 +255,7 @@ export const useFuturesStore = defineStore(() => {
             holdvolume: quote.holdvolume ?? 0,
             marketmarginalgorithm: 0,
             marketmarginvalue: 0,
+            qtydecimalplace: 0,
             rise: 0,
             change: 0,
             amplitude: 0,
@@ -303,6 +304,7 @@ export const useFuturesStore = defineStore(() => {
                     quotegear: item.quotegear,
                     marketmarginalgorithm: item.marketmarginalgorithm,
                     marketmarginvalue: item.marketmarginvalue,
+                    qtydecimalplace: item.qtydecimalplace,
                 } = goods)
 
                 item.iscannotbuy = goods.iscannotbuy ?? 0

+ 1 - 0
src/types/model/market.d.ts

@@ -133,5 +133,6 @@ declare namespace Model {
         marketmarginvalue: number; // 即市保证金值
         iscannotbuy: number; // 是否不能挂买 0:否 1:是
         iscannotsell: number; // 是否不能挂卖 0:否 1:是
+        qtydecimalplace: number;//成交量小数位
     }
 }