Handy_Cao 3 rokov pred
rodič
commit
313012750e

+ 1 - 5
src/packages/mobile/views/home/components/main/index.less

@@ -79,10 +79,8 @@
         display         : flex;
         align-items     : center;
         background-color: #fff;
-        margin-bottom   : .2rem;
         padding         : .16rem;
-        border-top      : 5px solid #f0f0f0;
-        border-bottom   : 5px solid #f0f0f0;
+        margin-top      : .2rem;
 
         .left {
             display        : flex;
@@ -91,7 +89,6 @@
             align-items    : center;
             padding        : .24rem;
             border-right   : 1px solid #eee;
-            width: 33%;
 
             h2 {
                 font-size: .36rem;
@@ -108,7 +105,6 @@
             flex   : 1;
             padding: 0 .24rem;
             
-
             table {
                 width    : 100%;
                 font-size: .24rem;

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

@@ -38,7 +38,7 @@
       <div class="home-main__market">
         <div class="left">
           <h2>合金指数</h2>
-          <span>{{ formatDate(marketRun.tradedate, "YYYY-MM-DD") }}</span>
+          <span>{{ formatDate(marketRun.tradedate ?? Date(), "YYYY-MM-DD") }}</span>
         </div>
         <div class="right">
           <table cellspacing="0" cellpadding="0">
@@ -91,7 +91,7 @@ const refreshing = shallowRef(false) // 是否处于加载中状态
 const topBanners = shallowRef<Model.ImageConfigsRsp[]>([])   // 轮播图列表
 const bodyBanners = shallowRef<Model.ImageConfigsRsp[]>([])  // 轮播图列表
 const newsList = shallowRef<Model.SiteColumnDetailRsp[]>([]) // 资讯列表
-const marketRun = shallowRef<Model.MarketRunRsp>({}) // 资讯列表
+const marketRun = shallowRef<Partial<Model.MarketRunRsp>>({})         // 市场
 
 const {dataList, getQuerySpotGoodsPriceLists} = useQuerySpotGoodsPriceLists()
 getQuerySpotGoodsPriceLists()

+ 4 - 0
src/types/model/goods.d.ts

@@ -214,10 +214,14 @@ declare namespace Model {
 
     /** 获取现货行情 响应 */
     interface SpotGoodsPriceRsp {
+        /// 涨跌幅
+        chg: string
         /// 报价货币ID
         currencyid: number
         /// 现货品种ID
         deliverygoodsid: number
+        /// 上日价格
+        prespotgoodsprice: number
         /// 现货品牌ID(通用则为0, 不为0则须先有商品ID)
         spotgoodsbrandid: number
         /// 【最新价】当前价格