Преглед изворни кода

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP20_WEB_GLOBAL

li.shaoyi пре 2 година
родитељ
комит
2e1a71e7fd

+ 10 - 14
src/packages/mobile/views/swap/detail/Index.vue

@@ -10,16 +10,18 @@
             </app-navbar>
         </template>
         <Tabs v-model:active="tabIndex">
-            <Tab title="卖大厅">
-            </Tab>
-            <Tab title="买大厅">
-            </Tab>
+            <Tab title="卖大厅" />
+            <Tab title="买大厅" />
         </Tabs>
         <div class="trade">
                 <div class="trade-section sell" v-if="dataList.length">
                     <app-list :columns="columns" :data-list="dataList">
+                        <template #username="{ row }">
+                            <span >{{ row.userid }}</span>
+                            <span >{{ row.username }}</span>
+                        </template>
                         <template #operate="{ row }">
-                            <Button size="small" round @click="onDelisting(row, tabIndex)">摘牌</Button>
+                            <Button size="small" type="primary" round @click="onDelisting(row, tabIndex)">摘牌</Button>
                         </template>
                     </app-list>
                 </div>
@@ -30,7 +32,7 @@
 </template>
 
 <script lang="ts" setup>
-import { shallowRef, defineAsyncComponent, PropType } from 'vue'
+import { shallowRef, defineAsyncComponent } from 'vue'
 import { Tab, Tabs, Button } from 'vant'
 import { useRequest } from '@/hooks/request'
 import { useNavigation } from '@/hooks/navigation'
@@ -51,13 +53,6 @@ const selectedRow = shallowRef<Model.TjmdTradeOrderDetailRsp>()
 const error = shallowRef(false)
 const dataList = shallowRef<Model.TjmdTradeOrderDetailRsp[]>([])
 
-const props = defineProps({
-    selectedRow: {
-        type: Object as PropType<Model.TjmdTradeOrderDetailRsp>,
-        required: true,
-    }
-})
-
 const { pageIndex } = useRequest(queryTjmdTradeOrderDetail, {
     params: {
         goodsid: goodsId,
@@ -75,9 +70,10 @@ const { pageIndex } = useRequest(queryTjmdTradeOrderDetail, {
 })
 
 const columns: Model.TableColumn[] = [
-    { prop: 'fixedprice', label: '价格' },
+    { prop: 'orderprice', label: '价格' },
     { prop: 'orderqty', label: '数量' },
     { prop: 'username', label: '挂牌方' },
+    { prop: 'operate', label: '摘牌' },
 ]
 
 const onDelisting = (row: Model.TjmdTradeOrderDetailRsp, value: number) => {

+ 5 - 5
src/packages/mobile/views/swap/list/Index.vue

@@ -4,8 +4,8 @@
             <app-navbar title="掉期贸易" :show-back-button="false" />
         </template>
         <app-list :columns="columns" :data-list="tableList">
-            <template #goodsname="{ value }">
-                <span @click="$router.push({ name: 'swap-detail' })">{{ value }}</span>
+            <template #goodsname="{ row }">
+                <span @click="$router.push({ name: 'swap-detail', query: { id: row.goodsid } })">{{ row.goodsname }}</span>
             </template>
             <!-- 当前价 -->
             <template #last="{ row }">
@@ -56,22 +56,22 @@ const { dataList } = useRequest(queryQuoteGoodsList, {
     },
     onSuccess: (res) => {
         const goodsCodes = res.data.map((e) => e.refgoodscode)
-        const subscribe = quoteSocket.addSubscribe(goodsCodes, subscribeId)
+        const subscribe = quoteSocket.addSubscribe(goodsCodes,  subscribeId)
         subscribe.start()
     }
 })
 
 const tableList = computed(() => {
-    return dataList.value.map(({ refgoodscode, decimalplace }) => {
+    return dataList.value.map(({ refgoodscode, decimalplace, goodsid }) => {
         const quote = futuresStore.getQuoteInfo(refgoodscode)
         const { goodsname, lastColor, openedColor, lowestColor, highestColor, last, presettle, rise, change, amplitude, highest, lowest, opened } = quote.value ?? {}
-
         return {
             goodsname,
             lastColor,
             openedColor,
             lowestColor,
             highestColor,
+            goodsid,
             last: handleNumberValue(last),
             rise: handleNumberValue(rise?.toFixed(decimalplace)),
             change: parsePercent(change),