li.shaoyi 3 년 전
부모
커밋
85e3b06250

+ 2 - 0
src/business/bank/index.ts

@@ -18,6 +18,7 @@ export function useAmountStatementList() {
             data: {
                 page: pageIndex.value,
                 pagesize: pageSize.value,
+                pageflag: 1,
                 accountID: getFirstAccountId().toString(),
             },
             success: (res) => {
@@ -54,6 +55,7 @@ export function useHisAmountStatementList() {
             data: {
                 page: pageIndex.value,
                 pagesize: pageSize.value,
+                pageflag: 1,
                 accountID: getFirstAccountId().toString(),
             },
             success: (res) => {

+ 10 - 15
src/business/goods/index.ts

@@ -78,39 +78,34 @@ export function useWrstandardDetails(wrstandardid: number) {
 }
 
 
-// 添加用户商品收藏信息
-export function useAddUserFavoriteGoods() {
+// 用户商品收藏信息
+export function useUserFavoriteGoods(goodsid: number) {
     const { getUserId } = useLoginStore()
 
-    const getAddUserFavoriteGoods = (goodsid: number) => {
+    // 添加收藏
+    const getAddUserFavoriteGoods = () => {
         return addUserFavoriteGoods({
             data: {
                 userID: getUserId(),
                 goodsID: goodsid
             },
-            success: (res) => { console.log(res) }
         })
     }
 
-    return { getAddUserFavoriteGoods }
-}
-
-
-// 移除用户商品收藏信息
-export function useRemoveUserFavoriteGoods() {
-    const { getUserId } = useLoginStore()
-
-    const getRemoveUserFavoriteGoods = (goodsid: number) => {
+    // 移除收藏
+    const getRemoveUserFavoriteGoods = () => {
         return removeUserFavoriteGoods({
             data: {
                 userID: getUserId(),
                 goodsID: goodsid
             },
-            success: (res) => { console.log(res) }
         })
     }
 
-    return { getRemoveUserFavoriteGoods }
+    return {
+        getAddUserFavoriteGoods,
+        getRemoveUserFavoriteGoods,
+    }
 }
 
 // 获取我的推广-交易数据

+ 1 - 1
src/filters/index.ts

@@ -134,7 +134,7 @@ export function formatDate(date?: string, format = 'YYYY-MM-DD HH:mm:ss') {
     if (date) {
         return moment(date).format(format)
     }
-    return moment(new Date()).format(format)
+    return '--'
 }
 
 /**

+ 1 - 1
src/hooks/echarts/line/options.ts

@@ -42,7 +42,7 @@ export function useOptions(dataset: EchartsDataset) {
             grid: {
                 left: '16px',
                 right: '16px',
-                top: '16px',
+                top: '24px',
                 bottom: '16px',
                 containLabel: true,
             },

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
src/packages/mobile/assets/iconfont/iconfont.js


+ 4 - 0
src/packages/mobile/assets/themes/global/global.less

@@ -37,6 +37,10 @@
         align-items: center;
         gap        : .2rem;
         padding    : .2rem .32rem;
+
+        &:empty {
+            display: none;
+        }
     }
 }
 

+ 5 - 3
src/packages/mobile/components/base/list/index.less

@@ -29,7 +29,7 @@
     }
 
     &__column {
-        padding: .16rem .08rem;
+        padding: .08rem;
 
         &:first-child {
             text-align  : left;
@@ -43,7 +43,9 @@
     }
 
     &__cell {
-        display       : flex;
-        flex-direction: column;
+        display        : flex;
+        flex-direction : column;
+        justify-content: center;
+        min-height     : .72rem;
     }
 }

+ 1 - 1
src/packages/mobile/components/base/pull-refresh/index.vue

@@ -15,7 +15,7 @@
 </template>
 
 <script lang="ts" setup>
-import { shallowRef, computed, nextTick, PropType } from 'vue'
+import { shallowRef, computed, nextTick } from 'vue'
 import { List, PullRefresh, ListInstance } from 'vant'
 
 const props = defineProps({

+ 3 - 3
src/packages/mobile/router/index.ts

@@ -128,15 +128,15 @@ const routes: Array<RouteRecordRaw> = [
     component: Page,
     children: [
       {
-        path: 'product',
+        path: '',
         name: 'product',
-        component: () => import('../views/product/index.vue'),
+        component: () => import('../views/product/list/index.vue'),
         meta: {
           ignoreAuth: true,
         },
       },
       {
-        path: 'productdetail',
+        path: 'detail',
         name: 'product-detail',
         component: () => import('../views/product/detail/index.vue'),
         meta: {

+ 2 - 0
src/packages/mobile/views/bank/sign/index.less

@@ -1,5 +1,7 @@
 .bank-sign {
     &__container {
+        padding-top: .2rem;
+
         .van-cell {
             &__title {
                 flex: initial;

+ 8 - 5
src/packages/mobile/views/goods/details/index.vue

@@ -26,8 +26,9 @@
                         <div class="form-qty">
                             <div class="form-qty__input">
                                 <input type="number" v-model="formData.Qty" placeholder="必填" />
-                                <span>≤{{ selectedDate?.remainqty ?? 0
-                                }}{{ getGoodsUnitName(details.goodsinfo?.unitid) }}</span>
+                                <span v-if="selectedDate">≤{{ selectedDate.remainqty }}{{
+                                        getGoodsUnitName(goodsinfo.unitid)
+                                }}</span>
                             </div>
                             <div class="form-qty__label">
                                 <span>定金{{ deposit }}元</span>
@@ -58,8 +59,8 @@
                 <Button type="primary" @click="formRef?.submit" round block>采购下单</Button>
             </div>
             <div class="titlebar" v-if="selectedDate">
-                <span>参考价(元/{{ getGoodsUnitName(details.goodsinfo?.unitid) }})</span>
-                <span>{{ selectedDate.unitprice }}</span>
+                <span>参考价(元/{{ getGoodsUnitName(goodsinfo.unitid) }})</span>
+                <span>{{ selectedDate.unitprice ?? 0.00 }}</span>
             </div>
             <template v-if="chartData.price.length">
                 <Divider>历史价格走势</Divider>
@@ -110,10 +111,12 @@ const { formData, formSubmit } = usePurchaseOrderDesting()
 const deliveryDays = shallowRef<Model.THJWrstandardDetailRsp['deliverymonth']>([])
 // 当前选中的交割日期
 const selectedDate = shallowRef<Model.THJWrstandardDetailRsp['deliverymonth'][number]>()
+// 商品信息
+const goodsinfo = computed<Partial<Model.THJWrstandardDetailRsp['goodsinfo']>>(() => details.value.goodsinfo ?? {})
 
 // 商品图片列表
 const goodsImages = computed(() => {
-    const pictureurls = details.value.goodsinfo?.pictureurls ?? ''
+    const pictureurls = goodsinfo.value.pictureurls ?? ''
     return pictureurls.split(',').map((path) => getImageUrl(path))
 })
 

+ 1 - 1
src/packages/mobile/views/home/components/mine/index.vue

@@ -92,7 +92,7 @@
         </Cell>
         <Cell is-link :to="{ name: 'rules-fpsm' }">
           <template #title>
-            <app-iconfont icon="icon-guanyuzhengce">发票说明</app-iconfont>
+            <app-iconfont icon="icon-fapiaoshuoming">发票说明</app-iconfont>
           </template>
         </Cell>
         <Cell is-link :to="{ name: 'rules-fwrx' }">

+ 1 - 0
src/packages/mobile/views/mine/order/detail/index.less

@@ -0,0 +1 @@
+.order-detail {}

+ 39 - 100
src/packages/mobile/views/mine/order/detail/index.vue

@@ -1,81 +1,42 @@
 <template>
-    <app-view class="purchasetradedetail">
+    <app-view class="order-detail g-form">
         <template #header>
             <app-navbar title="采购详情" />
         </template>
-        <div v-if="detail" class="purchasetradedetail__container">
-            <table class="purchasetradedetail__container__table" cellspacing="0" cellpadding="0">
-                <tbody>
-                    <tr class="row">
-                        <td>商品:</td>
-                        <td>{{ handleNoneValue(detail.wrstandardname) }}</td>
-                        <td>仓库:</td>
-                        <td>{{ handleNoneValue(detail.warehousename) }}</td>
-                    </tr>
-                    <tr class="row">
-                        <td>预售价:</td>
-                        <td>{{ handleNoneValue(detail.tradeprice) }}</td>
-                        <td>数量:</td>
-                        <td>{{ handleNoneValue(detail.tradeqty) }}</td>
-                    </tr>
-                    <tr class="row">
-                        <td>定金:</td>
-                        <td>{{ handleNoneValue(detail.payeddeposit) }}</td>
-                        <td>实际价:</td>
-                        <td>{{ handleNoneValue(detail.lastprice) }}</td>
-                    </tr>
-                    <tr class="row">
-                        <td>尾款:</td>
-                        <td>{{ handleNoneValue(detail.remainamount) }}</td>
-                        <td>优惠:</td>
-                        <td>{{ handleNoneValue(detail.discountamount) }}</td>
-                    </tr>
-                    <tr class="row">
-                        <td>状态:</td>
-                        <td>{{ handleNoneValue(detail.orderstatus) }}</td>
-                        <td>总货款:</td>
-                        <td>{{ handleNoneValue(detail.tradeamount) }}</td>
-                    </tr>
-                    <tr class="row">
-                        <td>提货方式:</td>
-                        <td>{{ handleNoneValue(detail.thjdeliverymodedisplay) }}</td>
-                        <td>摘牌时间:</td>
-                        <td>{{ formatDate(detail.tradetime, 'YYYY/MM/DD HH:mm:ss') }}</td>
-                    </tr>
-                    <tr class="row">
-                        <td>联系人:</td>
-                        <td>{{ handleNoneValue(detail.contactname) }}</td>
-                        <td>联系方式:</td>
-                        <td>{{ handleNoneValue(detail.contactinfo) }}</td>
-                    </tr>
-                    <tr class="row">
-                        <td>目的地地址:</td>
-                        <td colspan="3">{{ handleNoneValue(detail.desaddress) }}</td>
-                    </tr>
-                    <tr class="row">
-                        <td>发票信息:</td>
-                        <td colspan="3">{{ handleNoneValue(detail.receiptinfo )}}</td>
-                    </tr>
-                    <tr class="row">
-                        <td>合同单号:</td>
-                        <td colspan="2">{{ handleNoneValue(detail.wrtradedetailid) }}</td>
-                        <Button size="mini">查看合同</Button>
-                    </tr>
-                </tbody>
-            </table>            
+        <div v-if="detail" class="order-detail__container g-form__container">
+            <CellGroup title="采购信息">
+                <Cell title="商品" :value="detail.wrstandardname" />
+                <Cell title="仓库" :value="detail.warehousename" />
+                <Cell title="预售价" :value="detail.tradeprice" />
+                <Cell title="数量" :value="detail.tradeqty" />
+                <Cell title="定金" :value="detail.payeddeposit" />
+                <Cell title="实际价" :value="detail.lastprice" />
+                <Cell title="尾款" :value="detail.remainamount" />
+                <Cell title="状态" :value="detail.orderstatus" />
+                <Cell title="总货款" :value="detail.tradeamount" />
+                <Cell title="摘牌时间:" :value="formatDate(detail.tradetime, 'YYYY/MM/DD HH:mm:ss')" />
+            </CellGroup>
+            <CellGroup title="提货信息">
+                <Cell title="提货方式" :value="detail.thjdeliverymodedisplay" />
+                <Cell title="联系人" :value="detail.contactname" v-if="detail.contactname" />
+                <Cell title="联系方式" :value="detail.contactinfo" v-if="detail.contactinfo" />
+                <Cell title="目的地地址" :value="detail.desaddress" v-if="detail.desaddress" />
+                <Cell title="发票信息" :value="detail.receiptinfo" v-if="detail.receiptinfo" />
+                <Cell title="合同单号" :value="detail.wrtradedetailid" is-link />
+            </CellGroup>
         </div>
         <div v-else>
             <Empty />
         </div>
         <template #footer>
-            <div class="purchasetradedetail_buttonview">
-                <!-- <Button block round type="primary" v-if="detail?.orderstatus === 1">合同转让</Button>
-                <Button block round type="primary" v-if="detail?.orderstatus === 8">转让撤销</Button> -->
-                <Button block round type="primary" v-if="detail?.orderstatus === 5" @click="spotConfirmSubmit">确认交收</Button>
-                <div class="pay__buttonview">
-                    <Button block round type="primary" v-if="detail?.orderstatus === 3" @click="spotApplySubmit">违约</Button>
-                    <Button block round type="primary" v-if="detail?.orderstatus === 3" @click="spotPlaymentSubmit">支付</Button>
-                </div>
+            <div class="g-form__footer" v-if="detail">
+                <!-- <Button block round type="primary" v-if="detail.orderstatus === 1">合同转让</Button>
+                <Button block round type="primary" v-if="detail.orderstatus === 8">转让撤销</Button> -->
+                <Button block round type="primary" v-if="detail.orderstatus === 5"
+                    @click="spotConfirmSubmit">确认交收</Button>
+                <Button block round type="primary" v-if="detail.orderstatus === 3" @click="spotApplySubmit">违约</Button>
+                <Button block round type="primary" v-if="detail.orderstatus === 3"
+                    @click="spotPlaymentSubmit">支付</Button>
             </div>
         </template>
     </app-view>
@@ -83,25 +44,24 @@
 
 <script lang="ts" setup>
 
-import { shallowRef, computed, ref } from 'vue'
+import { shallowRef } from 'vue'
 import { useNavigation } from '@/hooks/navigation'
 import { fullloading, dialog } from '@/utils/vant'
-import { Empty, Button, Toast } from 'vant'
-import { handleNoneValue, formatDate } from "@/filters";
+import { CellGroup, Cell, Empty, Button, Toast } from 'vant'
+import { formatDate } from "@/filters";
 import { useSpotPresaleDeliveryConfirm, useSpotPresaleBreachOfContractApply, useSpotPresalePlayment } from "@/business/trade";
 
-const { route } = useNavigation()
+const { route, router } = useNavigation()
 const item = route.params.item
 const detail = shallowRef<Model.THJPurchaseTradeDetailRsp>()
-const { router } = useNavigation()
 
 const { confirmSubmit } = useSpotPresaleDeliveryConfirm()
-const { applySubmit} = useSpotPresaleBreachOfContractApply()
-const { playmentSubmit} = useSpotPresalePlayment()
+const { applySubmit } = useSpotPresaleBreachOfContractApply()
+const { playmentSubmit } = useSpotPresalePlayment()
 
 if (item) {
     detail.value = JSON.parse(item.toString())
-} 
+}
 
 /// 确认交收
 const spotConfirmSubmit = () => {
@@ -154,30 +114,9 @@ const spotPlaymentSubmit = () => {
         })
     })
 }
-    
+
 </script>
 
 <style lang="less">
-
-.purchasetradedetail {
-    &__container {
-        height: 100%;
-        overflow-y: auto;
-        padding: .10rem .20rem;
-    }
-
-    &_buttonview {
-        .pay__buttonview {
-            display: flex;
-            flex-direction: row;
-            justify-content: space-between;
-            padding: .1rem;
-
-            .van-button {
-                width: 45%;
-            }
-        }
-    }
-}
-
+@import './index.less';
 </style>

+ 2 - 1
src/packages/mobile/views/mine/order/list/index.less

@@ -5,7 +5,8 @@
         height        : 100%;
 
         &__content {
-            flex: 1;
+            flex       : 1;
+            padding-top: .2rem;
         }
 
         .van-tab__panel {

+ 2 - 0
src/packages/mobile/views/news/list/index.less

@@ -2,6 +2,8 @@
 
 .news-list {
     &__container {
+        padding-top: .2rem;
+
         .article-item {
             &__title {
                 span {

+ 75 - 0
src/packages/mobile/views/product/detail/index.less

@@ -0,0 +1,75 @@
+.product-details {
+    &__content {
+        .van-divider {
+            font-size  : .32rem;
+            font-weight: bold;
+            color      : #333;
+            padding    : var(--van-divider-margin);
+            margin     : 0;
+        }
+
+        .banner {
+            .van-swipe {
+                background-color: #999;
+                min-height      : 3rem;
+
+                &-item {
+                    height   : 3rem;
+                    font-size: 0;
+
+                    img {
+                        width     : 100%;
+                        height    : 100%;
+                        object-fit: cover;
+                    }
+                }
+            }
+        }
+
+        .goods {
+            position        : relative;
+            display         : flex;
+            flex-direction  : column;
+            align-items     : center;
+            background-color: #fff;
+            padding         : .32rem;
+            margin-bottom   : .2rem;
+
+            &-title {
+                line-height: 1;
+                font-size  : .36rem;
+                font-weight: bold;
+            }
+
+            &-price {
+                margin-top: .12rem;
+
+                span {
+                    &.red {
+                        font-size  : .48rem;
+                        font-weight: bold;
+                        color      : #E84F42;
+                        margin     : 0 .12rem;
+                    }
+                }
+            }
+
+            &-favorite {
+                position : absolute;
+                right    : .32rem;
+                top      : 50%;
+                font-size: .48rem;
+                transform: translateY(-50%);
+            }
+        }
+
+        .chart {
+            background-color: #fff;
+            margin-bottom   : .2rem;
+        }
+
+        .gallery {
+            background-color: #fff;
+        }
+    }
+}

+ 47 - 35
src/packages/mobile/views/product/detail/index.vue

@@ -1,23 +1,28 @@
 <template>
-    <app-view class="productdetail">
-      <template #header>
-        <app-navbar class="productdetail__header" title="商品详情" />
-      </template>
-      <Swipe :autoplay="3000" indicator-color="white" lazy-render>
-        <SwipeItem v-for="(item, index) in topBanners" :key="index">
-          <img :src="getImageUrl(item)" />
-        </SwipeItem>
-      </Swipe>
-      
-      <div class="goods-details__container">
-            <div class="goods-details__container price">
-                <span>{{ details.goodsinfo?.wrstandardname }}</span>
-                <span> 参考价 {{ details.goodsinfo?.spotgoodsprice ?? 0.0 }}元/{{ getGoodsUnitName(details.goodsinfo?.unitid) }} </span>
-                <Button icon="{{ active === 0 ? 'star-o' : 'start' }}" @click="favorite"></Button>
+    <app-view class="product-details">
+        <template #header>
+            <app-navbar title="商品详情" />
+        </template>
+        <div class="product-details__content">
+            <Swipe class="banner" :autoplay="3000" indicator-color="white" lazy-render>
+                <SwipeItem v-for="(item, index) in topBanners" :key="index">
+                    <img :src="getImageUrl(item)" />
+                </SwipeItem>
+            </Swipe>
+            <div class="goods">
+                <h1 class="goods-title">{{ goodsinfo.wrstandardname }}</h1>
+                <div class="goods-price">
+                    <span>参考价</span>
+                    <span class="red">{{ goodsinfo.spotgoodsprice ?? 0.00 }}</span>
+                    <span>元/{{ getGoodsUnitName(goodsinfo.unitid) }}</span>
+                </div>
+                <Icon class="goods-favorite" :name="isFavorite ? 'star-o' : 'star'" @click="favorite" />
             </div>
-            <Divider>历史价格走势</Divider>
-            <Divider>商品详情</Divider>
-            <div class="">
+            <div class="chart" v-if="chartData.price.length">
+                <component :is="componentMap.get('chart')" :loading="loading" :data-list="chartData" />
+            </div>
+            <div class="gallery">
+                <Divider>商品详情</Divider>
                 <template v-for="(url, index) in goodsImages" :key="index">
                     <img :src="url" alt="" />
                 </template>
@@ -27,44 +32,51 @@
 </template>
 
 <script lang="ts" setup>
-
-import { computed } from 'vue'
+import { defineAsyncComponent, computed, shallowRef } from 'vue'
 import { useNavigation } from '@/hooks/navigation'
-import { Divider, Swipe, SwipeItem, Button } from 'vant'
+import { Divider, Swipe, SwipeItem, Icon } from 'vant'
 import { getImageUrl } from "@/filters";
-import { useWrstandardDetails, useAddUserFavoriteGoods, useRemoveUserFavoriteGoods } from '@/business/goods'
+import { useWrstandardDetails, useUserFavoriteGoods } from '@/business/goods'
 import { getGoodsUnitName } from '@/constants/unit'
 
+const componentMap = new Map<string, unknown>([
+    ['chart', defineAsyncComponent(() => import('@mobile/components/modules/echarts-line/index.vue'))],
+])
+
 const { getQueryStringToNumber } = useNavigation()
 const wrstandardid = getQueryStringToNumber('wrstandardid')
-var active = getQueryStringToNumber('active')
-const { details, getWrstandardDetails } = useWrstandardDetails(wrstandardid)
-const { getAddUserFavoriteGoods } = useAddUserFavoriteGoods()
-const { getRemoveUserFavoriteGoods } = useRemoveUserFavoriteGoods()
+const isFavorite = shallowRef(getQueryStringToNumber('favorite'))
+const { loading, chartData, details, getWrstandardDetails } = useWrstandardDetails(wrstandardid)
+const { getAddUserFavoriteGoods, getRemoveUserFavoriteGoods } = useUserFavoriteGoods(wrstandardid)
+
+const goodsinfo = computed<Partial<Model.THJWrstandardDetailRsp['goodsinfo']>>(() => details.value.goodsinfo ?? {})
 
 // 商品图片列表
 const goodsImages = computed(() => {
-    const pictureurls = details?.value.goodsinfo?.pictureurls ?? ''
+    const pictureurls = goodsinfo.value.pictureurls ?? ''
     return pictureurls.split(',').map((path) => getImageUrl(path))
 })
 
 // 商品banner
 const topBanners = computed(() => {
-    const bannerpicurls = details?.value.goodsinfo?.bannerpicurl ?? ''
+    const bannerpicurls = goodsinfo.value.bannerpicurl ?? ''
     return bannerpicurls.split(',').map((path) => getImageUrl(path))
 })
 
 /// 收藏
 const favorite = () => {
-    if (active === 0) {
-        active = 1
-        getAddUserFavoriteGoods(wrstandardid)
+    if (isFavorite.value === 1) {
+        isFavorite.value = 0
+        getAddUserFavoriteGoods()
     } else {
-        active = 0 
-        getRemoveUserFavoriteGoods(wrstandardid)
+        isFavorite.value = 1
+        getRemoveUserFavoriteGoods()
     }
 }
 
 getWrstandardDetails()
-    
-</script>
+</script>
+
+<style lang="less">
+@import './index.less';
+</style>

+ 0 - 26
src/packages/mobile/views/product/index.less

@@ -1,26 +0,0 @@
-.product {
-    &__header {
-        .van-search {
-            padding-top: 0;
-        }
-    }
-
-    &__container {
-        .van-cell__title {
-            display    : flex;
-            align-items: center;
-
-            img {
-                width        : 1rem;
-                height       : 1rem;
-                object-fit   : cover;
-                border-radius: .16rem;
-                margin-right : .4rem;
-            }
-
-            span {
-                flex: 1;
-            }
-        }
-    }
-}

+ 28 - 0
src/packages/mobile/views/product/list/index.less

@@ -0,0 +1,28 @@
+.product {
+    &__container {
+        padding-top: .2rem;
+
+        .van-cell {
+            &__value {
+                display    : flex;
+                align-items: center;
+
+                img {
+                    width        : 1rem;
+                    height       : 1rem;
+                    object-fit   : cover;
+                    border-radius: .16rem;
+                    margin-right : .4rem;
+                }
+
+                span {
+                    flex: 1;
+                }
+
+                .van-button {
+                    width: 2rem;
+                }
+            }
+        }
+    }
+}

+ 15 - 12
src/packages/mobile/views/product/index.vue → src/packages/mobile/views/product/list/index.vue

@@ -1,25 +1,22 @@
 <template>
-  <app-view class="product">
+  <app-view class="product" flex>
     <template #header>
-      <app-navbar class="product__header" title="产品介绍" />
+      <app-navbar title="产品介绍" />
     </template>
-    <Tabs class="product__tabs" v-model:active="active" @change="onClickTab">
-      <Tab title="已关注" :name="0">
-        <Empty v-if="dataList.length === 0" />
-      </Tab>
-      <Tab title="未关注" :name="1">
-        <Empty v-if="dataList.length === 0" />
-      </Tab>
+    <Tabs v-model:active="active" @change="onClickTab">
+      <Tab title="已关注" />
+      <Tab title="未关注" />
     </Tabs>
     <app-pull-refresh ref="pullRefreshRef" class="product__container" v-model:error="error"
       v-model:pageIndex="pageIndex" :page-count="pageCount" @refresh="onRefresh">
+      <Empty v-if="dataList.length === 0" />
       <template v-for="(item, index) in dataList" :key="index">
         <Cell>
-          <template #title>
-            <img :src="getImageUrl(item.bannerpicurl)" />
+          <template #value>
+            <img :src="getFirstImage(item.thumurls)" />
             <span>{{ item.wrstandardname }}</span>
             <Button type="primary" round size="small"
-              @click="$router.push({ name: 'product-detail', query: { wrstandardid: item.wrstandardid, active: active } })">立即进入</Button>
+              @click="$router.push({ name: 'product-detail', query: { favorite: active, wrstandardid: item.wrstandardid } })">立即进入</Button>
           </template>
         </Cell>
       </template>
@@ -39,6 +36,12 @@ const pullRefreshRef = shallowRef()
 const dataList = shallowRef<Model.THJProductRsp[]>([])
 const error = shallowRef(false)
 
+// 获取产品首图
+const getFirstImage = (url: string) => {
+  const images = url.split(',').map((path) => getImageUrl(path))
+  return images[0] ?? ''
+}
+
 // Tab触发
 const onClickTab = () => {
   pullRefreshRef.value?.refresh()

+ 3 - 1
src/types/model/bank.d.ts

@@ -157,6 +157,7 @@ declare namespace Model {
         accountID: string; // 资金账户 - 格式:1,2,3
         page?: number; // 页码
         pagesize?: number; // 每页条数
+        pageflag?: number; // 分页标志 0-page从0开始 1-page从1开始
         OperateType?: string; // 资金操作类型 - 格式:1,2,3
         startDate?: string; // 开始时间 - 闭区间,格式:yyyy-MM-dd
         endDate?: string; // 结束时间 - 闭区间,格式:yyyy-MM-dd
@@ -197,7 +198,7 @@ declare namespace Model {
         // 用户状态 1:正常 2:注销
         userstatus?: number,
         // 用户id
-        userid: number 
+        userid: number
     }
 
     interface AddAuthReq {
@@ -221,6 +222,7 @@ declare namespace Model {
         page?: number
         // 每页条数
         pagesize?: number
+        pageflag?: number; // 分页标志 0-page从0开始 1-page从1开始
         // 资金账户 - 格式:1,2,3
         accountID: string
         // 资金操作类型 - 格式:1,2,3

+ 2 - 2
src/types/model/goods.d.ts

@@ -21,8 +21,7 @@ declare namespace Model {
         decimalplace: number;//报价小数位
         delistingdate: string;//商品退市时间(状态:退市) – 已作废
         delistingmode: number;//退市方式 - 1:退市平仓 2:退市交收 3:不处理(仅期权\币币兑换)
-        deliveryflag: number;//交割标志 - number;
-        //:不可交割 1:可交割
+        deliveryflag: number;//交割标志 - number;0:不可交割 1:可交割
         forceclosemode: number;//定期强平方式 - 1:无 2:每日 3:每周 4:每月[收益权]
         forceclosevalue: number;//定期强平参数 [收益权]
         goodscode: string;//商品代码(内部)
@@ -203,6 +202,7 @@ declare namespace Model {
         wrstandardid: string
         /// 现货商品名称
         wrstandardname: string
+        thumurls: string;
     }
 
     /** 获取现货行情 请求 */

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.